Documentation
¶
Index ¶
- Constants
- func DecodePayload(m Envelope, target any) error
- func EncodeControl(msgType string, payload any) ([]byte, error)
- type ApprovalDecisionMsg
- type ApprovalInfo
- type ApprovalNotificationMsg
- type ApprovalRequestMsg
- type ApprovalRespondMsg
- type AttachMsg
- type ContextReport
- type CreateMsg
- type DeleteMsg
- type DetachedMsg
- type Envelope
- type ErrorMsg
- type FleetSummary
- type ForkMsg
- type Frame
- type FrameReader
- type FrameWriter
- type HandshakeErrMsg
- type HandshakeMsg
- type HandshakeOkMsg
- type IncludedRepoInfo
- type LogsMsg
- type MsgAckMsg
- type MsgPubMsg
- type MsgSubMsg
- type MsgTopicsMsg
- type RenameMsg
- type ResizeMsg
- type ResumeMsg
- type ScreenPreviewMsg
- type ScreenPreviewResponseMsg
- type ScreenSnapshotMsg
- type ScreenSnapshotResponseMsg
- type SessionInfo
- type SessionListMsg
- type StatusReportMsg
- type StatusRequestMsg
- type StatusResponseMsg
- type StopMsg
- type TypeMsg
- type UpgradeMsg
- type UsageReport
Constants ¶
View Source
const ( ChannelControl = byte(0x00) ChannelData = byte(0x01) MaxPayload = 4 * 1024 * 1024 )
View Source
const Version = "1.0"
Variables ¶
This section is empty.
Functions ¶
func DecodePayload ¶
Types ¶
type ApprovalDecisionMsg ¶ added in v0.13.0
type ApprovalInfo ¶ added in v0.13.0
type ApprovalInfo struct {
RequestID string `json:"request_id"`
SessionID string `json:"session_id"`
SessionName string `json:"session_name"`
ToolName string `json:"tool_name"`
ToolInput string `json:"tool_input,omitempty"`
Agent string `json:"agent"`
RepoName string `json:"repo_name"`
RequestedAt string `json:"requested_at"`
}
type ApprovalNotificationMsg ¶ added in v0.13.0
type ApprovalNotificationMsg struct {
Pending []ApprovalInfo `json:"pending"`
}
type ApprovalRequestMsg ¶ added in v0.13.0
type ApprovalRequestMsg struct {
RequestID string `json:"request_id"`
SessionID string `json:"session_id"`
ToolName string `json:"tool_name"`
ToolInput string `json:"tool_input,omitempty"`
}
ApprovalRequestMsg is sent by the hook CLI (gr approve-request) to the daemon. The handler blocks until a decision is made.
type ApprovalRespondMsg ¶ added in v0.13.0
type ContextReport ¶ added in v0.11.0
type CreateMsg ¶
type CreateMsg struct {
Name string `json:"name"`
ParentID string `json:"parent_id,omitempty"`
Agent string `json:"agent"`
RepoPath string `json:"repo_path"`
Base string `json:"base,omitempty"`
Prompt string `json:"prompt,omitempty"`
NoRepo bool `json:"no_repo,omitempty"`
AgentHooks bool `json:"agent_hooks,omitempty"`
InPlace bool `json:"in_place,omitempty"`
AllowConcurrent bool `json:"allow_concurrent,omitempty"`
}
type DetachedMsg ¶
type DetachedMsg struct {
Reason string `json:"reason"`
}
type Envelope ¶
type Envelope struct {
Type string `json:"type"`
Payload json.RawMessage `json:"payload,omitempty"`
}
func DecodeControl ¶
type FleetSummary ¶ added in v0.7.0
type FrameReader ¶
type FrameReader struct {
// contains filtered or unexported fields
}
func NewFrameReader ¶
func NewFrameReader(r io.Reader) *FrameReader
func (*FrameReader) ReadFrame ¶
func (fr *FrameReader) ReadFrame() (Frame, error)
type FrameWriter ¶
type FrameWriter struct {
// contains filtered or unexported fields
}
func NewFrameWriter ¶
func NewFrameWriter(w io.Writer) *FrameWriter
func (*FrameWriter) WriteFrame ¶
func (fw *FrameWriter) WriteFrame(channel byte, payload []byte) error
type HandshakeErrMsg ¶
type HandshakeErrMsg struct {
Reason string `json:"reason"`
}
type HandshakeMsg ¶
type HandshakeMsg struct {
Version string `json:"version"`
ClientID string `json:"client_id"`
TerminalSize [2]uint16 `json:"terminal_size"`
Cwd string `json:"cwd"`
Profile string `json:"profile,omitempty"`
}
Client -> Daemon
type HandshakeOkMsg ¶
type HandshakeOkMsg struct {
Version string `json:"version"`
DaemonVersion string `json:"daemon_version"`
}
Daemon -> Client
type IncludedRepoInfo ¶ added in v0.19.0
type MsgTopicsMsg ¶
type ScreenPreviewMsg ¶ added in v0.2.0
type ScreenPreviewMsg struct {
SessionID string `json:"session_id"`
}
type ScreenPreviewResponseMsg ¶ added in v0.2.0
type ScreenSnapshotMsg ¶ added in v0.2.0
type ScreenSnapshotMsg struct {
SessionID string `json:"session_id"`
}
type ScreenSnapshotResponseMsg ¶ added in v0.2.0
type SessionInfo ¶
type SessionInfo struct {
ID string `json:"id"`
ParentID string `json:"parent_id,omitempty"`
Name string `json:"name"`
RepoPath string `json:"repo_path"`
RepoName string `json:"repo_name"`
WorktreePath string `json:"worktree_path"`
Branch string `json:"branch"`
BaseBranch string `json:"base_branch"`
Agent string `json:"agent"`
AgentSessionID string `json:"agent_session_id,omitempty"`
Status string `json:"status"`
AgentStatus string `json:"agent_status,omitempty"`
ExitCode *int `json:"exit_code,omitempty"`
CreatedAt string `json:"created_at"`
LastAttachedAt string `json:"last_attached_at,omitempty"`
Dirty bool `json:"dirty,omitempty"`
UnpushedCount int `json:"unpushed_count,omitempty"`
Sandboxed bool `json:"sandboxed,omitempty"`
InPlace bool `json:"in_place,omitempty"`
Model string `json:"model,omitempty"`
ToolName string `json:"tool_name,omitempty"`
CostUSD *float64 `json:"cost_usd,omitempty"`
ContextPercent *float64 `json:"context_percent,omitempty"`
Includes []IncludedRepoInfo `json:"includes,omitempty"`
}
type SessionListMsg ¶
type SessionListMsg struct {
Sessions []SessionInfo `json:"sessions"`
}
type StatusReportMsg ¶ added in v0.11.0
type StatusReportMsg struct {
SessionID string `json:"session_id"`
Event string `json:"event"`
Status string `json:"status,omitempty"`
ToolName string `json:"tool_name,omitempty"`
Model string `json:"model,omitempty"`
Usage *UsageReport `json:"usage,omitempty"`
Context *ContextReport `json:"context,omitempty"`
}
Client -> Daemon (hook reporting)
type StatusRequestMsg ¶ added in v0.3.0
type StatusRequestMsg struct {
SessionID string `json:"session_id"`
}
type StatusResponseMsg ¶ added in v0.3.0
type StatusResponseMsg struct {
Session SessionInfo `json:"session"`
UnreadCount int `json:"unread_count"`
Fleet FleetSummary `json:"fleet"`
}
type UpgradeMsg ¶ added in v0.16.3
type UpgradeMsg struct {
ExecPath string `json:"exec_path,omitempty"`
}
type UsageReport ¶ added in v0.11.0
Click to show internal directories.
Click to hide internal directories.