Documentation
¶
Index ¶
- type Client
- func (c *Client) AnswerPermission(runtimeID, requestID, optionID string) error
- func (c *Client) Call(method string, params any, result any) error
- func (c *Client) Cancel(runtimeID string) error
- func (c *Client) Close() error
- func (c *Client) Events() <-chan Event
- func (c *Client) InterruptAndPrompt(runtimeID, text string, keepQueue bool) error
- func (c *Client) List() ([]map[string]any, error)
- func (c *Client) Prompt(runtimeID, text string) error
- func (c *Client) Shutdown(mode string) error
- func (c *Client) Spawn(params map[string]any) (map[string]any, error)
- func (c *Client) Status(runtimeID string) (map[string]any, error)
- type Event
- type Notification
- type Request
- type RespError
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AnswerPermission ¶
AnswerPermission answers a pending permission request.
func (*Client) Events ¶
Events returns a channel of server-sent events. Only one subscriber is supported. Call before any Call() to avoid missing events.
func (*Client) InterruptAndPrompt ¶
InterruptAndPrompt cancels the current turn and starts a new prompt.
type Event ¶
type Event struct {
Event string `json:"event"`
SessionID string `json:"session_id,omitempty"`
RuntimeID string `json:"runtime_id,omitempty"`
Raw map[string]any `json:"-"`
}
func (*Event) UnmarshalJSON ¶
type Notification ¶
type Notification struct {
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
}
type Request ¶
type Request struct {
JSONRPC string `json:"jsonrpc"`
ID any `json:"id,omitempty"`
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.