Documentation
¶
Index ¶
- func RegisterClientSessionApiHandlers(client *jsonrpc2.Client, ...)
- type AccountGetQuotaRequest
- type AccountGetQuotaResult
- type AccountQuotaSnapshot
- type AgentApi
- func (a *AgentApi) Deselect(ctx context.Context) (*AgentDeselectResult, error)
- func (a *AgentApi) GetCurrent(ctx context.Context) (*AgentGetCurrentResult, error)
- func (a *AgentApi) List(ctx context.Context) (*AgentList, error)
- func (a *AgentApi) Reload(ctx context.Context) (*AgentReloadResult, error)
- func (a *AgentApi) Select(ctx context.Context, params *AgentSelectRequest) (*AgentSelectResult, error)
- type AgentDeselectResult
- type AgentGetCurrentResult
- type AgentInfo
- type AgentList
- type AgentReloadResult
- type AgentSelectRequest
- type AgentSelectResult
- type AuthApi
- type AuthInfoType
- type ClientSessionApiHandlers
- type CommandsApi
- func (a *CommandsApi) HandlePendingCommand(ctx context.Context, params *CommandsHandlePendingCommandRequest) (*CommandsHandlePendingCommandResult, error)
- func (a *CommandsApi) RespondToQueuedCommand(ctx context.Context, params *CommandsRespondToQueuedCommandRequest) (*CommandsRespondToQueuedCommandResult, error)
- type CommandsHandlePendingCommandRequest
- type CommandsHandlePendingCommandResult
- type CommandsRespondToQueuedCommandRequest
- type CommandsRespondToQueuedCommandResult
- type ConnectRequest
- type ConnectResult
- type CurrentModel
- type DiscoveredMcpServer
- type DiscoveredMcpServerSource
- type DiscoveredMcpServerType
- type EmbeddedBlobResourceContents
- type EmbeddedTextResourceContents
- type Extension
- type ExtensionList
- type ExtensionSource
- type ExtensionStatus
- type ExtensionsApi
- func (a *ExtensionsApi) Disable(ctx context.Context, params *ExtensionsDisableRequest) (*ExtensionsDisableResult, error)
- func (a *ExtensionsApi) Enable(ctx context.Context, params *ExtensionsEnableRequest) (*ExtensionsEnableResult, error)
- func (a *ExtensionsApi) List(ctx context.Context) (*ExtensionList, error)
- func (a *ExtensionsApi) Reload(ctx context.Context) (*ExtensionsReloadResult, error)
- type ExtensionsDisableRequest
- type ExtensionsDisableResult
- type ExtensionsEnableRequest
- type ExtensionsEnableResult
- type ExtensionsReloadResult
- type ExternalToolResult
- type ExternalToolStringResult
- type ExternalToolTextResultForLlm
- type ExternalToolTextResultForLlmContent
- type ExternalToolTextResultForLlmContentAudio
- type ExternalToolTextResultForLlmContentImage
- type ExternalToolTextResultForLlmContentResource
- type ExternalToolTextResultForLlmContentResourceDetails
- type ExternalToolTextResultForLlmContentResourceLink
- type ExternalToolTextResultForLlmContentResourceLinkIcon
- type ExternalToolTextResultForLlmContentResourceLinkIconTheme
- type ExternalToolTextResultForLlmContentTerminal
- type ExternalToolTextResultForLlmContentText
- type ExternalToolTextResultForLlmContentType
- type FilterMapping
- type FilterMappingEnumMap
- type FilterMappingString
- type FilterMappingValue
- type FleetApi
- type FleetStartRequest
- type FleetStartResult
- type HandlePendingToolCallRequest
- type HandlePendingToolCallResult
- type HistoryApi
- type HistoryCompactContextWindow
- type HistoryCompactResult
- type HistoryTruncateRequest
- type HistoryTruncateResult
- type InstructionsApi
- type InstructionsGetSourcesResult
- type InstructionsSources
- type InstructionsSourcesLocation
- type InstructionsSourcesType
- type InternalServerRpc
- type LogRequest
- type LogResult
- type McpApi
- func (a *McpApi) Disable(ctx context.Context, params *McpDisableRequest) (*McpDisableResult, error)
- func (a *McpApi) Enable(ctx context.Context, params *McpEnableRequest) (*McpEnableResult, error)
- func (a *McpApi) List(ctx context.Context) (*McpServerList, error)
- func (s *McpApi) Oauth() *McpOauthApi
- func (a *McpApi) Reload(ctx context.Context) (*McpReloadResult, error)
- type McpConfigAddRequest
- type McpConfigAddResult
- type McpConfigDisableRequest
- type McpConfigDisableResult
- type McpConfigEnableRequest
- type McpConfigEnableResult
- type McpConfigList
- type McpConfigRemoveRequest
- type McpConfigRemoveResult
- type McpConfigUpdateRequest
- type McpConfigUpdateResult
- type McpDisableRequest
- type McpDisableResult
- type McpDiscoverRequest
- type McpDiscoverResult
- type McpEnableRequest
- type McpEnableResult
- type McpOauthApi
- type McpOauthLoginRequest
- type McpOauthLoginResult
- type McpReloadResult
- type McpServer
- type McpServerConfig
- type McpServerConfigHTTP
- type McpServerConfigHTTPOauthGrantType
- type McpServerConfigHTTPType
- type McpServerConfigLocal
- type McpServerConfigLocalType
- type McpServerList
- type McpServerSource
- type McpServerStatus
- type ModeApi
- type ModeSetRequest
- type ModeSetResult
- type Model
- type ModelApi
- type ModelBilling
- type ModelCapabilities
- type ModelCapabilitiesLimits
- type ModelCapabilitiesLimitsVision
- type ModelCapabilitiesOverride
- type ModelCapabilitiesOverrideLimits
- type ModelCapabilitiesOverrideLimitsVision
- type ModelCapabilitiesOverrideSupports
- type ModelCapabilitiesSupports
- type ModelList
- type ModelPickerCategory
- type ModelPickerPriceCategory
- type ModelPolicy
- type ModelSwitchToRequest
- type ModelSwitchToResult
- type ModelsListRequest
- type NameApi
- type NameGetResult
- type NameSetRequest
- type NameSetResult
- type PermissionDecision
- type PermissionDecisionApproveForLocation
- type PermissionDecisionApproveForLocationApproval
- type PermissionDecisionApproveForLocationApprovalCommands
- type PermissionDecisionApproveForLocationApprovalCustomTool
- type PermissionDecisionApproveForLocationApprovalExtensionManagement
- type PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess
- type PermissionDecisionApproveForLocationApprovalKind
- type PermissionDecisionApproveForLocationApprovalMcp
- type PermissionDecisionApproveForLocationApprovalMcpSampling
- type PermissionDecisionApproveForLocationApprovalMemory
- type PermissionDecisionApproveForLocationApprovalRead
- type PermissionDecisionApproveForLocationApprovalWrite
- type PermissionDecisionApproveForSession
- type PermissionDecisionApproveForSessionApproval
- type PermissionDecisionApproveForSessionApprovalCommands
- type PermissionDecisionApproveForSessionApprovalCustomTool
- type PermissionDecisionApproveForSessionApprovalExtensionManagement
- type PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess
- type PermissionDecisionApproveForSessionApprovalKind
- type PermissionDecisionApproveForSessionApprovalMcp
- type PermissionDecisionApproveForSessionApprovalMcpSampling
- type PermissionDecisionApproveForSessionApprovalMemory
- type PermissionDecisionApproveForSessionApprovalRead
- type PermissionDecisionApproveForSessionApprovalWrite
- type PermissionDecisionApproveOnce
- type PermissionDecisionApprovePermanently
- type PermissionDecisionKind
- type PermissionDecisionReject
- type PermissionDecisionRequest
- type PermissionDecisionUserNotAvailable
- type PermissionRequestResult
- type PermissionsApi
- func (a *PermissionsApi) HandlePendingPermissionRequest(ctx context.Context, params *PermissionDecisionRequest) (*PermissionRequestResult, error)
- func (a *PermissionsApi) ResetSessionApprovals(ctx context.Context) (*PermissionsResetSessionApprovalsResult, error)
- func (a *PermissionsApi) SetApproveAll(ctx context.Context, params *PermissionsSetApproveAllRequest) (*PermissionsSetApproveAllResult, error)
- type PermissionsResetSessionApprovalsRequest
- type PermissionsResetSessionApprovalsResult
- type PermissionsSetApproveAllRequest
- type PermissionsSetApproveAllResult
- type PingRequest
- type PingResult
- type PlanApi
- type PlanDeleteResult
- type PlanReadResult
- type PlanUpdateRequest
- type PlanUpdateResult
- type Plugin
- type PluginList
- type PluginsApi
- type QueuedCommandHandled
- type QueuedCommandNotHandled
- type QueuedCommandResult
- type RawExternalToolTextResultForLlmContentData
- type RawExternalToolTextResultForLlmContentResourceDetailsData
- type RawMcpServerConfigData
- type RawPermissionDecisionApproveForLocationApprovalData
- type RawPermissionDecisionApproveForSessionApprovalData
- type RawPermissionDecisionData
- type RawTaskInfoData
- type RawUIElicitationSchemaPropertyData
- type RemoteApi
- type RemoteDisableResult
- type RemoteEnableResult
- type ServerAccountApi
- type ServerMcpApi
- type ServerMcpConfigApi
- func (a *ServerMcpConfigApi) Add(ctx context.Context, params *McpConfigAddRequest) (*McpConfigAddResult, error)
- func (a *ServerMcpConfigApi) Disable(ctx context.Context, params *McpConfigDisableRequest) (*McpConfigDisableResult, error)
- func (a *ServerMcpConfigApi) Enable(ctx context.Context, params *McpConfigEnableRequest) (*McpConfigEnableResult, error)
- func (a *ServerMcpConfigApi) List(ctx context.Context) (*McpConfigList, error)
- func (a *ServerMcpConfigApi) Remove(ctx context.Context, params *McpConfigRemoveRequest) (*McpConfigRemoveResult, error)
- func (a *ServerMcpConfigApi) Update(ctx context.Context, params *McpConfigUpdateRequest) (*McpConfigUpdateResult, error)
- type ServerModelsApi
- type ServerRpc
- type ServerSessionFsApi
- type ServerSessionsApi
- type ServerSkill
- type ServerSkillList
- type ServerSkillsApi
- type ServerSkillsConfigApi
- type ServerToolsApi
- type SessionAuthStatus
- type SessionFsAppendFileRequest
- type SessionFsError
- type SessionFsErrorCode
- type SessionFsExistsRequest
- type SessionFsExistsResult
- type SessionFsHandler
- type SessionFsMkdirRequest
- type SessionFsReadFileRequest
- type SessionFsReadFileResult
- type SessionFsReaddirRequest
- type SessionFsReaddirResult
- type SessionFsReaddirWithTypesEntry
- type SessionFsReaddirWithTypesEntryType
- type SessionFsReaddirWithTypesRequest
- type SessionFsReaddirWithTypesResult
- type SessionFsRenameRequest
- type SessionFsRmRequest
- type SessionFsSetProviderConventions
- type SessionFsSetProviderRequest
- type SessionFsSetProviderResult
- type SessionFsStatRequest
- type SessionFsStatResult
- type SessionFsWriteFileRequest
- type SessionLogLevel
- type SessionMode
- type SessionRpc
- type SessionsForkRequest
- type SessionsForkResult
- type ShellApi
- type ShellExecRequest
- type ShellExecResult
- type ShellKillRequest
- type ShellKillResult
- type ShellKillSignal
- type Skill
- type SkillList
- type SkillsApi
- func (a *SkillsApi) Disable(ctx context.Context, params *SkillsDisableRequest) (*SkillsDisableResult, error)
- func (a *SkillsApi) Enable(ctx context.Context, params *SkillsEnableRequest) (*SkillsEnableResult, error)
- func (a *SkillsApi) List(ctx context.Context) (*SkillList, error)
- func (a *SkillsApi) Reload(ctx context.Context) (*SkillsReloadResult, error)
- type SkillsConfigSetDisabledSkillsRequest
- type SkillsConfigSetDisabledSkillsResult
- type SkillsDisableRequest
- type SkillsDisableResult
- type SkillsDiscoverRequest
- type SkillsEnableRequest
- type SkillsEnableResult
- type SkillsReloadResult
- type SuspendResult
- type TaskAgentInfo
- type TaskAgentInfoExecutionMode
- type TaskAgentInfoStatus
- type TaskInfo
- type TaskInfoType
- type TaskList
- type TaskShellInfo
- type TaskShellInfoAttachmentMode
- type TaskShellInfoExecutionMode
- type TaskShellInfoStatus
- type TasksApi
- func (a *TasksApi) Cancel(ctx context.Context, params *TasksCancelRequest) (*TasksCancelResult, error)
- func (a *TasksApi) List(ctx context.Context) (*TaskList, error)
- func (a *TasksApi) PromoteToBackground(ctx context.Context, params *TasksPromoteToBackgroundRequest) (*TasksPromoteToBackgroundResult, error)
- func (a *TasksApi) Remove(ctx context.Context, params *TasksRemoveRequest) (*TasksRemoveResult, error)
- func (a *TasksApi) SendMessage(ctx context.Context, params *TasksSendMessageRequest) (*TasksSendMessageResult, error)
- func (a *TasksApi) StartAgent(ctx context.Context, params *TasksStartAgentRequest) (*TasksStartAgentResult, error)
- type TasksCancelRequest
- type TasksCancelResult
- type TasksPromoteToBackgroundRequest
- type TasksPromoteToBackgroundResult
- type TasksRemoveRequest
- type TasksRemoveResult
- type TasksSendMessageRequest
- type TasksSendMessageResult
- type TasksStartAgentRequest
- type TasksStartAgentResult
- type Tool
- type ToolList
- type ToolsApi
- type ToolsListRequest
- type UIApi
- type UIElicitationArrayAnyOfField
- type UIElicitationArrayAnyOfFieldItems
- type UIElicitationArrayAnyOfFieldItemsAnyOf
- type UIElicitationArrayEnumField
- type UIElicitationArrayEnumFieldItems
- type UIElicitationArrayEnumFieldItemsType
- type UIElicitationBooleanValue
- type UIElicitationFieldValue
- type UIElicitationNumberValue
- type UIElicitationRequest
- type UIElicitationResponse
- type UIElicitationResponseAction
- type UIElicitationResponseContent
- type UIElicitationResult
- type UIElicitationSchema
- type UIElicitationSchemaProperty
- type UIElicitationSchemaPropertyBoolean
- type UIElicitationSchemaPropertyNumber
- type UIElicitationSchemaPropertyNumberType
- type UIElicitationSchemaPropertyString
- type UIElicitationSchemaPropertyStringFormat
- type UIElicitationSchemaPropertyType
- type UIElicitationSchemaType
- type UIElicitationStringArrayValue
- type UIElicitationStringEnumField
- type UIElicitationStringOneOfField
- type UIElicitationStringOneOfFieldOneOf
- type UIElicitationStringValue
- type UIHandlePendingElicitationRequest
- type UsageApi
- type UsageGetMetricsResult
- type UsageMetricsCodeChanges
- type UsageMetricsModelMetric
- type UsageMetricsModelMetricRequests
- type UsageMetricsModelMetricTokenDetail
- type UsageMetricsModelMetricUsage
- type UsageMetricsTokenDetail
- type WorkspacesApi
- func (a *WorkspacesApi) CreateFile(ctx context.Context, params *WorkspacesCreateFileRequest) (*WorkspacesCreateFileResult, error)
- func (a *WorkspacesApi) GetWorkspace(ctx context.Context) (*WorkspacesGetWorkspaceResult, error)
- func (a *WorkspacesApi) ListFiles(ctx context.Context) (*WorkspacesListFilesResult, error)
- func (a *WorkspacesApi) ReadFile(ctx context.Context, params *WorkspacesReadFileRequest) (*WorkspacesReadFileResult, error)
- type WorkspacesCreateFileRequest
- type WorkspacesCreateFileResult
- type WorkspacesGetWorkspaceResult
- type WorkspacesGetWorkspaceResultWorkspace
- type WorkspacesGetWorkspaceResultWorkspaceHostType
- type WorkspacesListFilesResult
- type WorkspacesReadFileRequest
- type WorkspacesReadFileResult
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 AccountGetQuotaRequest ¶ added in v0.3.0
type AccountGetQuotaRequest struct {
// GitHub token for per-user quota lookup. When provided, resolves this token to determine
// the user's quota instead of using the global auth.
GitHubToken *string `json:"gitHubToken,omitempty"`
}
type AccountGetQuotaResult ¶
type AccountGetQuotaResult struct {
// Quota snapshots keyed by type (e.g., chat, completions, premium_interactions)
QuotaSnapshots map[string]AccountQuotaSnapshot `json:"quotaSnapshots"`
}
type AccountQuotaSnapshot ¶ added in v0.3.0
type AccountQuotaSnapshot struct {
// Number of requests included in the entitlement
EntitlementRequests int64 `json:"entitlementRequests"`
// Whether the user has an unlimited usage entitlement
IsUnlimitedEntitlement bool `json:"isUnlimitedEntitlement"`
// Number of overage requests made this period
Overage float64 `json:"overage"`
// Whether overage 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 string)
ResetDate *string `json:"resetDate,omitempty"`
// Whether usage is still permitted after quota exhaustion
UsageAllowedWithExhaustedQuota bool `json:"usageAllowedWithExhaustedQuota"`
// Number of requests used so far this period
UsedRequests int64 `json:"usedRequests"`
}
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) (*AgentDeselectResult, error)
func (*AgentApi) GetCurrent ¶ added in v0.2.1
func (a *AgentApi) GetCurrent(ctx context.Context) (*AgentGetCurrentResult, error)
func (*AgentApi) Reload ¶ added in v0.2.1
func (a *AgentApi) Reload(ctx context.Context) (*AgentReloadResult, error)
func (*AgentApi) Select ¶ added in v0.2.1
func (a *AgentApi) Select(ctx context.Context, params *AgentSelectRequest) (*AgentSelectResult, error)
type AgentDeselectResult ¶ added in v0.3.0
type AgentDeselectResult struct {
}
Experimental: AgentDeselectResult is part of an experimental API and may change or be removed.
type AgentGetCurrentResult ¶ added in v0.3.0
type AgentGetCurrentResult struct {
// Currently selected custom agent, or null if using the default agent
Agent *AgentInfo `json:"agent,omitempty"`
}
Experimental: AgentGetCurrentResult is part of an experimental API and may change or be removed.
type AgentInfo ¶ added in v0.3.0
type AgentInfo 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"`
// Absolute local file path of the agent definition. Only set for file-based agents loaded
// from disk; remote agents do not have a path.
Path *string `json:"path,omitempty"`
}
type AgentList ¶ added in v0.3.0
type AgentList struct {
// Available custom agents
Agents []AgentInfo `json:"agents"`
}
Experimental: AgentList is part of an experimental API and may change or be removed.
type AgentReloadResult ¶ added in v0.3.0
type AgentReloadResult struct {
// Reloaded custom agents
Agents []AgentInfo `json:"agents"`
}
Experimental: AgentReloadResult is part of an experimental API and may change or be removed.
type AgentSelectRequest ¶ added in v0.3.0
type AgentSelectRequest struct {
// Name of the custom agent to select
Name string `json:"name"`
}
Experimental: AgentSelectRequest is part of an experimental API and may change or be removed.
type AgentSelectResult ¶ added in v0.3.0
type AgentSelectResult struct {
// The newly selected custom agent
Agent AgentInfo `json:"agent"`
}
Experimental: AgentSelectResult is part of an experimental API and may change or be removed.
type AuthInfoType ¶ added in v0.3.0
type AuthInfoType string
Authentication type
const ( AuthInfoTypeAPIKey AuthInfoType = "api-key" AuthInfoTypeCopilotAPIToken AuthInfoType = "copilot-api-token" AuthInfoTypeEnv AuthInfoType = "env" AuthInfoTypeGhCli AuthInfoType = "gh-cli" AuthInfoTypeHmac AuthInfoType = "hmac" AuthInfoTypeToken AuthInfoType = "token" AuthInfoTypeUser AuthInfoType = "user" )
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 *CommandsHandlePendingCommandRequest) (*CommandsHandlePendingCommandResult, error)
func (*CommandsApi) RespondToQueuedCommand ¶
func (a *CommandsApi) RespondToQueuedCommand(ctx context.Context, params *CommandsRespondToQueuedCommandRequest) (*CommandsRespondToQueuedCommandResult, error)
type CommandsHandlePendingCommandRequest ¶ added in v0.3.0
type CommandsHandlePendingCommandResult ¶ added in v0.3.0
type CommandsHandlePendingCommandResult struct {
// Whether the command was handled successfully
Success bool `json:"success"`
}
type CommandsRespondToQueuedCommandRequest ¶ added in v1.0.0
type CommandsRespondToQueuedCommandRequest struct {
// Request ID from the queued command event
RequestID string `json:"requestId"`
// Result of the queued command execution
Result QueuedCommandResult `json:"result"`
}
type CommandsRespondToQueuedCommandResult ¶ added in v1.0.0
type CommandsRespondToQueuedCommandResult struct {
// Whether the response was accepted (false if the requestId was not found or already
// resolved)
Success bool `json:"success"`
}
type ConnectRequest ¶ added in v1.0.0
type ConnectRequest struct {
// Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN
Token *string `json:"token,omitempty"`
}
Internal: ConnectRequest is an internal SDK API and is not part of the public surface.
type ConnectResult ¶ added in v1.0.0
type ConnectResult struct {
// Always true on success
Ok bool `json:"ok"`
// Server protocol version number
ProtocolVersion int64 `json:"protocolVersion"`
// Server package version
Version string `json:"version"`
}
Internal: ConnectResult is an internal SDK API and is not part of the public surface.
type CurrentModel ¶ added in v0.3.0
type CurrentModel struct {
// Currently active model identifier
ModelID *string `json:"modelId,omitempty"`
}
type DiscoveredMcpServer ¶
type DiscoveredMcpServer struct {
// Whether the server is enabled (not in the disabled list)
Enabled bool `json:"enabled"`
// Server name (config key)
Name string `json:"name"`
// Configuration source
Source DiscoveredMcpServerSource `json:"source"`
// Server transport type: stdio, http, sse, or memory (local configs are normalized to stdio)
Type *DiscoveredMcpServerType `json:"type,omitempty"`
}
type DiscoveredMcpServerSource ¶
type DiscoveredMcpServerSource string
Configuration source
const ( DiscoveredMcpServerSourceBuiltin DiscoveredMcpServerSource = "builtin" DiscoveredMcpServerSourcePlugin DiscoveredMcpServerSource = "plugin" DiscoveredMcpServerSourceUser DiscoveredMcpServerSource = "user" DiscoveredMcpServerSourceWorkspace DiscoveredMcpServerSource = "workspace" )
type DiscoveredMcpServerType ¶
type DiscoveredMcpServerType string
Server transport type: stdio, http, sse, or memory (local configs are normalized to stdio)
const ( DiscoveredMcpServerTypeHTTP DiscoveredMcpServerType = "http" DiscoveredMcpServerTypeMemory DiscoveredMcpServerType = "memory" DiscoveredMcpServerTypeSse DiscoveredMcpServerType = "sse" DiscoveredMcpServerTypeStdio DiscoveredMcpServerType = "stdio" )
type EmbeddedBlobResourceContents ¶ added in v1.0.0
type EmbeddedTextResourceContents ¶ added in v1.0.0
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 ExtensionSource `json:"source"`
// Current status: running, disabled, failed, or starting
Status ExtensionStatus `json:"status"`
}
type ExtensionList ¶ added in v0.3.0
type ExtensionList struct {
// Discovered extensions and their current status
Extensions []Extension `json:"extensions"`
}
Experimental: ExtensionList is part of an experimental API and may change or be removed.
type ExtensionSource ¶ added in v0.3.0
type ExtensionSource string
Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)
const ( ExtensionSourceProject ExtensionSource = "project" ExtensionSourceUser ExtensionSource = "user" )
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 *ExtensionsDisableRequest) (*ExtensionsDisableResult, error)
func (*ExtensionsApi) Enable ¶ added in v0.2.1
func (a *ExtensionsApi) Enable(ctx context.Context, params *ExtensionsEnableRequest) (*ExtensionsEnableResult, error)
func (*ExtensionsApi) List ¶ added in v0.2.1
func (a *ExtensionsApi) List(ctx context.Context) (*ExtensionList, error)
func (*ExtensionsApi) Reload ¶ added in v0.2.1
func (a *ExtensionsApi) Reload(ctx context.Context) (*ExtensionsReloadResult, error)
type ExtensionsDisableRequest ¶ added in v0.3.0
type ExtensionsDisableRequest struct {
// Source-qualified extension ID to disable
ID string `json:"id"`
}
Experimental: ExtensionsDisableRequest is part of an experimental API and may change or be removed.
type ExtensionsDisableResult ¶ added in v0.3.0
type ExtensionsDisableResult struct {
}
Experimental: ExtensionsDisableResult is part of an experimental API and may change or be removed.
type ExtensionsEnableRequest ¶ added in v0.3.0
type ExtensionsEnableRequest struct {
// Source-qualified extension ID to enable
ID string `json:"id"`
}
Experimental: ExtensionsEnableRequest is part of an experimental API and may change or be removed.
type ExtensionsEnableResult ¶ added in v0.3.0
type ExtensionsEnableResult struct {
}
Experimental: ExtensionsEnableResult is part of an experimental API and may change or be removed.
type ExtensionsReloadResult ¶ added in v0.3.0
type ExtensionsReloadResult struct {
}
Experimental: ExtensionsReloadResult is part of an experimental API and may change or be removed.
type ExternalToolResult ¶ added in v1.0.0
type ExternalToolResult interface {
// contains filtered or unexported methods
}
Tool call result (string or expanded result object)
type ExternalToolStringResult ¶ added in v1.0.0
type ExternalToolStringResult string
type ExternalToolTextResultForLlm ¶ added in v1.0.0
type ExternalToolTextResultForLlm struct {
// Structured content blocks from the tool
Contents []ExternalToolTextResultForLlmContent `json:"contents,omitempty"`
// Optional error message for failed executions
Error *string `json:"error,omitempty"`
// Execution outcome classification. Optional for back-compat; normalized to 'success' (or
// 'failure' when error is present) when missing or unrecognized.
ResultType *string `json:"resultType,omitempty"`
// Detailed log content for timeline display
SessionLog *string `json:"sessionLog,omitempty"`
// Text result returned to the model
TextResultForLlm string `json:"textResultForLlm"`
// Optional tool-specific telemetry
ToolTelemetry map[string]any `json:"toolTelemetry,omitempty"`
}
Expanded external tool result payload
func (*ExternalToolTextResultForLlm) UnmarshalJSON ¶ added in v1.0.0
func (r *ExternalToolTextResultForLlm) UnmarshalJSON(data []byte) error
type ExternalToolTextResultForLlmContent ¶ added in v1.0.0
type ExternalToolTextResultForLlmContent interface {
Type() ExternalToolTextResultForLlmContentType
// contains filtered or unexported methods
}
A content block within a tool result, which may be text, terminal output, image, audio, or a resource
type ExternalToolTextResultForLlmContentAudio ¶ added in v1.0.0
type ExternalToolTextResultForLlmContentAudio struct {
// Base64-encoded audio data
Data string `json:"data"`
// MIME type of the audio (e.g., audio/wav, audio/mpeg)
MIMEType string `json:"mimeType"`
}
Audio content block with base64-encoded data
func (ExternalToolTextResultForLlmContentAudio) MarshalJSON ¶ added in v1.0.0
func (r ExternalToolTextResultForLlmContentAudio) MarshalJSON() ([]byte, error)
type ExternalToolTextResultForLlmContentImage ¶ added in v1.0.0
type ExternalToolTextResultForLlmContentImage struct {
// Base64-encoded image data
Data string `json:"data"`
// MIME type of the image (e.g., image/png, image/jpeg)
MIMEType string `json:"mimeType"`
}
Image content block with base64-encoded data
func (ExternalToolTextResultForLlmContentImage) MarshalJSON ¶ added in v1.0.0
func (r ExternalToolTextResultForLlmContentImage) MarshalJSON() ([]byte, error)
type ExternalToolTextResultForLlmContentResource ¶ added in v1.0.0
type ExternalToolTextResultForLlmContentResource struct {
// The embedded resource contents, either text or base64-encoded binary
Resource ExternalToolTextResultForLlmContentResourceDetails `json:"resource"`
}
Embedded resource content block with inline text or binary data
func (ExternalToolTextResultForLlmContentResource) MarshalJSON ¶ added in v1.0.0
func (r ExternalToolTextResultForLlmContentResource) MarshalJSON() ([]byte, error)
func (*ExternalToolTextResultForLlmContentResource) UnmarshalJSON ¶ added in v1.0.0
func (r *ExternalToolTextResultForLlmContentResource) UnmarshalJSON(data []byte) error
type ExternalToolTextResultForLlmContentResourceDetails ¶ added in v1.0.0
type ExternalToolTextResultForLlmContentResourceDetails interface {
// contains filtered or unexported methods
}
The embedded resource contents, either text or base64-encoded binary
type ExternalToolTextResultForLlmContentResourceLink ¶ added in v1.0.0
type ExternalToolTextResultForLlmContentResourceLink struct {
// Human-readable description of the resource
Description *string `json:"description,omitempty"`
// Icons associated with this resource
Icons []ExternalToolTextResultForLlmContentResourceLinkIcon `json:"icons,omitempty"`
// MIME type of the resource content
MIMEType *string `json:"mimeType,omitempty"`
// Resource name identifier
Name string `json:"name"`
// Size of the resource in bytes
Size *float64 `json:"size,omitempty"`
// Human-readable display title for the resource
Title *string `json:"title,omitempty"`
// URI identifying the resource
URI string `json:"uri"`
}
Resource link content block referencing an external resource
func (ExternalToolTextResultForLlmContentResourceLink) MarshalJSON ¶ added in v1.0.0
func (r ExternalToolTextResultForLlmContentResourceLink) MarshalJSON() ([]byte, error)
type ExternalToolTextResultForLlmContentResourceLinkIcon ¶ added in v1.0.0
type ExternalToolTextResultForLlmContentResourceLinkIcon struct {
// MIME type of the icon image
MIMEType *string `json:"mimeType,omitempty"`
// Available icon sizes (e.g., ['16x16', '32x32'])
Sizes []string `json:"sizes,omitempty"`
// URL or path to the icon image
Src string `json:"src"`
// Theme variant this icon is intended for
Theme *ExternalToolTextResultForLlmContentResourceLinkIconTheme `json:"theme,omitempty"`
}
Icon image for a resource
type ExternalToolTextResultForLlmContentResourceLinkIconTheme ¶ added in v1.0.0
type ExternalToolTextResultForLlmContentResourceLinkIconTheme string
Theme variant this icon is intended for
const ( ExternalToolTextResultForLlmContentResourceLinkIconThemeDark ExternalToolTextResultForLlmContentResourceLinkIconTheme = "dark" ExternalToolTextResultForLlmContentResourceLinkIconThemeLight ExternalToolTextResultForLlmContentResourceLinkIconTheme = "light" )
type ExternalToolTextResultForLlmContentTerminal ¶ added in v1.0.0
type ExternalToolTextResultForLlmContentTerminal struct {
// Working directory where the command was executed
Cwd *string `json:"cwd,omitempty"`
// Process exit code, if the command has completed
ExitCode *float64 `json:"exitCode,omitempty"`
// Terminal/shell output text
Text string `json:"text"`
}
Terminal/shell output content block with optional exit code and working directory
func (ExternalToolTextResultForLlmContentTerminal) MarshalJSON ¶ added in v1.0.0
func (r ExternalToolTextResultForLlmContentTerminal) MarshalJSON() ([]byte, error)
type ExternalToolTextResultForLlmContentText ¶ added in v1.0.0
type ExternalToolTextResultForLlmContentText struct {
// The text content
Text string `json:"text"`
}
Plain text content block
func (ExternalToolTextResultForLlmContentText) MarshalJSON ¶ added in v1.0.0
func (r ExternalToolTextResultForLlmContentText) MarshalJSON() ([]byte, error)
type ExternalToolTextResultForLlmContentType ¶ added in v1.0.0
type ExternalToolTextResultForLlmContentType string
Type discriminator for ExternalToolTextResultForLlmContent.
const ( ExternalToolTextResultForLlmContentTypeAudio ExternalToolTextResultForLlmContentType = "audio" ExternalToolTextResultForLlmContentTypeImage ExternalToolTextResultForLlmContentType = "image" ExternalToolTextResultForLlmContentTypeResource ExternalToolTextResultForLlmContentType = "resource" ExternalToolTextResultForLlmContentTypeResourceLink ExternalToolTextResultForLlmContentType = "resource_link" ExternalToolTextResultForLlmContentTypeTerminal ExternalToolTextResultForLlmContentType = "terminal" ExternalToolTextResultForLlmContentTypeText ExternalToolTextResultForLlmContentType = "text" )
type FilterMapping ¶ added in v0.3.0
type FilterMapping interface {
// contains filtered or unexported methods
}
type FilterMappingEnumMap ¶ added in v1.0.0
type FilterMappingEnumMap map[string]FilterMappingValue
type FilterMappingString ¶ added in v0.3.0
type FilterMappingString string
const ( FilterMappingStringHiddenCharacters FilterMappingString = "hidden_characters" FilterMappingStringMarkdown FilterMappingString = "markdown" FilterMappingStringNone FilterMappingString = "none" )
type FilterMappingValue ¶
type FilterMappingValue string
const ( FilterMappingValueHiddenCharacters FilterMappingValue = "hidden_characters" FilterMappingValueMarkdown FilterMappingValue = "markdown" FilterMappingValueNone FilterMappingValue = "none" )
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 *FleetStartRequest) (*FleetStartResult, error)
type FleetStartRequest ¶ added in v0.3.0
type FleetStartRequest struct {
// Optional user prompt to combine with fleet instructions
Prompt *string `json:"prompt,omitempty"`
}
Experimental: FleetStartRequest is part of an experimental API and may change or be removed.
type FleetStartResult ¶ added in v0.3.0
type FleetStartResult struct {
// Whether fleet mode was successfully activated
Started bool `json:"started"`
}
Experimental: FleetStartResult is part of an experimental API and may change or be removed.
type HandlePendingToolCallRequest ¶ added in v1.0.0
type HandlePendingToolCallRequest struct {
// Error message if the tool call failed
Error *string `json:"error,omitempty"`
// Request ID of the pending tool call
RequestID string `json:"requestId"`
// Tool call result (string or expanded result object)
Result ExternalToolResult `json:"result,omitempty"`
}
func (*HandlePendingToolCallRequest) UnmarshalJSON ¶ added in v1.0.0
func (r *HandlePendingToolCallRequest) UnmarshalJSON(data []byte) error
type HandlePendingToolCallResult ¶ added in v1.0.0
type HandlePendingToolCallResult struct {
// Whether the tool call result was handled successfully
Success bool `json:"success"`
}
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) (*HistoryCompactResult, error)
func (*HistoryApi) Truncate ¶ added in v0.2.2
func (a *HistoryApi) Truncate(ctx context.Context, params *HistoryTruncateRequest) (*HistoryTruncateResult, error)
type HistoryCompactContextWindow ¶ added in v0.3.0
type HistoryCompactContextWindow struct {
// Token count from non-system messages (user, assistant, tool)
ConversationTokens *int64 `json:"conversationTokens,omitempty"`
// Current total tokens in the context window (system + conversation + tool definitions)
CurrentTokens int64 `json:"currentTokens"`
// Current number of messages in the conversation
MessagesLength int64 `json:"messagesLength"`
// Token count from system message(s)
SystemTokens *int64 `json:"systemTokens,omitempty"`
// Maximum token count for the model's context window
TokenLimit int64 `json:"tokenLimit"`
// Token count from tool definitions
ToolDefinitionsTokens *int64 `json:"toolDefinitionsTokens,omitempty"`
}
Post-compaction context window usage breakdown
type HistoryCompactResult ¶ added in v0.3.0
type HistoryCompactResult struct {
// Post-compaction context window usage breakdown
ContextWindow *HistoryCompactContextWindow `json:"contextWindow,omitempty"`
// Number of messages removed during compaction
MessagesRemoved int64 `json:"messagesRemoved"`
// Whether compaction completed successfully
Success bool `json:"success"`
// Number of tokens freed by compaction
TokensRemoved int64 `json:"tokensRemoved"`
}
Experimental: HistoryCompactResult is part of an experimental API and may change or be removed.
type HistoryTruncateRequest ¶ added in v0.3.0
type HistoryTruncateRequest struct {
// Event ID to truncate to. This event and all events after it are removed from the session.
EventID string `json:"eventId"`
}
Experimental: HistoryTruncateRequest is part of an experimental API and may change or be removed.
type HistoryTruncateResult ¶ added in v0.3.0
type HistoryTruncateResult struct {
// Number of events that were removed
EventsRemoved int64 `json:"eventsRemoved"`
}
Experimental: HistoryTruncateResult is part of an experimental API and may change or be removed.
type InstructionsApi ¶ added in v0.3.0
type InstructionsApi sessionApi
func (*InstructionsApi) GetSources ¶ added in v0.3.0
func (a *InstructionsApi) GetSources(ctx context.Context) (*InstructionsGetSourcesResult, error)
type InstructionsGetSourcesResult ¶ added in v0.3.0
type InstructionsGetSourcesResult struct {
// Instruction sources for the session
Sources []InstructionsSources `json:"sources"`
}
type InstructionsSources ¶ added in v0.3.0
type InstructionsSources struct {
// Glob pattern from frontmatter — when set, this instruction applies only to matching files
ApplyTo *string `json:"applyTo,omitempty"`
// Raw content of the instruction file
Content string `json:"content"`
// Short description (body after frontmatter) for use in instruction tables
Description *string `json:"description,omitempty"`
// Unique identifier for this source (used for toggling)
ID string `json:"id"`
// Human-readable label
Label string `json:"label"`
// Where this source lives — used for UI grouping
Location InstructionsSourcesLocation `json:"location"`
// File path relative to repo or absolute for home
SourcePath string `json:"sourcePath"`
// Category of instruction source — used for merge logic
Type InstructionsSourcesType `json:"type"`
}
type InstructionsSourcesLocation ¶ added in v0.3.0
type InstructionsSourcesLocation string
Where this source lives — used for UI grouping
const ( InstructionsSourcesLocationRepository InstructionsSourcesLocation = "repository" InstructionsSourcesLocationUser InstructionsSourcesLocation = "user" InstructionsSourcesLocationWorkingDirectory InstructionsSourcesLocation = "working-directory" )
type InstructionsSourcesType ¶ added in v0.3.0
type InstructionsSourcesType string
Category of instruction source — used for merge logic
const ( InstructionsSourcesTypeChildInstructions InstructionsSourcesType = "child-instructions" InstructionsSourcesTypeHome InstructionsSourcesType = "home" InstructionsSourcesTypeModel InstructionsSourcesType = "model" InstructionsSourcesTypeNestedAgents InstructionsSourcesType = "nested-agents" InstructionsSourcesTypeRepo InstructionsSourcesType = "repo" InstructionsSourcesTypeVscode InstructionsSourcesType = "vscode" )
type InternalServerRpc ¶
type InternalServerRpc struct {
// contains filtered or unexported fields
}
InternalServerRpc provides internal SDK server-scoped RPC methods (handshake helpers etc.). Not part of the public API.
func NewInternalServerRpc ¶
func NewInternalServerRpc(client *jsonrpc2.Client) *InternalServerRpc
func (*InternalServerRpc) Connect ¶
func (a *InternalServerRpc) Connect(ctx context.Context, params *ConnectRequest) (*ConnectResult, error)
Internal: Connect is part of the SDK's internal handshake/plumbing; external callers should not use it.
type LogRequest ¶ added in v0.3.0
type LogRequest 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 *SessionLogLevel `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 LogResult ¶ added in v0.3.0
type LogResult struct {
// The unique identifier of the emitted session event
EventID string `json:"eventId"`
}
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 *McpDisableRequest) (*McpDisableResult, error)
func (*McpApi) Enable ¶ added in v0.2.1
func (a *McpApi) Enable(ctx context.Context, params *McpEnableRequest) (*McpEnableResult, error)
func (*McpApi) List ¶ added in v0.2.1
func (a *McpApi) List(ctx context.Context) (*McpServerList, error)
func (*McpApi) Oauth ¶ added in v0.3.0
func (s *McpApi) Oauth() *McpOauthApi
Experimental: Oauth returns experimental APIs that may change or be removed.
type McpConfigAddRequest ¶
type McpConfigAddRequest struct {
// MCP server configuration (local/stdio or remote/http)
Config McpServerConfig `json:"config"`
// Unique name for the MCP server
Name string `json:"name"`
}
func (*McpConfigAddRequest) UnmarshalJSON ¶
func (r *McpConfigAddRequest) UnmarshalJSON(data []byte) error
type McpConfigAddResult ¶
type McpConfigAddResult struct {
}
type McpConfigDisableRequest ¶
type McpConfigDisableRequest struct {
// Names of MCP servers to disable. Each server is added to the persisted disabled list so
// new sessions skip it. Already-disabled names are ignored. Active sessions keep their
// current connections until they end.
Names []string `json:"names"`
}
type McpConfigDisableResult ¶
type McpConfigDisableResult struct {
}
type McpConfigEnableRequest ¶
type McpConfigEnableRequest struct {
// Names of MCP servers to enable. Each server is removed from the persisted disabled list
// so new sessions spawn it. Unknown or already-enabled names are ignored.
Names []string `json:"names"`
}
type McpConfigEnableResult ¶
type McpConfigEnableResult struct {
}
type McpConfigList ¶
type McpConfigList struct {
// All MCP servers from user config, keyed by name
Servers map[string]McpServerConfig `json:"servers"`
}
func (*McpConfigList) UnmarshalJSON ¶
func (r *McpConfigList) UnmarshalJSON(data []byte) error
type McpConfigRemoveRequest ¶
type McpConfigRemoveRequest struct {
// Name of the MCP server to remove
Name string `json:"name"`
}
type McpConfigRemoveResult ¶
type McpConfigRemoveResult struct {
}
type McpConfigUpdateRequest ¶
type McpConfigUpdateRequest struct {
// MCP server configuration (local/stdio or remote/http)
Config McpServerConfig `json:"config"`
// Name of the MCP server to update
Name string `json:"name"`
}
func (*McpConfigUpdateRequest) UnmarshalJSON ¶
func (r *McpConfigUpdateRequest) UnmarshalJSON(data []byte) error
type McpConfigUpdateResult ¶
type McpConfigUpdateResult struct {
}
type McpDisableRequest ¶
type McpDisableRequest struct {
// Name of the MCP server to disable
ServerName string `json:"serverName"`
}
Experimental: McpDisableRequest is part of an experimental API and may change or be removed.
type McpDisableResult ¶
type McpDisableResult struct {
}
Experimental: McpDisableResult is part of an experimental API and may change or be removed.
type McpDiscoverRequest ¶
type McpDiscoverRequest struct {
// Working directory used as context for discovery (e.g., plugin resolution)
WorkingDirectory *string `json:"workingDirectory,omitempty"`
}
type McpDiscoverResult ¶
type McpDiscoverResult struct {
// MCP servers discovered from all sources
Servers []DiscoveredMcpServer `json:"servers"`
}
type McpEnableRequest ¶
type McpEnableRequest struct {
// Name of the MCP server to enable
ServerName string `json:"serverName"`
}
Experimental: McpEnableRequest is part of an experimental API and may change or be removed.
type McpEnableResult ¶
type McpEnableResult struct {
}
Experimental: McpEnableResult is part of an experimental API and may change or be removed.
type McpOauthApi ¶ added in v0.3.0
type McpOauthApi sessionApi
Experimental: McpOauthApi contains experimental APIs that may change or be removed.
func (*McpOauthApi) Login ¶ added in v0.3.0
func (a *McpOauthApi) Login(ctx context.Context, params *McpOauthLoginRequest) (*McpOauthLoginResult, error)
type McpOauthLoginRequest ¶
type McpOauthLoginRequest struct {
// Optional override for the body text shown on the OAuth loopback callback success page.
// When omitted, the runtime applies a neutral fallback; callers driving interactive auth
// should pass surface-specific copy telling the user where to return.
CallbackSuccessMessage *string `json:"callbackSuccessMessage,omitempty"`
// Optional override for the OAuth client display name shown on the consent screen. Applies
// to newly registered dynamic clients only — existing registrations keep the name they were
// created with. When omitted, the runtime applies a neutral fallback; callers driving
// interactive auth should pass their own surface-specific label so the consent screen
// matches the product the user sees.
ClientName *string `json:"clientName,omitempty"`
// When true, clears any cached OAuth token for the server and runs a full new
// authorization. Use when the user explicitly wants to switch accounts or believes their
// session is stuck.
ForceReauth *bool `json:"forceReauth,omitempty"`
// Name of the remote MCP server to authenticate
ServerName string `json:"serverName"`
}
Experimental: McpOauthLoginRequest is part of an experimental API and may change or be removed.
type McpOauthLoginResult ¶
type McpOauthLoginResult struct {
// URL the caller should open in a browser to complete OAuth. Omitted when cached tokens
// were still valid and no browser interaction was needed — the server is already
// reconnected in that case. When present, the runtime starts the callback listener before
// returning and continues the flow in the background; completion is signaled via
// session.mcp_server_status_changed.
AuthorizationURL *string `json:"authorizationUrl,omitempty"`
}
Experimental: McpOauthLoginResult is part of an experimental API and may change or be removed.
type McpReloadResult ¶
type McpReloadResult struct {
}
Experimental: McpReloadResult is part of an experimental API and may change or be removed.
type McpServer ¶
type McpServer 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 *McpServerSource `json:"source,omitempty"`
// Connection status: connected, failed, needs-auth, pending, disabled, or not_configured
Status McpServerStatus `json:"status"`
}
type McpServerConfig ¶
type McpServerConfig interface {
// contains filtered or unexported methods
}
MCP server configuration (local/stdio or remote/http)
type McpServerConfigHTTP ¶
type McpServerConfigHTTP struct {
FilterMapping FilterMapping `json:"filterMapping,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
IsDefaultServer *bool `json:"isDefaultServer,omitempty"`
OauthClientID *string `json:"oauthClientId,omitempty"`
OauthGrantType *McpServerConfigHTTPOauthGrantType `json:"oauthGrantType,omitempty"`
OauthPublicClient *bool `json:"oauthPublicClient,omitempty"`
// Timeout in milliseconds for tool calls to this server.
Timeout *int64 `json:"timeout,omitempty"`
// Tools to include. Defaults to all tools if not specified.
Tools []string `json:"tools,omitempty"`
// Remote transport type. Defaults to "http" when omitted.
Type *McpServerConfigHTTPType `json:"type,omitempty"`
URL string `json:"url"`
}
func (*McpServerConfigHTTP) UnmarshalJSON ¶
func (r *McpServerConfigHTTP) UnmarshalJSON(data []byte) error
type McpServerConfigHTTPOauthGrantType ¶
type McpServerConfigHTTPOauthGrantType string
const ( McpServerConfigHTTPOauthGrantTypeAuthorizationCode McpServerConfigHTTPOauthGrantType = "authorization_code" McpServerConfigHTTPOauthGrantTypeClientCredentials McpServerConfigHTTPOauthGrantType = "client_credentials" )
type McpServerConfigHTTPType ¶
type McpServerConfigHTTPType string
Remote transport type. Defaults to "http" when omitted.
const ( McpServerConfigHTTPTypeHTTP McpServerConfigHTTPType = "http" McpServerConfigHTTPTypeSse McpServerConfigHTTPType = "sse" )
type McpServerConfigLocal ¶
type McpServerConfigLocal struct {
Args []string `json:"args"`
Command string `json:"command"`
Cwd *string `json:"cwd,omitempty"`
Env map[string]string `json:"env,omitempty"`
FilterMapping FilterMapping `json:"filterMapping,omitempty"`
IsDefaultServer *bool `json:"isDefaultServer,omitempty"`
// Timeout in milliseconds for tool calls to this server.
Timeout *int64 `json:"timeout,omitempty"`
// Tools to include. Defaults to all tools if not specified.
Tools []string `json:"tools,omitempty"`
Type *McpServerConfigLocalType `json:"type,omitempty"`
}
func (*McpServerConfigLocal) UnmarshalJSON ¶
func (r *McpServerConfigLocal) UnmarshalJSON(data []byte) error
type McpServerConfigLocalType ¶
type McpServerConfigLocalType string
const ( McpServerConfigLocalTypeLocal McpServerConfigLocalType = "local" McpServerConfigLocalTypeStdio McpServerConfigLocalType = "stdio" )
type McpServerList ¶
type McpServerList struct {
// Configured MCP servers
Servers []McpServer `json:"servers"`
}
Experimental: McpServerList is part of an experimental API and may change or be removed.
type McpServerSource ¶
type McpServerSource string
Configuration source: user, workspace, plugin, or builtin
const ( McpServerSourceBuiltin McpServerSource = "builtin" McpServerSourcePlugin McpServerSource = "plugin" McpServerSourceUser McpServerSource = "user" McpServerSourceWorkspace McpServerSource = "workspace" )
type McpServerStatus ¶
type McpServerStatus string
Connection status: connected, failed, needs-auth, pending, disabled, or not_configured
const ( McpServerStatusConnected McpServerStatus = "connected" McpServerStatusDisabled McpServerStatus = "disabled" McpServerStatusFailed McpServerStatus = "failed" McpServerStatusNeedsAuth McpServerStatus = "needs-auth" McpServerStatusNotConfigured McpServerStatus = "not_configured" McpServerStatusPending McpServerStatus = "pending" )
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) (*SessionMode, error)
func (*ModeApi) Set ¶ added in v0.2.1
func (a *ModeApi) Set(ctx context.Context, params *ModeSetRequest) (*ModeSetResult, error)
type ModeSetRequest ¶ added in v0.3.0
type ModeSetRequest struct {
// The agent mode. Valid values: "interactive", "plan", "autopilot".
Mode SessionMode `json:"mode"`
}
type ModeSetResult ¶ added in v0.3.0
type ModeSetResult struct {
}
type Model ¶
type Model struct {
// Billing information
Billing *ModelBilling `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"`
// Model capability category for grouping in the model picker
ModelPickerCategory *ModelPickerCategory `json:"modelPickerCategory,omitempty"`
// Relative cost tier for token-based billing users
ModelPickerPriceCategory *ModelPickerPriceCategory `json:"modelPickerPriceCategory,omitempty"`
// Display name
Name string `json:"name"`
// Policy state (if applicable)
Policy *ModelPolicy `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) (*CurrentModel, error)
func (*ModelApi) SwitchTo ¶ added in v0.2.1
func (a *ModelApi) SwitchTo(ctx context.Context, params *ModelSwitchToRequest) (*ModelSwitchToResult, error)
type ModelBilling ¶ added in v0.3.0
type ModelBilling struct {
// Billing cost multiplier relative to the base rate
Multiplier *float64 `json:"multiplier,omitempty"`
}
Billing information
type ModelCapabilities ¶ added in v0.2.2
type ModelCapabilities struct {
// Token limits for prompts, outputs, and context window
Limits *ModelCapabilitiesLimits `json:"limits,omitempty"`
// Feature flags indicating what the model supports
Supports *ModelCapabilitiesSupports `json:"supports,omitempty"`
}
Model capabilities and limits
type ModelCapabilitiesLimits ¶ added in v0.2.2
type ModelCapabilitiesLimits struct {
// Maximum total context window size in tokens
MaxContextWindowTokens *int64 `json:"max_context_window_tokens,omitempty"`
// Maximum number of output/completion tokens
MaxOutputTokens *int64 `json:"max_output_tokens,omitempty"`
// Maximum number of prompt/input tokens
MaxPromptTokens *int64 `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 number of images per prompt
MaxPromptImages int64 `json:"max_prompt_images"`
// Maximum image size in bytes
MaxPromptImageSize int64 `json:"max_prompt_image_size"`
// 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 *int64 `json:"max_context_window_tokens,omitempty"`
MaxOutputTokens *int64 `json:"max_output_tokens,omitempty"`
MaxPromptTokens *int64 `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 number of images per prompt
MaxPromptImages *int64 `json:"max_prompt_images,omitempty"`
// Maximum image size in bytes
MaxPromptImageSize *int64 `json:"max_prompt_image_size,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 ModelList ¶ added in v0.3.0
type ModelList struct {
// List of available models with full metadata
Models []Model `json:"models"`
}
type ModelPickerCategory ¶ added in v1.0.0
type ModelPickerCategory string
Model capability category for grouping in the model picker
const ( ModelPickerCategoryLightweight ModelPickerCategory = "lightweight" ModelPickerCategoryPowerful ModelPickerCategory = "powerful" ModelPickerCategoryVersatile ModelPickerCategory = "versatile" )
type ModelPickerPriceCategory ¶ added in v1.0.0
type ModelPickerPriceCategory string
Relative cost tier for token-based billing users
const ( ModelPickerPriceCategoryHigh ModelPickerPriceCategory = "high" ModelPickerPriceCategoryLow ModelPickerPriceCategory = "low" ModelPickerPriceCategoryMedium ModelPickerPriceCategory = "medium" ModelPickerPriceCategoryVeryHigh ModelPickerPriceCategory = "very_high" )
type ModelPolicy ¶ added in v0.3.0
type ModelPolicy struct {
// Current policy state for this model
State string `json:"state"`
// Usage terms or conditions for this model
Terms *string `json:"terms,omitempty"`
}
Policy state (if applicable)
type ModelSwitchToRequest ¶ added in v0.3.0
type ModelSwitchToRequest 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 ModelSwitchToResult ¶ added in v0.3.0
type ModelSwitchToResult struct {
// Currently active model identifier after the switch
ModelID *string `json:"modelId,omitempty"`
}
type ModelsListRequest ¶ added in v0.3.0
type ModelsListRequest struct {
// GitHub token for per-user model listing. When provided, resolves this token to determine
// the user's Copilot plan and available models instead of using the global auth.
GitHubToken *string `json:"gitHubToken,omitempty"`
}
type NameApi ¶ added in v0.3.0
type NameApi sessionApi
func (*NameApi) Get ¶ added in v0.3.0
func (a *NameApi) Get(ctx context.Context) (*NameGetResult, error)
func (*NameApi) Set ¶ added in v0.3.0
func (a *NameApi) Set(ctx context.Context, params *NameSetRequest) (*NameSetResult, error)
type NameGetResult ¶ added in v0.3.0
type NameGetResult struct {
// The session name (user-set or auto-generated), or null if not yet set
Name *string `json:"name"`
}
type NameSetRequest ¶ added in v0.3.0
type NameSetRequest struct {
// New session name (1–100 characters, trimmed of leading/trailing whitespace)
Name string `json:"name"`
}
type NameSetResult ¶ added in v0.3.0
type NameSetResult struct {
}
type PermissionDecision ¶ added in v0.3.0
type PermissionDecision interface {
Kind() PermissionDecisionKind
// contains filtered or unexported methods
}
type PermissionDecisionApproveForLocation ¶ added in v0.3.0
type PermissionDecisionApproveForLocation struct {
// The approval to persist for this location
Approval PermissionDecisionApproveForLocationApproval `json:"approval"`
// The location key (git root or cwd) to persist the approval to
LocationKey string `json:"locationKey"`
}
func (PermissionDecisionApproveForLocation) Kind ¶ added in v0.3.0
func (PermissionDecisionApproveForLocation) Kind() PermissionDecisionKind
func (PermissionDecisionApproveForLocation) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForLocation) MarshalJSON() ([]byte, error)
func (*PermissionDecisionApproveForLocation) UnmarshalJSON ¶ added in v1.0.0
func (r *PermissionDecisionApproveForLocation) UnmarshalJSON(data []byte) error
type PermissionDecisionApproveForLocationApproval ¶ added in v0.3.0
type PermissionDecisionApproveForLocationApproval interface {
Kind() PermissionDecisionApproveForLocationApprovalKind
// contains filtered or unexported methods
}
The approval to persist for this location
type PermissionDecisionApproveForLocationApprovalCommands ¶ added in v0.3.0
type PermissionDecisionApproveForLocationApprovalCommands struct {
CommandIdentifiers []string `json:"commandIdentifiers"`
}
func (PermissionDecisionApproveForLocationApprovalCommands) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForLocationApprovalCommands) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForLocationApprovalCustomTool ¶ added in v0.3.0
type PermissionDecisionApproveForLocationApprovalCustomTool struct {
ToolName string `json:"toolName"`
}
func (PermissionDecisionApproveForLocationApprovalCustomTool) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForLocationApprovalCustomTool) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForLocationApprovalExtensionManagement ¶ added in v1.0.0
type PermissionDecisionApproveForLocationApprovalExtensionManagement struct {
Operation *string `json:"operation,omitempty"`
}
func (PermissionDecisionApproveForLocationApprovalExtensionManagement) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForLocationApprovalExtensionManagement) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess ¶ added in v1.0.0
type PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess struct {
ExtensionName string `json:"extensionName"`
}
func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForLocationApprovalKind ¶ added in v1.0.0
type PermissionDecisionApproveForLocationApprovalKind string
Kind discriminator for PermissionDecisionApproveForLocationApproval.
const ( PermissionDecisionApproveForLocationApprovalKindCommands PermissionDecisionApproveForLocationApprovalKind = "commands" PermissionDecisionApproveForLocationApprovalKindCustomTool PermissionDecisionApproveForLocationApprovalKind = "custom-tool" PermissionDecisionApproveForLocationApprovalKindExtensionManagement PermissionDecisionApproveForLocationApprovalKind = "extension-management" PermissionDecisionApproveForLocationApprovalKindExtensionPermissionAccess PermissionDecisionApproveForLocationApprovalKind = "extension-permission-access" PermissionDecisionApproveForLocationApprovalKindMcp PermissionDecisionApproveForLocationApprovalKind = "mcp" PermissionDecisionApproveForLocationApprovalKindMcpSampling PermissionDecisionApproveForLocationApprovalKind = "mcp-sampling" PermissionDecisionApproveForLocationApprovalKindMemory PermissionDecisionApproveForLocationApprovalKind = "memory" PermissionDecisionApproveForLocationApprovalKindRead PermissionDecisionApproveForLocationApprovalKind = "read" PermissionDecisionApproveForLocationApprovalKindWrite PermissionDecisionApproveForLocationApprovalKind = "write" )
type PermissionDecisionApproveForLocationApprovalMcp ¶
type PermissionDecisionApproveForLocationApprovalMcp struct {
ServerName string `json:"serverName"`
ToolName *string `json:"toolName"`
}
func (PermissionDecisionApproveForLocationApprovalMcp) MarshalJSON ¶
func (r PermissionDecisionApproveForLocationApprovalMcp) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForLocationApprovalMcpSampling ¶
type PermissionDecisionApproveForLocationApprovalMcpSampling struct {
ServerName string `json:"serverName"`
}
func (PermissionDecisionApproveForLocationApprovalMcpSampling) MarshalJSON ¶
func (r PermissionDecisionApproveForLocationApprovalMcpSampling) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForLocationApprovalMemory ¶ added in v0.3.0
type PermissionDecisionApproveForLocationApprovalMemory struct {
}
func (PermissionDecisionApproveForLocationApprovalMemory) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForLocationApprovalMemory) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForLocationApprovalRead ¶ added in v0.3.0
type PermissionDecisionApproveForLocationApprovalRead struct {
}
func (PermissionDecisionApproveForLocationApprovalRead) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForLocationApprovalRead) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForLocationApprovalWrite ¶ added in v0.3.0
type PermissionDecisionApproveForLocationApprovalWrite struct {
}
func (PermissionDecisionApproveForLocationApprovalWrite) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForLocationApprovalWrite) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForSession ¶ added in v0.3.0
type PermissionDecisionApproveForSession struct {
// The approval to add as a session-scoped rule
Approval PermissionDecisionApproveForSessionApproval `json:"approval,omitempty"`
// The URL domain to approve for this session
Domain *string `json:"domain,omitempty"`
}
func (PermissionDecisionApproveForSession) Kind ¶ added in v0.3.0
func (PermissionDecisionApproveForSession) Kind() PermissionDecisionKind
func (PermissionDecisionApproveForSession) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForSession) MarshalJSON() ([]byte, error)
func (*PermissionDecisionApproveForSession) UnmarshalJSON ¶ added in v1.0.0
func (r *PermissionDecisionApproveForSession) UnmarshalJSON(data []byte) error
type PermissionDecisionApproveForSessionApproval ¶ added in v0.3.0
type PermissionDecisionApproveForSessionApproval interface {
Kind() PermissionDecisionApproveForSessionApprovalKind
// contains filtered or unexported methods
}
The approval to add as a session-scoped rule
type PermissionDecisionApproveForSessionApprovalCommands ¶ added in v0.3.0
type PermissionDecisionApproveForSessionApprovalCommands struct {
CommandIdentifiers []string `json:"commandIdentifiers"`
}
func (PermissionDecisionApproveForSessionApprovalCommands) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForSessionApprovalCommands) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForSessionApprovalCustomTool ¶ added in v0.3.0
type PermissionDecisionApproveForSessionApprovalCustomTool struct {
ToolName string `json:"toolName"`
}
func (PermissionDecisionApproveForSessionApprovalCustomTool) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForSessionApprovalCustomTool) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForSessionApprovalExtensionManagement ¶ added in v1.0.0
type PermissionDecisionApproveForSessionApprovalExtensionManagement struct {
Operation *string `json:"operation,omitempty"`
}
func (PermissionDecisionApproveForSessionApprovalExtensionManagement) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForSessionApprovalExtensionManagement) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess ¶ added in v1.0.0
type PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess struct {
ExtensionName string `json:"extensionName"`
}
func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForSessionApprovalKind ¶ added in v1.0.0
type PermissionDecisionApproveForSessionApprovalKind string
Kind discriminator for PermissionDecisionApproveForSessionApproval.
const ( PermissionDecisionApproveForSessionApprovalKindCommands PermissionDecisionApproveForSessionApprovalKind = "commands" PermissionDecisionApproveForSessionApprovalKindCustomTool PermissionDecisionApproveForSessionApprovalKind = "custom-tool" PermissionDecisionApproveForSessionApprovalKindExtensionManagement PermissionDecisionApproveForSessionApprovalKind = "extension-management" PermissionDecisionApproveForSessionApprovalKindExtensionPermissionAccess PermissionDecisionApproveForSessionApprovalKind = "extension-permission-access" PermissionDecisionApproveForSessionApprovalKindMcp PermissionDecisionApproveForSessionApprovalKind = "mcp" PermissionDecisionApproveForSessionApprovalKindMcpSampling PermissionDecisionApproveForSessionApprovalKind = "mcp-sampling" PermissionDecisionApproveForSessionApprovalKindMemory PermissionDecisionApproveForSessionApprovalKind = "memory" PermissionDecisionApproveForSessionApprovalKindRead PermissionDecisionApproveForSessionApprovalKind = "read" PermissionDecisionApproveForSessionApprovalKindWrite PermissionDecisionApproveForSessionApprovalKind = "write" )
type PermissionDecisionApproveForSessionApprovalMcp ¶
type PermissionDecisionApproveForSessionApprovalMcp struct {
ServerName string `json:"serverName"`
ToolName *string `json:"toolName"`
}
func (PermissionDecisionApproveForSessionApprovalMcp) MarshalJSON ¶
func (r PermissionDecisionApproveForSessionApprovalMcp) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForSessionApprovalMcpSampling ¶
type PermissionDecisionApproveForSessionApprovalMcpSampling struct {
ServerName string `json:"serverName"`
}
func (PermissionDecisionApproveForSessionApprovalMcpSampling) MarshalJSON ¶
func (r PermissionDecisionApproveForSessionApprovalMcpSampling) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForSessionApprovalMemory ¶ added in v0.3.0
type PermissionDecisionApproveForSessionApprovalMemory struct {
}
func (PermissionDecisionApproveForSessionApprovalMemory) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForSessionApprovalMemory) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForSessionApprovalRead ¶ added in v0.3.0
type PermissionDecisionApproveForSessionApprovalRead struct {
}
func (PermissionDecisionApproveForSessionApprovalRead) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForSessionApprovalRead) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveForSessionApprovalWrite ¶ added in v0.3.0
type PermissionDecisionApproveForSessionApprovalWrite struct {
}
func (PermissionDecisionApproveForSessionApprovalWrite) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveForSessionApprovalWrite) MarshalJSON() ([]byte, error)
type PermissionDecisionApproveOnce ¶ added in v0.3.0
type PermissionDecisionApproveOnce struct {
}
func (PermissionDecisionApproveOnce) Kind ¶ added in v0.3.0
func (PermissionDecisionApproveOnce) Kind() PermissionDecisionKind
func (PermissionDecisionApproveOnce) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApproveOnce) MarshalJSON() ([]byte, error)
type PermissionDecisionApprovePermanently ¶ added in v1.0.0
type PermissionDecisionApprovePermanently struct {
// The URL domain to approve permanently
Domain string `json:"domain"`
}
func (PermissionDecisionApprovePermanently) Kind ¶ added in v1.0.0
func (PermissionDecisionApprovePermanently) Kind() PermissionDecisionKind
func (PermissionDecisionApprovePermanently) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionApprovePermanently) MarshalJSON() ([]byte, error)
type PermissionDecisionKind ¶ added in v0.3.0
type PermissionDecisionKind string
Kind discriminator for PermissionDecision.
const ( PermissionDecisionKindApproveForLocation PermissionDecisionKind = "approve-for-location" PermissionDecisionKindApproveForSession PermissionDecisionKind = "approve-for-session" PermissionDecisionKindApproveOnce PermissionDecisionKind = "approve-once" PermissionDecisionKindApprovePermanently PermissionDecisionKind = "approve-permanently" PermissionDecisionKindReject PermissionDecisionKind = "reject" PermissionDecisionKindUserNotAvailable PermissionDecisionKind = "user-not-available" )
type PermissionDecisionReject ¶ added in v0.3.0
type PermissionDecisionReject struct {
// Optional feedback from the user explaining the denial
Feedback *string `json:"feedback,omitempty"`
}
func (PermissionDecisionReject) Kind ¶ added in v0.3.0
func (PermissionDecisionReject) Kind() PermissionDecisionKind
func (PermissionDecisionReject) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionReject) MarshalJSON() ([]byte, error)
type PermissionDecisionRequest ¶ added in v0.3.0
type PermissionDecisionRequest struct {
// Request ID of the pending permission request
RequestID string `json:"requestId"`
Result PermissionDecision `json:"result"`
}
func (*PermissionDecisionRequest) UnmarshalJSON ¶ added in v1.0.0
func (r *PermissionDecisionRequest) UnmarshalJSON(data []byte) error
type PermissionDecisionUserNotAvailable ¶ added in v0.3.0
type PermissionDecisionUserNotAvailable struct {
}
func (PermissionDecisionUserNotAvailable) Kind ¶ added in v0.3.0
func (PermissionDecisionUserNotAvailable) Kind() PermissionDecisionKind
func (PermissionDecisionUserNotAvailable) MarshalJSON ¶ added in v1.0.0
func (r PermissionDecisionUserNotAvailable) MarshalJSON() ([]byte, error)
type PermissionRequestResult ¶ added in v0.3.0
type PermissionRequestResult struct {
// Whether the permission request was handled successfully
Success bool `json:"success"`
}
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 *PermissionDecisionRequest) (*PermissionRequestResult, error)
func (*PermissionsApi) ResetSessionApprovals ¶ added in v0.3.0
func (a *PermissionsApi) ResetSessionApprovals(ctx context.Context) (*PermissionsResetSessionApprovalsResult, error)
func (*PermissionsApi) SetApproveAll ¶ added in v0.3.0
func (a *PermissionsApi) SetApproveAll(ctx context.Context, params *PermissionsSetApproveAllRequest) (*PermissionsSetApproveAllResult, error)
type PermissionsResetSessionApprovalsRequest ¶ added in v0.3.0
type PermissionsResetSessionApprovalsRequest struct {
}
type PermissionsResetSessionApprovalsResult ¶ added in v0.3.0
type PermissionsResetSessionApprovalsResult struct {
// Whether the operation succeeded
Success bool `json:"success"`
}
type PermissionsSetApproveAllRequest ¶ added in v0.3.0
type PermissionsSetApproveAllRequest struct {
// Whether to auto-approve all tool permission requests
Enabled bool `json:"enabled"`
}
type PermissionsSetApproveAllResult ¶ added in v0.3.0
type PermissionsSetApproveAllResult struct {
// Whether the operation succeeded
Success bool `json:"success"`
}
type PingRequest ¶ added in v0.3.0
type PingRequest 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) (*PlanDeleteResult, error)
func (*PlanApi) Read ¶ added in v0.2.1
func (a *PlanApi) Read(ctx context.Context) (*PlanReadResult, error)
func (*PlanApi) Update ¶ added in v0.2.1
func (a *PlanApi) Update(ctx context.Context, params *PlanUpdateRequest) (*PlanUpdateResult, error)
type PlanDeleteResult ¶ added in v0.3.0
type PlanDeleteResult struct {
}
type PlanReadResult ¶ added in v0.3.0
type PlanReadResult 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 PlanUpdateRequest ¶ added in v0.3.0
type PlanUpdateRequest struct {
// The new content for the plan file
Content string `json:"content"`
}
type PlanUpdateResult ¶ added in v0.3.0
type PlanUpdateResult struct {
}
type PluginList ¶ added in v0.3.0
type PluginList struct {
// Installed plugins
Plugins []Plugin `json:"plugins"`
}
Experimental: PluginList is part of an experimental API and may change or be removed.
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) (*PluginList, error)
type QueuedCommandHandled ¶ added in v1.0.0
type QueuedCommandNotHandled ¶ added in v1.0.0
type QueuedCommandNotHandled struct {
// The command was not handled
Handled bool `json:"handled"`
}
type QueuedCommandResult ¶ added in v1.0.0
type QueuedCommandResult struct {
// The command was handled
Handled any `json:"handled"`
// If true, stop processing remaining queued items
StopProcessingQueue *bool `json:"stopProcessingQueue,omitempty"`
}
Result of the queued command execution
type RawExternalToolTextResultForLlmContentData ¶ added in v1.0.0
type RawExternalToolTextResultForLlmContentData struct {
Discriminator ExternalToolTextResultForLlmContentType
Raw json.RawMessage
}
func (RawExternalToolTextResultForLlmContentData) MarshalJSON ¶ added in v1.0.0
func (r RawExternalToolTextResultForLlmContentData) MarshalJSON() ([]byte, error)
type RawExternalToolTextResultForLlmContentResourceDetailsData ¶ added in v1.0.0
type RawExternalToolTextResultForLlmContentResourceDetailsData struct {
Raw json.RawMessage
}
func (RawExternalToolTextResultForLlmContentResourceDetailsData) MarshalJSON ¶ added in v1.0.0
func (r RawExternalToolTextResultForLlmContentResourceDetailsData) MarshalJSON() ([]byte, error)
type RawMcpServerConfigData ¶
type RawMcpServerConfigData struct {
Raw json.RawMessage
}
func (RawMcpServerConfigData) MarshalJSON ¶
func (r RawMcpServerConfigData) MarshalJSON() ([]byte, error)
type RawPermissionDecisionApproveForLocationApprovalData ¶ added in v1.0.0
type RawPermissionDecisionApproveForLocationApprovalData struct {
Discriminator PermissionDecisionApproveForLocationApprovalKind
Raw json.RawMessage
}
func (RawPermissionDecisionApproveForLocationApprovalData) MarshalJSON ¶ added in v1.0.0
func (r RawPermissionDecisionApproveForLocationApprovalData) MarshalJSON() ([]byte, error)
type RawPermissionDecisionApproveForSessionApprovalData ¶ added in v1.0.0
type RawPermissionDecisionApproveForSessionApprovalData struct {
Discriminator PermissionDecisionApproveForSessionApprovalKind
Raw json.RawMessage
}
func (RawPermissionDecisionApproveForSessionApprovalData) MarshalJSON ¶ added in v1.0.0
func (r RawPermissionDecisionApproveForSessionApprovalData) MarshalJSON() ([]byte, error)
type RawPermissionDecisionData ¶ added in v1.0.0
type RawPermissionDecisionData struct {
Discriminator PermissionDecisionKind
Raw json.RawMessage
}
func (RawPermissionDecisionData) Kind ¶ added in v1.0.0
func (r RawPermissionDecisionData) Kind() PermissionDecisionKind
func (RawPermissionDecisionData) MarshalJSON ¶ added in v1.0.0
func (r RawPermissionDecisionData) MarshalJSON() ([]byte, error)
type RawTaskInfoData ¶ added in v1.0.0
type RawTaskInfoData struct {
Discriminator TaskInfoType
Raw json.RawMessage
}
func (RawTaskInfoData) MarshalJSON ¶ added in v1.0.0
func (r RawTaskInfoData) MarshalJSON() ([]byte, error)
func (RawTaskInfoData) Type ¶ added in v1.0.0
func (r RawTaskInfoData) Type() TaskInfoType
type RawUIElicitationSchemaPropertyData ¶ added in v1.0.0
type RawUIElicitationSchemaPropertyData struct {
Discriminator UIElicitationSchemaPropertyType
Raw json.RawMessage
}
func (RawUIElicitationSchemaPropertyData) MarshalJSON ¶ added in v1.0.0
func (r RawUIElicitationSchemaPropertyData) MarshalJSON() ([]byte, error)
func (RawUIElicitationSchemaPropertyData) Type ¶ added in v1.0.0
func (r RawUIElicitationSchemaPropertyData) Type() UIElicitationSchemaPropertyType
type RemoteApi ¶
type RemoteApi sessionApi
Experimental: RemoteApi contains experimental APIs that may change or be removed.
type RemoteDisableResult ¶
type RemoteDisableResult struct {
}
Experimental: RemoteDisableResult is part of an experimental API and may change or be removed.
type RemoteEnableResult ¶ added in v1.0.0
type RemoteEnableResult struct {
// Whether remote steering is enabled
RemoteSteerable bool `json:"remoteSteerable"`
// Mission Control frontend URL for this session
URL *string `json:"url,omitempty"`
}
Experimental: RemoteEnableResult is part of an experimental API and may change or be removed.
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, params *AccountGetQuotaRequest) (*AccountGetQuotaResult, error)
type ServerMcpApi ¶ added in v0.2.1
type ServerMcpApi serverApi
func (*ServerMcpApi) Config ¶ added in v0.3.0
func (s *ServerMcpApi) Config() *ServerMcpConfigApi
func (*ServerMcpApi) Discover ¶ added in v0.3.0
func (a *ServerMcpApi) Discover(ctx context.Context, params *McpDiscoverRequest) (*McpDiscoverResult, error)
type ServerMcpConfigApi ¶ added in v0.3.0
type ServerMcpConfigApi serverApi
func (*ServerMcpConfigApi) Add ¶ added in v0.3.0
func (a *ServerMcpConfigApi) Add(ctx context.Context, params *McpConfigAddRequest) (*McpConfigAddResult, error)
func (*ServerMcpConfigApi) Disable ¶ added in v0.3.0
func (a *ServerMcpConfigApi) Disable(ctx context.Context, params *McpConfigDisableRequest) (*McpConfigDisableResult, error)
func (*ServerMcpConfigApi) Enable ¶ added in v0.3.0
func (a *ServerMcpConfigApi) Enable(ctx context.Context, params *McpConfigEnableRequest) (*McpConfigEnableResult, error)
func (*ServerMcpConfigApi) List ¶ added in v0.3.0
func (a *ServerMcpConfigApi) List(ctx context.Context) (*McpConfigList, error)
func (*ServerMcpConfigApi) Remove ¶ added in v0.3.0
func (a *ServerMcpConfigApi) Remove(ctx context.Context, params *McpConfigRemoveRequest) (*McpConfigRemoveResult, error)
func (*ServerMcpConfigApi) Update ¶ added in v0.3.0
func (a *ServerMcpConfigApi) Update(ctx context.Context, params *McpConfigUpdateRequest) (*McpConfigUpdateResult, error)
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, params *ModelsListRequest) (*ModelList, error)
type ServerRpc ¶
type ServerRpc struct {
Account *ServerAccountApi
Mcp *ServerMcpApi
Models *ServerModelsApi
SessionFs *ServerSessionFsApi
Sessions *ServerSessionsApi
Skills *ServerSkillsApi
Tools *ServerToolsApi
// 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 *PingRequest) (*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 *SessionFsSetProviderRequest) (*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 *SessionsForkRequest) (*SessionsForkResult, error)
type ServerSkill ¶ added in v0.3.0
type ServerSkill struct {
// Description of what the skill does
Description string `json:"description"`
// Whether the skill is currently enabled (based on global config)
Enabled bool `json:"enabled"`
// Unique identifier for the skill
Name string `json:"name"`
// Absolute path to the skill file
Path *string `json:"path,omitempty"`
// The project path this skill belongs to (only for project/inherited skills)
ProjectPath *string `json:"projectPath,omitempty"`
// Source location type (e.g., project, personal-copilot, plugin, builtin)
Source string `json:"source"`
// Whether the skill can be invoked by the user as a slash command
UserInvocable bool `json:"userInvocable"`
}
type ServerSkillList ¶ added in v0.3.0
type ServerSkillList struct {
// All discovered skills across all sources
Skills []ServerSkill `json:"skills"`
}
type ServerSkillsApi ¶ added in v0.3.0
type ServerSkillsApi serverApi
func (*ServerSkillsApi) Config ¶ added in v0.3.0
func (s *ServerSkillsApi) Config() *ServerSkillsConfigApi
func (*ServerSkillsApi) Discover ¶ added in v0.3.0
func (a *ServerSkillsApi) Discover(ctx context.Context, params *SkillsDiscoverRequest) (*ServerSkillList, error)
type ServerSkillsConfigApi ¶ added in v0.3.0
type ServerSkillsConfigApi serverApi
func (*ServerSkillsConfigApi) SetDisabledSkills ¶ added in v0.3.0
func (a *ServerSkillsConfigApi) SetDisabledSkills(ctx context.Context, params *SkillsConfigSetDisabledSkillsRequest) (*SkillsConfigSetDisabledSkillsResult, error)
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 *ToolsListRequest) (*ToolList, error)
type SessionAuthStatus ¶ added in v0.3.0
type SessionAuthStatus struct {
// Authentication type
AuthType *AuthInfoType `json:"authType,omitempty"`
// Copilot plan tier (e.g., individual_pro, business)
CopilotPlan *string `json:"copilotPlan,omitempty"`
// Authentication host URL
Host *string `json:"host,omitempty"`
// Whether the session has resolved authentication
IsAuthenticated bool `json:"isAuthenticated"`
// Authenticated login/username, if available
Login *string `json:"login,omitempty"`
// Human-readable authentication status description
StatusMessage *string `json:"statusMessage,omitempty"`
}
type SessionFsAppendFileRequest ¶
type SessionFsAppendFileRequest struct {
// Content to append
Content string `json:"content"`
// Optional POSIX-style mode for newly created files
Mode *int64 `json:"mode,omitempty"`
// Path using SessionFs conventions
Path string `json:"path"`
// Target session identifier
SessionID string `json:"sessionId"`
}
type SessionFsError ¶
type SessionFsError struct {
// Error classification
Code SessionFsErrorCode `json:"code"`
// Free-form detail about the error, for logging/diagnostics
Message *string `json:"message,omitempty"`
}
Describes a filesystem error.
type SessionFsErrorCode ¶
type SessionFsErrorCode string
Error classification
const ( SessionFsErrorCodeENOENT SessionFsErrorCode = "ENOENT" SessionFsErrorCodeUNKNOWN SessionFsErrorCode = "UNKNOWN" )
type SessionFsExistsRequest ¶
type SessionFsExistsResult ¶
type SessionFsExistsResult struct {
// Whether the path exists
Exists bool `json:"exists"`
}
type SessionFsHandler ¶ added in v0.2.2
type SessionFsHandler interface {
AppendFile(request *SessionFsAppendFileRequest) (*SessionFsError, error)
Exists(request *SessionFsExistsRequest) (*SessionFsExistsResult, error)
Mkdir(request *SessionFsMkdirRequest) (*SessionFsError, error)
Readdir(request *SessionFsReaddirRequest) (*SessionFsReaddirResult, error)
ReaddirWithTypes(request *SessionFsReaddirWithTypesRequest) (*SessionFsReaddirWithTypesResult, error)
ReadFile(request *SessionFsReadFileRequest) (*SessionFsReadFileResult, error)
Rename(request *SessionFsRenameRequest) (*SessionFsError, error)
Rm(request *SessionFsRmRequest) (*SessionFsError, error)
Stat(request *SessionFsStatRequest) (*SessionFsStatResult, error)
WriteFile(request *SessionFsWriteFileRequest) (*SessionFsError, error)
}
type SessionFsMkdirRequest ¶
type SessionFsMkdirRequest struct {
// Optional POSIX-style mode for newly created directories
Mode *int64 `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 SessionFsReadFileResult ¶
type SessionFsReadFileResult struct {
// File content as UTF-8 string
Content string `json:"content"`
// Describes a filesystem error.
Error *SessionFsError `json:"error,omitempty"`
}
type SessionFsReaddirRequest ¶
type SessionFsReaddirResult ¶
type SessionFsReaddirResult struct {
// Entry names in the directory
Entries []string `json:"entries"`
// Describes a filesystem error.
Error *SessionFsError `json:"error,omitempty"`
}
type SessionFsReaddirWithTypesEntry ¶
type SessionFsReaddirWithTypesEntry struct {
// Entry name
Name string `json:"name"`
// Entry type
Type SessionFsReaddirWithTypesEntryType `json:"type"`
}
type SessionFsReaddirWithTypesEntryType ¶
type SessionFsReaddirWithTypesEntryType string
Entry type
const ( SessionFsReaddirWithTypesEntryTypeDirectory SessionFsReaddirWithTypesEntryType = "directory" SessionFsReaddirWithTypesEntryTypeFile SessionFsReaddirWithTypesEntryType = "file" )
type SessionFsReaddirWithTypesResult ¶
type SessionFsReaddirWithTypesResult struct {
// Directory entries with type information
Entries []SessionFsReaddirWithTypesEntry `json:"entries"`
// Describes a filesystem error.
Error *SessionFsError `json:"error,omitempty"`
}
type SessionFsRenameRequest ¶
type SessionFsRmRequest ¶
type SessionFsRmRequest 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 SessionFsSetProviderConventions ¶
type SessionFsSetProviderConventions string
Path conventions used by this filesystem
const ( SessionFsSetProviderConventionsPosix SessionFsSetProviderConventions = "posix" SessionFsSetProviderConventionsWindows SessionFsSetProviderConventions = "windows" )
type SessionFsSetProviderRequest ¶
type SessionFsSetProviderRequest struct {
// Path conventions used by this filesystem
Conventions SessionFsSetProviderConventions `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 ¶
type SessionFsSetProviderResult struct {
// Whether the provider was set successfully
Success bool `json:"success"`
}
type SessionFsStatRequest ¶
type SessionFsStatResult ¶
type SessionFsStatResult struct {
// ISO 8601 timestamp of creation
Birthtime time.Time `json:"birthtime"`
// Describes a filesystem error.
Error *SessionFsError `json:"error,omitempty"`
// 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 time.Time `json:"mtime"`
// File size in bytes
Size int64 `json:"size"`
}
type SessionFsWriteFileRequest ¶
type SessionFsWriteFileRequest struct {
// Content to write
Content string `json:"content"`
// Optional POSIX-style mode for newly created files
Mode *int64 `json:"mode,omitempty"`
// Path using SessionFs conventions
Path string `json:"path"`
// Target session identifier
SessionID string `json:"sessionId"`
}
type SessionLogLevel ¶ added in v0.3.0
type SessionLogLevel string
Log severity level. Determines how the message is displayed in the timeline. Defaults to "info".
const ( SessionLogLevelError SessionLogLevel = "error" SessionLogLevelInfo SessionLogLevel = "info" SessionLogLevelWarning SessionLogLevel = "warning" )
type SessionMode ¶ added in v0.3.0
type SessionMode string
The agent mode. Valid values: "interactive", "plan", "autopilot".
const ( SessionModeAutopilot SessionMode = "autopilot" SessionModeInteractive SessionMode = "interactive" SessionModePlan SessionMode = "plan" )
type SessionRpc ¶
type SessionRpc struct {
Agent *AgentApi
Auth *AuthApi
Commands *CommandsApi
Extensions *ExtensionsApi
Fleet *FleetApi
History *HistoryApi
Instructions *InstructionsApi
Mcp *McpApi
Mode *ModeApi
Model *ModelApi
Name *NameApi
Permissions *PermissionsApi
Plan *PlanApi
Plugins *PluginsApi
Remote *RemoteApi
Shell *ShellApi
Skills *SkillsApi
Tasks *TasksApi
Tools *ToolsApi
UI *UIApi
Usage *UsageApi
Workspaces *WorkspacesApi
// 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 *LogRequest) (*LogResult, error)
func (*SessionRpc) Suspend ¶
func (a *SessionRpc) Suspend(ctx context.Context) (*SuspendResult, error)
type SessionsForkRequest ¶ added in v0.3.0
type SessionsForkRequest 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: SessionsForkRequest 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 *ShellExecRequest) (*ShellExecResult, error)
func (*ShellApi) Kill ¶ added in v0.2.1
func (a *ShellApi) Kill(ctx context.Context, params *ShellKillRequest) (*ShellKillResult, error)
type ShellExecRequest ¶ added in v0.3.0
type ShellExecResult ¶ added in v0.3.0
type ShellExecResult struct {
// Unique identifier for tracking streamed output
ProcessID string `json:"processId"`
}
type ShellKillRequest ¶ added in v0.3.0
type ShellKillRequest struct {
// Process identifier returned by shell.exec
ProcessID string `json:"processId"`
// Signal to send (default: SIGTERM)
Signal *ShellKillSignal `json:"signal,omitempty"`
}
type ShellKillResult ¶ added in v0.3.0
type ShellKillResult struct {
// Whether the signal was sent successfully
Killed bool `json:"killed"`
}
type ShellKillSignal ¶ added in v0.3.0
type ShellKillSignal string
Signal to send (default: SIGTERM)
const ( ShellKillSignalSIGINT ShellKillSignal = "SIGINT" ShellKillSignalSIGKILL ShellKillSignal = "SIGKILL" ShellKillSignalSIGTERM ShellKillSignal = "SIGTERM" )
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 SkillList ¶ added in v0.3.0
type SkillList struct {
// Available skills
Skills []Skill `json:"skills"`
}
Experimental: SkillList is part of an experimental API and may change or be removed.
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 *SkillsDisableRequest) (*SkillsDisableResult, error)
func (*SkillsApi) Enable ¶ added in v0.2.1
func (a *SkillsApi) Enable(ctx context.Context, params *SkillsEnableRequest) (*SkillsEnableResult, error)
type SkillsConfigSetDisabledSkillsRequest ¶ added in v0.3.0
type SkillsConfigSetDisabledSkillsRequest struct {
// List of skill names to disable
DisabledSkills []string `json:"disabledSkills"`
}
type SkillsConfigSetDisabledSkillsResult ¶ added in v0.3.0
type SkillsConfigSetDisabledSkillsResult struct {
}
type SkillsDisableRequest ¶ added in v0.3.0
type SkillsDisableRequest struct {
// Name of the skill to disable
Name string `json:"name"`
}
Experimental: SkillsDisableRequest is part of an experimental API and may change or be removed.
type SkillsDisableResult ¶ added in v0.3.0
type SkillsDisableResult struct {
}
Experimental: SkillsDisableResult is part of an experimental API and may change or be removed.
type SkillsDiscoverRequest ¶ added in v0.3.0
type SkillsEnableRequest ¶ added in v0.3.0
type SkillsEnableRequest struct {
// Name of the skill to enable
Name string `json:"name"`
}
Experimental: SkillsEnableRequest is part of an experimental API and may change or be removed.
type SkillsEnableResult ¶ added in v0.3.0
type SkillsEnableResult struct {
}
Experimental: SkillsEnableResult is part of an experimental API and may change or be removed.
type SkillsReloadResult ¶ added in v0.3.0
type SkillsReloadResult struct {
}
Experimental: SkillsReloadResult is part of an experimental API and may change or be removed.
type SuspendResult ¶
type SuspendResult struct {
}
type TaskAgentInfo ¶ added in v1.0.0
type TaskAgentInfo struct {
// ISO 8601 timestamp when the current active period began
ActiveStartedAt *time.Time `json:"activeStartedAt,omitempty"`
// Accumulated active execution time in milliseconds
ActiveTimeMs *int64 `json:"activeTimeMs,omitempty"`
// Type of agent running this task
AgentType string `json:"agentType"`
// Whether the task is currently in the original sync wait and can be moved to background
// mode. False once it is already backgrounded, idle, finished, or no longer has a
// promotable sync waiter.
CanPromoteToBackground *bool `json:"canPromoteToBackground,omitempty"`
// ISO 8601 timestamp when the task finished
CompletedAt *time.Time `json:"completedAt,omitempty"`
// Short description of the task
Description string `json:"description"`
// Error message when the task failed
Error *string `json:"error,omitempty"`
// How the agent is currently being managed by the runtime
ExecutionMode *TaskAgentInfoExecutionMode `json:"executionMode,omitempty"`
// Unique task identifier
ID string `json:"id"`
// ISO 8601 timestamp when the agent entered idle state
IdleSince *time.Time `json:"idleSince,omitempty"`
// Most recent response text from the agent
LatestResponse *string `json:"latestResponse,omitempty"`
// Model used for the task when specified
Model *string `json:"model,omitempty"`
// Prompt passed to the agent
Prompt string `json:"prompt"`
// Result text from the task when available
Result *string `json:"result,omitempty"`
// ISO 8601 timestamp when the task was started
StartedAt time.Time `json:"startedAt"`
// Current lifecycle status of the task
Status TaskAgentInfoStatus `json:"status"`
// Tool call ID associated with this agent task
ToolCallID string `json:"toolCallId"`
}
func (TaskAgentInfo) MarshalJSON ¶ added in v1.0.0
func (r TaskAgentInfo) MarshalJSON() ([]byte, error)
func (TaskAgentInfo) Type ¶ added in v1.0.0
func (TaskAgentInfo) Type() TaskInfoType
type TaskAgentInfoExecutionMode ¶
type TaskAgentInfoExecutionMode string
How the agent is currently being managed by the runtime
const ( TaskAgentInfoExecutionModeBackground TaskAgentInfoExecutionMode = "background" TaskAgentInfoExecutionModeSync TaskAgentInfoExecutionMode = "sync" )
type TaskAgentInfoStatus ¶
type TaskAgentInfoStatus string
Current lifecycle status of the task
const ( TaskAgentInfoStatusCancelled TaskAgentInfoStatus = "cancelled" TaskAgentInfoStatusCompleted TaskAgentInfoStatus = "completed" TaskAgentInfoStatusFailed TaskAgentInfoStatus = "failed" TaskAgentInfoStatusIdle TaskAgentInfoStatus = "idle" TaskAgentInfoStatusRunning TaskAgentInfoStatus = "running" )
type TaskInfo ¶ added in v1.0.0
type TaskInfo interface {
Type() TaskInfoType
// contains filtered or unexported methods
}
type TaskInfoType ¶ added in v1.0.0
type TaskInfoType string
Type discriminator for TaskInfo.
const ( TaskInfoTypeAgent TaskInfoType = "agent" TaskInfoTypeShell TaskInfoType = "shell" )
type TaskList ¶ added in v1.0.0
type TaskList struct {
// Currently tracked tasks
Tasks []TaskInfo `json:"tasks"`
}
Experimental: TaskList is part of an experimental API and may change or be removed.
func (*TaskList) UnmarshalJSON ¶ added in v1.0.0
type TaskShellInfo ¶ added in v1.0.0
type TaskShellInfo struct {
// Whether the shell runs inside a managed PTY session or as an independent background
// process
AttachmentMode TaskShellInfoAttachmentMode `json:"attachmentMode"`
// Whether this shell task can be promoted to background mode
CanPromoteToBackground *bool `json:"canPromoteToBackground,omitempty"`
// Command being executed
Command string `json:"command"`
// ISO 8601 timestamp when the task finished
CompletedAt *time.Time `json:"completedAt,omitempty"`
// Short description of the task
Description string `json:"description"`
// Whether the shell command is currently sync-waited or background-managed
ExecutionMode *TaskShellInfoExecutionMode `json:"executionMode,omitempty"`
// Unique task identifier
ID string `json:"id"`
// Path to the detached shell log, when available
LogPath *string `json:"logPath,omitempty"`
// Process ID when available
Pid *int64 `json:"pid,omitempty"`
// ISO 8601 timestamp when the task was started
StartedAt time.Time `json:"startedAt"`
// Current lifecycle status of the task
Status TaskShellInfoStatus `json:"status"`
}
func (TaskShellInfo) MarshalJSON ¶ added in v1.0.0
func (r TaskShellInfo) MarshalJSON() ([]byte, error)
func (TaskShellInfo) Type ¶ added in v1.0.0
func (TaskShellInfo) Type() TaskInfoType
type TaskShellInfoAttachmentMode ¶ added in v1.0.0
type TaskShellInfoAttachmentMode string
Whether the shell runs inside a managed PTY session or as an independent background process
const ( TaskShellInfoAttachmentModeAttached TaskShellInfoAttachmentMode = "attached" TaskShellInfoAttachmentModeDetached TaskShellInfoAttachmentMode = "detached" )
type TaskShellInfoExecutionMode ¶
type TaskShellInfoExecutionMode string
Whether the shell command is currently sync-waited or background-managed
const ( TaskShellInfoExecutionModeBackground TaskShellInfoExecutionMode = "background" TaskShellInfoExecutionModeSync TaskShellInfoExecutionMode = "sync" )
type TaskShellInfoStatus ¶
type TaskShellInfoStatus string
Current lifecycle status of the task
const ( TaskShellInfoStatusCancelled TaskShellInfoStatus = "cancelled" TaskShellInfoStatusCompleted TaskShellInfoStatus = "completed" TaskShellInfoStatusFailed TaskShellInfoStatus = "failed" TaskShellInfoStatusIdle TaskShellInfoStatus = "idle" TaskShellInfoStatusRunning TaskShellInfoStatus = "running" )
type TasksApi ¶
type TasksApi sessionApi
Experimental: TasksApi contains experimental APIs that may change or be removed.
func (*TasksApi) Cancel ¶
func (a *TasksApi) Cancel(ctx context.Context, params *TasksCancelRequest) (*TasksCancelResult, error)
func (*TasksApi) PromoteToBackground ¶
func (a *TasksApi) PromoteToBackground(ctx context.Context, params *TasksPromoteToBackgroundRequest) (*TasksPromoteToBackgroundResult, error)
func (*TasksApi) Remove ¶
func (a *TasksApi) Remove(ctx context.Context, params *TasksRemoveRequest) (*TasksRemoveResult, error)
func (*TasksApi) SendMessage ¶
func (a *TasksApi) SendMessage(ctx context.Context, params *TasksSendMessageRequest) (*TasksSendMessageResult, error)
func (*TasksApi) StartAgent ¶
func (a *TasksApi) StartAgent(ctx context.Context, params *TasksStartAgentRequest) (*TasksStartAgentResult, error)
type TasksCancelRequest ¶ added in v1.0.0
type TasksCancelRequest struct {
// Task identifier
ID string `json:"id"`
}
Experimental: TasksCancelRequest is part of an experimental API and may change or be removed.
type TasksCancelResult ¶ added in v1.0.0
type TasksCancelResult struct {
// Whether the task was successfully cancelled
Cancelled bool `json:"cancelled"`
}
Experimental: TasksCancelResult is part of an experimental API and may change or be removed.
type TasksPromoteToBackgroundRequest ¶ added in v1.0.0
type TasksPromoteToBackgroundRequest struct {
// Task identifier
ID string `json:"id"`
}
Experimental: TasksPromoteToBackgroundRequest is part of an experimental API and may change or be removed.
type TasksPromoteToBackgroundResult ¶ added in v1.0.0
type TasksPromoteToBackgroundResult struct {
// Whether the task was successfully promoted to background mode
Promoted bool `json:"promoted"`
}
Experimental: TasksPromoteToBackgroundResult is part of an experimental API and may change or be removed.
type TasksRemoveRequest ¶ added in v1.0.0
type TasksRemoveRequest struct {
// Task identifier
ID string `json:"id"`
}
Experimental: TasksRemoveRequest is part of an experimental API and may change or be removed.
type TasksRemoveResult ¶ added in v1.0.0
type TasksRemoveResult struct {
// Whether the task was removed. Returns false if the task does not exist or is still
// running/idle (cancel it first).
Removed bool `json:"removed"`
}
Experimental: TasksRemoveResult is part of an experimental API and may change or be removed.
type TasksSendMessageRequest ¶ added in v1.0.0
type TasksSendMessageRequest struct {
// Agent ID of the sender, if sent on behalf of another agent
FromAgentID *string `json:"fromAgentId,omitempty"`
// Agent task identifier
ID string `json:"id"`
// Message content to send to the agent
Message string `json:"message"`
}
Experimental: TasksSendMessageRequest is part of an experimental API and may change or be removed.
type TasksSendMessageResult ¶ added in v1.0.0
type TasksSendMessageResult struct {
// Error message if delivery failed
Error *string `json:"error,omitempty"`
// Whether the message was successfully delivered or steered
Sent bool `json:"sent"`
}
Experimental: TasksSendMessageResult is part of an experimental API and may change or be removed.
type TasksStartAgentRequest ¶ added in v1.0.0
type TasksStartAgentRequest struct {
// Type of agent to start (e.g., 'explore', 'task', 'general-purpose')
AgentType string `json:"agentType"`
// Short description of the task
Description *string `json:"description,omitempty"`
// Optional model override
Model *string `json:"model,omitempty"`
// Short name for the agent, used to generate a human-readable ID
Name string `json:"name"`
// Task prompt for the agent
Prompt string `json:"prompt"`
}
Experimental: TasksStartAgentRequest is part of an experimental API and may change or be removed.
type TasksStartAgentResult ¶ added in v1.0.0
type TasksStartAgentResult struct {
// Generated agent ID for the background task
AgentID string `json:"agentId"`
}
Experimental: TasksStartAgentResult is part of an experimental API and may change or be removed.
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 ToolList ¶ added in v0.3.0
type ToolList struct {
// List of available built-in tools with metadata
Tools []Tool `json:"tools"`
}
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 *HandlePendingToolCallRequest) (*HandlePendingToolCallResult, error)
type ToolsListRequest ¶ added in v0.3.0
type ToolsListRequest struct {
// Optional model ID — when provided, the returned tool list reflects model-specific
// overrides
Model *string `json:"model,omitempty"`
}
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 *UIElicitationRequest) (*UIElicitationResponse, error)
func (*UIApi) HandlePendingElicitation ¶ added in v0.2.2
func (a *UIApi) HandlePendingElicitation(ctx context.Context, params *UIHandlePendingElicitationRequest) (*UIElicitationResult, error)
type UIElicitationArrayAnyOfField ¶ added in v0.3.0
type UIElicitationArrayAnyOfField struct {
Default []string `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
Items UIElicitationArrayAnyOfFieldItems `json:"items"`
MaxItems *float64 `json:"maxItems,omitempty"`
MinItems *float64 `json:"minItems,omitempty"`
Title *string `json:"title,omitempty"`
}
func (UIElicitationArrayAnyOfField) MarshalJSON ¶ added in v1.0.0
func (r UIElicitationArrayAnyOfField) MarshalJSON() ([]byte, error)
func (UIElicitationArrayAnyOfField) Type ¶ added in v0.3.0
func (UIElicitationArrayAnyOfField) Type() UIElicitationSchemaPropertyType
type UIElicitationArrayAnyOfFieldItems ¶ added in v0.3.0
type UIElicitationArrayAnyOfFieldItems struct {
AnyOf []UIElicitationArrayAnyOfFieldItemsAnyOf `json:"anyOf"`
}
type UIElicitationArrayAnyOfFieldItemsAnyOf ¶ added in v0.3.0
type UIElicitationArrayEnumField ¶ added in v0.3.0
type UIElicitationArrayEnumField struct {
Default []string `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
Items UIElicitationArrayEnumFieldItems `json:"items"`
MaxItems *float64 `json:"maxItems,omitempty"`
MinItems *float64 `json:"minItems,omitempty"`
Title *string `json:"title,omitempty"`
}
func (UIElicitationArrayEnumField) MarshalJSON ¶ added in v1.0.0
func (r UIElicitationArrayEnumField) MarshalJSON() ([]byte, error)
func (UIElicitationArrayEnumField) Type ¶ added in v0.3.0
func (UIElicitationArrayEnumField) Type() UIElicitationSchemaPropertyType
type UIElicitationArrayEnumFieldItems ¶ added in v0.3.0
type UIElicitationArrayEnumFieldItems struct {
Enum []string `json:"enum"`
Type UIElicitationArrayEnumFieldItemsType `json:"type"`
}
type UIElicitationArrayEnumFieldItemsType ¶ added in v0.3.0
type UIElicitationArrayEnumFieldItemsType string
const (
UIElicitationArrayEnumFieldItemsTypeString UIElicitationArrayEnumFieldItemsType = "string"
)
type UIElicitationBooleanValue ¶ added in v1.0.0
type UIElicitationBooleanValue bool
type UIElicitationFieldValue ¶ added in v0.3.0
type UIElicitationFieldValue interface {
// contains filtered or unexported methods
}
type UIElicitationNumberValue ¶ added in v1.0.0
type UIElicitationNumberValue float64
type UIElicitationRequest ¶ added in v0.3.0
type UIElicitationRequest 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 UIElicitationSchema `json:"requestedSchema"`
}
type UIElicitationResponse ¶ added in v0.3.0
type UIElicitationResponse struct {
// The user's response: accept (submitted), decline (rejected), or cancel (dismissed)
Action UIElicitationResponseAction `json:"action"`
// The form values submitted by the user (present when action is 'accept')
Content map[string]UIElicitationFieldValue `json:"content,omitempty"`
}
The elicitation response (accept with form values, decline, or cancel)
func (*UIElicitationResponse) UnmarshalJSON ¶ added in v1.0.0
func (r *UIElicitationResponse) UnmarshalJSON(data []byte) error
type UIElicitationResponseAction ¶ added in v0.3.0
type UIElicitationResponseAction string
The user's response: accept (submitted), decline (rejected), or cancel (dismissed)
const ( UIElicitationResponseActionAccept UIElicitationResponseAction = "accept" UIElicitationResponseActionCancel UIElicitationResponseAction = "cancel" UIElicitationResponseActionDecline UIElicitationResponseAction = "decline" )
type UIElicitationResponseContent ¶ added in v1.0.0
type UIElicitationResponseContent map[string]UIElicitationFieldValue
The form values submitted by the user (present when action is 'accept')
type UIElicitationResult ¶ added in v0.3.0
type UIElicitationResult struct {
// Whether the response was accepted. False if the request was already resolved by another
// client.
Success bool `json:"success"`
}
type UIElicitationSchema ¶ added in v0.3.0
type UIElicitationSchema struct {
// Form field definitions, keyed by field name
Properties map[string]UIElicitationSchemaProperty `json:"properties"`
// List of required field names
Required []string `json:"required,omitempty"`
// Schema type indicator (always 'object')
Type UIElicitationSchemaType `json:"type"`
}
JSON Schema describing the form fields to present to the user
func (*UIElicitationSchema) UnmarshalJSON ¶ added in v1.0.0
func (r *UIElicitationSchema) UnmarshalJSON(data []byte) error
type UIElicitationSchemaProperty ¶ added in v0.3.0
type UIElicitationSchemaProperty interface {
Type() UIElicitationSchemaPropertyType
// contains filtered or unexported methods
}
type UIElicitationSchemaPropertyBoolean ¶ added in v0.3.0
type UIElicitationSchemaPropertyBoolean struct {
Default *bool `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
Title *string `json:"title,omitempty"`
}
func (UIElicitationSchemaPropertyBoolean) MarshalJSON ¶ added in v1.0.0
func (r UIElicitationSchemaPropertyBoolean) MarshalJSON() ([]byte, error)
type UIElicitationSchemaPropertyNumber ¶ added in v0.3.0
type UIElicitationSchemaPropertyNumber struct {
Default *float64 `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
Maximum *float64 `json:"maximum,omitempty"`
Minimum *float64 `json:"minimum,omitempty"`
Title *string `json:"title,omitempty"`
Discriminator UIElicitationSchemaPropertyNumberType `json:"type,omitempty"`
}
func (UIElicitationSchemaPropertyNumber) MarshalJSON ¶ added in v1.0.0
func (r UIElicitationSchemaPropertyNumber) MarshalJSON() ([]byte, error)
func (UIElicitationSchemaPropertyNumber) Type ¶ added in v0.3.0
func (r UIElicitationSchemaPropertyNumber) Type() UIElicitationSchemaPropertyType
type UIElicitationSchemaPropertyNumberType ¶ added in v1.0.0
type UIElicitationSchemaPropertyNumberType string
const ( UIElicitationSchemaPropertyNumberTypeInteger UIElicitationSchemaPropertyNumberType = "integer" UIElicitationSchemaPropertyNumberTypeNumber UIElicitationSchemaPropertyNumberType = "number" )
type UIElicitationSchemaPropertyString ¶ added in v0.3.0
type UIElicitationSchemaPropertyString struct {
Default *string `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
Format *UIElicitationSchemaPropertyStringFormat `json:"format,omitempty"`
MaxLength *float64 `json:"maxLength,omitempty"`
MinLength *float64 `json:"minLength,omitempty"`
Title *string `json:"title,omitempty"`
}
func (UIElicitationSchemaPropertyString) MarshalJSON ¶ added in v1.0.0
func (r UIElicitationSchemaPropertyString) MarshalJSON() ([]byte, error)
type UIElicitationSchemaPropertyStringFormat ¶ added in v0.3.0
type UIElicitationSchemaPropertyStringFormat string
const ( UIElicitationSchemaPropertyStringFormatDate UIElicitationSchemaPropertyStringFormat = "date" UIElicitationSchemaPropertyStringFormatDateTime UIElicitationSchemaPropertyStringFormat = "date-time" UIElicitationSchemaPropertyStringFormatEmail UIElicitationSchemaPropertyStringFormat = "email" UIElicitationSchemaPropertyStringFormatURI UIElicitationSchemaPropertyStringFormat = "uri" )
type UIElicitationSchemaPropertyType ¶ added in v0.3.0
type UIElicitationSchemaPropertyType string
Type discriminator for UIElicitationSchemaProperty.
const ( UIElicitationSchemaPropertyTypeArray UIElicitationSchemaPropertyType = "array" UIElicitationSchemaPropertyTypeBoolean UIElicitationSchemaPropertyType = "boolean" UIElicitationSchemaPropertyTypeInteger UIElicitationSchemaPropertyType = "integer" UIElicitationSchemaPropertyTypeNumber UIElicitationSchemaPropertyType = "number" UIElicitationSchemaPropertyTypeString UIElicitationSchemaPropertyType = "string" )
type UIElicitationSchemaType ¶ added in v0.3.0
type UIElicitationSchemaType string
Schema type indicator (always 'object')
const (
UIElicitationSchemaTypeObject UIElicitationSchemaType = "object"
)
type UIElicitationStringArrayValue ¶ added in v1.0.0
type UIElicitationStringArrayValue []string
type UIElicitationStringEnumField ¶ added in v0.3.0
type UIElicitationStringEnumField struct {
Default *string `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
Enum []string `json:"enum"`
EnumNames []string `json:"enumNames,omitempty"`
Title *string `json:"title,omitempty"`
}
func (UIElicitationStringEnumField) MarshalJSON ¶ added in v1.0.0
func (r UIElicitationStringEnumField) MarshalJSON() ([]byte, error)
func (UIElicitationStringEnumField) Type ¶ added in v0.3.0
func (UIElicitationStringEnumField) Type() UIElicitationSchemaPropertyType
type UIElicitationStringOneOfField ¶ added in v0.3.0
type UIElicitationStringOneOfField struct {
Default *string `json:"default,omitempty"`
Description *string `json:"description,omitempty"`
OneOf []UIElicitationStringOneOfFieldOneOf `json:"oneOf"`
Title *string `json:"title,omitempty"`
}
func (UIElicitationStringOneOfField) MarshalJSON ¶ added in v1.0.0
func (r UIElicitationStringOneOfField) MarshalJSON() ([]byte, error)
func (UIElicitationStringOneOfField) Type ¶ added in v0.3.0
func (UIElicitationStringOneOfField) Type() UIElicitationSchemaPropertyType
type UIElicitationStringOneOfFieldOneOf ¶ added in v0.3.0
type UIElicitationStringValue ¶ added in v1.0.0
type UIElicitationStringValue string
type UIHandlePendingElicitationRequest ¶ added in v0.3.0
type UIHandlePendingElicitationRequest 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 UIElicitationResponse `json:"result"`
}
type UsageApi ¶ added in v0.3.0
type UsageApi sessionApi
Experimental: UsageApi contains experimental APIs that may change or be removed.
func (*UsageApi) GetMetrics ¶ added in v0.3.0
func (a *UsageApi) GetMetrics(ctx context.Context) (*UsageGetMetricsResult, error)
type UsageGetMetricsResult ¶ added in v0.3.0
type UsageGetMetricsResult struct {
// Aggregated code change metrics
CodeChanges UsageMetricsCodeChanges `json:"codeChanges"`
// Currently active model identifier
CurrentModel *string `json:"currentModel,omitempty"`
// Input tokens from the most recent main-agent API call
LastCallInputTokens int64 `json:"lastCallInputTokens"`
// Output tokens from the most recent main-agent API call
LastCallOutputTokens int64 `json:"lastCallOutputTokens"`
// Per-model token and request metrics, keyed by model identifier
ModelMetrics map[string]UsageMetricsModelMetric `json:"modelMetrics"`
// Session start timestamp (epoch milliseconds)
SessionStartTime int64 `json:"sessionStartTime"`
// Session-wide per-token-type accumulated token counts
TokenDetails map[string]UsageMetricsTokenDetail `json:"tokenDetails,omitempty"`
// Total time spent in model API calls (milliseconds)
TotalAPIDurationMs float64 `json:"totalApiDurationMs"`
// Session-wide accumulated nano-AI units cost
TotalNanoAiu *int64 `json:"totalNanoAiu,omitempty"`
// Total user-initiated premium request cost across all models (may be fractional due to
// multipliers)
TotalPremiumRequestCost float64 `json:"totalPremiumRequestCost"`
// Raw count of user-initiated API requests
TotalUserRequests int64 `json:"totalUserRequests"`
}
Experimental: UsageGetMetricsResult is part of an experimental API and may change or be removed.
type UsageMetricsCodeChanges ¶ added in v0.3.0
type UsageMetricsCodeChanges struct {
// Number of distinct files modified
FilesModifiedCount int64 `json:"filesModifiedCount"`
// Total lines of code added
LinesAdded int64 `json:"linesAdded"`
// Total lines of code removed
LinesRemoved int64 `json:"linesRemoved"`
}
Aggregated code change metrics
type UsageMetricsModelMetric ¶ added in v0.3.0
type UsageMetricsModelMetric struct {
// Request count and cost metrics for this model
Requests UsageMetricsModelMetricRequests `json:"requests"`
// Token count details per type
TokenDetails map[string]UsageMetricsModelMetricTokenDetail `json:"tokenDetails,omitempty"`
// Accumulated nano-AI units cost for this model
TotalNanoAiu *int64 `json:"totalNanoAiu,omitempty"`
// Token usage metrics for this model
Usage UsageMetricsModelMetricUsage `json:"usage"`
}
type UsageMetricsModelMetricRequests ¶ added in v0.3.0
type UsageMetricsModelMetricRequests struct {
// User-initiated premium request cost (with multiplier applied)
Cost float64 `json:"cost"`
// Number of API requests made with this model
Count int64 `json:"count"`
}
Request count and cost metrics for this model
type UsageMetricsModelMetricTokenDetail ¶ added in v1.0.0
type UsageMetricsModelMetricTokenDetail struct {
// Accumulated token count for this token type
TokenCount int64 `json:"tokenCount"`
}
type UsageMetricsModelMetricUsage ¶ added in v0.3.0
type UsageMetricsModelMetricUsage struct {
// Total tokens read from prompt cache
CacheReadTokens int64 `json:"cacheReadTokens"`
// Total tokens written to prompt cache
CacheWriteTokens int64 `json:"cacheWriteTokens"`
// Total input tokens consumed
InputTokens int64 `json:"inputTokens"`
// Total output tokens produced
OutputTokens int64 `json:"outputTokens"`
// Total output tokens used for reasoning
ReasoningTokens *int64 `json:"reasoningTokens,omitempty"`
}
Token usage metrics for this model
type UsageMetricsTokenDetail ¶ added in v1.0.0
type UsageMetricsTokenDetail struct {
// Accumulated token count for this token type
TokenCount int64 `json:"tokenCount"`
}
type WorkspacesApi ¶ added in v0.3.0
type WorkspacesApi sessionApi
func (*WorkspacesApi) CreateFile ¶ added in v0.3.0
func (a *WorkspacesApi) CreateFile(ctx context.Context, params *WorkspacesCreateFileRequest) (*WorkspacesCreateFileResult, error)
func (*WorkspacesApi) GetWorkspace ¶ added in v0.3.0
func (a *WorkspacesApi) GetWorkspace(ctx context.Context) (*WorkspacesGetWorkspaceResult, error)
func (*WorkspacesApi) ListFiles ¶ added in v0.3.0
func (a *WorkspacesApi) ListFiles(ctx context.Context) (*WorkspacesListFilesResult, error)
func (*WorkspacesApi) ReadFile ¶ added in v0.3.0
func (a *WorkspacesApi) ReadFile(ctx context.Context, params *WorkspacesReadFileRequest) (*WorkspacesReadFileResult, error)
type WorkspacesCreateFileRequest ¶ added in v0.3.0
type WorkspacesCreateFileResult ¶ added in v0.3.0
type WorkspacesCreateFileResult struct {
}
type WorkspacesGetWorkspaceResult ¶ added in v0.3.0
type WorkspacesGetWorkspaceResult struct {
// Current workspace metadata, or null if not available
Workspace *WorkspacesGetWorkspaceResultWorkspace `json:"workspace"`
}
type WorkspacesGetWorkspaceResultWorkspace ¶ added in v1.0.0
type WorkspacesGetWorkspaceResultWorkspace struct {
Branch *string `json:"branch,omitempty"`
ChronicleSyncDismissed *bool `json:"chronicle_sync_dismissed,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
Cwd *string `json:"cwd,omitempty"`
GitRoot *string `json:"git_root,omitempty"`
HostType *WorkspacesGetWorkspaceResultWorkspaceHostType `json:"host_type,omitempty"`
ID string `json:"id"`
McLastEventID *string `json:"mc_last_event_id,omitempty"`
McSessionID *string `json:"mc_session_id,omitempty"`
McTaskID *string `json:"mc_task_id,omitempty"`
Name *string `json:"name,omitempty"`
RemoteSteerable *bool `json:"remote_steerable,omitempty"`
Repository *string `json:"repository,omitempty"`
SummaryCount *int64 `json:"summary_count,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
UserNamed *bool `json:"user_named,omitempty"`
}
type WorkspacesGetWorkspaceResultWorkspaceHostType ¶
type WorkspacesGetWorkspaceResultWorkspaceHostType string
const ( WorkspacesGetWorkspaceResultWorkspaceHostTypeAdo WorkspacesGetWorkspaceResultWorkspaceHostType = "ado" WorkspacesGetWorkspaceResultWorkspaceHostTypeGithub WorkspacesGetWorkspaceResultWorkspaceHostType = "github" )
type WorkspacesListFilesResult ¶ added in v0.3.0
type WorkspacesListFilesResult struct {
// Relative file paths in the workspace files directory
Files []string `json:"files"`
}
type WorkspacesReadFileRequest ¶ added in v0.3.0
type WorkspacesReadFileRequest struct {
// Relative path within the workspace files directory
Path string `json:"path"`
}
type WorkspacesReadFileResult ¶ added in v0.3.0
type WorkspacesReadFileResult struct {
// File content as a UTF-8 string
Content string `json:"content"`
}