Documentation
¶
Index ¶
- Constants
- func WriteMessage(w io.Writer, msg *Message) error
- type AttachPayload
- type Client
- type Conn
- type CreatePanePayload
- type CreatePaneReqPayload
- type CreatePaneRespPayload
- type CreateTabPayload
- type DestroyPanePayload
- type DestroyPaneReqPayload
- type DestroyPaneRespPayload
- type DestroyTabPayload
- type DismissEventPayload
- type GetNotificationsRespPayload
- type HighlightPanePayload
- type ListPanesRespPayload
- type ListTabsRespPayload
- type Message
- type MessageHandler
- type PaneEventPayload
- type PaneInfo
- type PaneInputPayload
- type PaneOutputPayload
- type PaneStatusReqPayload
- type PaneStatusRespPayload
- type PluginErrorPayload
- type ReadPaneOutputReqPayload
- type ReadPaneOutputRespPayload
- type ResizePanePayload
- type RestartPaneReqPayload
- type RestartPaneRespPayload
- type ScreenshotPaneReqPayload
- type ScreenshotPaneRespPayload
- type Server
- type SetActivePanePayload
- type SwitchTabPayload
- type SwitchTabReqPayload
- type SwitchTabRespPayload
- type TabInfo
- type UpdateLayoutPayload
- type UpdatePanePayload
- type UpdateTabPayload
- type WatchNotificationsReqPayload
- type WatchNotificationsRespPayload
Constants ¶
View Source
const ( // Lifecycle MsgAttach = "attach" MsgDetach = "detach" MsgShutdown = "shutdown" MsgHeartbeat = "heartbeat" // Session control (Client -> Daemon) MsgCreatePane = "create_pane" MsgDestroyPane = "destroy_pane" MsgResizePane = "resize_pane" MsgUpdatePane = "update_pane" MsgUpdateLayout = "update_layout" // Tab control (Client -> Daemon) MsgCreateTab = "create_tab" MsgDestroyTab = "destroy_tab" MsgSwitchTab = "switch_tab" MsgUpdateTab = "update_tab" // I/O (bidirectional) MsgPaneInput = "pane_input" MsgPaneOutput = "pane_output" // State sync (Daemon -> Client) MsgWorkspaceState = "workspace_state" MsgStateUpdate = "state_update" // Plugin (Daemon -> Client) MsgPluginError = "plugin_error" // Plugin management (Client -> Daemon) MsgReloadPlugins = "reload_plugins" // MCP request-response (Client -> Daemon -> Client) MsgListPanesReq = "list_panes_req" MsgListPanesResp = "list_panes_resp" MsgReadPaneOutputReq = "read_pane_output_req" MsgReadPaneOutputResp = "read_pane_output_resp" MsgPaneStatusReq = "pane_status_req" MsgPaneStatusResp = "pane_status_resp" MsgCreatePaneReq = "create_pane_req" MsgCreatePaneResp = "create_pane_resp" MsgRestartPaneReq = "restart_pane_req" MsgRestartPaneResp = "restart_pane_resp" MsgScreenshotPaneReq = "screenshot_pane_req" MsgScreenshotPaneResp = "screenshot_pane_resp" MsgSwitchTabReq = "switch_tab_req" MsgSwitchTabResp = "switch_tab_resp" MsgListTabsReq = "list_tabs_req" MsgListTabsResp = "list_tabs_resp" MsgDestroyPaneReq = "destroy_pane_req" MsgDestroyPaneResp = "destroy_pane_resp" MsgSetActivePane = "set_active_pane" // broadcast to TUI MsgCloseTUI = "close_tui" // broadcast to TUI MsgHighlightPane = "highlight_pane" // broadcast to TUI (MCP interaction indicator) // Notification center (M12) MsgPaneEvent = "pane_event" // broadcast to TUI MsgDismissEvent = "dismiss_event" // client → daemon MsgGetNotificationsReq = "get_notifications_req" // MCP request MsgGetNotificationsResp = "get_notifications_resp" // MCP response MsgWatchNotificationsReq = "watch_notifications_req" // MCP request (blocking) MsgWatchNotificationsResp = "watch_notifications_resp" // MCP response )
Message type constants
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AttachPayload ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client connects to the daemon over a Unix socket.
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn wraps a net.Conn with message framing.
type CreatePanePayload ¶
type CreatePaneReqPayload ¶
type CreatePaneRespPayload ¶
type CreateTabPayload ¶
type CreateTabPayload struct {
Name string `json:"name"`
}
type DestroyPanePayload ¶
type DestroyPanePayload struct {
PaneID string `json:"pane_id"`
}
type DestroyPaneReqPayload ¶
type DestroyPaneReqPayload struct {
PaneID string `json:"pane_id"`
}
type DestroyPaneRespPayload ¶
type DestroyPaneRespPayload struct {
Success bool `json:"success"`
}
type DestroyTabPayload ¶
type DestroyTabPayload struct {
TabID string `json:"tab_id"`
}
type DismissEventPayload ¶
type DismissEventPayload struct {
EventID string `json:"event_id"` // empty = dismiss all
}
type GetNotificationsRespPayload ¶
type GetNotificationsRespPayload struct {
Events []PaneEventPayload `json:"events"`
}
type HighlightPanePayload ¶
type HighlightPanePayload struct {
PaneID string `json:"pane_id"`
}
type ListPanesRespPayload ¶
type ListPanesRespPayload struct {
Panes []PaneInfo `json:"panes"`
}
type ListTabsRespPayload ¶
type ListTabsRespPayload struct {
Tabs []TabInfo `json:"tabs"`
}
type Message ¶
type Message struct {
Type string `json:"type"`
ID string `json:"id,omitempty"` // request-response correlation (MCP bridge)
Payload json.RawMessage `json:"payload,omitempty"`
}
Message is the wire format for IPC communication.
func NewMessage ¶
NewMessage creates a Message with a typed payload.
func ReadMessage ¶
ReadMessage reads a length-prefixed JSON message from r.
func (*Message) DecodePayload ¶
DecodePayload unmarshals the message payload into the given target.
type MessageHandler ¶
MessageHandler is called for each incoming message on a connection.
type PaneEventPayload ¶
type PaneEventPayload struct {
ID string `json:"id"`
PaneID string `json:"pane_id"`
TabID string `json:"tab_id"`
PaneName string `json:"pane_name"`
Type string `json:"type"`
Title string `json:"title"`
Message string `json:"message,omitempty"`
Severity string `json:"severity"`
Timestamp int64 `json:"timestamp"`
Data map[string]string `json:"data,omitempty"`
}
type PaneInputPayload ¶
type PaneOutputPayload ¶
type PaneStatusReqPayload ¶
type PaneStatusReqPayload struct {
PaneID string `json:"pane_id"`
}
type PaneStatusRespPayload ¶
type PluginErrorPayload ¶
type ResizePanePayload ¶
type RestartPaneReqPayload ¶
type RestartPaneReqPayload struct {
PaneID string `json:"pane_id"`
}
type RestartPaneRespPayload ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server listens for client connections over a Unix socket.
func NewServer ¶
func NewServer(socketPath string, handler MessageHandler, onDisconnect func(*Conn)) *Server
type SetActivePanePayload ¶
type SetActivePanePayload struct {
PaneID string `json:"pane_id"`
}
type SwitchTabPayload ¶
type SwitchTabPayload struct {
TabID string `json:"tab_id"`
}
type SwitchTabReqPayload ¶
type SwitchTabReqPayload struct {
TabID string `json:"tab_id"`
}
type SwitchTabRespPayload ¶
type SwitchTabRespPayload struct {
TabID string `json:"tab_id"`
}
type UpdateLayoutPayload ¶
type UpdateLayoutPayload struct {
TabID string `json:"tab_id"`
Layout json.RawMessage `json:"layout"`
}
type UpdatePanePayload ¶
type UpdateTabPayload ¶
type WatchNotificationsRespPayload ¶
type WatchNotificationsRespPayload struct {
Event *PaneEventPayload `json:"event,omitempty"`
Timeout bool `json:"timeout"`
}
Click to show internal directories.
Click to hide internal directories.