Documentation
¶
Index ¶
- type AccountGetQuotaResult
- type AccountRpcApi
- type AgentElement
- type AgentRpcApi
- func (a *AgentRpcApi) Deselect(ctx context.Context) (*SessionAgentDeselectResult, error)
- func (a *AgentRpcApi) GetCurrent(ctx context.Context) (*SessionAgentGetCurrentResult, error)
- func (a *AgentRpcApi) List(ctx context.Context) (*SessionAgentListResult, error)
- func (a *AgentRpcApi) Select(ctx context.Context, params *SessionAgentSelectParams) (*SessionAgentSelectResult, error)
- type Billing
- type Capabilities
- type CompactionRpcApi
- type FleetRpcApi
- type Limits
- type Mode
- type ModeRpcApi
- type Model
- type ModelRpcApi
- type ModelsListResult
- type ModelsRpcApi
- type PingParams
- type PingResult
- type PlanRpcApi
- type Policy
- type QuotaSnapshot
- type ServerRpc
- type SessionAgentDeselectResult
- type SessionAgentGetCurrentResult
- type SessionAgentGetCurrentResultAgent
- type SessionAgentListResult
- type SessionAgentSelectParams
- type SessionAgentSelectResult
- type SessionAgentSelectResultAgent
- type SessionCompactionCompactResult
- type SessionFleetStartParams
- type SessionFleetStartResult
- type SessionModeGetResult
- type SessionModeSetParams
- type SessionModeSetResult
- type SessionModelGetCurrentResult
- type SessionModelSwitchToParams
- type SessionModelSwitchToResult
- type SessionPlanDeleteResult
- type SessionPlanReadResult
- type SessionPlanUpdateParams
- type SessionPlanUpdateResult
- type SessionRpc
- type SessionWorkspaceCreateFileParams
- type SessionWorkspaceCreateFileResult
- type SessionWorkspaceListFilesResult
- type SessionWorkspaceReadFileParams
- type SessionWorkspaceReadFileResult
- type Supports
- type Tool
- type ToolsListParams
- type ToolsListResult
- type ToolsRpcApi
- type WorkspaceRpcApi
- func (a *WorkspaceRpcApi) CreateFile(ctx context.Context, params *SessionWorkspaceCreateFileParams) (*SessionWorkspaceCreateFileResult, error)
- func (a *WorkspaceRpcApi) ListFiles(ctx context.Context) (*SessionWorkspaceListFilesResult, error)
- func (a *WorkspaceRpcApi) ReadFile(ctx context.Context, params *SessionWorkspaceReadFileParams) (*SessionWorkspaceReadFileResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountGetQuotaResult ¶
type AccountGetQuotaResult struct {
// Quota snapshots keyed by type (e.g., chat, completions, premium_interactions)
QuotaSnapshots map[string]QuotaSnapshot `json:"quotaSnapshots"`
}
type AccountRpcApi ¶
type AccountRpcApi struct {
// contains filtered or unexported fields
}
func (*AccountRpcApi) GetQuota ¶
func (a *AccountRpcApi) GetQuota(ctx context.Context) (*AccountGetQuotaResult, error)
type AgentElement ¶ added in v0.1.28
type AgentRpcApi ¶ added in v0.1.28
type AgentRpcApi struct {
// contains filtered or unexported fields
}
func (*AgentRpcApi) Deselect ¶ added in v0.1.28
func (a *AgentRpcApi) Deselect(ctx context.Context) (*SessionAgentDeselectResult, error)
func (*AgentRpcApi) GetCurrent ¶ added in v0.1.28
func (a *AgentRpcApi) GetCurrent(ctx context.Context) (*SessionAgentGetCurrentResult, error)
func (*AgentRpcApi) List ¶ added in v0.1.28
func (a *AgentRpcApi) List(ctx context.Context) (*SessionAgentListResult, error)
func (*AgentRpcApi) Select ¶ added in v0.1.28
func (a *AgentRpcApi) Select(ctx context.Context, params *SessionAgentSelectParams) (*SessionAgentSelectResult, error)
type Capabilities ¶
Model capabilities and limits
type CompactionRpcApi ¶ added in v0.1.28
type CompactionRpcApi struct {
// contains filtered or unexported fields
}
func (*CompactionRpcApi) Compact ¶ added in v0.1.28
func (a *CompactionRpcApi) Compact(ctx context.Context) (*SessionCompactionCompactResult, error)
type FleetRpcApi ¶ added in v0.1.25
type FleetRpcApi struct {
// contains filtered or unexported fields
}
func (*FleetRpcApi) Start ¶ added in v0.1.25
func (a *FleetRpcApi) Start(ctx context.Context, params *SessionFleetStartParams) (*SessionFleetStartResult, error)
type Mode ¶ added in v0.1.25
type Mode string
The current agent mode.
The agent mode after switching.
The mode to switch to. Valid values: "interactive", "plan", "autopilot".
type ModeRpcApi ¶ added in v0.1.25
type ModeRpcApi struct {
// contains filtered or unexported fields
}
func (*ModeRpcApi) Get ¶ added in v0.1.25
func (a *ModeRpcApi) Get(ctx context.Context) (*SessionModeGetResult, error)
func (*ModeRpcApi) Set ¶ added in v0.1.25
func (a *ModeRpcApi) Set(ctx context.Context, params *SessionModeSetParams) (*SessionModeSetResult, error)
type Model ¶
type Model struct {
// Billing information
Billing *Billing `json:"billing,omitempty"`
// Model capabilities and limits
Capabilities Capabilities `json:"capabilities"`
// Default reasoning effort level (only present if model supports reasoning effort)
DefaultReasoningEffort *string `json:"defaultReasoningEffort,omitempty"`
// Model identifier (e.g., "claude-sonnet-4.5")
ID string `json:"id"`
// Display name
Name string `json:"name"`
// Policy state (if applicable)
Policy *Policy `json:"policy,omitempty"`
// Supported reasoning effort levels (only present if model supports reasoning effort)
SupportedReasoningEfforts []string `json:"supportedReasoningEfforts,omitempty"`
}
type ModelRpcApi ¶
type ModelRpcApi struct {
// contains filtered or unexported fields
}
func (*ModelRpcApi) GetCurrent ¶
func (a *ModelRpcApi) GetCurrent(ctx context.Context) (*SessionModelGetCurrentResult, error)
func (*ModelRpcApi) SwitchTo ¶
func (a *ModelRpcApi) SwitchTo(ctx context.Context, params *SessionModelSwitchToParams) (*SessionModelSwitchToResult, error)
type ModelsListResult ¶
type ModelsListResult struct {
// List of available models with full metadata
Models []Model `json:"models"`
}
type ModelsRpcApi ¶
type ModelsRpcApi struct {
// contains filtered or unexported fields
}
func (*ModelsRpcApi) List ¶
func (a *ModelsRpcApi) List(ctx context.Context) (*ModelsListResult, error)
type PingParams ¶
type PingParams struct {
// Optional message to echo back
Message *string `json:"message,omitempty"`
}
type PingResult ¶
type PlanRpcApi ¶ added in v0.1.25
type PlanRpcApi struct {
// contains filtered or unexported fields
}
func (*PlanRpcApi) Delete ¶ added in v0.1.25
func (a *PlanRpcApi) Delete(ctx context.Context) (*SessionPlanDeleteResult, error)
func (*PlanRpcApi) Read ¶ added in v0.1.25
func (a *PlanRpcApi) Read(ctx context.Context) (*SessionPlanReadResult, error)
func (*PlanRpcApi) Update ¶ added in v0.1.25
func (a *PlanRpcApi) Update(ctx context.Context, params *SessionPlanUpdateParams) (*SessionPlanUpdateResult, error)
type QuotaSnapshot ¶
type QuotaSnapshot struct {
// Number of requests included in the entitlement
EntitlementRequests float64 `json:"entitlementRequests"`
// Number of overage requests made this period
Overage float64 `json:"overage"`
// Whether pay-per-request usage is allowed when quota is exhausted
OverageAllowedWithExhaustedQuota bool `json:"overageAllowedWithExhaustedQuota"`
// Percentage of entitlement remaining
RemainingPercentage float64 `json:"remainingPercentage"`
// Date when the quota resets (ISO 8601)
ResetDate *string `json:"resetDate,omitempty"`
// Number of requests used so far this period
UsedRequests float64 `json:"usedRequests"`
}
type ServerRpc ¶
type ServerRpc struct {
Models *ModelsRpcApi
Tools *ToolsRpcApi
Account *AccountRpcApi
// contains filtered or unexported fields
}
ServerRpc provides typed server-scoped RPC methods.
func NewServerRpc ¶
func (*ServerRpc) Ping ¶
func (a *ServerRpc) Ping(ctx context.Context, params *PingParams) (*PingResult, error)
type SessionAgentDeselectResult ¶ added in v0.1.28
type SessionAgentDeselectResult struct {
}
type SessionAgentGetCurrentResult ¶ added in v0.1.28
type SessionAgentGetCurrentResult struct {
// Currently selected custom agent, or null if using the default agent
Agent *SessionAgentGetCurrentResultAgent `json:"agent"`
}
type SessionAgentGetCurrentResultAgent ¶ added in v0.1.28
type SessionAgentListResult ¶ added in v0.1.28
type SessionAgentListResult struct {
// Available custom agents
Agents []AgentElement `json:"agents"`
}
type SessionAgentSelectParams ¶ added in v0.1.28
type SessionAgentSelectParams struct {
// Name of the custom agent to select
Name string `json:"name"`
}
type SessionAgentSelectResult ¶ added in v0.1.28
type SessionAgentSelectResult struct {
// The newly selected custom agent
Agent SessionAgentSelectResultAgent `json:"agent"`
}
type SessionAgentSelectResultAgent ¶ added in v0.1.28
type SessionAgentSelectResultAgent struct {
// Description of the agent's purpose
Description string `json:"description"`
// Human-readable display name
DisplayName string `json:"displayName"`
// Unique identifier of the custom agent
Name string `json:"name"`
}
The newly selected custom agent
type SessionCompactionCompactResult ¶ added in v0.1.28
type SessionCompactionCompactResult struct {
// Number of messages removed during compaction
MessagesRemoved float64 `json:"messagesRemoved"`
// Whether compaction completed successfully
Success bool `json:"success"`
// Number of tokens freed by compaction
TokensRemoved float64 `json:"tokensRemoved"`
}
type SessionFleetStartParams ¶ added in v0.1.25
type SessionFleetStartParams struct {
// Optional user prompt to combine with fleet instructions
Prompt *string `json:"prompt,omitempty"`
}
type SessionFleetStartResult ¶ added in v0.1.25
type SessionFleetStartResult struct {
// Whether fleet mode was successfully activated
Started bool `json:"started"`
}
type SessionModeGetResult ¶ added in v0.1.25
type SessionModeGetResult struct {
// The current agent mode.
Mode Mode `json:"mode"`
}
type SessionModeSetParams ¶ added in v0.1.25
type SessionModeSetParams struct {
// The mode to switch to. Valid values: "interactive", "plan", "autopilot".
Mode Mode `json:"mode"`
}
type SessionModeSetResult ¶ added in v0.1.25
type SessionModeSetResult struct {
// The agent mode after switching.
Mode Mode `json:"mode"`
}
type SessionModelGetCurrentResult ¶
type SessionModelGetCurrentResult struct {
ModelID *string `json:"modelId,omitempty"`
}
type SessionModelSwitchToParams ¶
type SessionModelSwitchToParams struct {
ModelID string `json:"modelId"`
}
type SessionModelSwitchToResult ¶
type SessionModelSwitchToResult struct {
ModelID *string `json:"modelId,omitempty"`
}
type SessionPlanDeleteResult ¶ added in v0.1.25
type SessionPlanDeleteResult struct {
}
type SessionPlanReadResult ¶ added in v0.1.25
type SessionPlanUpdateParams ¶ added in v0.1.25
type SessionPlanUpdateParams struct {
// The new content for plan.md
Content string `json:"content"`
}
type SessionPlanUpdateResult ¶ added in v0.1.25
type SessionPlanUpdateResult struct {
}
type SessionRpc ¶
type SessionRpc struct {
Model *ModelRpcApi
Mode *ModeRpcApi
Plan *PlanRpcApi
Workspace *WorkspaceRpcApi
Fleet *FleetRpcApi
Agent *AgentRpcApi
Compaction *CompactionRpcApi
// contains filtered or unexported fields
}
SessionRpc provides typed session-scoped RPC methods.
func NewSessionRpc ¶
func NewSessionRpc(client *jsonrpc2.Client, sessionID string) *SessionRpc
type SessionWorkspaceCreateFileParams ¶ added in v0.1.25
type SessionWorkspaceCreateFileResult ¶ added in v0.1.25
type SessionWorkspaceCreateFileResult struct {
}
type SessionWorkspaceListFilesResult ¶ added in v0.1.25
type SessionWorkspaceListFilesResult struct {
// Relative file paths in the workspace files directory
Files []string `json:"files"`
}
type SessionWorkspaceReadFileParams ¶ added in v0.1.25
type SessionWorkspaceReadFileParams struct {
// Relative path within the workspace files directory
Path string `json:"path"`
}
type SessionWorkspaceReadFileResult ¶ added in v0.1.25
type SessionWorkspaceReadFileResult struct {
// File content as a UTF-8 string
Content string `json:"content"`
}
type Tool ¶
type Tool struct {
// Description of what the tool does
Description string `json:"description"`
// Optional instructions for how to use this tool effectively
Instructions *string `json:"instructions,omitempty"`
// Tool identifier (e.g., "bash", "grep", "str_replace_editor")
Name string `json:"name"`
// Optional namespaced name for declarative filtering (e.g., "playwright/navigate" for MCP
// tools)
NamespacedName *string `json:"namespacedName,omitempty"`
// JSON Schema for the tool's input parameters
Parameters map[string]interface{} `json:"parameters,omitempty"`
}
type ToolsListParams ¶
type ToolsListParams struct {
// Optional model ID — when provided, the returned tool list reflects model-specific
// overrides
Model *string `json:"model,omitempty"`
}
type ToolsListResult ¶
type ToolsListResult struct {
// List of available built-in tools with metadata
Tools []Tool `json:"tools"`
}
type ToolsRpcApi ¶
type ToolsRpcApi struct {
// contains filtered or unexported fields
}
func (*ToolsRpcApi) List ¶
func (a *ToolsRpcApi) List(ctx context.Context, params *ToolsListParams) (*ToolsListResult, error)
type WorkspaceRpcApi ¶ added in v0.1.25
type WorkspaceRpcApi struct {
// contains filtered or unexported fields
}
func (*WorkspaceRpcApi) CreateFile ¶ added in v0.1.25
func (a *WorkspaceRpcApi) CreateFile(ctx context.Context, params *SessionWorkspaceCreateFileParams) (*SessionWorkspaceCreateFileResult, error)
func (*WorkspaceRpcApi) ListFiles ¶ added in v0.1.25
func (a *WorkspaceRpcApi) ListFiles(ctx context.Context) (*SessionWorkspaceListFilesResult, error)
func (*WorkspaceRpcApi) ReadFile ¶ added in v0.1.25
func (a *WorkspaceRpcApi) ReadFile(ctx context.Context, params *SessionWorkspaceReadFileParams) (*SessionWorkspaceReadFileResult, error)
Click to show internal directories.
Click to hide internal directories.