diff --git a/gsd-openclaw/src/gsd_openclaw/response_formatter.py b/gsd-openclaw/src/gsd_openclaw/response_formatter.py new file mode 100644 index 0000000..a7d7a9b --- /dev/null +++ b/gsd-openclaw/src/gsd_openclaw/response_formatter.py @@ -0,0 +1,25 @@ +""" +Response formatter for Feishu Card messages. + +This module provides classes for formatting responses as Feishu Card JSON 2.0 +messages with three-zone structure (header/content/actions). +""" +from dataclasses import dataclass +from typing import Dict, Any, List, Optional +from enum import Enum + + +class CardTheme(Enum): + """Theme colors for Feishu Card messages.""" + SUCCESS = "green" + ERROR = "red" + INFO = "blue" + WARNING = "orange" + + +@dataclass +class CardButton: + """Interactive button for Feishu Card actions.""" + text: str + value: Dict[str, Any] + button_type: str = "primary" # primary, default, danger