Documentation
¶
Index ¶
- func RegisterClientSessionApiHandlers(client *jsonrpc2.Client, ...)
- type AccountGetQuotaResult
- type Action
- type AgentApi
- func (a *AgentApi) Deselect(ctx context.Context) (*SessionAgentDeselectResult, error)
- func (a *AgentApi) GetCurrent(ctx context.Context) (*SessionAgentGetCurrentResult, error)
- func (a *AgentApi) List(ctx context.Context) (*SessionAgentListResult, error)
- func (a *AgentApi) Reload(ctx context.Context) (*SessionAgentReloadResult, error)
- func (a *AgentApi) Select(ctx context.Context, params *SessionAgentSelectParams) (*SessionAgentSelectResult, error)
- type AnyOf
- type Billing
- type ClientSessionApiHandlers
- type CommandsApi
- type Content
- type Conventions
- type Entry
- type EntryType
- type Extension
- type ExtensionStatus
- type ExtensionsApi
- func (a *ExtensionsApi) Disable(ctx context.Context, params *SessionExtensionsDisableParams) (*SessionExtensionsDisableResult, error)
- func (a *ExtensionsApi) Enable(ctx context.Context, params *SessionExtensionsEnableParams) (*SessionExtensionsEnableResult, error)
- func (a *ExtensionsApi) List(ctx context.Context) (*SessionExtensionsListResult, error)
- func (a *ExtensionsApi) Reload(ctx context.Context) (*SessionExtensionsReloadResult, error)
- type FilterMappingEnum
- type FilterMappingUnion
- type FleetApi
- type Format
- type HistoryApi
- type Items
- type ItemsType
- type Kind
- type Level
- type MCPConfigAddParams
- type MCPConfigAddParamsConfig
- type MCPConfigListResult
- type MCPConfigRemoveParams
- type MCPConfigUpdateParams
- type MCPConfigUpdateParamsConfig
- type McpApi
- func (a *McpApi) Disable(ctx context.Context, params *SessionMCPDisableParams) (*SessionMCPDisableResult, error)
- func (a *McpApi) Enable(ctx context.Context, params *SessionMCPEnableParams) (*SessionMCPEnableResult, error)
- func (a *McpApi) List(ctx context.Context) (*SessionMCPListResult, error)
- func (a *McpApi) Reload(ctx context.Context) (*SessionMCPReloadResult, error)
- type Mode
- type ModeApi
- type Model
- type ModelApi
- type ModelCapabilities
- type ModelCapabilitiesLimits
- type ModelCapabilitiesLimitsVision
- type ModelCapabilitiesOverride
- type ModelCapabilitiesOverrideLimits
- type ModelCapabilitiesOverrideLimitsVision
- type ModelCapabilitiesOverrideSupports
- type ModelCapabilitiesSupports
- type ModelsListResult
- type OneOf
- type PermissionsApi
- type PingParams
- type PingResult
- type PlanApi
- type Plugin
- type PluginsApi
- type Policy
- type Property
- type PropertyType
- type QuotaSnapshot
- type RequestedSchema
- type RequestedSchemaType
- type ResultResult
- type ResultUnion
- type ServerAccountApi
- type ServerElement
- type ServerMcpApi
- type ServerModelsApi
- type ServerRpc
- type ServerSessionFsApi
- type ServerSessionsApi
- type ServerStatus
- type ServerToolsApi
- type ServerType
- type ServerValue
- type SessionAgentDeselectResult
- type SessionAgentGetCurrentResult
- type SessionAgentGetCurrentResultAgent
- type SessionAgentListResult
- type SessionAgentListResultAgent
- type SessionAgentReloadResult
- type SessionAgentReloadResultAgent
- type SessionAgentSelectParams
- type SessionAgentSelectResult
- type SessionAgentSelectResultAgent
- type SessionCommandsHandlePendingCommandParams
- type SessionCommandsHandlePendingCommandResult
- type SessionExtensionsDisableParams
- type SessionExtensionsDisableResult
- type SessionExtensionsEnableParams
- type SessionExtensionsEnableResult
- type SessionExtensionsListResult
- type SessionExtensionsReloadResult
- type SessionFSAppendFileParams
- type SessionFSExistsParams
- type SessionFSExistsResult
- type SessionFSMkdirParams
- type SessionFSReadFileParams
- type SessionFSReadFileResult
- type SessionFSReaddirParams
- type SessionFSReaddirResult
- type SessionFSReaddirWithTypesParams
- type SessionFSReaddirWithTypesResult
- type SessionFSRenameParams
- type SessionFSRmParams
- type SessionFSSetProviderParams
- type SessionFSSetProviderResult
- type SessionFSStatParams
- type SessionFSStatResult
- type SessionFSWriteFileParams
- type SessionFleetStartParams
- type SessionFleetStartResult
- type SessionFsHandler
- type SessionHistoryCompactResult
- type SessionHistoryTruncateParams
- type SessionHistoryTruncateResult
- type SessionLogParams
- type SessionLogResult
- type SessionMCPDisableParams
- type SessionMCPDisableResult
- type SessionMCPEnableParams
- type SessionMCPEnableResult
- type SessionMCPListResult
- type SessionMCPReloadResult
- type SessionModeGetResult
- type SessionModeSetParams
- type SessionModeSetResult
- type SessionModelGetCurrentResult
- type SessionModelSwitchToParams
- type SessionModelSwitchToResult
- type SessionPermissionsHandlePendingPermissionRequestParams
- type SessionPermissionsHandlePendingPermissionRequestParamsResult
- type SessionPermissionsHandlePendingPermissionRequestResult
- type SessionPlanDeleteResult
- type SessionPlanReadResult
- type SessionPlanUpdateParams
- type SessionPlanUpdateResult
- type SessionPluginsListResult
- type SessionRpc
- type SessionShellExecParams
- type SessionShellExecResult
- type SessionShellKillParams
- type SessionShellKillResult
- type SessionSkillsDisableParams
- type SessionSkillsDisableResult
- type SessionSkillsEnableParams
- type SessionSkillsEnableResult
- type SessionSkillsListResult
- type SessionSkillsReloadResult
- type SessionToolsHandlePendingToolCallParams
- type SessionToolsHandlePendingToolCallResult
- type SessionUIElicitationParams
- type SessionUIElicitationResult
- type SessionUIHandlePendingElicitationParams
- type SessionUIHandlePendingElicitationParamsResult
- type SessionUIHandlePendingElicitationResult
- type SessionWorkspaceCreateFileParams
- type SessionWorkspaceCreateFileResult
- type SessionWorkspaceListFilesResult
- type SessionWorkspaceReadFileParams
- type SessionWorkspaceReadFileResult
- type SessionsForkParams
- type SessionsForkResult
- type ShellApi
- type Signal
- type Skill
- type SkillsApi
- func (a *SkillsApi) Disable(ctx context.Context, params *SessionSkillsDisableParams) (*SessionSkillsDisableResult, error)
- func (a *SkillsApi) Enable(ctx context.Context, params *SessionSkillsEnableParams) (*SessionSkillsEnableResult, error)
- func (a *SkillsApi) List(ctx context.Context) (*SessionSkillsListResult, error)
- func (a *SkillsApi) Reload(ctx context.Context) (*SessionSkillsReloadResult, error)
- type Source
- type Tool
- type ToolsApi
- type ToolsListParams
- type ToolsListResult
- type UIApi
- type WorkspaceApi
- func (a *WorkspaceApi) CreateFile(ctx context.Context, params *SessionWorkspaceCreateFileParams) (*SessionWorkspaceCreateFileResult, error)
- func (a *WorkspaceApi) ListFiles(ctx context.Context) (*SessionWorkspaceListFilesResult, error)
- func (a *WorkspaceApi) ReadFile(ctx context.Context, params *SessionWorkspaceReadFileParams) (*SessionWorkspaceReadFileResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterClientSessionApiHandlers ¶ added in v0.2.2
func RegisterClientSessionApiHandlers(client *jsonrpc2.Client, getHandlers func(sessionID string) *ClientSessionApiHandlers)
RegisterClientSessionApiHandlers registers handlers for server-to-client session API calls.
Types ¶
type AccountGetQuotaResult ¶
type AccountGetQuotaResult struct {
// Quota snapshots keyed by type (e.g., chat, completions, premium_interactions)
QuotaSnapshots map[string]QuotaSnapshot `json:"quotaSnapshots"`
}
type Action ¶ added in v0.2.0
type Action string
The user's response: accept (submitted), decline (rejected), or cancel (dismissed)
type AgentApi ¶ added in v0.2.1
type AgentApi sessionApi
Experimental: AgentApi contains experimental APIs that may change or be removed.
func (*AgentApi) Deselect ¶ added in v0.2.1
func (a *AgentApi) Deselect(ctx context.Context) (*SessionAgentDeselectResult, error)
func (*AgentApi) GetCurrent ¶ added in v0.2.1
func (a *AgentApi) GetCurrent(ctx context.Context) (*SessionAgentGetCurrentResult, error)
func (*AgentApi) List ¶ added in v0.2.1
func (a *AgentApi) List(ctx context.Context) (*SessionAgentListResult, error)
func (*AgentApi) Reload ¶ added in v0.2.1
func (a *AgentApi) Reload(ctx context.Context) (*SessionAgentReloadResult, error)
func (*AgentApi) Select ¶ added in v0.2.1
func (a *AgentApi) Select(ctx context.Context, params *SessionAgentSelectParams) (*SessionAgentSelectResult, error)
type Billing ¶
type Billing struct {
// Billing cost multiplier relative to the base rate
Multiplier float64 `json:"multiplier"`
}
Billing information
type ClientSessionApiHandlers ¶ added in v0.2.2
type ClientSessionApiHandlers struct {
SessionFs SessionFsHandler
}
ClientSessionApiHandlers provides all client session API handler groups for a session.
type CommandsApi ¶ added in v0.2.1
type CommandsApi sessionApi
func (*CommandsApi) HandlePendingCommand ¶ added in v0.2.1
func (a *CommandsApi) HandlePendingCommand(ctx context.Context, params *SessionCommandsHandlePendingCommandParams) (*SessionCommandsHandlePendingCommandResult, error)
type Conventions ¶ added in v0.2.1
type Conventions string
Path conventions used by this filesystem
const ( ConventionsPosix Conventions = "posix" ConventionsWindows Conventions = "windows" )
type Extension ¶ added in v0.2.0
type Extension struct {
// Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper')
ID string `json:"id"`
// Extension name (directory name)
Name string `json:"name"`
// Process ID if the extension is running
PID *int64 `json:"pid,omitempty"`
// Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)
Source Source `json:"source"`
// Current status: running, disabled, failed, or starting
Status ExtensionStatus `json:"status"`
}
type ExtensionStatus ¶ added in v0.2.0
type ExtensionStatus string
Current status: running, disabled, failed, or starting
const ( ExtensionStatusDisabled ExtensionStatus = "disabled" ExtensionStatusFailed ExtensionStatus = "failed" ExtensionStatusRunning ExtensionStatus = "running" ExtensionStatusStarting ExtensionStatus = "starting" )
type ExtensionsApi ¶ added in v0.2.1
type ExtensionsApi sessionApi
Experimental: ExtensionsApi contains experimental APIs that may change or be removed.
func (*ExtensionsApi) Disable ¶ added in v0.2.1
func (a *ExtensionsApi) Disable(ctx context.Context, params *SessionExtensionsDisableParams) (*SessionExtensionsDisableResult, error)
func (*ExtensionsApi) Enable ¶ added in v0.2.1
func (a *ExtensionsApi) Enable(ctx context.Context, params *SessionExtensionsEnableParams) (*SessionExtensionsEnableResult, error)
func (*ExtensionsApi) List ¶ added in v0.2.1
func (a *ExtensionsApi) List(ctx context.Context) (*SessionExtensionsListResult, error)
func (*ExtensionsApi) Reload ¶ added in v0.2.1
func (a *ExtensionsApi) Reload(ctx context.Context) (*SessionExtensionsReloadResult, error)
type FilterMappingEnum ¶ added in v0.2.1
type FilterMappingEnum string
const ( FilterMappingEnumHiddenCharacters FilterMappingEnum = "hidden_characters" FilterMappingEnumMarkdown FilterMappingEnum = "markdown" FilterMappingEnumNone FilterMappingEnum = "none" )
type FilterMappingUnion ¶ added in v0.2.1
type FilterMappingUnion struct {
Enum *FilterMappingEnum
EnumMap map[string]FilterMappingEnum
}
type FleetApi ¶ added in v0.2.1
type FleetApi sessionApi
Experimental: FleetApi contains experimental APIs that may change or be removed.
func (*FleetApi) Start ¶ added in v0.2.1
func (a *FleetApi) Start(ctx context.Context, params *SessionFleetStartParams) (*SessionFleetStartResult, error)
type HistoryApi ¶ added in v0.2.2
type HistoryApi sessionApi
Experimental: HistoryApi contains experimental APIs that may change or be removed.
func (*HistoryApi) Compact ¶ added in v0.2.2
func (a *HistoryApi) Compact(ctx context.Context) (*SessionHistoryCompactResult, error)
func (*HistoryApi) Truncate ¶ added in v0.2.2
func (a *HistoryApi) Truncate(ctx context.Context, params *SessionHistoryTruncateParams) (*SessionHistoryTruncateResult, error)
type ItemsType ¶ added in v0.2.0
type ItemsType string
const (
ItemsTypeString ItemsType = "string"
)
type Kind ¶ added in v0.1.31
type Kind string
const ( KindApproved Kind = "approved" KindDeniedByContentExclusionPolicy Kind = "denied-by-content-exclusion-policy" KindDeniedByPermissionRequestHook Kind = "denied-by-permission-request-hook" KindDeniedByRules Kind = "denied-by-rules" KindDeniedInteractivelyByUser Kind = "denied-interactively-by-user" KindDeniedNoApprovalRuleAndCouldNotRequestFromUser Kind = "denied-no-approval-rule-and-could-not-request-from-user" )
type Level ¶ added in v0.2.0
type Level string
Log severity level. Determines how the message is displayed in the timeline. Defaults to "info".
type MCPConfigAddParams ¶ added in v0.2.1
type MCPConfigAddParams struct {
// MCP server configuration (local/stdio or remote/http)
Config MCPConfigAddParamsConfig `json:"config"`
// Unique name for the MCP server
Name string `json:"name"`
}
type MCPConfigAddParamsConfig ¶ added in v0.2.1
type MCPConfigAddParamsConfig struct {
Args []string `json:"args,omitempty"`
Command *string `json:"command,omitempty"`
Cwd *string `json:"cwd,omitempty"`
Env map[string]string `json:"env,omitempty"`
FilterMapping *FilterMappingUnion `json:"filterMapping"`
IsDefaultServer *bool `json:"isDefaultServer,omitempty"`
Timeout *float64 `json:"timeout,omitempty"`
// Tools to include. Defaults to all tools if not specified.
Tools []string `json:"tools,omitempty"`
Type *ServerType `json:"type,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
OauthClientID *string `json:"oauthClientId,omitempty"`
OauthPublicClient *bool `json:"oauthPublicClient,omitempty"`
URL *string `json:"url,omitempty"`
}
MCP server configuration (local/stdio or remote/http)
type MCPConfigListResult ¶ added in v0.2.1
type MCPConfigListResult struct {
// All MCP servers from user config, keyed by name
Servers map[string]ServerValue `json:"servers"`
}
type MCPConfigRemoveParams ¶ added in v0.2.1
type MCPConfigRemoveParams struct {
// Name of the MCP server to remove
Name string `json:"name"`
}
type MCPConfigUpdateParams ¶ added in v0.2.1
type MCPConfigUpdateParams struct {
// MCP server configuration (local/stdio or remote/http)
Config MCPConfigUpdateParamsConfig `json:"config"`
// Name of the MCP server to update
Name string `json:"name"`
}
type MCPConfigUpdateParamsConfig ¶ added in v0.2.1
type MCPConfigUpdateParamsConfig struct {
Args []string `json:"args,omitempty"`
Command *string `json:"command,omitempty"`
Cwd *string `json:"cwd,omitempty"`
Env map[string]string `json:"env,omitempty"`
FilterMapping *FilterMappingUnion `json:"filterMapping"`
IsDefaultServer *bool `json:"isDefaultServer,omitempty"`
Timeout *float64 `json:"timeout,omitempty"`
// Tools to include. Defaults to all tools if not specified.
Tools []string `json:"tools,omitempty"`
Type *ServerType `json:"type,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
OauthClientID *string `json:"oauthClientId,omitempty"`
OauthPublicClient *bool `json:"oauthPublicClient,omitempty"`
URL *string `json:"url,omitempty"`
}
MCP server configuration (local/stdio or remote/http)
type McpApi ¶ added in v0.2.1
type McpApi sessionApi
Experimental: McpApi contains experimental APIs that may change or be removed.
func (*McpApi) Disable ¶ added in v0.2.1
func (a *McpApi) Disable(ctx context.Context, params *SessionMCPDisableParams) (*SessionMCPDisableResult, error)
func (*McpApi) Enable ¶ added in v0.2.1
func (a *McpApi) Enable(ctx context.Context, params *SessionMCPEnableParams) (*SessionMCPEnableResult, 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 ModeApi ¶ added in v0.2.1
type ModeApi sessionApi
func (*ModeApi) Get ¶ added in v0.2.1
func (a *ModeApi) Get(ctx context.Context) (*SessionModeGetResult, error)
func (*ModeApi) Set ¶ added in v0.2.1
func (a *ModeApi) 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 ModelCapabilities `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 ModelApi ¶ added in v0.2.1
type ModelApi sessionApi
func (*ModelApi) GetCurrent ¶ added in v0.2.1
func (a *ModelApi) GetCurrent(ctx context.Context) (*SessionModelGetCurrentResult, error)
func (*ModelApi) SwitchTo ¶ added in v0.2.1
func (a *ModelApi) SwitchTo(ctx context.Context, params *SessionModelSwitchToParams) (*SessionModelSwitchToResult, error)
type ModelCapabilities ¶ added in v0.2.2
type ModelCapabilities struct {
// Token limits for prompts, outputs, and context window
Limits ModelCapabilitiesLimits `json:"limits"`
// Feature flags indicating what the model supports
Supports ModelCapabilitiesSupports `json:"supports"`
}
Model capabilities and limits
type ModelCapabilitiesLimits ¶ added in v0.2.2
type ModelCapabilitiesLimits struct {
// Maximum total context window size in tokens
MaxContextWindowTokens float64 `json:"max_context_window_tokens"`
// Maximum number of output/completion tokens
MaxOutputTokens *float64 `json:"max_output_tokens,omitempty"`
// Maximum number of prompt/input tokens
MaxPromptTokens *float64 `json:"max_prompt_tokens,omitempty"`
// Vision-specific limits
Vision *ModelCapabilitiesLimitsVision `json:"vision,omitempty"`
}
Token limits for prompts, outputs, and context window
type ModelCapabilitiesLimitsVision ¶ added in v0.2.2
type ModelCapabilitiesLimitsVision struct {
// Maximum image size in bytes
MaxPromptImageSize float64 `json:"max_prompt_image_size"`
// Maximum number of images per prompt
MaxPromptImages float64 `json:"max_prompt_images"`
// MIME types the model accepts
SupportedMediaTypes []string `json:"supported_media_types"`
}
Vision-specific limits
type ModelCapabilitiesOverride ¶ added in v0.2.2
type ModelCapabilitiesOverride struct {
// Token limits for prompts, outputs, and context window
Limits *ModelCapabilitiesOverrideLimits `json:"limits,omitempty"`
// Feature flags indicating what the model supports
Supports *ModelCapabilitiesOverrideSupports `json:"supports,omitempty"`
}
Override individual model capabilities resolved by the runtime
type ModelCapabilitiesOverrideLimits ¶ added in v0.2.2
type ModelCapabilitiesOverrideLimits struct {
// Maximum total context window size in tokens
MaxContextWindowTokens *float64 `json:"max_context_window_tokens,omitempty"`
MaxOutputTokens *float64 `json:"max_output_tokens,omitempty"`
MaxPromptTokens *float64 `json:"max_prompt_tokens,omitempty"`
Vision *ModelCapabilitiesOverrideLimitsVision `json:"vision,omitempty"`
}
Token limits for prompts, outputs, and context window
type ModelCapabilitiesOverrideLimitsVision ¶ added in v0.2.2
type ModelCapabilitiesOverrideLimitsVision struct {
// Maximum image size in bytes
MaxPromptImageSize *float64 `json:"max_prompt_image_size,omitempty"`
// Maximum number of images per prompt
MaxPromptImages *float64 `json:"max_prompt_images,omitempty"`
// MIME types the model accepts
SupportedMediaTypes []string `json:"supported_media_types,omitempty"`
}
type ModelCapabilitiesOverrideSupports ¶ added in v0.2.2
type ModelCapabilitiesOverrideSupports struct {
ReasoningEffort *bool `json:"reasoningEffort,omitempty"`
Vision *bool `json:"vision,omitempty"`
}
Feature flags indicating what the model supports
type ModelCapabilitiesSupports ¶ added in v0.2.2
type ModelCapabilitiesSupports struct {
// Whether this model supports reasoning effort configuration
ReasoningEffort *bool `json:"reasoningEffort,omitempty"`
// Whether this model supports vision/image input
Vision *bool `json:"vision,omitempty"`
}
Feature flags indicating what the model supports
type ModelsListResult ¶
type ModelsListResult struct {
// List of available models with full metadata
Models []Model `json:"models"`
}
type PermissionsApi ¶ added in v0.2.1
type PermissionsApi sessionApi
func (*PermissionsApi) HandlePendingPermissionRequest ¶ added in v0.2.1
func (a *PermissionsApi) HandlePendingPermissionRequest(ctx context.Context, params *SessionPermissionsHandlePendingPermissionRequestParams) (*SessionPermissionsHandlePendingPermissionRequestResult, error)
type PingParams ¶
type PingParams struct {
// Optional message to echo back
Message *string `json:"message,omitempty"`
}
type PingResult ¶
type PlanApi ¶ added in v0.2.1
type PlanApi sessionApi
func (*PlanApi) Delete ¶ added in v0.2.1
func (a *PlanApi) Delete(ctx context.Context) (*SessionPlanDeleteResult, error)
func (*PlanApi) Read ¶ added in v0.2.1
func (a *PlanApi) Read(ctx context.Context) (*SessionPlanReadResult, error)
func (*PlanApi) Update ¶ added in v0.2.1
func (a *PlanApi) Update(ctx context.Context, params *SessionPlanUpdateParams) (*SessionPlanUpdateResult, error)
type PluginsApi ¶ added in v0.2.1
type PluginsApi sessionApi
Experimental: PluginsApi contains experimental APIs that may change or be removed.
func (*PluginsApi) List ¶ added in v0.2.1
func (a *PluginsApi) List(ctx context.Context) (*SessionPluginsListResult, error)
type Policy ¶
type Policy struct {
// Current policy state for this model
State string `json:"state"`
// Usage terms or conditions for this model
Terms string `json:"terms"`
}
Policy state (if applicable)
type Property ¶ added in v0.2.0
type Property struct {
Default *Content `json:"default"`
Description *string `json:"description,omitempty"`
Enum []string `json:"enum,omitempty"`
EnumNames []string `json:"enumNames,omitempty"`
Title *string `json:"title,omitempty"`
Type PropertyType `json:"type"`
OneOf []OneOf `json:"oneOf,omitempty"`
Items *Items `json:"items,omitempty"`
MaxItems *float64 `json:"maxItems,omitempty"`
MinItems *float64 `json:"minItems,omitempty"`
Format *Format `json:"format,omitempty"`
MaxLength *float64 `json:"maxLength,omitempty"`
MinLength *float64 `json:"minLength,omitempty"`
Maximum *float64 `json:"maximum,omitempty"`
Minimum *float64 `json:"minimum,omitempty"`
}
type PropertyType ¶ added in v0.2.0
type PropertyType string
const ( PropertyTypeArray PropertyType = "array" PropertyTypeBoolean PropertyType = "boolean" PropertyTypeString PropertyType = "string" PropertyTypeInteger PropertyType = "integer" PropertyTypeNumber PropertyType = "number" )
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 RequestedSchema ¶ added in v0.2.0
type RequestedSchema struct {
// Form field definitions, keyed by field name
Properties map[string]Property `json:"properties"`
// List of required field names
Required []string `json:"required,omitempty"`
// Schema type indicator (always 'object')
Type RequestedSchemaType `json:"type"`
}
JSON Schema describing the form fields to present to the user
type RequestedSchemaType ¶ added in v0.2.0
type RequestedSchemaType string
const (
RequestedSchemaTypeObject RequestedSchemaType = "object"
)
type ResultResult ¶ added in v0.1.31
type ResultUnion ¶ added in v0.1.31
type ResultUnion struct {
ResultResult *ResultResult
String *string
}
func (ResultUnion) MarshalJSON ¶ added in v0.1.31
func (r ResultUnion) MarshalJSON() ([]byte, error)
MarshalJSON serializes ResultUnion as the appropriate JSON variant: a plain string when String is set, or the ResultResult object otherwise. The generated struct has no custom marshaler, so without this the Go struct fields would serialize as {"ResultResult":...,"String":...} instead of the union the server expects.
func (*ResultUnion) UnmarshalJSON ¶ added in v0.1.31
func (r *ResultUnion) UnmarshalJSON(data []byte) error
UnmarshalJSON deserializes a JSON value into the appropriate ResultUnion variant.
type ServerAccountApi ¶ added in v0.2.1
type ServerAccountApi serverApi
func (*ServerAccountApi) GetQuota ¶ added in v0.2.1
func (a *ServerAccountApi) GetQuota(ctx context.Context) (*AccountGetQuotaResult, error)
type ServerElement ¶ added in v0.2.1
type ServerElement struct {
// Error message if the server failed to connect
Error *string `json:"error,omitempty"`
// Server name (config key)
Name string `json:"name"`
// Configuration source: user, workspace, plugin, or builtin
Source *string `json:"source,omitempty"`
// Connection status: connected, failed, needs-auth, pending, disabled, or not_configured
Status ServerStatus `json:"status"`
}
type ServerMcpApi ¶ added in v0.2.1
type ServerMcpApi serverApi
type ServerModelsApi ¶ added in v0.2.1
type ServerModelsApi serverApi
func (*ServerModelsApi) List ¶ added in v0.2.1
func (a *ServerModelsApi) List(ctx context.Context) (*ModelsListResult, error)
type ServerRpc ¶
type ServerRpc struct {
Models *ServerModelsApi
Tools *ServerToolsApi
Account *ServerAccountApi
Mcp *ServerMcpApi
SessionFs *ServerSessionFsApi
Sessions *ServerSessionsApi
// 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 ServerSessionFsApi ¶ added in v0.2.1
type ServerSessionFsApi serverApi
func (*ServerSessionFsApi) SetProvider ¶ added in v0.2.1
func (a *ServerSessionFsApi) SetProvider(ctx context.Context, params *SessionFSSetProviderParams) (*SessionFSSetProviderResult, error)
type ServerSessionsApi ¶ added in v0.2.2
type ServerSessionsApi serverApi
Experimental: ServerSessionsApi contains experimental APIs that may change or be removed.
func (*ServerSessionsApi) Fork ¶ added in v0.2.2
func (a *ServerSessionsApi) Fork(ctx context.Context, params *SessionsForkParams) (*SessionsForkResult, error)
type ServerStatus ¶ added in v0.2.0
type ServerStatus string
Connection status: connected, failed, needs-auth, pending, disabled, or not_configured
const ( ServerStatusConnected ServerStatus = "connected" ServerStatusNeedsAuth ServerStatus = "needs-auth" ServerStatusNotConfigured ServerStatus = "not_configured" ServerStatusPending ServerStatus = "pending" ServerStatusDisabled ServerStatus = "disabled" ServerStatusFailed ServerStatus = "failed" )
type ServerToolsApi ¶ added in v0.2.1
type ServerToolsApi serverApi
func (*ServerToolsApi) List ¶ added in v0.2.1
func (a *ServerToolsApi) List(ctx context.Context, params *ToolsListParams) (*ToolsListResult, error)
type ServerType ¶ added in v0.2.1
type ServerType string
const ( ServerTypeHTTP ServerType = "http" ServerTypeLocal ServerType = "local" ServerTypeSse ServerType = "sse" ServerTypeStdio ServerType = "stdio" )
type ServerValue ¶ added in v0.2.1
type ServerValue struct {
Args []string `json:"args,omitempty"`
Command *string `json:"command,omitempty"`
Cwd *string `json:"cwd,omitempty"`
Env map[string]string `json:"env,omitempty"`
FilterMapping *FilterMappingUnion `json:"filterMapping"`
IsDefaultServer *bool `json:"isDefaultServer,omitempty"`
Timeout *float64 `json:"timeout,omitempty"`
// Tools to include. Defaults to all tools if not specified.
Tools []string `json:"tools,omitempty"`
Type *ServerType `json:"type,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
OauthClientID *string `json:"oauthClientId,omitempty"`
OauthPublicClient *bool `json:"oauthPublicClient,omitempty"`
URL *string `json:"url,omitempty"`
}
MCP server configuration (local/stdio or remote/http)
type SessionAgentDeselectResult ¶ added in v0.1.28
type SessionAgentDeselectResult struct {
}
Experimental: SessionAgentDeselectResult is part of an experimental API and may change or be removed.
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"`
}
Experimental: SessionAgentGetCurrentResult is part of an experimental API and may change or be removed.
type SessionAgentGetCurrentResultAgent ¶ added in v0.1.28
type SessionAgentListResult ¶ added in v0.1.28
type SessionAgentListResult struct {
// Available custom agents
Agents []SessionAgentListResultAgent `json:"agents"`
}
Experimental: SessionAgentListResult is part of an experimental API and may change or be removed.
type SessionAgentListResultAgent ¶ added in v0.2.0
type SessionAgentReloadResult ¶ added in v0.2.0
type SessionAgentReloadResult struct {
// Reloaded custom agents
Agents []SessionAgentReloadResultAgent `json:"agents"`
}
Experimental: SessionAgentReloadResult is part of an experimental API and may change or be removed.
type SessionAgentReloadResultAgent ¶ added in v0.2.0
type SessionAgentSelectParams ¶ added in v0.1.28
type SessionAgentSelectParams struct {
// Name of the custom agent to select
Name string `json:"name"`
}
Experimental: SessionAgentSelectParams is part of an experimental API and may change or be removed.
type SessionAgentSelectResult ¶ added in v0.1.28
type SessionAgentSelectResult struct {
// The newly selected custom agent
Agent SessionAgentSelectResultAgent `json:"agent"`
}
Experimental: SessionAgentSelectResult is part of an experimental API and may change or be removed.
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 SessionCommandsHandlePendingCommandParams ¶ added in v0.2.0
type SessionCommandsHandlePendingCommandResult ¶ added in v0.2.0
type SessionCommandsHandlePendingCommandResult struct {
Success bool `json:"success"`
}
type SessionExtensionsDisableParams ¶ added in v0.2.0
type SessionExtensionsDisableParams struct {
// Source-qualified extension ID to disable
ID string `json:"id"`
}
Experimental: SessionExtensionsDisableParams is part of an experimental API and may change or be removed.
type SessionExtensionsDisableResult ¶ added in v0.2.0
type SessionExtensionsDisableResult struct {
}
Experimental: SessionExtensionsDisableResult is part of an experimental API and may change or be removed.
type SessionExtensionsEnableParams ¶ added in v0.2.0
type SessionExtensionsEnableParams struct {
// Source-qualified extension ID to enable
ID string `json:"id"`
}
Experimental: SessionExtensionsEnableParams is part of an experimental API and may change or be removed.
type SessionExtensionsEnableResult ¶ added in v0.2.0
type SessionExtensionsEnableResult struct {
}
Experimental: SessionExtensionsEnableResult is part of an experimental API and may change or be removed.
type SessionExtensionsListResult ¶ added in v0.2.0
type SessionExtensionsListResult struct {
// Discovered extensions and their current status
Extensions []Extension `json:"extensions"`
}
Experimental: SessionExtensionsListResult is part of an experimental API and may change or be removed.
type SessionExtensionsReloadResult ¶ added in v0.2.0
type SessionExtensionsReloadResult struct {
}
Experimental: SessionExtensionsReloadResult is part of an experimental API and may change or be removed.
type SessionFSAppendFileParams ¶ added in v0.2.2
type SessionFSAppendFileParams struct {
// Content to append
Content string `json:"content"`
// Optional POSIX-style mode for newly created files
Mode *float64 `json:"mode,omitempty"`
// Path using SessionFs conventions
Path string `json:"path"`
// Target session identifier
SessionID string `json:"sessionId"`
}
type SessionFSExistsParams ¶ added in v0.2.2
type SessionFSExistsResult ¶ added in v0.2.2
type SessionFSExistsResult struct {
// Whether the path exists
Exists bool `json:"exists"`
}
type SessionFSMkdirParams ¶ added in v0.2.2
type SessionFSMkdirParams struct {
// Optional POSIX-style mode for newly created directories
Mode *float64 `json:"mode,omitempty"`
// Path using SessionFs conventions
Path string `json:"path"`
// Create parent directories as needed
Recursive *bool `json:"recursive,omitempty"`
// Target session identifier
SessionID string `json:"sessionId"`
}
type SessionFSReadFileParams ¶ added in v0.2.2
type SessionFSReadFileResult ¶ added in v0.2.2
type SessionFSReadFileResult struct {
// File content as UTF-8 string
Content string `json:"content"`
}
type SessionFSReaddirParams ¶ added in v0.2.2
type SessionFSReaddirResult ¶ added in v0.2.2
type SessionFSReaddirResult struct {
// Entry names in the directory
Entries []string `json:"entries"`
}
type SessionFSReaddirWithTypesParams ¶ added in v0.2.2
type SessionFSReaddirWithTypesResult ¶ added in v0.2.2
type SessionFSReaddirWithTypesResult struct {
// Directory entries with type information
Entries []Entry `json:"entries"`
}
type SessionFSRenameParams ¶ added in v0.2.2
type SessionFSRmParams ¶ added in v0.2.2
type SessionFSRmParams struct {
// Ignore errors if the path does not exist
Force *bool `json:"force,omitempty"`
// Path using SessionFs conventions
Path string `json:"path"`
// Remove directories and their contents recursively
Recursive *bool `json:"recursive,omitempty"`
// Target session identifier
SessionID string `json:"sessionId"`
}
type SessionFSSetProviderParams ¶ added in v0.2.1
type SessionFSSetProviderParams struct {
// Path conventions used by this filesystem
Conventions Conventions `json:"conventions"`
// Initial working directory for sessions
InitialCwd string `json:"initialCwd"`
// Path within each session's SessionFs where the runtime stores files for that session
SessionStatePath string `json:"sessionStatePath"`
}
type SessionFSSetProviderResult ¶ added in v0.2.1
type SessionFSSetProviderResult struct {
// Whether the provider was set successfully
Success bool `json:"success"`
}
type SessionFSStatParams ¶ added in v0.2.2
type SessionFSStatResult ¶ added in v0.2.2
type SessionFSStatResult struct {
// ISO 8601 timestamp of creation
Birthtime string `json:"birthtime"`
// Whether the path is a directory
IsDirectory bool `json:"isDirectory"`
// Whether the path is a file
IsFile bool `json:"isFile"`
// ISO 8601 timestamp of last modification
Mtime string `json:"mtime"`
// File size in bytes
Size float64 `json:"size"`
}
type SessionFSWriteFileParams ¶ added in v0.2.2
type SessionFSWriteFileParams struct {
// Content to write
Content string `json:"content"`
// Optional POSIX-style mode for newly created files
Mode *float64 `json:"mode,omitempty"`
// Path using SessionFs conventions
Path string `json:"path"`
// Target session identifier
SessionID string `json:"sessionId"`
}
type SessionFleetStartParams ¶ added in v0.1.25
type SessionFleetStartParams struct {
// Optional user prompt to combine with fleet instructions
Prompt *string `json:"prompt,omitempty"`
}
Experimental: SessionFleetStartParams is part of an experimental API and may change or be removed.
type SessionFleetStartResult ¶ added in v0.1.25
type SessionFleetStartResult struct {
// Whether fleet mode was successfully activated
Started bool `json:"started"`
}
Experimental: SessionFleetStartResult is part of an experimental API and may change or be removed.
type SessionFsHandler ¶ added in v0.2.2
type SessionFsHandler interface {
ReadFile(request *SessionFSReadFileParams) (*SessionFSReadFileResult, error)
WriteFile(request *SessionFSWriteFileParams) error
AppendFile(request *SessionFSAppendFileParams) error
Exists(request *SessionFSExistsParams) (*SessionFSExistsResult, error)
Stat(request *SessionFSStatParams) (*SessionFSStatResult, error)
Mkdir(request *SessionFSMkdirParams) error
Readdir(request *SessionFSReaddirParams) (*SessionFSReaddirResult, error)
ReaddirWithTypes(request *SessionFSReaddirWithTypesParams) (*SessionFSReaddirWithTypesResult, error)
Rm(request *SessionFSRmParams) error
Rename(request *SessionFSRenameParams) error
}
type SessionHistoryCompactResult ¶ added in v0.2.2
type SessionHistoryCompactResult 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"`
}
Experimental: SessionHistoryCompactResult is part of an experimental API and may change or be removed.
type SessionHistoryTruncateParams ¶ added in v0.2.2
type SessionHistoryTruncateParams struct {
// Event ID to truncate to. This event and all events after it are removed from the session.
EventID string `json:"eventId"`
}
Experimental: SessionHistoryTruncateParams is part of an experimental API and may change or be removed.
type SessionHistoryTruncateResult ¶ added in v0.2.2
type SessionHistoryTruncateResult struct {
// Number of events that were removed
EventsRemoved float64 `json:"eventsRemoved"`
}
Experimental: SessionHistoryTruncateResult is part of an experimental API and may change or be removed.
type SessionLogParams ¶ added in v0.2.0
type SessionLogParams struct {
// When true, the message is transient and not persisted to the session event log on disk
Ephemeral *bool `json:"ephemeral,omitempty"`
// Log severity level. Determines how the message is displayed in the timeline. Defaults to
// "info".
Level *Level `json:"level,omitempty"`
// Human-readable message
Message string `json:"message"`
// Optional URL the user can open in their browser for more details
URL *string `json:"url,omitempty"`
}
type SessionLogResult ¶ added in v0.2.0
type SessionLogResult struct {
// The unique identifier of the emitted session event
EventID string `json:"eventId"`
}
type SessionMCPDisableParams ¶ added in v0.2.0
type SessionMCPDisableParams struct {
// Name of the MCP server to disable
ServerName string `json:"serverName"`
}
type SessionMCPDisableResult ¶ added in v0.2.0
type SessionMCPDisableResult struct {
}
type SessionMCPEnableParams ¶ added in v0.2.0
type SessionMCPEnableParams struct {
// Name of the MCP server to enable
ServerName string `json:"serverName"`
}
type SessionMCPEnableResult ¶ added in v0.2.0
type SessionMCPEnableResult struct {
}
type SessionMCPListResult ¶ added in v0.2.0
type SessionMCPListResult struct {
// Configured MCP servers
Servers []ServerElement `json:"servers"`
}
type SessionMCPReloadResult ¶ added in v0.2.0
type SessionMCPReloadResult struct {
}
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 {
// Currently active model identifier
ModelID *string `json:"modelId,omitempty"`
}
type SessionModelSwitchToParams ¶
type SessionModelSwitchToParams struct {
// Override individual model capabilities resolved by the runtime
ModelCapabilities *ModelCapabilitiesOverride `json:"modelCapabilities,omitempty"`
// Model identifier to switch to
ModelID string `json:"modelId"`
// Reasoning effort level to use for the model
ReasoningEffort *string `json:"reasoningEffort,omitempty"`
}
type SessionModelSwitchToResult ¶
type SessionModelSwitchToResult struct {
// Currently active model identifier after the switch
ModelID *string `json:"modelId,omitempty"`
}
type SessionPermissionsHandlePendingPermissionRequestParams ¶ added in v0.1.31
type SessionPermissionsHandlePendingPermissionRequestParams struct {
RequestID string `json:"requestId"`
Result SessionPermissionsHandlePendingPermissionRequestParamsResult `json:"result"`
}
type SessionPermissionsHandlePendingPermissionRequestParamsResult ¶ added in v0.1.31
type SessionPermissionsHandlePendingPermissionRequestParamsResult struct {
Kind Kind `json:"kind"`
Rules []any `json:"rules,omitempty"`
Feedback *string `json:"feedback,omitempty"`
Message *string `json:"message,omitempty"`
Path *string `json:"path,omitempty"`
Interrupt *bool `json:"interrupt,omitempty"`
}
type SessionPermissionsHandlePendingPermissionRequestResult ¶ added in v0.1.31
type SessionPermissionsHandlePendingPermissionRequestResult struct {
// Whether the permission request was handled successfully
Success bool `json:"success"`
}
type SessionPlanDeleteResult ¶ added in v0.1.25
type SessionPlanDeleteResult struct {
}
type SessionPlanReadResult ¶ added in v0.1.25
type SessionPlanReadResult struct {
// The content of the plan file, or null if it does not exist
Content *string `json:"content"`
// Whether the plan file exists in the workspace
Exists bool `json:"exists"`
// Absolute file path of the plan file, or null if workspace is not enabled
Path *string `json:"path"`
}
type SessionPlanUpdateParams ¶ added in v0.1.25
type SessionPlanUpdateParams struct {
// The new content for the plan file
Content string `json:"content"`
}
type SessionPlanUpdateResult ¶ added in v0.1.25
type SessionPlanUpdateResult struct {
}
type SessionPluginsListResult ¶ added in v0.2.0
type SessionPluginsListResult struct {
// Installed plugins
Plugins []Plugin `json:"plugins"`
}
Experimental: SessionPluginsListResult is part of an experimental API and may change or be removed.
type SessionRpc ¶
type SessionRpc struct {
Model *ModelApi
Mode *ModeApi
Plan *PlanApi
Workspace *WorkspaceApi
Fleet *FleetApi
Agent *AgentApi
Skills *SkillsApi
Mcp *McpApi
Plugins *PluginsApi
Extensions *ExtensionsApi
Tools *ToolsApi
Commands *CommandsApi
UI *UIApi
Permissions *PermissionsApi
Shell *ShellApi
History *HistoryApi
// contains filtered or unexported fields
}
SessionRpc provides typed session-scoped RPC methods.
func NewSessionRpc ¶
func NewSessionRpc(client *jsonrpc2.Client, sessionID string) *SessionRpc
func (*SessionRpc) Log ¶ added in v0.2.0
func (a *SessionRpc) Log(ctx context.Context, params *SessionLogParams) (*SessionLogResult, error)
type SessionShellExecParams ¶ added in v0.2.0
type SessionShellExecResult ¶ added in v0.2.0
type SessionShellExecResult struct {
// Unique identifier for tracking streamed output
ProcessID string `json:"processId"`
}
type SessionShellKillParams ¶ added in v0.2.0
type SessionShellKillResult ¶ added in v0.2.0
type SessionShellKillResult struct {
// Whether the signal was sent successfully
Killed bool `json:"killed"`
}
type SessionSkillsDisableParams ¶ added in v0.2.0
type SessionSkillsDisableParams struct {
// Name of the skill to disable
Name string `json:"name"`
}
Experimental: SessionSkillsDisableParams is part of an experimental API and may change or be removed.
type SessionSkillsDisableResult ¶ added in v0.2.0
type SessionSkillsDisableResult struct {
}
Experimental: SessionSkillsDisableResult is part of an experimental API and may change or be removed.
type SessionSkillsEnableParams ¶ added in v0.2.0
type SessionSkillsEnableParams struct {
// Name of the skill to enable
Name string `json:"name"`
}
Experimental: SessionSkillsEnableParams is part of an experimental API and may change or be removed.
type SessionSkillsEnableResult ¶ added in v0.2.0
type SessionSkillsEnableResult struct {
}
Experimental: SessionSkillsEnableResult is part of an experimental API and may change or be removed.
type SessionSkillsListResult ¶ added in v0.2.0
type SessionSkillsListResult struct {
// Available skills
Skills []Skill `json:"skills"`
}
Experimental: SessionSkillsListResult is part of an experimental API and may change or be removed.
type SessionSkillsReloadResult ¶ added in v0.2.0
type SessionSkillsReloadResult struct {
}
Experimental: SessionSkillsReloadResult is part of an experimental API and may change or be removed.
type SessionToolsHandlePendingToolCallParams ¶ added in v0.1.31
type SessionToolsHandlePendingToolCallParams struct {
Error *string `json:"error,omitempty"`
RequestID string `json:"requestId"`
Result *ResultUnion `json:"result"`
}
type SessionToolsHandlePendingToolCallResult ¶ added in v0.1.31
type SessionToolsHandlePendingToolCallResult struct {
// Whether the tool call result was handled successfully
Success bool `json:"success"`
}
type SessionUIElicitationParams ¶ added in v0.2.0
type SessionUIElicitationParams struct {
// Message describing what information is needed from the user
Message string `json:"message"`
// JSON Schema describing the form fields to present to the user
RequestedSchema RequestedSchema `json:"requestedSchema"`
}
type SessionUIElicitationResult ¶ added in v0.2.0
type SessionUIHandlePendingElicitationParams ¶ added in v0.2.1
type SessionUIHandlePendingElicitationParams struct {
// The unique request ID from the elicitation.requested event
RequestID string `json:"requestId"`
// The elicitation response (accept with form values, decline, or cancel)
Result SessionUIHandlePendingElicitationParamsResult `json:"result"`
}
type SessionUIHandlePendingElicitationParamsResult ¶ added in v0.2.1
type SessionUIHandlePendingElicitationParamsResult struct {
// The user's response: accept (submitted), decline (rejected), or cancel (dismissed)
Action Action `json:"action"`
// The form values submitted by the user (present when action is 'accept')
Content map[string]*Content `json:"content,omitempty"`
}
The elicitation response (accept with form values, decline, or cancel)
type SessionUIHandlePendingElicitationResult ¶ added in v0.2.1
type SessionUIHandlePendingElicitationResult struct {
// Whether the response was accepted. False if the request was already resolved by another
// client.
Success bool `json:"success"`
}
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 SessionsForkParams ¶ added in v0.2.2
type SessionsForkParams struct {
// Source session ID to fork from
SessionID string `json:"sessionId"`
// Optional event ID boundary. When provided, the fork includes only events before this ID
// (exclusive). When omitted, all events are included.
ToEventID *string `json:"toEventId,omitempty"`
}
Experimental: SessionsForkParams is part of an experimental API and may change or be removed.
type SessionsForkResult ¶ added in v0.2.2
type SessionsForkResult struct {
// The new forked session's ID
SessionID string `json:"sessionId"`
}
Experimental: SessionsForkResult is part of an experimental API and may change or be removed.
type ShellApi ¶ added in v0.2.1
type ShellApi sessionApi
func (*ShellApi) Exec ¶ added in v0.2.1
func (a *ShellApi) Exec(ctx context.Context, params *SessionShellExecParams) (*SessionShellExecResult, error)
func (*ShellApi) Kill ¶ added in v0.2.1
func (a *ShellApi) Kill(ctx context.Context, params *SessionShellKillParams) (*SessionShellKillResult, error)
type Skill ¶ added in v0.2.0
type Skill struct {
// Description of what the skill does
Description string `json:"description"`
// Whether the skill is currently enabled
Enabled bool `json:"enabled"`
// Unique identifier for the skill
Name string `json:"name"`
// Absolute path to the skill file
Path *string `json:"path,omitempty"`
// Source location type (e.g., project, personal, plugin)
Source string `json:"source"`
// Whether the skill can be invoked by the user as a slash command
UserInvocable bool `json:"userInvocable"`
}
type SkillsApi ¶ added in v0.2.1
type SkillsApi sessionApi
Experimental: SkillsApi contains experimental APIs that may change or be removed.
func (*SkillsApi) Disable ¶ added in v0.2.1
func (a *SkillsApi) Disable(ctx context.Context, params *SessionSkillsDisableParams) (*SessionSkillsDisableResult, error)
func (*SkillsApi) Enable ¶ added in v0.2.1
func (a *SkillsApi) Enable(ctx context.Context, params *SessionSkillsEnableParams) (*SessionSkillsEnableResult, error)
type Source ¶ added in v0.2.0
type Source string
Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)
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]any `json:"parameters,omitempty"`
}
type ToolsApi ¶ added in v0.2.1
type ToolsApi sessionApi
func (*ToolsApi) HandlePendingToolCall ¶ added in v0.2.1
func (a *ToolsApi) HandlePendingToolCall(ctx context.Context, params *SessionToolsHandlePendingToolCallParams) (*SessionToolsHandlePendingToolCallResult, error)
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 UIApi ¶ added in v0.2.2
type UIApi sessionApi
func (*UIApi) Elicitation ¶ added in v0.2.2
func (a *UIApi) Elicitation(ctx context.Context, params *SessionUIElicitationParams) (*SessionUIElicitationResult, error)
func (*UIApi) HandlePendingElicitation ¶ added in v0.2.2
func (a *UIApi) HandlePendingElicitation(ctx context.Context, params *SessionUIHandlePendingElicitationParams) (*SessionUIHandlePendingElicitationResult, error)
type WorkspaceApi ¶ added in v0.2.1
type WorkspaceApi sessionApi
func (*WorkspaceApi) CreateFile ¶ added in v0.2.1
func (a *WorkspaceApi) CreateFile(ctx context.Context, params *SessionWorkspaceCreateFileParams) (*SessionWorkspaceCreateFileResult, error)
func (*WorkspaceApi) ListFiles ¶ added in v0.2.1
func (a *WorkspaceApi) ListFiles(ctx context.Context) (*SessionWorkspaceListFilesResult, error)
func (*WorkspaceApi) ReadFile ¶ added in v0.2.1
func (a *WorkspaceApi) ReadFile(ctx context.Context, params *SessionWorkspaceReadFileParams) (*SessionWorkspaceReadFileResult, error)