diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs index cbb91eca9..9557bf368 100644 --- a/dotnet/src/Generated/Rpc.cs +++ b/dotnet/src/Generated/Rpc.cs @@ -17,7 +17,7 @@ namespace GitHub.Copilot.SDK.Rpc; -/// RPC data type for Ping operations. +/// Server liveness response, including the echoed message, current timestamp, and protocol version. public sealed class PingResult { /// Echoed message (or default greeting). @@ -33,7 +33,7 @@ public sealed class PingResult public long Timestamp { get; set; } } -/// RPC data type for Ping operations. +/// Optional message to echo back to the caller. internal sealed class PingRequest { /// Optional message to echo back. @@ -41,7 +41,7 @@ internal sealed class PingRequest public string? Message { get; set; } } -/// RPC data type for Connect operations. +/// Handshake result reporting the server's protocol version and package version on success. internal sealed class ConnectResult { /// Always true on success. @@ -57,7 +57,7 @@ internal sealed class ConnectResult public string Version { get; set; } = string.Empty; } -/// RPC data type for Connect operations. +/// Optional connection token presented by the SDK client during the handshake. internal sealed class ConnectRequest { /// Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN. @@ -174,7 +174,7 @@ public sealed class ModelPolicy public string? Terms { get; set; } } -/// RPC data type for Model operations. +/// Schema for the `Model` type. public sealed class Model { /// Billing information. @@ -214,7 +214,7 @@ public sealed class Model public IList? SupportedReasoningEfforts { get; set; } } -/// RPC data type for ModelList operations. +/// List of Copilot models available to the resolved user, including capabilities and billing metadata. public sealed class ModelList { /// List of available models with full metadata. @@ -230,7 +230,7 @@ internal sealed class ModelsListRequest public string? GitHubToken { get; set; } } -/// RPC data type for Tool operations. +/// Schema for the `Tool` type. public sealed class Tool { /// Description of what the tool does. @@ -254,7 +254,7 @@ public sealed class Tool public IDictionary? Parameters { get; set; } } -/// RPC data type for ToolList operations. +/// Built-in tools available for the requested model, with their parameters and instructions. public sealed class ToolList { /// List of available built-in tools with metadata. @@ -262,7 +262,7 @@ public sealed class ToolList public IList Tools { get => field ??= []; set; } } -/// RPC data type for ToolsList operations. +/// Optional model identifier whose tool overrides should be applied to the listing. internal sealed class ToolsListRequest { /// Optional model ID — when provided, the returned tool list reflects model-specific overrides. @@ -270,7 +270,7 @@ internal sealed class ToolsListRequest public string? Model { get; set; } } -/// RPC data type for AccountQuotaSnapshot operations. +/// Schema for the `AccountQuotaSnapshot` type. public sealed class AccountQuotaSnapshot { /// Number of requests included in the entitlement. @@ -308,7 +308,7 @@ public sealed class AccountQuotaSnapshot public long UsedRequests { get; set; } } -/// RPC data type for AccountGetQuota operations. +/// Quota usage snapshots for the resolved user, keyed by quota type. public sealed class AccountGetQuotaResult { /// Quota snapshots keyed by type (e.g., chat, completions, premium_interactions). @@ -324,7 +324,7 @@ internal sealed class AccountGetQuotaRequest public string? GitHubToken { get; set; } } -/// RPC data type for DiscoveredMcpServer operations. +/// Schema for the `DiscoveredMcpServer` type. public sealed class DiscoveredMcpServer { /// Whether the server is enabled (not in the disabled list). @@ -347,7 +347,7 @@ public sealed class DiscoveredMcpServer public DiscoveredMcpServerType? Type { get; set; } } -/// RPC data type for McpDiscover operations. +/// MCP servers discovered from user, workspace, plugin, and built-in sources. public sealed class McpDiscoverResult { /// MCP servers discovered from all sources. @@ -355,7 +355,7 @@ public sealed class McpDiscoverResult public IList Servers { get => field ??= []; set; } } -/// RPC data type for McpDiscover operations. +/// Optional working directory used as context for MCP server discovery. internal sealed class McpDiscoverRequest { /// Working directory used as context for discovery (e.g., plugin resolution). @@ -363,7 +363,7 @@ internal sealed class McpDiscoverRequest public string? WorkingDirectory { get; set; } } -/// RPC data type for McpConfigList operations. +/// User-configured MCP servers, keyed by server name. public sealed class McpConfigList { /// All MCP servers from user config, keyed by name. @@ -371,7 +371,7 @@ public sealed class McpConfigList public IDictionary Servers { get => field ??= new Dictionary(); set; } } -/// RPC data type for McpConfigAdd operations. +/// MCP server name and configuration to add to user configuration. internal sealed class McpConfigAddRequest { /// MCP server configuration (local/stdio or remote/http). @@ -386,7 +386,7 @@ internal sealed class McpConfigAddRequest public string Name { get; set; } = string.Empty; } -/// RPC data type for McpConfigUpdate operations. +/// MCP server name and replacement configuration to write to user configuration. internal sealed class McpConfigUpdateRequest { /// MCP server configuration (local/stdio or remote/http). @@ -401,7 +401,7 @@ internal sealed class McpConfigUpdateRequest public string Name { get; set; } = string.Empty; } -/// RPC data type for McpConfigRemove operations. +/// MCP server name to remove from user configuration. internal sealed class McpConfigRemoveRequest { /// Name of the MCP server to remove. @@ -412,7 +412,7 @@ internal sealed class McpConfigRemoveRequest public string Name { get; set; } = string.Empty; } -/// RPC data type for McpConfigEnable operations. +/// MCP server names to enable for new sessions. internal sealed class McpConfigEnableRequest { /// 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. @@ -420,7 +420,7 @@ internal sealed class McpConfigEnableRequest public IList Names { get => field ??= []; set; } } -/// RPC data type for McpConfigDisable operations. +/// MCP server names to disable for new sessions. internal sealed class McpConfigDisableRequest { /// 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. @@ -428,7 +428,7 @@ internal sealed class McpConfigDisableRequest public IList Names { get => field ??= []; set; } } -/// RPC data type for ServerSkill operations. +/// Schema for the `ServerSkill` type. public sealed class ServerSkill { /// Description of what the skill does. @@ -460,7 +460,7 @@ public sealed class ServerSkill public bool UserInvocable { get; set; } } -/// RPC data type for ServerSkillList operations. +/// Skills discovered across global and project sources. public sealed class ServerSkillList { /// All discovered skills across all sources. @@ -468,7 +468,7 @@ public sealed class ServerSkillList public IList Skills { get => field ??= []; set; } } -/// RPC data type for SkillsDiscover operations. +/// Optional project paths and additional skill directories to include in discovery. internal sealed class SkillsDiscoverRequest { /// Optional list of project directory paths to scan for project-scoped skills. @@ -480,7 +480,7 @@ internal sealed class SkillsDiscoverRequest public IList? SkillDirectories { get; set; } } -/// RPC data type for SkillsConfigSetDisabledSkills operations. +/// Skill names to mark as disabled in global configuration, replacing any previous list. internal sealed class SkillsConfigSetDisabledSkillsRequest { /// List of skill names to disable. @@ -488,7 +488,7 @@ internal sealed class SkillsConfigSetDisabledSkillsRequest public IList DisabledSkills { get => field ??= []; set; } } -/// RPC data type for SessionFsSetProvider operations. +/// Indicates whether the calling client was registered as the session filesystem provider. public sealed class SessionFsSetProviderResult { /// Whether the provider was set successfully. @@ -496,7 +496,7 @@ public sealed class SessionFsSetProviderResult public bool Success { get; set; } } -/// RPC data type for SessionFsSetProvider operations. +/// Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider. internal sealed class SessionFsSetProviderRequest { /// Path conventions used by this filesystem. @@ -512,7 +512,7 @@ internal sealed class SessionFsSetProviderRequest public string SessionStatePath { get; set; } = string.Empty; } -/// RPC data type for SessionsFork operations. +/// Identifier and optional friendly name assigned to the newly forked session. [Experimental(Diagnostics.Experimental)] public sealed class SessionsForkResult { @@ -525,7 +525,7 @@ public sealed class SessionsForkResult public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionsFork operations. +/// Source session identifier to fork from, optional event-ID boundary, and optional friendly name for the new session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionsForkRequest { @@ -542,7 +542,7 @@ internal sealed class SessionsForkRequest public string? ToEventId { get; set; } } -/// RPC data type for SessionSuspend operations. +/// Identifies the target session. internal sealed class SessionSuspendRequest { /// Target session identifier. @@ -550,7 +550,7 @@ internal sealed class SessionSuspendRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for Log operations. +/// Identifier of the session event that was emitted for the log message. public sealed class LogResult { /// The unique identifier of the emitted session event. @@ -558,7 +558,7 @@ public sealed class LogResult public Guid EventId { get; set; } } -/// RPC data type for Log operations. +/// Message text, optional severity level, persistence flag, and optional follow-up URL. internal sealed class LogRequest { /// When true, the message is transient and not persisted to the session event log on disk. @@ -584,7 +584,7 @@ internal sealed class LogRequest public string? Url { get; set; } } -/// RPC data type for SessionAuthStatus operations. +/// Authentication status and account metadata for the session. public sealed class SessionAuthStatus { /// Authentication type. @@ -612,7 +612,7 @@ public sealed class SessionAuthStatus public string? StatusMessage { get; set; } } -/// RPC data type for SessionAuthGetStatus operations. +/// Identifies the target session. internal sealed class SessionAuthGetStatusRequest { /// Target session identifier. @@ -620,7 +620,7 @@ internal sealed class SessionAuthGetStatusRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for CurrentModel operations. +/// The currently selected model for the session. public sealed class CurrentModel { /// Currently active model identifier. @@ -628,7 +628,7 @@ public sealed class CurrentModel public string? ModelId { get; set; } } -/// RPC data type for SessionModelGetCurrent operations. +/// Identifies the target session. internal sealed class SessionModelGetCurrentRequest { /// Target session identifier. @@ -636,7 +636,7 @@ internal sealed class SessionModelGetCurrentRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for ModelSwitchTo operations. +/// The model identifier active on the session after the switch. public sealed class ModelSwitchToResult { /// Currently active model identifier after the switch. @@ -644,7 +644,7 @@ public sealed class ModelSwitchToResult public string? ModelId { get; set; } } -/// RPC data type for ModelCapabilitiesOverrideLimitsVision operations. +/// Vision-specific limits. public sealed class ModelCapabilitiesOverrideLimitsVision { /// Maximum image size in bytes. @@ -670,17 +670,17 @@ public sealed class ModelCapabilitiesOverrideLimits [JsonPropertyName("max_context_window_tokens")] public long? MaxContextWindowTokens { get; set; } - /// Gets or sets the max_output_tokens value. + /// Maximum number of output/completion tokens. [Range((double)0, (double)long.MaxValue)] [JsonPropertyName("max_output_tokens")] public long? MaxOutputTokens { get; set; } - /// Gets or sets the max_prompt_tokens value. + /// Maximum number of prompt/input tokens. [Range((double)0, (double)long.MaxValue)] [JsonPropertyName("max_prompt_tokens")] public long? MaxPromptTokens { get; set; } - /// Gets or sets the vision value. + /// Vision-specific limits. [JsonPropertyName("vision")] public ModelCapabilitiesOverrideLimitsVision? Vision { get; set; } } @@ -688,11 +688,11 @@ public sealed class ModelCapabilitiesOverrideLimits /// Feature flags indicating what the model supports. public sealed class ModelCapabilitiesOverrideSupports { - /// Gets or sets the reasoningEffort value. + /// Whether this model supports reasoning effort configuration. [JsonPropertyName("reasoningEffort")] public bool? ReasoningEffort { get; set; } - /// Gets or sets the vision value. + /// Whether this model supports vision/image input. [JsonPropertyName("vision")] public bool? Vision { get; set; } } @@ -709,7 +709,7 @@ public sealed class ModelCapabilitiesOverride public ModelCapabilitiesOverrideSupports? Supports { get; set; } } -/// RPC data type for ModelSwitchTo operations. +/// Target model identifier and optional reasoning effort, summary, and capability overrides. internal sealed class ModelSwitchToRequest { /// Override individual model capabilities resolved by the runtime. @@ -720,16 +720,20 @@ internal sealed class ModelSwitchToRequest [JsonPropertyName("modelId")] public string ModelId { get; set; } = string.Empty; - /// Reasoning effort level to use for the model. + /// Reasoning effort level to use for the model. "none" disables reasoning. [JsonPropertyName("reasoningEffort")] public string? ReasoningEffort { get; set; } + /// Reasoning summary mode to request for supported model clients. + [JsonPropertyName("reasoningSummary")] + public ReasoningSummary? ReasoningSummary { get; set; } + /// Target session identifier. [JsonPropertyName("sessionId")] public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionModeGet operations. +/// Identifies the target session. internal sealed class SessionModeGetRequest { /// Target session identifier. @@ -737,7 +741,7 @@ internal sealed class SessionModeGetRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for ModeSet operations. +/// Agent interaction mode to apply to the session. internal sealed class ModeSetRequest { /// The agent mode. Valid values: "interactive", "plan", "autopilot". @@ -749,7 +753,7 @@ internal sealed class ModeSetRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for NameGet operations. +/// The session's friendly name, or null when not yet set. public sealed class NameGetResult { /// The session name (user-set or auto-generated), or null if not yet set. @@ -757,7 +761,7 @@ public sealed class NameGetResult public string? Name { get; set; } } -/// RPC data type for SessionNameGet operations. +/// Identifies the target session. internal sealed class SessionNameGetRequest { /// Target session identifier. @@ -765,7 +769,7 @@ internal sealed class SessionNameGetRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for NameSet operations. +/// New friendly name to apply to the session. internal sealed class NameSetRequest { /// New session name (1–100 characters, trimmed of leading/trailing whitespace). @@ -780,7 +784,7 @@ internal sealed class NameSetRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for PlanRead operations. +/// Existence, contents, and resolved path of the session plan file. public sealed class PlanReadResult { /// The content of the plan file, or null if it does not exist. @@ -796,7 +800,7 @@ public sealed class PlanReadResult public string? Path { get; set; } } -/// RPC data type for SessionPlanRead operations. +/// Identifies the target session. internal sealed class SessionPlanReadRequest { /// Target session identifier. @@ -804,7 +808,7 @@ internal sealed class SessionPlanReadRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for PlanUpdate operations. +/// Replacement contents to write to the session plan file. internal sealed class PlanUpdateRequest { /// The new content for the plan file. @@ -816,7 +820,7 @@ internal sealed class PlanUpdateRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionPlanDelete operations. +/// Identifies the target session. internal sealed class SessionPlanDeleteRequest { /// Target session identifier. @@ -893,7 +897,7 @@ public sealed class WorkspacesGetWorkspaceResultWorkspace public bool? UserNamed { get; set; } } -/// RPC data type for WorkspacesGetWorkspace operations. +/// Current workspace metadata for the session, or null when not available. public sealed class WorkspacesGetWorkspaceResult { /// Current workspace metadata, or null if not available. @@ -901,7 +905,7 @@ public sealed class WorkspacesGetWorkspaceResult public WorkspacesGetWorkspaceResultWorkspace? Workspace { get; set; } } -/// RPC data type for SessionWorkspacesGetWorkspace operations. +/// Identifies the target session. internal sealed class SessionWorkspacesGetWorkspaceRequest { /// Target session identifier. @@ -909,7 +913,7 @@ internal sealed class SessionWorkspacesGetWorkspaceRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for WorkspacesListFiles operations. +/// Relative paths of files stored in the session workspace files directory. public sealed class WorkspacesListFilesResult { /// Relative file paths in the workspace files directory. @@ -917,7 +921,7 @@ public sealed class WorkspacesListFilesResult public IList Files { get => field ??= []; set; } } -/// RPC data type for SessionWorkspacesListFiles operations. +/// Identifies the target session. internal sealed class SessionWorkspacesListFilesRequest { /// Target session identifier. @@ -925,7 +929,7 @@ internal sealed class SessionWorkspacesListFilesRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for WorkspacesReadFile operations. +/// Contents of the requested workspace file as a UTF-8 string. public sealed class WorkspacesReadFileResult { /// File content as a UTF-8 string. @@ -933,7 +937,7 @@ public sealed class WorkspacesReadFileResult public string Content { get; set; } = string.Empty; } -/// RPC data type for WorkspacesReadFile operations. +/// Relative path of the workspace file to read. internal sealed class WorkspacesReadFileRequest { /// Relative path within the workspace files directory. @@ -945,7 +949,7 @@ internal sealed class WorkspacesReadFileRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for WorkspacesCreateFile operations. +/// Relative path and UTF-8 content for the workspace file to create or overwrite. internal sealed class WorkspacesCreateFileRequest { /// File content to write as a UTF-8 string. @@ -961,7 +965,7 @@ internal sealed class WorkspacesCreateFileRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for InstructionsSources operations. +/// Schema for the `InstructionsSources` type. public sealed class InstructionsSources { /// Glob pattern from frontmatter — when set, this instruction applies only to matching files. @@ -997,7 +1001,7 @@ public sealed class InstructionsSources public InstructionsSourcesType Type { get; set; } } -/// RPC data type for InstructionsGetSources operations. +/// Instruction sources loaded for the session, in merge order. public sealed class InstructionsGetSourcesResult { /// Instruction sources for the session. @@ -1005,7 +1009,7 @@ public sealed class InstructionsGetSourcesResult public IList Sources { get => field ??= []; set; } } -/// RPC data type for SessionInstructionsGetSources operations. +/// Identifies the target session. internal sealed class SessionInstructionsGetSourcesRequest { /// Target session identifier. @@ -1013,7 +1017,7 @@ internal sealed class SessionInstructionsGetSourcesRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for FleetStart operations. +/// Indicates whether fleet mode was successfully activated. [Experimental(Diagnostics.Experimental)] public sealed class FleetStartResult { @@ -1022,7 +1026,7 @@ public sealed class FleetStartResult public bool Started { get; set; } } -/// RPC data type for FleetStart operations. +/// Optional user prompt to combine with the fleet orchestration instructions. [Experimental(Diagnostics.Experimental)] internal sealed class FleetStartRequest { @@ -1035,7 +1039,7 @@ internal sealed class FleetStartRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for AgentInfo operations. +/// Schema for the `AgentInfo` type. public sealed class AgentInfo { /// Description of the agent's purpose. @@ -1055,7 +1059,7 @@ public sealed class AgentInfo public string? Path { get; set; } } -/// RPC data type for AgentList operations. +/// Custom agents available to the session. [Experimental(Diagnostics.Experimental)] public sealed class AgentList { @@ -1064,7 +1068,7 @@ public sealed class AgentList public IList Agents { get => field ??= []; set; } } -/// RPC data type for SessionAgentList operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionAgentListRequest { @@ -1073,7 +1077,7 @@ internal sealed class SessionAgentListRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for AgentGetCurrent operations. +/// The currently selected custom agent, or null when using the default agent. [Experimental(Diagnostics.Experimental)] public sealed class AgentGetCurrentResult { @@ -1082,7 +1086,7 @@ public sealed class AgentGetCurrentResult public AgentInfo? Agent { get; set; } } -/// RPC data type for SessionAgentGetCurrent operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionAgentGetCurrentRequest { @@ -1091,7 +1095,7 @@ internal sealed class SessionAgentGetCurrentRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for AgentSelect operations. +/// The newly selected custom agent. [Experimental(Diagnostics.Experimental)] public sealed class AgentSelectResult { @@ -1100,7 +1104,7 @@ public sealed class AgentSelectResult public AgentInfo Agent { get => field ??= new(); set; } } -/// RPC data type for AgentSelect operations. +/// Name of the custom agent to select for subsequent turns. [Experimental(Diagnostics.Experimental)] internal sealed class AgentSelectRequest { @@ -1113,7 +1117,7 @@ internal sealed class AgentSelectRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionAgentDeselect operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionAgentDeselectRequest { @@ -1122,7 +1126,7 @@ internal sealed class SessionAgentDeselectRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for AgentReload operations. +/// Custom agents available to the session after reloading definitions from disk. [Experimental(Diagnostics.Experimental)] public sealed class AgentReloadResult { @@ -1131,7 +1135,7 @@ public sealed class AgentReloadResult public IList Agents { get => field ??= []; set; } } -/// RPC data type for SessionAgentReload operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionAgentReloadRequest { @@ -1140,7 +1144,7 @@ internal sealed class SessionAgentReloadRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for TasksStartAgent operations. +/// Identifier assigned to the newly started background agent task. [Experimental(Diagnostics.Experimental)] public sealed class TasksStartAgentResult { @@ -1149,7 +1153,7 @@ public sealed class TasksStartAgentResult public string AgentId { get; set; } = string.Empty; } -/// RPC data type for TasksStartAgent operations. +/// Agent type, prompt, name, and optional description and model override for the new task. [Experimental(Diagnostics.Experimental)] internal sealed class TasksStartAgentRequest { @@ -1178,7 +1182,8 @@ internal sealed class TasksStartAgentRequest public string SessionId { get; set; } = string.Empty; } -/// Polymorphic base type discriminated by type. +/// Schema for the `TaskInfo` type. +/// Polymorphic base type discriminated by type. [JsonPolymorphic( TypeDiscriminatorPropertyName = "type", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] @@ -1192,7 +1197,8 @@ public partial class TaskInfo } -/// The agent variant of . +/// Schema for the `TaskAgentInfo` type. +/// The agent variant of . public partial class TaskInfoAgent : TaskInfo { /// @@ -1279,7 +1285,8 @@ public partial class TaskInfoAgent : TaskInfo public required string ToolCallId { get; set; } } -/// The shell variant of . +/// Schema for the `TaskShellInfo` type. +/// The shell variant of . public partial class TaskInfoShell : TaskInfo { /// @@ -1336,7 +1343,7 @@ public partial class TaskInfoShell : TaskInfo public required TaskShellInfoStatus Status { get; set; } } -/// RPC data type for TaskList operations. +/// Background tasks currently tracked by the session. [Experimental(Diagnostics.Experimental)] public sealed class TaskList { @@ -1345,7 +1352,7 @@ public sealed class TaskList public IList Tasks { get => field ??= []; set; } } -/// RPC data type for SessionTasksList operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionTasksListRequest { @@ -1354,7 +1361,7 @@ internal sealed class SessionTasksListRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for TasksPromoteToBackground operations. +/// Indicates whether the task was successfully promoted to background mode. [Experimental(Diagnostics.Experimental)] public sealed class TasksPromoteToBackgroundResult { @@ -1363,7 +1370,7 @@ public sealed class TasksPromoteToBackgroundResult public bool Promoted { get; set; } } -/// RPC data type for TasksPromoteToBackground operations. +/// Identifier of the task to promote to background mode. [Experimental(Diagnostics.Experimental)] internal sealed class TasksPromoteToBackgroundRequest { @@ -1376,7 +1383,7 @@ internal sealed class TasksPromoteToBackgroundRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for TasksCancel operations. +/// Indicates whether the background task was successfully cancelled. [Experimental(Diagnostics.Experimental)] public sealed class TasksCancelResult { @@ -1385,7 +1392,7 @@ public sealed class TasksCancelResult public bool Cancelled { get; set; } } -/// RPC data type for TasksCancel operations. +/// Identifier of the background task to cancel. [Experimental(Diagnostics.Experimental)] internal sealed class TasksCancelRequest { @@ -1398,7 +1405,7 @@ internal sealed class TasksCancelRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for TasksRemove operations. +/// Indicates whether the task was removed. False when the task does not exist or is still running/idle. [Experimental(Diagnostics.Experimental)] public sealed class TasksRemoveResult { @@ -1407,7 +1414,7 @@ public sealed class TasksRemoveResult public bool Removed { get; set; } } -/// RPC data type for TasksRemove operations. +/// Identifier of the completed or cancelled task to remove from tracking. [Experimental(Diagnostics.Experimental)] internal sealed class TasksRemoveRequest { @@ -1420,7 +1427,7 @@ internal sealed class TasksRemoveRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for TasksSendMessage operations. +/// Indicates whether the message was delivered, with an error message when delivery failed. [Experimental(Diagnostics.Experimental)] public sealed class TasksSendMessageResult { @@ -1433,7 +1440,7 @@ public sealed class TasksSendMessageResult public bool Sent { get; set; } } -/// RPC data type for TasksSendMessage operations. +/// Identifier of the target agent task, message content, and optional sender agent ID. [Experimental(Diagnostics.Experimental)] internal sealed class TasksSendMessageRequest { @@ -1454,7 +1461,7 @@ internal sealed class TasksSendMessageRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for Skill operations. +/// Schema for the `Skill` type. public sealed class Skill { /// Description of what the skill does. @@ -1482,7 +1489,7 @@ public sealed class Skill public bool UserInvocable { get; set; } } -/// RPC data type for SkillList operations. +/// Skills available to the session, with their enabled state. [Experimental(Diagnostics.Experimental)] public sealed class SkillList { @@ -1491,7 +1498,7 @@ public sealed class SkillList public IList Skills { get => field ??= []; set; } } -/// RPC data type for SessionSkillsList operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionSkillsListRequest { @@ -1500,7 +1507,7 @@ internal sealed class SessionSkillsListRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SkillsEnable operations. +/// Name of the skill to enable for the session. [Experimental(Diagnostics.Experimental)] internal sealed class SkillsEnableRequest { @@ -1513,7 +1520,7 @@ internal sealed class SkillsEnableRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SkillsDisable operations. +/// Name of the skill to disable for the session. [Experimental(Diagnostics.Experimental)] internal sealed class SkillsDisableRequest { @@ -1526,7 +1533,7 @@ internal sealed class SkillsDisableRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SkillsLoadDiagnostics operations. +/// Diagnostics from reloading skill definitions, with warnings and errors as separate lists. [Experimental(Diagnostics.Experimental)] public sealed class SkillsLoadDiagnostics { @@ -1539,7 +1546,7 @@ public sealed class SkillsLoadDiagnostics public IList Warnings { get => field ??= []; set; } } -/// RPC data type for SessionSkillsReload operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionSkillsReloadRequest { @@ -1548,7 +1555,7 @@ internal sealed class SessionSkillsReloadRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for McpServer operations. +/// Schema for the `McpServer` type. public sealed class McpServer { /// Error message if the server failed to connect. @@ -1571,7 +1578,7 @@ public sealed class McpServer public McpServerStatus Status { get; set; } } -/// RPC data type for McpServerList operations. +/// MCP servers configured for the session, with their connection status. [Experimental(Diagnostics.Experimental)] public sealed class McpServerList { @@ -1580,7 +1587,7 @@ public sealed class McpServerList public IList Servers { get => field ??= []; set; } } -/// RPC data type for SessionMcpList operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionMcpListRequest { @@ -1589,7 +1596,7 @@ internal sealed class SessionMcpListRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for McpEnable operations. +/// Name of the MCP server to enable for the session. [Experimental(Diagnostics.Experimental)] internal sealed class McpEnableRequest { @@ -1605,7 +1612,7 @@ internal sealed class McpEnableRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for McpDisable operations. +/// Name of the MCP server to disable for the session. [Experimental(Diagnostics.Experimental)] internal sealed class McpDisableRequest { @@ -1621,7 +1628,7 @@ internal sealed class McpDisableRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionMcpReload operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionMcpReloadRequest { @@ -1630,7 +1637,7 @@ internal sealed class SessionMcpReloadRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for McpOauthLogin operations. +/// OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server. [Experimental(Diagnostics.Experimental)] public sealed class McpOauthLoginResult { @@ -1639,7 +1646,7 @@ public sealed class McpOauthLoginResult public string? AuthorizationUrl { get; set; } } -/// RPC data type for McpOauthLogin operations. +/// Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, and the callback success-page copy. [Experimental(Diagnostics.Experimental)] internal sealed class McpOauthLoginRequest { @@ -1667,7 +1674,7 @@ internal sealed class McpOauthLoginRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for Plugin operations. +/// Schema for the `Plugin` type. public sealed class Plugin { /// Whether the plugin is currently enabled. @@ -1687,7 +1694,7 @@ public sealed class Plugin public string? Version { get; set; } } -/// RPC data type for PluginList operations. +/// Plugins installed for the session, with their enabled state and version metadata. [Experimental(Diagnostics.Experimental)] public sealed class PluginList { @@ -1696,7 +1703,7 @@ public sealed class PluginList public IList Plugins { get => field ??= []; set; } } -/// RPC data type for SessionPluginsList operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionPluginsListRequest { @@ -1705,7 +1712,7 @@ internal sealed class SessionPluginsListRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for Extension operations. +/// Schema for the `Extension` type. public sealed class Extension { /// Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper'). @@ -1729,7 +1736,7 @@ public sealed class Extension public ExtensionStatus Status { get; set; } } -/// RPC data type for ExtensionList operations. +/// Extensions discovered for the session, with their current status. [Experimental(Diagnostics.Experimental)] public sealed class ExtensionList { @@ -1738,7 +1745,7 @@ public sealed class ExtensionList public IList Extensions { get => field ??= []; set; } } -/// RPC data type for SessionExtensionsList operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionExtensionsListRequest { @@ -1747,7 +1754,7 @@ internal sealed class SessionExtensionsListRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for ExtensionsEnable operations. +/// Source-qualified extension identifier to enable for the session. [Experimental(Diagnostics.Experimental)] internal sealed class ExtensionsEnableRequest { @@ -1760,7 +1767,7 @@ internal sealed class ExtensionsEnableRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for ExtensionsDisable operations. +/// Source-qualified extension identifier to disable for the session. [Experimental(Diagnostics.Experimental)] internal sealed class ExtensionsDisableRequest { @@ -1773,7 +1780,7 @@ internal sealed class ExtensionsDisableRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionExtensionsReload operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionExtensionsReloadRequest { @@ -1782,7 +1789,7 @@ internal sealed class SessionExtensionsReloadRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for HandlePendingToolCall operations. +/// Indicates whether the external tool call result was handled successfully. public sealed class HandlePendingToolCallResult { /// Whether the tool call result was handled successfully. @@ -1790,7 +1797,7 @@ public sealed class HandlePendingToolCallResult public bool Success { get; set; } } -/// RPC data type for HandlePendingToolCall operations. +/// Pending external tool call request ID, with the tool result or an error describing why it failed. internal sealed class HandlePendingToolCallRequest { /// Error message if the tool call failed. @@ -1830,7 +1837,7 @@ public sealed class SlashCommandInput public bool? Required { get; set; } } -/// RPC data type for SlashCommandInfo operations. +/// Schema for the `SlashCommandInfo` type. public sealed class SlashCommandInfo { /// Canonical aliases without leading slashes. @@ -1862,7 +1869,7 @@ public sealed class SlashCommandInfo public string Name { get; set; } = string.Empty; } -/// RPC data type for CommandList operations. +/// Slash commands available in the session, after applying any include/exclude filters. public sealed class CommandList { /// Commands available in this session. @@ -1870,7 +1877,7 @@ public sealed class CommandList public IList Commands { get => field ??= []; set; } } -/// RPC data type for CommandsList operations. +/// Optional filters controlling which command sources to include in the listing. public sealed class CommandsListRequest { /// Include runtime built-in commands. @@ -1886,7 +1893,7 @@ public sealed class CommandsListRequest public bool? IncludeSkills { get; set; } } -/// RPC data type for CommandsListRequestWithSession operations. +/// Optional filters controlling which command sources to include in the listing. internal sealed class CommandsListRequestWithSession { /// Include runtime built-in commands. @@ -1906,7 +1913,8 @@ internal sealed class CommandsListRequestWithSession public string SessionId { get; set; } = string.Empty; } -/// Polymorphic base type discriminated by kind. +/// Result of invoking the slash command (text output, prompt to send to the agent, or completion). +/// Polymorphic base type discriminated by kind. [JsonPolymorphic( TypeDiscriminatorPropertyName = "kind", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] @@ -1921,7 +1929,8 @@ public partial class SlashCommandInvocationResult } -/// The text variant of . +/// Schema for the `SlashCommandTextResult` type. +/// The text variant of . public partial class SlashCommandInvocationResultText : SlashCommandInvocationResult { /// @@ -1948,7 +1957,8 @@ public partial class SlashCommandInvocationResultText : SlashCommandInvocationRe public required string Text { get; set; } } -/// The agent-prompt variant of . +/// Schema for the `SlashCommandAgentPromptResult` type. +/// The agent-prompt variant of . public partial class SlashCommandInvocationResultAgentPrompt : SlashCommandInvocationResult { /// @@ -1974,7 +1984,8 @@ public partial class SlashCommandInvocationResultAgentPrompt : SlashCommandInvoc public bool? RuntimeSettingsChanged { get; set; } } -/// The completed variant of . +/// Schema for the `SlashCommandCompletedResult` type. +/// The completed variant of . public partial class SlashCommandInvocationResultCompleted : SlashCommandInvocationResult { /// @@ -1992,7 +2003,7 @@ public partial class SlashCommandInvocationResultCompleted : SlashCommandInvocat public bool? RuntimeSettingsChanged { get; set; } } -/// RPC data type for CommandsInvoke operations. +/// Slash command name and optional raw input string to invoke. internal sealed class CommandsInvokeRequest { /// Raw input after the command name. @@ -2008,7 +2019,7 @@ internal sealed class CommandsInvokeRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for CommandsHandlePendingCommand operations. +/// Indicates whether the pending client-handled command was completed successfully. public sealed class CommandsHandlePendingCommandResult { /// Whether the command was handled successfully. @@ -2016,7 +2027,7 @@ public sealed class CommandsHandlePendingCommandResult public bool Success { get; set; } } -/// RPC data type for CommandsHandlePendingCommand operations. +/// Pending command request ID and an optional error if the client handler failed. internal sealed class CommandsHandlePendingCommandRequest { /// Error message if the command handler failed. @@ -2032,7 +2043,7 @@ internal sealed class CommandsHandlePendingCommandRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for CommandsRespondToQueuedCommand operations. +/// Indicates whether the queued-command response was accepted by the session. public sealed class CommandsRespondToQueuedCommandResult { /// Whether the response was accepted (false if the requestId was not found or already resolved). @@ -2054,7 +2065,7 @@ public partial class QueuedCommandResult public bool? StopProcessingQueue { get; set; } } -/// RPC data type for CommandsRespondToQueuedCommand operations. +/// Queued command request ID and the result indicating whether the client handled it. internal sealed class CommandsRespondToQueuedCommandRequest { /// Request ID from the queued command event. @@ -2098,7 +2109,7 @@ public sealed class UIElicitationSchema public string Type { get; set; } = string.Empty; } -/// RPC data type for UIElicitation operations. +/// Prompt message and JSON schema describing the form fields to elicit from the user. internal sealed class UIElicitationRequest { /// Message describing what information is needed from the user. @@ -2114,7 +2125,7 @@ internal sealed class UIElicitationRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for UIElicitation operations. +/// Indicates whether the elicitation response was accepted; false if it was already resolved by another client. public sealed class UIElicitationResult { /// Whether the response was accepted. False if the request was already resolved by another client. @@ -2122,7 +2133,7 @@ public sealed class UIElicitationResult public bool Success { get; set; } } -/// RPC data type for UIHandlePendingElicitation operations. +/// Pending elicitation request ID and the user's response (accept/decline/cancel + form values). internal sealed class UIHandlePendingElicitationRequest { /// The unique request ID from the elicitation.requested event. @@ -2138,7 +2149,7 @@ internal sealed class UIHandlePendingElicitationRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for PermissionRequest operations. +/// Indicates whether the permission decision was applied; false when the request was already resolved. public sealed class PermissionRequestResult { /// Whether the permission request was handled successfully. @@ -2146,7 +2157,8 @@ public sealed class PermissionRequestResult public bool Success { get; set; } } -/// Polymorphic base type discriminated by kind. +/// Decision to apply to a pending permission request. +/// Polymorphic base type discriminated by kind. [JsonPolymorphic( TypeDiscriminatorPropertyName = "kind", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] @@ -2164,7 +2176,8 @@ public partial class PermissionDecision } -/// The approve-once variant of . +/// Schema for the `PermissionDecisionApproveOnce` type. +/// The approve-once variant of . public partial class PermissionDecisionApproveOnce : PermissionDecision { /// @@ -2194,19 +2207,21 @@ public partial class PermissionDecisionApproveForSessionApproval } -/// The commands variant of . +/// Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type. +/// The commands variant of . public partial class PermissionDecisionApproveForSessionApprovalCommands : PermissionDecisionApproveForSessionApproval { /// [JsonIgnore] public override string Kind => "commands"; - /// Gets or sets the commandIdentifiers value. + /// Command identifiers covered by this approval. [JsonPropertyName("commandIdentifiers")] public required IList CommandIdentifiers { get; set; } } -/// The read variant of . +/// Schema for the `PermissionDecisionApproveForSessionApprovalRead` type. +/// The read variant of . public partial class PermissionDecisionApproveForSessionApprovalRead : PermissionDecisionApproveForSessionApproval { /// @@ -2214,7 +2229,8 @@ public partial class PermissionDecisionApproveForSessionApprovalRead : Permissio public override string Kind => "read"; } -/// The write variant of . +/// Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type. +/// The write variant of . public partial class PermissionDecisionApproveForSessionApprovalWrite : PermissionDecisionApproveForSessionApproval { /// @@ -2222,35 +2238,38 @@ public partial class PermissionDecisionApproveForSessionApprovalWrite : Permissi public override string Kind => "write"; } -/// The mcp variant of . +/// Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type. +/// The mcp variant of . public partial class PermissionDecisionApproveForSessionApprovalMcp : PermissionDecisionApproveForSessionApproval { /// [JsonIgnore] public override string Kind => "mcp"; - /// Gets or sets the serverName value. + /// MCP server name. [JsonPropertyName("serverName")] public required string ServerName { get; set; } - /// Gets or sets the toolName value. + /// MCP tool name, or null to cover every tool on the server. [JsonPropertyName("toolName")] public string? ToolName { get; set; } } -/// The mcp-sampling variant of . +/// Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type. +/// The mcp-sampling variant of . public partial class PermissionDecisionApproveForSessionApprovalMcpSampling : PermissionDecisionApproveForSessionApproval { /// [JsonIgnore] public override string Kind => "mcp-sampling"; - /// Gets or sets the serverName value. + /// MCP server name. [JsonPropertyName("serverName")] public required string ServerName { get; set; } } -/// The memory variant of . +/// Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type. +/// The memory variant of . public partial class PermissionDecisionApproveForSessionApprovalMemory : PermissionDecisionApproveForSessionApproval { /// @@ -2258,44 +2277,48 @@ public partial class PermissionDecisionApproveForSessionApprovalMemory : Permiss public override string Kind => "memory"; } -/// The custom-tool variant of . +/// Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type. +/// The custom-tool variant of . public partial class PermissionDecisionApproveForSessionApprovalCustomTool : PermissionDecisionApproveForSessionApproval { /// [JsonIgnore] public override string Kind => "custom-tool"; - /// Gets or sets the toolName value. + /// Custom tool name. [JsonPropertyName("toolName")] public required string ToolName { get; set; } } -/// The extension-management variant of . +/// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type. +/// The extension-management variant of . public partial class PermissionDecisionApproveForSessionApprovalExtensionManagement : PermissionDecisionApproveForSessionApproval { /// [JsonIgnore] public override string Kind => "extension-management"; - /// Gets or sets the operation value. + /// Optional operation identifier; when omitted, the approval covers all extension management operations. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("operation")] public string? Operation { get; set; } } -/// The extension-permission-access variant of . +/// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` type. +/// The extension-permission-access variant of . public partial class PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess : PermissionDecisionApproveForSessionApproval { /// [JsonIgnore] public override string Kind => "extension-permission-access"; - /// Gets or sets the extensionName value. + /// Extension name. [JsonPropertyName("extensionName")] public required string ExtensionName { get; set; } } -/// The approve-for-session variant of . +/// Schema for the `PermissionDecisionApproveForSession` type. +/// The approve-for-session variant of . public partial class PermissionDecisionApproveForSession : PermissionDecision { /// @@ -2335,19 +2358,21 @@ public partial class PermissionDecisionApproveForLocationApproval } -/// The commands variant of . +/// Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type. +/// The commands variant of . public partial class PermissionDecisionApproveForLocationApprovalCommands : PermissionDecisionApproveForLocationApproval { /// [JsonIgnore] public override string Kind => "commands"; - /// Gets or sets the commandIdentifiers value. + /// Command identifiers covered by this approval. [JsonPropertyName("commandIdentifiers")] public required IList CommandIdentifiers { get; set; } } -/// The read variant of . +/// Schema for the `PermissionDecisionApproveForLocationApprovalRead` type. +/// The read variant of . public partial class PermissionDecisionApproveForLocationApprovalRead : PermissionDecisionApproveForLocationApproval { /// @@ -2355,7 +2380,8 @@ public partial class PermissionDecisionApproveForLocationApprovalRead : Permissi public override string Kind => "read"; } -/// The write variant of . +/// Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type. +/// The write variant of . public partial class PermissionDecisionApproveForLocationApprovalWrite : PermissionDecisionApproveForLocationApproval { /// @@ -2363,35 +2389,38 @@ public partial class PermissionDecisionApproveForLocationApprovalWrite : Permiss public override string Kind => "write"; } -/// The mcp variant of . +/// Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type. +/// The mcp variant of . public partial class PermissionDecisionApproveForLocationApprovalMcp : PermissionDecisionApproveForLocationApproval { /// [JsonIgnore] public override string Kind => "mcp"; - /// Gets or sets the serverName value. + /// MCP server name. [JsonPropertyName("serverName")] public required string ServerName { get; set; } - /// Gets or sets the toolName value. + /// MCP tool name, or null to cover every tool on the server. [JsonPropertyName("toolName")] public string? ToolName { get; set; } } -/// The mcp-sampling variant of . +/// Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type. +/// The mcp-sampling variant of . public partial class PermissionDecisionApproveForLocationApprovalMcpSampling : PermissionDecisionApproveForLocationApproval { /// [JsonIgnore] public override string Kind => "mcp-sampling"; - /// Gets or sets the serverName value. + /// MCP server name. [JsonPropertyName("serverName")] public required string ServerName { get; set; } } -/// The memory variant of . +/// Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type. +/// The memory variant of . public partial class PermissionDecisionApproveForLocationApprovalMemory : PermissionDecisionApproveForLocationApproval { /// @@ -2399,44 +2428,48 @@ public partial class PermissionDecisionApproveForLocationApprovalMemory : Permis public override string Kind => "memory"; } -/// The custom-tool variant of . +/// Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type. +/// The custom-tool variant of . public partial class PermissionDecisionApproveForLocationApprovalCustomTool : PermissionDecisionApproveForLocationApproval { /// [JsonIgnore] public override string Kind => "custom-tool"; - /// Gets or sets the toolName value. + /// Custom tool name. [JsonPropertyName("toolName")] public required string ToolName { get; set; } } -/// The extension-management variant of . +/// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type. +/// The extension-management variant of . public partial class PermissionDecisionApproveForLocationApprovalExtensionManagement : PermissionDecisionApproveForLocationApproval { /// [JsonIgnore] public override string Kind => "extension-management"; - /// Gets or sets the operation value. + /// Optional operation identifier; when omitted, the approval covers all extension management operations. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("operation")] public string? Operation { get; set; } } -/// The extension-permission-access variant of . +/// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` type. +/// The extension-permission-access variant of . public partial class PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess : PermissionDecisionApproveForLocationApproval { /// [JsonIgnore] public override string Kind => "extension-permission-access"; - /// Gets or sets the extensionName value. + /// Extension name. [JsonPropertyName("extensionName")] public required string ExtensionName { get; set; } } -/// The approve-for-location variant of . +/// Schema for the `PermissionDecisionApproveForLocation` type. +/// The approve-for-location variant of . public partial class PermissionDecisionApproveForLocation : PermissionDecision { /// @@ -2452,7 +2485,8 @@ public partial class PermissionDecisionApproveForLocation : PermissionDecision public required string LocationKey { get; set; } } -/// The approve-permanently variant of . +/// Schema for the `PermissionDecisionApprovePermanently` type. +/// The approve-permanently variant of . public partial class PermissionDecisionApprovePermanently : PermissionDecision { /// @@ -2464,7 +2498,8 @@ public partial class PermissionDecisionApprovePermanently : PermissionDecision public required string Domain { get; set; } } -/// The reject variant of . +/// Schema for the `PermissionDecisionReject` type. +/// The reject variant of . public partial class PermissionDecisionReject : PermissionDecision { /// @@ -2477,7 +2512,8 @@ public partial class PermissionDecisionReject : PermissionDecision public string? Feedback { get; set; } } -/// The user-not-available variant of . +/// Schema for the `PermissionDecisionUserNotAvailable` type. +/// The user-not-available variant of . public partial class PermissionDecisionUserNotAvailable : PermissionDecision { /// @@ -2485,14 +2521,14 @@ public partial class PermissionDecisionUserNotAvailable : PermissionDecision public override string Kind => "user-not-available"; } -/// RPC data type for PermissionDecision operations. +/// Pending permission request ID and the decision to apply (approve/reject and scope). internal sealed class PermissionDecisionRequest { /// Request ID of the pending permission request. [JsonPropertyName("requestId")] public string RequestId { get; set; } = string.Empty; - /// Gets or sets the result value. + /// Decision to apply to a pending permission request. [JsonPropertyName("result")] public PermissionDecision Result { get => field ??= new(); set; } @@ -2501,7 +2537,7 @@ internal sealed class PermissionDecisionRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for PermissionsSetApproveAll operations. +/// Indicates whether the operation succeeded. public sealed class PermissionsSetApproveAllResult { /// Whether the operation succeeded. @@ -2509,7 +2545,7 @@ public sealed class PermissionsSetApproveAllResult public bool Success { get; set; } } -/// RPC data type for PermissionsSetApproveAll operations. +/// Whether to auto-approve all tool permission requests for the rest of the session. internal sealed class PermissionsSetApproveAllRequest { /// Whether to auto-approve all tool permission requests. @@ -2521,7 +2557,7 @@ internal sealed class PermissionsSetApproveAllRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for PermissionsResetSessionApprovals operations. +/// Indicates whether the operation succeeded. public sealed class PermissionsResetSessionApprovalsResult { /// Whether the operation succeeded. @@ -2529,7 +2565,7 @@ public sealed class PermissionsResetSessionApprovalsResult public bool Success { get; set; } } -/// RPC data type for PermissionsResetSessionApprovals operations. +/// No parameters; clears all session-scoped tool permission approvals. internal sealed class PermissionsResetSessionApprovalsRequest { /// Target session identifier. @@ -2537,7 +2573,7 @@ internal sealed class PermissionsResetSessionApprovalsRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for ShellExec operations. +/// Identifier of the spawned process, used to correlate streamed output and exit notifications. public sealed class ShellExecResult { /// Unique identifier for tracking streamed output. @@ -2545,7 +2581,7 @@ public sealed class ShellExecResult public string ProcessId { get; set; } = string.Empty; } -/// RPC data type for ShellExec operations. +/// Shell command to run, with optional working directory and timeout in milliseconds. internal sealed class ShellExecRequest { /// Shell command to execute. @@ -2567,7 +2603,7 @@ internal sealed class ShellExecRequest public TimeSpan? Timeout { get; set; } } -/// RPC data type for ShellKill operations. +/// Indicates whether the signal was delivered; false if the process was unknown or already exited. public sealed class ShellKillResult { /// Whether the signal was sent successfully. @@ -2575,7 +2611,7 @@ public sealed class ShellKillResult public bool Killed { get; set; } } -/// RPC data type for ShellKill operations. +/// Identifier of a process previously returned by "shell.exec" and the signal to send. internal sealed class ShellKillRequest { /// Process identifier returned by shell.exec. @@ -2625,7 +2661,7 @@ public sealed class HistoryCompactContextWindow public long? ToolDefinitionsTokens { get; set; } } -/// RPC data type for HistoryCompact operations. +/// Compaction outcome with the number of tokens and messages removed and the resulting context window breakdown. [Experimental(Diagnostics.Experimental)] public sealed class HistoryCompactResult { @@ -2648,7 +2684,7 @@ public sealed class HistoryCompactResult public long TokensRemoved { get; set; } } -/// RPC data type for SessionHistoryCompact operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionHistoryCompactRequest { @@ -2657,7 +2693,7 @@ internal sealed class SessionHistoryCompactRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for HistoryTruncate operations. +/// Number of events that were removed by the truncation. [Experimental(Diagnostics.Experimental)] public sealed class HistoryTruncateResult { @@ -2667,7 +2703,7 @@ public sealed class HistoryTruncateResult public long EventsRemoved { get; set; } } -/// RPC data type for HistoryTruncate operations. +/// Identifier of the event to truncate to; this event and all later events are removed. [Experimental(Diagnostics.Experimental)] internal sealed class HistoryTruncateRequest { @@ -2708,7 +2744,7 @@ public sealed class UsageMetricsModelMetricRequests public long Count { get; set; } } -/// RPC data type for UsageMetricsModelMetricTokenDetail operations. +/// Schema for the `UsageMetricsModelMetricTokenDetail` type. public sealed class UsageMetricsModelMetricTokenDetail { /// Accumulated token count for this token type. @@ -2746,7 +2782,7 @@ public sealed class UsageMetricsModelMetricUsage public long? ReasoningTokens { get; set; } } -/// RPC data type for UsageMetricsModelMetric operations. +/// Schema for the `UsageMetricsModelMetric` type. public sealed class UsageMetricsModelMetric { /// Request count and cost metrics for this model. @@ -2767,7 +2803,7 @@ public sealed class UsageMetricsModelMetric public UsageMetricsModelMetricUsage Usage { get => field ??= new(); set; } } -/// RPC data type for UsageMetricsTokenDetail operations. +/// Schema for the `UsageMetricsTokenDetail` type. public sealed class UsageMetricsTokenDetail { /// Accumulated token count for this token type. @@ -2776,7 +2812,7 @@ public sealed class UsageMetricsTokenDetail public long TokenCount { get; set; } } -/// RPC data type for UsageGetMetrics operations. +/// Accumulated session usage metrics, including premium request cost, token counts, model breakdown, and code-change totals. [Experimental(Diagnostics.Experimental)] public sealed class UsageGetMetricsResult { @@ -2831,7 +2867,7 @@ public sealed class UsageGetMetricsResult public long TotalUserRequests { get; set; } } -/// RPC data type for SessionUsageGetMetrics operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionUsageGetMetricsRequest { @@ -2840,7 +2876,7 @@ internal sealed class SessionUsageGetMetricsRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for RemoteEnable operations. +/// GitHub URL for the session and a flag indicating whether remote steering is enabled. [Experimental(Diagnostics.Experimental)] public sealed class RemoteEnableResult { @@ -2848,16 +2884,16 @@ public sealed class RemoteEnableResult [JsonPropertyName("remoteSteerable")] public bool RemoteSteerable { get; set; } - /// Mission Control frontend URL for this session. + /// GitHub frontend URL for this session. [JsonPropertyName("url")] public string? Url { get; set; } } -/// RPC data type for RemoteEnable operations. +/// Optional remote session mode ("off", "export", or "on"); defaults to enabling both export and remote steering. [Experimental(Diagnostics.Experimental)] internal sealed class RemoteEnableRequest { - /// Per-session remote mode. "off" disables remote, "export" exports session events to Mission Control without enabling remote steering, "on" enables both export and remote steering. + /// Per-session remote mode. "off" disables remote, "export" exports session events to GitHub without enabling remote steering, "on" enables both export and remote steering. [JsonPropertyName("mode")] public RemoteSessionMode? Mode { get; set; } @@ -2866,7 +2902,7 @@ internal sealed class RemoteEnableRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionRemoteDisable operations. +/// Identifies the target session. [Experimental(Diagnostics.Experimental)] internal sealed class SessionRemoteDisableRequest { @@ -2887,7 +2923,7 @@ public sealed class SessionFsError public string? Message { get; set; } } -/// RPC data type for SessionFsReadFile operations. +/// File content as a UTF-8 string, or a filesystem error if the read failed. public sealed class SessionFsReadFileResult { /// File content as UTF-8 string. @@ -2899,7 +2935,7 @@ public sealed class SessionFsReadFileResult public SessionFsError? Error { get; set; } } -/// RPC data type for SessionFsReadFile operations. +/// Path of the file to read from the client-provided session filesystem. public sealed class SessionFsReadFileRequest { /// Path using SessionFs conventions. @@ -2911,7 +2947,7 @@ public sealed class SessionFsReadFileRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionFsWriteFile operations. +/// File path, content to write, and optional mode for the client-provided session filesystem. public sealed class SessionFsWriteFileRequest { /// Content to write. @@ -2932,7 +2968,7 @@ public sealed class SessionFsWriteFileRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionFsAppendFile operations. +/// File path, content to append, and optional mode for the client-provided session filesystem. public sealed class SessionFsAppendFileRequest { /// Content to append. @@ -2953,7 +2989,7 @@ public sealed class SessionFsAppendFileRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionFsExists operations. +/// Indicates whether the requested path exists in the client-provided session filesystem. public sealed class SessionFsExistsResult { /// Whether the path exists. @@ -2961,7 +2997,7 @@ public sealed class SessionFsExistsResult public bool Exists { get; set; } } -/// RPC data type for SessionFsExists operations. +/// Path to test for existence in the client-provided session filesystem. public sealed class SessionFsExistsRequest { /// Path using SessionFs conventions. @@ -2973,7 +3009,7 @@ public sealed class SessionFsExistsRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionFsStat operations. +/// Filesystem metadata for the requested path, or a filesystem error if the stat failed. public sealed class SessionFsStatResult { /// ISO 8601 timestamp of creation. @@ -3002,7 +3038,7 @@ public sealed class SessionFsStatResult public long Size { get; set; } } -/// RPC data type for SessionFsStat operations. +/// Path whose metadata should be returned from the client-provided session filesystem. public sealed class SessionFsStatRequest { /// Path using SessionFs conventions. @@ -3014,7 +3050,7 @@ public sealed class SessionFsStatRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionFsMkdir operations. +/// Directory path to create in the client-provided session filesystem, with options for recursive creation and POSIX mode. public sealed class SessionFsMkdirRequest { /// Optional POSIX-style mode for newly created directories. @@ -3035,7 +3071,7 @@ public sealed class SessionFsMkdirRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionFsReaddir operations. +/// Names of entries in the requested directory, or a filesystem error if the read failed. public sealed class SessionFsReaddirResult { /// Entry names in the directory. @@ -3047,7 +3083,7 @@ public sealed class SessionFsReaddirResult public SessionFsError? Error { get; set; } } -/// RPC data type for SessionFsReaddir operations. +/// Directory path whose entries should be listed from the client-provided session filesystem. public sealed class SessionFsReaddirRequest { /// Path using SessionFs conventions. @@ -3059,7 +3095,7 @@ public sealed class SessionFsReaddirRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionFsReaddirWithTypesEntry operations. +/// Schema for the `SessionFsReaddirWithTypesEntry` type. public sealed class SessionFsReaddirWithTypesEntry { /// Entry name. @@ -3071,7 +3107,7 @@ public sealed class SessionFsReaddirWithTypesEntry public SessionFsReaddirWithTypesEntryType Type { get; set; } } -/// RPC data type for SessionFsReaddirWithTypes operations. +/// Entries in the requested directory paired with file/directory type information, or a filesystem error if the read failed. public sealed class SessionFsReaddirWithTypesResult { /// Directory entries with type information. @@ -3083,7 +3119,7 @@ public sealed class SessionFsReaddirWithTypesResult public SessionFsError? Error { get; set; } } -/// RPC data type for SessionFsReaddirWithTypes operations. +/// Directory path whose entries (with type information) should be listed from the client-provided session filesystem. public sealed class SessionFsReaddirWithTypesRequest { /// Path using SessionFs conventions. @@ -3095,7 +3131,7 @@ public sealed class SessionFsReaddirWithTypesRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionFsRm operations. +/// Path to remove from the client-provided session filesystem, with options for recursive removal and force. public sealed class SessionFsRmRequest { /// Ignore errors if the path does not exist. @@ -3115,7 +3151,7 @@ public sealed class SessionFsRmRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for SessionFsRename operations. +/// Source and destination paths for renaming or moving an entry in the client-provided session filesystem. public sealed class SessionFsRenameRequest { /// Destination path using SessionFs conventions. @@ -3131,6 +3167,55 @@ public sealed class SessionFsRenameRequest public string Src { get; set; } = string.Empty; } +/// Query results including rows, columns, and rows affected, or a filesystem error if execution failed. +public sealed class SessionFsSqliteResult +{ + /// Column names from the result set. + [JsonPropertyName("columns")] + public IList Columns { get => field ??= []; set; } + + /// Describes a filesystem error. + [JsonPropertyName("error")] + public SessionFsError? Error { get; set; } + + /// Last inserted row ID (for INSERT). + [JsonPropertyName("lastInsertRowid")] + public double? LastInsertRowid { get; set; } + + /// For SELECT: array of row objects. For others: empty array. + [JsonPropertyName("rows")] + public IList> Rows { get => field ??= []; set; } + + /// Number of rows affected (for INSERT/UPDATE/DELETE). + [Range((double)0, (double)long.MaxValue)] + [JsonPropertyName("rowsAffected")] + public long RowsAffected { get; set; } +} + +/// Database name, SQL query, query type, and optional bind parameters for executing a SQLite query against a per-session database. +public sealed class SessionFsSqliteRequest +{ + /// Logical database name (e.g., 'session'). + [JsonPropertyName("dbName")] + public string DbName { get; set; } = string.Empty; + + /// Optional named bind parameters. + [JsonPropertyName("params")] + public IDictionary? Params { get; set; } + + /// SQL query to execute. + [JsonPropertyName("query")] + public string Query { get; set; } = string.Empty; + + /// How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected). + [JsonPropertyName("queryType")] + public SessionFsSqliteQueryType QueryType { get; set; } + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// Model capability category for grouping in the model picker. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -3604,6 +3689,71 @@ public override void Write(Utf8JsonWriter writer, AuthInfoType value, JsonSerial } +/// Reasoning summary mode to request for supported model clients. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct ReasoningSummary : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public ReasoningSummary(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Gets the none value. + public static ReasoningSummary None { get; } = new("none"); + + /// Gets the concise value. + public static ReasoningSummary Concise { get; } = new("concise"); + + /// Gets the detailed value. + public static ReasoningSummary Detailed { get; } = new("detailed"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(ReasoningSummary left, ReasoningSummary right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(ReasoningSummary left, ReasoningSummary right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is ReasoningSummary other && Equals(other); + + /// + public bool Equals(ReasoningSummary other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + + /// + public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); + + /// + public override string ToString() => Value; + + /// Provides a for serializing instances. + [EditorBrowsable(EditorBrowsableState.Never)] + public sealed class Converter : JsonConverter + { + /// + public override ReasoningSummary Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GitHub.Copilot.SDK.GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, ReasoningSummary value, JsonSerializerOptions options) + { + GitHub.Copilot.SDK.GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ReasoningSummary)); + } + } +} + + /// The agent mode. Valid values: "interactive", "plan", "autopilot". [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -4789,7 +4939,7 @@ public override void Write(Utf8JsonWriter writer, ShellKillSignal value, JsonSer } -/// Per-session remote mode. "off" disables remote, "export" exports session events to Mission Control without enabling remote steering, "on" enables both export and remote steering. +/// Per-session remote mode. "off" disables remote, "export" exports session events to GitHub without enabling remote steering, "on" enables both export and remote steering. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct RemoteSessionMode : IEquatable @@ -4978,6 +5128,71 @@ public override void Write(Utf8JsonWriter writer, SessionFsReaddirWithTypesEntry } +/// How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected). +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct SessionFsSqliteQueryType : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public SessionFsSqliteQueryType(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Gets the exec value. + public static SessionFsSqliteQueryType Exec { get; } = new("exec"); + + /// Gets the query value. + public static SessionFsSqliteQueryType Query { get; } = new("query"); + + /// Gets the run value. + public static SessionFsSqliteQueryType Run { get; } = new("run"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SessionFsSqliteQueryType left, SessionFsSqliteQueryType right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SessionFsSqliteQueryType left, SessionFsSqliteQueryType right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is SessionFsSqliteQueryType other && Equals(other); + + /// + public bool Equals(SessionFsSqliteQueryType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + + /// + public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); + + /// + public override string ToString() => Value; + + /// Provides a for serializing instances. + [EditorBrowsable(EditorBrowsableState.Never)] + public sealed class Converter : JsonConverter + { + /// + public override SessionFsSqliteQueryType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GitHub.Copilot.SDK.GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, SessionFsSqliteQueryType value, JsonSerializerOptions options) + { + GitHub.Copilot.SDK.GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionFsSqliteQueryType)); + } + } +} + + /// Provides server-scoped RPC methods (no session required). public sealed class ServerRpc { @@ -5391,9 +5606,9 @@ public async Task GetCurrentAsync(CancellationToken cancellationTo } /// Calls "session.model.switchTo". - public async Task SwitchToAsync(string modelId, string? reasoningEffort = null, ModelCapabilitiesOverride? modelCapabilities = null, CancellationToken cancellationToken = default) + public async Task SwitchToAsync(string modelId, string? reasoningEffort = null, ReasoningSummary? reasoningSummary = null, ModelCapabilitiesOverride? modelCapabilities = null, CancellationToken cancellationToken = default) { - var request = new ModelSwitchToRequest { SessionId = _sessionId, ModelId = modelId, ReasoningEffort = reasoningEffort, ModelCapabilities = modelCapabilities }; + var request = new ModelSwitchToRequest { SessionId = _sessionId, ModelId = modelId, ReasoningEffort = reasoningEffort, ReasoningSummary = reasoningSummary, ModelCapabilities = modelCapabilities }; return await CopilotClient.InvokeRpcAsync(_rpc, "session.model.switchTo", [request], cancellationToken); } } @@ -6094,6 +6309,8 @@ public interface ISessionFsHandler Task RmAsync(SessionFsRmRequest request, CancellationToken cancellationToken = default); /// Handles "sessionFs.rename". Task RenameAsync(SessionFsRenameRequest request, CancellationToken cancellationToken = default); + /// Handles "sessionFs.sqlite". + Task SqliteAsync(SessionFsSqliteRequest request, CancellationToken cancellationToken = default); } /// Provides all client session API handler groups for a session. @@ -6173,6 +6390,12 @@ public static void RegisterClientSessionApiHandlers(JsonRpc rpc, Func>)(async (request, cancellationToken) => + { + var handler = getHandlers(request.SessionId).SessionFs; + if (handler is null) throw new InvalidOperationException($"No sessionFs handler registered for session: {request.SessionId}"); + return await handler.SqliteAsync(request, cancellationToken); + }), singleObjectParam: true); } } @@ -6299,6 +6522,8 @@ public static void RegisterClientSessionApiHandlers(JsonRpc rpc, FuncScheduled prompt registered via /every or /after. +/// Scheduled prompt registered via /every. /// Represents the session.schedule_created event. public partial class SessionScheduleCreatedEvent : SessionEvent { @@ -1195,11 +1195,6 @@ public partial class SessionStartData [JsonPropertyName("copilotVersion")] public required string CopilotVersion { get; set; } - /// When set, identifies a parent session whose context this session continues — e.g., a detached headless rem-agent run launched on the parent's interactive shutdown. Telemetry from this session is reported under the parent's session_id. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("detachedFromSpawningParentSessionId")] - public string? DetachedFromSpawningParentSessionId { get; set; } - /// Identifier of the software producing the events (e.g., "copilot-agent"). [JsonPropertyName("producer")] public required string Producer { get; set; } @@ -1348,7 +1343,7 @@ public partial class SessionTitleChangedData public required string Title { get; set; } } -/// Scheduled prompt registered via /every or /after. +/// Scheduled prompt registered via /every. public partial class SessionScheduleCreatedData { /// Sequential id assigned to the scheduled prompt within the session. @@ -1362,11 +1357,6 @@ public partial class SessionScheduleCreatedData /// Prompt text that gets enqueued on every tick. [JsonPropertyName("prompt")] public required string Prompt { get; set; } - - /// Whether the schedule re-arms after each tick (`/every`) or fires once (`/after`). - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("recurring")] - public bool? Recurring { get; set; } } /// Scheduled prompt cancelled from the schedule manager dialog. @@ -1845,11 +1835,6 @@ public partial class UserMessageData [JsonPropertyName("interactionId")] public string? InteractionId { get; set; } - /// True when this user message was auto-injected by autopilot's continuation loop rather than typed by the user; used to distinguish autopilot-driven turns in telemetry. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("isAutopilotContinuation")] - public bool? IsAutopilotContinuation { get; set; } - /// Path-backed native document attachments that stayed on the tagged_files path flow because native upload would exceed the request size limit. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("nativeDocumentPathFallbackPaths")] @@ -1937,16 +1922,6 @@ public partial class AssistantStreamingDeltaData /// Assistant response containing text content, optional tool requests, and interaction metadata. public partial class AssistantMessageData { - /// Raw Anthropic content array with advisor blocks (server_tool_use, advisor_tool_result) for verbatim round-tripping. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("anthropicAdvisorBlocks")] - public object[]? AnthropicAdvisorBlocks { get; set; } - - /// Anthropic advisor model ID used for this response, for timeline display on replay. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("anthropicAdvisorModel")] - public string? AnthropicAdvisorModel { get; set; } - /// The assistant's text response content. [JsonPropertyName("content")] public required string Content { get; set; } @@ -1965,11 +1940,6 @@ public partial class AssistantMessageData [JsonPropertyName("messageId")] public required string MessageId { get; set; } - /// Model that produced this assistant message, if known. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("model")] - public string? Model { get; set; } - /// Actual output token count from the API response (completion_tokens), used for accurate token accounting. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("outputTokens")] @@ -2059,11 +2029,6 @@ public partial class AssistantUsageData [JsonPropertyName("apiCallId")] public string? ApiCallId { get; set; } - /// API endpoint used for this model call, matching CAPI supported_endpoints vocabulary. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("apiEndpoint")] - public AssistantUsageApiEndpoint? ApiEndpoint { get; set; } - /// Number of tokens read from prompt cache. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("cacheReadTokens")] @@ -2191,9 +2156,9 @@ public partial class ModelCallFailureData /// Turn abort information including the reason for termination. public partial class AbortData { - /// Finite reason code describing why the current turn was aborted. + /// Reason the current turn was aborted (e.g., "user initiated"). [JsonPropertyName("reason")] - public required AbortReason Reason { get; set; } + public required string Reason { get; set; } } /// User-initiated tool invocation request with tool name and arguments. @@ -2379,11 +2344,6 @@ public partial class SubagentStartedData [JsonPropertyName("agentName")] public required string AgentName { get; set; } - /// Model the sub-agent will run with, when known at start. Surfaced in the timeline for auto-selected sub-agents (e.g. rubber-duck). - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("model")] - public string? Model { get; set; } - /// Tool call ID of the parent tool invocation that spawned this sub-agent. [JsonPropertyName("toolCallId")] public required string ToolCallId { get; set; } @@ -4201,51 +4161,6 @@ public partial class PermissionRequestHook : PermissionRequest public required string ToolName { get; set; } } -/// Extension management permission request. -/// The extension-management variant of . -public partial class PermissionRequestExtensionManagement : PermissionRequest -{ - /// - [JsonIgnore] - public override string Kind => "extension-management"; - - /// Name of the extension being managed. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("extensionName")] - public string? ExtensionName { get; set; } - - /// The extension management operation (scaffold, reload). - [JsonPropertyName("operation")] - public required string Operation { get; set; } - - /// Tool call ID that triggered this permission request. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("toolCallId")] - public string? ToolCallId { get; set; } -} - -/// Extension permission access request. -/// The extension-permission-access variant of . -public partial class PermissionRequestExtensionPermissionAccess : PermissionRequest -{ - /// - [JsonIgnore] - public override string Kind => "extension-permission-access"; - - /// Capabilities the extension is requesting. - [JsonPropertyName("capabilities")] - public required string[] Capabilities { get; set; } - - /// Name of the extension requesting permission access. - [JsonPropertyName("extensionName")] - public required string ExtensionName { get; set; } - - /// Tool call ID that triggered this permission request. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("toolCallId")] - public string? ToolCallId { get; set; } -} - /// Details of the permission being requested. /// Polymorphic base type discriminated by kind. [JsonPolymorphic( @@ -4259,8 +4174,6 @@ public partial class PermissionRequestExtensionPermissionAccess : PermissionRequ [JsonDerivedType(typeof(PermissionRequestMemory), "memory")] [JsonDerivedType(typeof(PermissionRequestCustomTool), "custom-tool")] [JsonDerivedType(typeof(PermissionRequestHook), "hook")] -[JsonDerivedType(typeof(PermissionRequestExtensionManagement), "extension-management")] -[JsonDerivedType(typeof(PermissionRequestExtensionPermissionAccess), "extension-permission-access")] public partial class PermissionRequest { /// The type discriminator. @@ -4534,51 +4447,6 @@ public partial class PermissionPromptRequestHook : PermissionPromptRequest public required string ToolName { get; set; } } -/// Extension management permission prompt. -/// The extension-management variant of . -public partial class PermissionPromptRequestExtensionManagement : PermissionPromptRequest -{ - /// - [JsonIgnore] - public override string Kind => "extension-management"; - - /// Name of the extension being managed. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("extensionName")] - public string? ExtensionName { get; set; } - - /// The extension management operation (scaffold, reload). - [JsonPropertyName("operation")] - public required string Operation { get; set; } - - /// Tool call ID that triggered this permission request. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("toolCallId")] - public string? ToolCallId { get; set; } -} - -/// Extension permission access prompt. -/// The extension-permission-access variant of . -public partial class PermissionPromptRequestExtensionPermissionAccess : PermissionPromptRequest -{ - /// - [JsonIgnore] - public override string Kind => "extension-permission-access"; - - /// Capabilities the extension is requesting. - [JsonPropertyName("capabilities")] - public required string[] Capabilities { get; set; } - - /// Name of the extension requesting permission access. - [JsonPropertyName("extensionName")] - public required string ExtensionName { get; set; } - - /// Tool call ID that triggered this permission request. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("toolCallId")] - public string? ToolCallId { get; set; } -} - /// Derived user-facing permission prompt details for UI consumers. /// Polymorphic base type discriminated by kind. [JsonPolymorphic( @@ -4593,8 +4461,6 @@ public partial class PermissionPromptRequestExtensionPermissionAccess : Permissi [JsonDerivedType(typeof(PermissionPromptRequestCustomTool), "custom-tool")] [JsonDerivedType(typeof(PermissionPromptRequestPath), "path")] [JsonDerivedType(typeof(PermissionPromptRequestHook), "hook")] -[JsonDerivedType(typeof(PermissionPromptRequestExtensionManagement), "extension-management")] -[JsonDerivedType(typeof(PermissionPromptRequestExtensionPermissionAccess), "extension-permission-access")] public partial class PermissionPromptRequest { /// The type discriminator. @@ -4675,31 +4541,6 @@ public partial class UserToolSessionApprovalCustomTool : UserToolSessionApproval public required string ToolName { get; set; } } -/// The extension-management variant of . -public partial class UserToolSessionApprovalExtensionManagement : UserToolSessionApproval -{ - /// - [JsonIgnore] - public override string Kind => "extension-management"; - - /// Optional operation identifier. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("operation")] - public string? Operation { get; set; } -} - -/// The extension-permission-access variant of . -public partial class UserToolSessionApprovalExtensionPermissionAccess : UserToolSessionApproval -{ - /// - [JsonIgnore] - public override string Kind => "extension-permission-access"; - - /// Extension name. - [JsonPropertyName("extensionName")] - public required string ExtensionName { get; set; } -} - /// The approval to add as a session-scoped rule. /// Polymorphic base type discriminated by kind. [JsonPolymorphic( @@ -4711,8 +4552,6 @@ public partial class UserToolSessionApprovalExtensionPermissionAccess : UserTool [JsonDerivedType(typeof(UserToolSessionApprovalMcp), "mcp")] [JsonDerivedType(typeof(UserToolSessionApprovalMemory), "memory")] [JsonDerivedType(typeof(UserToolSessionApprovalCustomTool), "custom-tool")] -[JsonDerivedType(typeof(UserToolSessionApprovalExtensionManagement), "extension-management")] -[JsonDerivedType(typeof(UserToolSessionApprovalExtensionPermissionAccess), "extension-permission-access")] public partial class UserToolSessionApproval { /// The type discriminator. @@ -5536,73 +5375,6 @@ public override void Write(Utf8JsonWriter writer, AssistantMessageToolRequestTyp } } -/// API endpoint used for this model call, matching CAPI supported_endpoints vocabulary. -[JsonConverter(typeof(Converter))] -[DebuggerDisplay("{Value,nq}")] -public readonly struct AssistantUsageApiEndpoint : IEquatable -{ - private readonly string? _value; - - /// Initializes a new instance of the struct. - /// The value to associate with this . - [JsonConstructor] - public AssistantUsageApiEndpoint(string value) - { - ArgumentException.ThrowIfNullOrWhiteSpace(value); - _value = value; - } - - /// Gets the value associated with this . - public string Value => _value ?? string.Empty; - - /// Gets the /chat/completions value. - public static AssistantUsageApiEndpoint ChatCompletions { get; } = new("/chat/completions"); - - /// Gets the /v1/messages value. - public static AssistantUsageApiEndpoint V1Messages { get; } = new("/v1/messages"); - - /// Gets the /responses value. - public static AssistantUsageApiEndpoint Responses { get; } = new("/responses"); - - /// Gets the ws:/responses value. - public static AssistantUsageApiEndpoint WsResponses { get; } = new("ws:/responses"); - - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(AssistantUsageApiEndpoint left, AssistantUsageApiEndpoint right) => left.Equals(right); - - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(AssistantUsageApiEndpoint left, AssistantUsageApiEndpoint right) => !(left == right); - - /// - public override bool Equals(object? obj) => obj is AssistantUsageApiEndpoint other && Equals(other); - - /// - public bool Equals(AssistantUsageApiEndpoint other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); - - /// - public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); - - /// - public override string ToString() => Value; - - /// Provides a for serializing instances. - [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter - { - /// - public override AssistantUsageApiEndpoint Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - return new(GitHub.Copilot.SDK.GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); - } - - /// - public override void Write(Utf8JsonWriter writer, AssistantUsageApiEndpoint value, JsonSerializerOptions options) - { - GitHub.Copilot.SDK.GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AssistantUsageApiEndpoint)); - } - } -} - /// Where the failed model call originated. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -5667,70 +5439,6 @@ public override void Write(Utf8JsonWriter writer, ModelCallFailureSource value, } } -/// Finite reason code describing why the current turn was aborted. -[JsonConverter(typeof(Converter))] -[DebuggerDisplay("{Value,nq}")] -public readonly struct AbortReason : IEquatable -{ - private readonly string? _value; - - /// Initializes a new instance of the struct. - /// The value to associate with this . - [JsonConstructor] - public AbortReason(string value) - { - ArgumentException.ThrowIfNullOrWhiteSpace(value); - _value = value; - } - - /// Gets the value associated with this . - public string Value => _value ?? string.Empty; - - /// Gets the user_initiated value. - public static AbortReason UserInitiated { get; } = new("user_initiated"); - - /// Gets the remote_command value. - public static AbortReason RemoteCommand { get; } = new("remote_command"); - - /// Gets the user_abort value. - public static AbortReason UserAbort { get; } = new("user_abort"); - - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(AbortReason left, AbortReason right) => left.Equals(right); - - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(AbortReason left, AbortReason right) => !(left == right); - - /// - public override bool Equals(object? obj) => obj is AbortReason other && Equals(other); - - /// - public bool Equals(AbortReason other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); - - /// - public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); - - /// - public override string ToString() => Value; - - /// Provides a for serializing instances. - [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter - { - /// - public override AbortReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - return new(GitHub.Copilot.SDK.GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); - } - - /// - public override void Write(Utf8JsonWriter writer, AbortReason value, JsonSerializerOptions options) - { - GitHub.Copilot.SDK.GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AbortReason)); - } - } -} - /// Theme variant this icon is intended for. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -6707,8 +6415,6 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu [JsonSerializable(typeof(PermissionPromptRequest))] [JsonSerializable(typeof(PermissionPromptRequestCommands))] [JsonSerializable(typeof(PermissionPromptRequestCustomTool))] -[JsonSerializable(typeof(PermissionPromptRequestExtensionManagement))] -[JsonSerializable(typeof(PermissionPromptRequestExtensionPermissionAccess))] [JsonSerializable(typeof(PermissionPromptRequestHook))] [JsonSerializable(typeof(PermissionPromptRequestMcp))] [JsonSerializable(typeof(PermissionPromptRequestMemory))] @@ -6718,8 +6424,6 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu [JsonSerializable(typeof(PermissionPromptRequestWrite))] [JsonSerializable(typeof(PermissionRequest))] [JsonSerializable(typeof(PermissionRequestCustomTool))] -[JsonSerializable(typeof(PermissionRequestExtensionManagement))] -[JsonSerializable(typeof(PermissionRequestExtensionPermissionAccess))] [JsonSerializable(typeof(PermissionRequestHook))] [JsonSerializable(typeof(PermissionRequestMcp))] [JsonSerializable(typeof(PermissionRequestMemory))] @@ -6877,8 +6581,6 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu [JsonSerializable(typeof(UserToolSessionApproval))] [JsonSerializable(typeof(UserToolSessionApprovalCommands))] [JsonSerializable(typeof(UserToolSessionApprovalCustomTool))] -[JsonSerializable(typeof(UserToolSessionApprovalExtensionManagement))] -[JsonSerializable(typeof(UserToolSessionApprovalExtensionPermissionAccess))] [JsonSerializable(typeof(UserToolSessionApprovalMcp))] [JsonSerializable(typeof(UserToolSessionApprovalMemory))] [JsonSerializable(typeof(UserToolSessionApprovalRead))] diff --git a/dotnet/src/SessionFsProvider.cs b/dotnet/src/SessionFsProvider.cs index 6007dd081..b378ec67b 100644 --- a/dotnet/src/SessionFsProvider.cs +++ b/dotnet/src/SessionFsProvider.cs @@ -213,4 +213,11 @@ private static SessionFsError ToSessionFsError(Exception ex) : SessionFsErrorCode.UNKNOWN; return new SessionFsError { Code = code, Message = ex.Message }; } + + // SQLite support is not yet implemented for the .NET SDK. + // This satisfies the generated interface; full implementation will follow. + Task ISessionFsHandler.SqliteAsync(SessionFsSqliteRequest request, CancellationToken cancellationToken) + { + throw new NotImplementedException("SQLite is not yet supported by the .NET SDK."); + } } diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go index 43940db6c..0b238b0a6 100644 --- a/go/rpc/zrpc.go +++ b/go/rpc/zrpc.go @@ -18,11 +18,13 @@ type AccountGetQuotaRequest struct { GitHubToken *string `json:"gitHubToken,omitempty"` } +// Quota usage snapshots for the resolved user, keyed by quota type. type AccountGetQuotaResult struct { // Quota snapshots keyed by type (e.g., chat, completions, premium_interactions) QuotaSnapshots map[string]AccountQuotaSnapshot `json:"quotaSnapshots"` } +// Schema for the `AccountQuotaSnapshot` type. type AccountQuotaSnapshot struct { // Number of requests included in the entitlement EntitlementRequests int64 `json:"entitlementRequests"` @@ -42,11 +44,7 @@ type AccountQuotaSnapshot struct { UsedRequests int64 `json:"usedRequests"` } -// Experimental: AgentDeselectResult is part of an experimental API and may change or be -// removed. -type AgentDeselectResult struct { -} - +// The currently selected custom agent, or null when using the default agent. // Experimental: AgentGetCurrentResult is part of an experimental API and may change or be // removed. type AgentGetCurrentResult struct { @@ -54,6 +52,7 @@ type AgentGetCurrentResult struct { Agent *AgentInfo `json:"agent,omitempty"` } +// Schema for the `AgentInfo` type. type AgentInfo struct { // Description of the agent's purpose Description string `json:"description"` @@ -66,12 +65,14 @@ type AgentInfo struct { Path *string `json:"path,omitempty"` } +// Custom agents available to the session. // Experimental: AgentList is part of an experimental API and may change or be removed. type AgentList struct { // Available custom agents Agents []AgentInfo `json:"agents"` } +// Custom agents available to the session after reloading definitions from disk. // Experimental: AgentReloadResult is part of an experimental API and may change or be // removed. type AgentReloadResult struct { @@ -79,6 +80,7 @@ type AgentReloadResult struct { Agents []AgentInfo `json:"agents"` } +// Name of the custom agent to select for subsequent turns. // Experimental: AgentSelectRequest is part of an experimental API and may change or be // removed. type AgentSelectRequest struct { @@ -86,6 +88,7 @@ type AgentSelectRequest struct { Name string `json:"name"` } +// The newly selected custom agent. // Experimental: AgentSelectResult is part of an experimental API and may change or be // removed. type AgentSelectResult struct { @@ -93,11 +96,13 @@ type AgentSelectResult struct { Agent AgentInfo `json:"agent"` } +// Slash commands available in the session, after applying any include/exclude filters. type CommandList struct { // Commands available in this session Commands []SlashCommandInfo `json:"commands"` } +// Pending command request ID and an optional error if the client handler failed. type CommandsHandlePendingCommandRequest struct { // Error message if the command handler failed Error *string `json:"error,omitempty"` @@ -105,11 +110,13 @@ type CommandsHandlePendingCommandRequest struct { RequestID string `json:"requestId"` } +// Indicates whether the pending client-handled command was completed successfully. type CommandsHandlePendingCommandResult struct { // Whether the command was handled successfully Success bool `json:"success"` } +// Slash command name and optional raw input string to invoke. type CommandsInvokeRequest struct { // Raw input after the command name Input *string `json:"input,omitempty"` @@ -117,6 +124,7 @@ type CommandsInvokeRequest struct { Name string `json:"name"` } +// Optional filters controlling which command sources to include in the listing. type CommandsListRequest struct { // Include runtime built-in commands IncludeBuiltins *bool `json:"includeBuiltins,omitempty"` @@ -126,6 +134,7 @@ type CommandsListRequest struct { IncludeSkills *bool `json:"includeSkills,omitempty"` } +// Queued command request ID and the result indicating whether the client handled it. type CommandsRespondToQueuedCommandRequest struct { // Request ID from the queued command event RequestID string `json:"requestId"` @@ -133,18 +142,21 @@ type CommandsRespondToQueuedCommandRequest struct { Result QueuedCommandResult `json:"result"` } +// Indicates whether the queued-command response was accepted by the session. type CommandsRespondToQueuedCommandResult struct { // Whether the response was accepted (false if the requestId was not found or already // resolved) Success bool `json:"success"` } +// Optional connection token presented by the SDK client during the handshake. // Internal: ConnectRequest is an internal SDK API and is not part of the public surface. type ConnectRequest struct { // Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN Token *string `json:"token,omitempty"` } +// Handshake result reporting the server's protocol version and package version on success. // Internal: ConnectResult is an internal SDK API and is not part of the public surface. type ConnectResult struct { // Always true on success @@ -155,11 +167,13 @@ type ConnectResult struct { Version string `json:"version"` } +// The currently selected model for the session. type CurrentModel struct { // Currently active model identifier ModelID *string `json:"modelId,omitempty"` } +// Schema for the `DiscoveredMcpServer` type. type DiscoveredMcpServer struct { // Whether the server is enabled (not in the disabled list) Enabled bool `json:"enabled"` @@ -171,6 +185,7 @@ type DiscoveredMcpServer struct { Type *DiscoveredMcpServerType `json:"type,omitempty"` } +// Schema for the `Extension` type. type Extension struct { // Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper') ID string `json:"id"` @@ -184,12 +199,14 @@ type Extension struct { Status ExtensionStatus `json:"status"` } +// Extensions discovered for the session, with their current status. // Experimental: ExtensionList is part of an experimental API and may change or be removed. type ExtensionList struct { // Discovered extensions and their current status Extensions []Extension `json:"extensions"` } +// Source-qualified extension identifier to disable for the session. // Experimental: ExtensionsDisableRequest is part of an experimental API and may change or // be removed. type ExtensionsDisableRequest struct { @@ -197,11 +214,7 @@ type ExtensionsDisableRequest struct { ID string `json:"id"` } -// Experimental: ExtensionsDisableResult is part of an experimental API and may change or be -// removed. -type ExtensionsDisableResult struct { -} - +// Source-qualified extension identifier to enable for the session. // Experimental: ExtensionsEnableRequest is part of an experimental API and may change or be // removed. type ExtensionsEnableRequest struct { @@ -209,16 +222,6 @@ type ExtensionsEnableRequest struct { ID string `json:"id"` } -// Experimental: ExtensionsEnableResult is part of an experimental API and may change or be -// removed. -type ExtensionsEnableResult struct { -} - -// Experimental: ExtensionsReloadResult is part of an experimental API and may change or be -// removed. -type ExtensionsReloadResult struct { -} - // Tool call result (string or expanded result object) type ExternalToolResult interface { externalToolResult() @@ -362,6 +365,7 @@ type RawExternalToolTextResultForLlmContentResourceDetailsData struct { func (RawExternalToolTextResultForLlmContentResourceDetailsData) externalToolTextResultForLlmContentResourceDetails() { } +// Schema for the `EmbeddedBlobResourceContents` type. type EmbeddedBlobResourceContents struct { // Base64-encoded binary content of the resource Blob string `json:"blob"` @@ -373,6 +377,7 @@ type EmbeddedBlobResourceContents struct { func (EmbeddedBlobResourceContents) externalToolTextResultForLlmContentResourceDetails() {} +// Schema for the `EmbeddedTextResourceContents` type. type EmbeddedTextResourceContents struct { // MIME type of the text content MIMEType *string `json:"mimeType,omitempty"` @@ -396,6 +401,8 @@ type ExternalToolTextResultForLlmContentResourceLinkIcon struct { Theme *ExternalToolTextResultForLlmContentResourceLinkIconTheme `json:"theme,omitempty"` } +// Content filtering mode to apply to all tools, or a map of tool name to content filtering +// mode. type FilterMapping interface { filterMapping() } @@ -406,6 +413,7 @@ func (FilterMappingEnumMap) filterMapping() {} func (FilterMappingString) filterMapping() {} +// Optional user prompt to combine with the fleet orchestration instructions. // Experimental: FleetStartRequest is part of an experimental API and may change or be // removed. type FleetStartRequest struct { @@ -413,6 +421,7 @@ type FleetStartRequest struct { Prompt *string `json:"prompt,omitempty"` } +// Indicates whether fleet mode was successfully activated. // Experimental: FleetStartResult is part of an experimental API and may change or be // removed. type FleetStartResult struct { @@ -420,6 +429,8 @@ type FleetStartResult struct { Started bool `json:"started"` } +// Pending external tool call request ID, with the tool result or an error describing why it +// failed. type HandlePendingToolCallRequest struct { // Error message if the tool call failed Error *string `json:"error,omitempty"` @@ -429,6 +440,7 @@ type HandlePendingToolCallRequest struct { Result ExternalToolResult `json:"result,omitempty"` } +// Indicates whether the external tool call result was handled successfully. type HandlePendingToolCallResult struct { // Whether the tool call result was handled successfully Success bool `json:"success"` @@ -450,6 +462,8 @@ type HistoryCompactContextWindow struct { ToolDefinitionsTokens *int64 `json:"toolDefinitionsTokens,omitempty"` } +// Compaction outcome with the number of tokens and messages removed and the resulting +// context window breakdown. // Experimental: HistoryCompactResult is part of an experimental API and may change or be // removed. type HistoryCompactResult struct { @@ -463,6 +477,7 @@ type HistoryCompactResult struct { TokensRemoved int64 `json:"tokensRemoved"` } +// Identifier of the event to truncate to; this event and all later events are removed. // Experimental: HistoryTruncateRequest is part of an experimental API and may change or be // removed. type HistoryTruncateRequest struct { @@ -470,6 +485,7 @@ type HistoryTruncateRequest struct { EventID string `json:"eventId"` } +// Number of events that were removed by the truncation. // Experimental: HistoryTruncateResult is part of an experimental API and may change or be // removed. type HistoryTruncateResult struct { @@ -477,11 +493,13 @@ type HistoryTruncateResult struct { EventsRemoved int64 `json:"eventsRemoved"` } +// Instruction sources loaded for the session, in merge order. type InstructionsGetSourcesResult struct { // Instruction sources for the session Sources []InstructionsSources `json:"sources"` } +// Schema for the `InstructionsSources` type. type InstructionsSources struct { // Glob pattern from frontmatter — when set, this instruction applies only to matching files ApplyTo *string `json:"applyTo,omitempty"` @@ -501,6 +519,7 @@ type InstructionsSources struct { Type InstructionsSourcesType `json:"type"` } +// Message text, optional severity level, persistence flag, and optional follow-up URL. type LogRequest struct { // When true, the message is transient and not persisted to the session event log on disk Ephemeral *bool `json:"ephemeral,omitempty"` @@ -513,11 +532,13 @@ type LogRequest struct { URL *string `json:"url,omitempty"` } +// Identifier of the session event that was emitted for the log message. type LogResult struct { // The unique identifier of the emitted session event EventID string `json:"eventId"` } +// MCP server name and configuration to add to user configuration. type McpConfigAddRequest struct { // MCP server configuration (local/stdio or remote/http) Config McpServerConfig `json:"config"` @@ -528,6 +549,7 @@ type McpConfigAddRequest struct { type McpConfigAddResult struct { } +// MCP server names to disable for new sessions. 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 @@ -538,6 +560,7 @@ type McpConfigDisableRequest struct { type McpConfigDisableResult struct { } +// MCP server names to enable for new sessions. 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. @@ -547,11 +570,13 @@ type McpConfigEnableRequest struct { type McpConfigEnableResult struct { } +// User-configured MCP servers, keyed by server name. type McpConfigList struct { // All MCP servers from user config, keyed by name Servers map[string]McpServerConfig `json:"servers"` } +// MCP server name to remove from user configuration. type McpConfigRemoveRequest struct { // Name of the MCP server to remove Name string `json:"name"` @@ -560,6 +585,7 @@ type McpConfigRemoveRequest struct { type McpConfigRemoveResult struct { } +// MCP server name and replacement configuration to write to user configuration. type McpConfigUpdateRequest struct { // MCP server configuration (local/stdio or remote/http) Config McpServerConfig `json:"config"` @@ -570,6 +596,7 @@ type McpConfigUpdateRequest struct { type McpConfigUpdateResult struct { } +// Name of the MCP server to disable for the session. // Experimental: McpDisableRequest is part of an experimental API and may change or be // removed. type McpDisableRequest struct { @@ -577,21 +604,19 @@ type McpDisableRequest struct { ServerName string `json:"serverName"` } -// Experimental: McpDisableResult is part of an experimental API and may change or be -// removed. -type McpDisableResult struct { -} - +// Optional working directory used as context for MCP server discovery. type McpDiscoverRequest struct { // Working directory used as context for discovery (e.g., plugin resolution) WorkingDirectory *string `json:"workingDirectory,omitempty"` } +// MCP servers discovered from user, workspace, plugin, and built-in sources. type McpDiscoverResult struct { // MCP servers discovered from all sources Servers []DiscoveredMcpServer `json:"servers"` } +// Name of the MCP server to enable for the session. // Experimental: McpEnableRequest is part of an experimental API and may change or be // removed. type McpEnableRequest struct { @@ -599,10 +624,8 @@ type McpEnableRequest struct { ServerName string `json:"serverName"` } -// Experimental: McpEnableResult is part of an experimental API and may change or be removed. -type McpEnableResult struct { -} - +// Remote MCP server name and optional overrides controlling reauthentication, OAuth client +// display name, and the callback success-page copy. // Experimental: McpOauthLoginRequest is part of an experimental API and may change or be // removed. type McpOauthLoginRequest struct { @@ -624,6 +647,8 @@ type McpOauthLoginRequest struct { ServerName string `json:"serverName"` } +// OAuth authorization URL the caller should open, or empty when cached tokens already +// authenticated the server. // Experimental: McpOauthLoginResult is part of an experimental API and may change or be // removed. type McpOauthLoginResult struct { @@ -635,10 +660,7 @@ type McpOauthLoginResult struct { AuthorizationURL *string `json:"authorizationUrl,omitempty"` } -// Experimental: McpReloadResult is part of an experimental API and may change or be removed. -type McpReloadResult struct { -} - +// Schema for the `McpServer` type. type McpServer struct { // Error message if the server failed to connect Error *string `json:"error,omitempty"` @@ -661,46 +683,68 @@ type RawMcpServerConfigData struct { func (RawMcpServerConfigData) mcpServerConfig() {} +// Remote MCP server configuration accessed over HTTP or SSE. 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"` + // Content filtering mode to apply to all tools, or a map of tool name to content filtering + // mode. + FilterMapping FilterMapping `json:"filterMapping,omitempty"` + // HTTP headers to include in requests to the remote MCP server. + Headers map[string]string `json:"headers,omitempty"` + // Whether this server is a built-in fallback used when the user has not configured their + // own server. + IsDefaultServer *bool `json:"isDefaultServer,omitempty"` + // OAuth client ID for a pre-registered remote MCP OAuth client. + OauthClientID *string `json:"oauthClientId,omitempty"` + // OAuth grant type to use when authenticating to the remote MCP server. + OauthGrantType *McpServerConfigHTTPOauthGrantType `json:"oauthGrantType,omitempty"` + // Whether the configured OAuth client is public and does not require a client secret. + 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"` + // URL of the remote MCP server endpoint. + URL string `json:"url"` } func (McpServerConfigHTTP) mcpServerConfig() {} +// Local MCP server configuration launched as a child process. 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"` + // Command-line arguments passed to the local MCP server process. + Args []string `json:"args"` + // Executable command used to start the local MCP server process. + Command string `json:"command"` + // Working directory for the local MCP server process. + Cwd *string `json:"cwd,omitempty"` + // Environment variables to pass to the local MCP server process. + Env map[string]string `json:"env,omitempty"` + // Content filtering mode to apply to all tools, or a map of tool name to content filtering + // mode. + FilterMapping FilterMapping `json:"filterMapping,omitempty"` + // Whether this server is a built-in fallback used when the user has not configured their + // own server. + 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"` + Tools []string `json:"tools,omitempty"` + // Local transport type. Defaults to "local". + Type *McpServerConfigLocalType `json:"type,omitempty"` } func (McpServerConfigLocal) mcpServerConfig() {} +// MCP servers configured for the session, with their connection status. // Experimental: McpServerList is part of an experimental API and may change or be removed. type McpServerList struct { // Configured MCP servers Servers []McpServer `json:"servers"` } +// Schema for the `Model` type. type Model struct { // Billing information Billing *ModelBilling `json:"billing,omitempty"` @@ -786,12 +830,16 @@ type ModelCapabilitiesOverride struct { // Token limits for prompts, outputs, and context window 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"` + 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 *ModelCapabilitiesOverrideLimitsVision `json:"vision,omitempty"` } +// Vision-specific limits type ModelCapabilitiesOverrideLimitsVision struct { // Maximum number of images per prompt MaxPromptImages *int64 `json:"max_prompt_images,omitempty"` @@ -803,8 +851,10 @@ type ModelCapabilitiesOverrideLimitsVision struct { // Feature flags indicating what the model supports type ModelCapabilitiesOverrideSupports struct { + // Whether this model supports reasoning effort configuration ReasoningEffort *bool `json:"reasoningEffort,omitempty"` - Vision *bool `json:"vision,omitempty"` + // Whether this model supports vision/image input + Vision *bool `json:"vision,omitempty"` } // Feature flags indicating what the model supports @@ -815,6 +865,8 @@ type ModelCapabilitiesSupports struct { Vision *bool `json:"vision,omitempty"` } +// List of Copilot models available to the resolved user, including capabilities and billing +// metadata. type ModelList struct { // List of available models with full metadata Models []Model `json:"models"` @@ -834,41 +886,43 @@ type ModelsListRequest struct { GitHubToken *string `json:"gitHubToken,omitempty"` } +// Target model identifier and optional reasoning effort, summary, and capability overrides. 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 + // Reasoning effort level to use for the model. "none" disables reasoning. ReasoningEffort *string `json:"reasoningEffort,omitempty"` + // Reasoning summary mode to request for supported model clients + ReasoningSummary *ReasoningSummary `json:"reasoningSummary,omitempty"` } +// The model identifier active on the session after the switch. type ModelSwitchToResult struct { // Currently active model identifier after the switch ModelID *string `json:"modelId,omitempty"` } +// Agent interaction mode to apply to the session. type ModeSetRequest struct { // The agent mode. Valid values: "interactive", "plan", "autopilot". Mode SessionMode `json:"mode"` } -type ModeSetResult struct { -} - +// The session's friendly name, or null when not yet set. type NameGetResult struct { // The session name (user-set or auto-generated), or null if not yet set Name *string `json:"name"` } +// New friendly name to apply to the session. type NameSetRequest struct { // New session name (1–100 characters, trimmed of leading/trailing whitespace) Name string `json:"name"` } -type NameSetResult struct { -} - +// Decision to apply to a pending permission request. type PermissionDecision interface { permissionDecision() Kind() PermissionDecisionKind @@ -884,6 +938,7 @@ func (r RawPermissionDecisionData) Kind() PermissionDecisionKind { return r.Discriminator } +// Schema for the `PermissionDecisionApproveForLocation` type. type PermissionDecisionApproveForLocation struct { // The approval to persist for this location Approval PermissionDecisionApproveForLocationApproval `json:"approval"` @@ -896,6 +951,7 @@ func (PermissionDecisionApproveForLocation) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveForLocation } +// Schema for the `PermissionDecisionApproveForSession` type. type PermissionDecisionApproveForSession struct { // The approval to add as a session-scoped rule Approval PermissionDecisionApproveForSessionApproval `json:"approval,omitempty"` @@ -908,6 +964,7 @@ func (PermissionDecisionApproveForSession) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveForSession } +// Schema for the `PermissionDecisionApproveOnce` type. type PermissionDecisionApproveOnce struct { } @@ -916,6 +973,7 @@ func (PermissionDecisionApproveOnce) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveOnce } +// Schema for the `PermissionDecisionApprovePermanently` type. type PermissionDecisionApprovePermanently struct { // The URL domain to approve permanently Domain string `json:"domain"` @@ -926,6 +984,7 @@ func (PermissionDecisionApprovePermanently) Kind() PermissionDecisionKind { return PermissionDecisionKindApprovePermanently } +// Schema for the `PermissionDecisionReject` type. type PermissionDecisionReject struct { // Optional feedback from the user explaining the denial Feedback *string `json:"feedback,omitempty"` @@ -936,6 +995,7 @@ func (PermissionDecisionReject) Kind() PermissionDecisionKind { return PermissionDecisionKindReject } +// Schema for the `PermissionDecisionUserNotAvailable` type. type PermissionDecisionUserNotAvailable struct { } @@ -961,7 +1021,9 @@ func (r RawPermissionDecisionApproveForLocationApprovalData) Kind() PermissionDe return r.Discriminator } +// Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type. type PermissionDecisionApproveForLocationApprovalCommands struct { + // Command identifiers covered by this approval. CommandIdentifiers []string `json:"commandIdentifiers"` } @@ -971,7 +1033,9 @@ func (PermissionDecisionApproveForLocationApprovalCommands) Kind() PermissionDec return PermissionDecisionApproveForLocationApprovalKindCommands } +// Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type. type PermissionDecisionApproveForLocationApprovalCustomTool struct { + // Custom tool name. ToolName string `json:"toolName"` } @@ -981,7 +1045,10 @@ func (PermissionDecisionApproveForLocationApprovalCustomTool) Kind() PermissionD return PermissionDecisionApproveForLocationApprovalKindCustomTool } +// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type. type PermissionDecisionApproveForLocationApprovalExtensionManagement struct { + // Optional operation identifier; when omitted, the approval covers all extension management + // operations. Operation *string `json:"operation,omitempty"` } @@ -991,7 +1058,10 @@ func (PermissionDecisionApproveForLocationApprovalExtensionManagement) Kind() Pe return PermissionDecisionApproveForLocationApprovalKindExtensionManagement } +// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` +// type. type PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess struct { + // Extension name. ExtensionName string `json:"extensionName"` } @@ -1001,9 +1071,12 @@ func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) Kin return PermissionDecisionApproveForLocationApprovalKindExtensionPermissionAccess } +// Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type. type PermissionDecisionApproveForLocationApprovalMcp struct { - ServerName string `json:"serverName"` - ToolName *string `json:"toolName"` + // MCP server name. + ServerName string `json:"serverName"` + // MCP tool name, or null to cover every tool on the server. + ToolName *string `json:"toolName"` } func (PermissionDecisionApproveForLocationApprovalMcp) permissionDecisionApproveForLocationApproval() { @@ -1012,7 +1085,9 @@ func (PermissionDecisionApproveForLocationApprovalMcp) Kind() PermissionDecision return PermissionDecisionApproveForLocationApprovalKindMcp } +// Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type. type PermissionDecisionApproveForLocationApprovalMcpSampling struct { + // MCP server name. ServerName string `json:"serverName"` } @@ -1022,6 +1097,7 @@ func (PermissionDecisionApproveForLocationApprovalMcpSampling) Kind() Permission return PermissionDecisionApproveForLocationApprovalKindMcpSampling } +// Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type. type PermissionDecisionApproveForLocationApprovalMemory struct { } @@ -1031,6 +1107,7 @@ func (PermissionDecisionApproveForLocationApprovalMemory) Kind() PermissionDecis return PermissionDecisionApproveForLocationApprovalKindMemory } +// Schema for the `PermissionDecisionApproveForLocationApprovalRead` type. type PermissionDecisionApproveForLocationApprovalRead struct { } @@ -1040,6 +1117,7 @@ func (PermissionDecisionApproveForLocationApprovalRead) Kind() PermissionDecisio return PermissionDecisionApproveForLocationApprovalKindRead } +// Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type. type PermissionDecisionApproveForLocationApprovalWrite struct { } @@ -1066,7 +1144,9 @@ func (r RawPermissionDecisionApproveForSessionApprovalData) Kind() PermissionDec return r.Discriminator } +// Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type. type PermissionDecisionApproveForSessionApprovalCommands struct { + // Command identifiers covered by this approval. CommandIdentifiers []string `json:"commandIdentifiers"` } @@ -1076,7 +1156,9 @@ func (PermissionDecisionApproveForSessionApprovalCommands) Kind() PermissionDeci return PermissionDecisionApproveForSessionApprovalKindCommands } +// Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type. type PermissionDecisionApproveForSessionApprovalCustomTool struct { + // Custom tool name. ToolName string `json:"toolName"` } @@ -1086,7 +1168,10 @@ func (PermissionDecisionApproveForSessionApprovalCustomTool) Kind() PermissionDe return PermissionDecisionApproveForSessionApprovalKindCustomTool } +// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type. type PermissionDecisionApproveForSessionApprovalExtensionManagement struct { + // Optional operation identifier; when omitted, the approval covers all extension management + // operations. Operation *string `json:"operation,omitempty"` } @@ -1096,7 +1181,10 @@ func (PermissionDecisionApproveForSessionApprovalExtensionManagement) Kind() Per return PermissionDecisionApproveForSessionApprovalKindExtensionManagement } +// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` +// type. type PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess struct { + // Extension name. ExtensionName string `json:"extensionName"` } @@ -1106,9 +1194,12 @@ func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) Kind return PermissionDecisionApproveForSessionApprovalKindExtensionPermissionAccess } +// Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type. type PermissionDecisionApproveForSessionApprovalMcp struct { - ServerName string `json:"serverName"` - ToolName *string `json:"toolName"` + // MCP server name. + ServerName string `json:"serverName"` + // MCP tool name, or null to cover every tool on the server. + ToolName *string `json:"toolName"` } func (PermissionDecisionApproveForSessionApprovalMcp) permissionDecisionApproveForSessionApproval() {} @@ -1116,7 +1207,9 @@ func (PermissionDecisionApproveForSessionApprovalMcp) Kind() PermissionDecisionA return PermissionDecisionApproveForSessionApprovalKindMcp } +// Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type. type PermissionDecisionApproveForSessionApprovalMcpSampling struct { + // MCP server name. ServerName string `json:"serverName"` } @@ -1126,6 +1219,7 @@ func (PermissionDecisionApproveForSessionApprovalMcpSampling) Kind() PermissionD return PermissionDecisionApproveForSessionApprovalKindMcpSampling } +// Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type. type PermissionDecisionApproveForSessionApprovalMemory struct { } @@ -1135,6 +1229,7 @@ func (PermissionDecisionApproveForSessionApprovalMemory) Kind() PermissionDecisi return PermissionDecisionApproveForSessionApprovalKindMemory } +// Schema for the `PermissionDecisionApproveForSessionApprovalRead` type. type PermissionDecisionApproveForSessionApprovalRead struct { } @@ -1144,6 +1239,7 @@ func (PermissionDecisionApproveForSessionApprovalRead) Kind() PermissionDecision return PermissionDecisionApproveForSessionApprovalKindRead } +// Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type. type PermissionDecisionApproveForSessionApprovalWrite struct { } @@ -1153,40 +1249,51 @@ func (PermissionDecisionApproveForSessionApprovalWrite) Kind() PermissionDecisio return PermissionDecisionApproveForSessionApprovalKindWrite } +// Pending permission request ID and the decision to apply (approve/reject and scope). type PermissionDecisionRequest struct { // Request ID of the pending permission request - RequestID string `json:"requestId"` - Result PermissionDecision `json:"result"` + RequestID string `json:"requestId"` + // Decision to apply to a pending permission request. + Result PermissionDecision `json:"result"` } +// Indicates whether the permission decision was applied; false when the request was already +// resolved. type PermissionRequestResult struct { // Whether the permission request was handled successfully Success bool `json:"success"` } +// No parameters; clears all session-scoped tool permission approvals. type PermissionsResetSessionApprovalsRequest struct { } +// Indicates whether the operation succeeded. type PermissionsResetSessionApprovalsResult struct { // Whether the operation succeeded Success bool `json:"success"` } +// Whether to auto-approve all tool permission requests for the rest of the session. type PermissionsSetApproveAllRequest struct { // Whether to auto-approve all tool permission requests Enabled bool `json:"enabled"` } +// Indicates whether the operation succeeded. type PermissionsSetApproveAllResult struct { // Whether the operation succeeded Success bool `json:"success"` } +// Optional message to echo back to the caller. type PingRequest struct { // Optional message to echo back Message *string `json:"message,omitempty"` } +// Server liveness response, including the echoed message, current timestamp, and protocol +// version. type PingResult struct { // Echoed message (or default greeting) Message string `json:"message"` @@ -1196,9 +1303,7 @@ type PingResult struct { Timestamp int64 `json:"timestamp"` } -type PlanDeleteResult struct { -} - +// Existence, contents, and resolved path of the session plan file. type PlanReadResult struct { // The content of the plan file, or null if it does not exist Content *string `json:"content"` @@ -1208,14 +1313,13 @@ type PlanReadResult struct { Path *string `json:"path"` } +// Replacement contents to write to the session plan file. type PlanUpdateRequest struct { // The new content for the plan file Content string `json:"content"` } -type PlanUpdateResult struct { -} - +// Schema for the `Plugin` type. type Plugin struct { // Whether the plugin is currently enabled Enabled bool `json:"enabled"` @@ -1227,6 +1331,7 @@ type Plugin struct { Version *string `json:"version,omitempty"` } +// Plugins installed for the session, with their enabled state and version metadata. // Experimental: PluginList is part of an experimental API and may change or be removed. type PluginList struct { // Installed plugins @@ -1239,6 +1344,7 @@ type QueuedCommandResult interface { Handled() bool } +// Schema for the `QueuedCommandHandled` type. type QueuedCommandHandled struct { // If true, stop processing remaining queued items StopProcessingQueue *bool `json:"stopProcessingQueue,omitempty"` @@ -1249,6 +1355,7 @@ func (QueuedCommandHandled) Handled() bool { return true } +// Schema for the `QueuedCommandNotHandled` type. type QueuedCommandNotHandled struct { } @@ -1257,29 +1364,27 @@ func (QueuedCommandNotHandled) Handled() bool { return false } -// Experimental: RemoteDisableResult is part of an experimental API and may change or be -// removed. -type RemoteDisableResult struct { -} - +// Optional remote session mode ("off", "export", or "on"); defaults to enabling both export +// and remote steering. // Experimental: RemoteEnableRequest is part of an experimental API and may change or be // removed. type RemoteEnableRequest struct { - // Per-session remote mode. "off" disables remote, "export" exports session events to - // Mission Control without enabling remote steering, "on" enables both export and remote - // steering. + // Per-session remote mode. "off" disables remote, "export" exports session events to GitHub + // without enabling remote steering, "on" enables both export and remote steering. Mode *RemoteSessionMode `json:"mode,omitempty"` } +// GitHub URL for the session and a flag indicating whether remote steering is enabled. // Experimental: RemoteEnableResult is part of an experimental API and may change or be // removed. type RemoteEnableResult struct { // Whether remote steering is enabled RemoteSteerable bool `json:"remoteSteerable"` - // Mission Control frontend URL for this session + // GitHub frontend URL for this session URL *string `json:"url,omitempty"` } +// Schema for the `ServerSkill` type. type ServerSkill struct { // Description of what the skill does Description string `json:"description"` @@ -1297,11 +1402,18 @@ type ServerSkill struct { UserInvocable bool `json:"userInvocable"` } +// Skills discovered across global and project sources. type ServerSkillList struct { // All discovered skills across all sources Skills []ServerSkill `json:"skills"` } +// Experimental: SessionAgentDeselectResult is part of an experimental API and may change or +// be removed. +type SessionAgentDeselectResult struct { +} + +// Authentication status and account metadata for the session. type SessionAuthStatus struct { // Authentication type AuthType *AuthInfoType `json:"authType,omitempty"` @@ -1317,6 +1429,23 @@ type SessionAuthStatus struct { StatusMessage *string `json:"statusMessage,omitempty"` } +// Experimental: SessionExtensionsDisableResult is part of an experimental API and may +// change or be removed. +type SessionExtensionsDisableResult struct { +} + +// Experimental: SessionExtensionsEnableResult is part of an experimental API and may change +// or be removed. +type SessionExtensionsEnableResult struct { +} + +// Experimental: SessionExtensionsReloadResult is part of an experimental API and may change +// or be removed. +type SessionExtensionsReloadResult struct { +} + +// File path, content to append, and optional mode for the client-provided session +// filesystem. type SessionFsAppendFileRequest struct { // Content to append Content string `json:"content"` @@ -1336,6 +1465,7 @@ type SessionFsError struct { Message *string `json:"message,omitempty"` } +// Path to test for existence in the client-provided session filesystem. type SessionFsExistsRequest struct { // Path using SessionFs conventions Path string `json:"path"` @@ -1343,11 +1473,14 @@ type SessionFsExistsRequest struct { SessionID string `json:"sessionId"` } +// Indicates whether the requested path exists in the client-provided session filesystem. type SessionFsExistsResult struct { // Whether the path exists Exists bool `json:"exists"` } +// Directory path to create in the client-provided session filesystem, with options for +// recursive creation and POSIX mode. type SessionFsMkdirRequest struct { // Optional POSIX-style mode for newly created directories Mode *int64 `json:"mode,omitempty"` @@ -1359,6 +1492,7 @@ type SessionFsMkdirRequest struct { SessionID string `json:"sessionId"` } +// Directory path whose entries should be listed from the client-provided session filesystem. type SessionFsReaddirRequest struct { // Path using SessionFs conventions Path string `json:"path"` @@ -1366,6 +1500,7 @@ type SessionFsReaddirRequest struct { SessionID string `json:"sessionId"` } +// Names of entries in the requested directory, or a filesystem error if the read failed. type SessionFsReaddirResult struct { // Entry names in the directory Entries []string `json:"entries"` @@ -1373,6 +1508,7 @@ type SessionFsReaddirResult struct { Error *SessionFsError `json:"error,omitempty"` } +// Schema for the `SessionFsReaddirWithTypesEntry` type. type SessionFsReaddirWithTypesEntry struct { // Entry name Name string `json:"name"` @@ -1380,6 +1516,8 @@ type SessionFsReaddirWithTypesEntry struct { Type SessionFsReaddirWithTypesEntryType `json:"type"` } +// Directory path whose entries (with type information) should be listed from the +// client-provided session filesystem. type SessionFsReaddirWithTypesRequest struct { // Path using SessionFs conventions Path string `json:"path"` @@ -1387,6 +1525,8 @@ type SessionFsReaddirWithTypesRequest struct { SessionID string `json:"sessionId"` } +// Entries in the requested directory paired with file/directory type information, or a +// filesystem error if the read failed. type SessionFsReaddirWithTypesResult struct { // Directory entries with type information Entries []SessionFsReaddirWithTypesEntry `json:"entries"` @@ -1394,6 +1534,7 @@ type SessionFsReaddirWithTypesResult struct { Error *SessionFsError `json:"error,omitempty"` } +// Path of the file to read from the client-provided session filesystem. type SessionFsReadFileRequest struct { // Path using SessionFs conventions Path string `json:"path"` @@ -1401,6 +1542,7 @@ type SessionFsReadFileRequest struct { SessionID string `json:"sessionId"` } +// File content as a UTF-8 string, or a filesystem error if the read failed. type SessionFsReadFileResult struct { // File content as UTF-8 string Content string `json:"content"` @@ -1408,6 +1550,8 @@ type SessionFsReadFileResult struct { Error *SessionFsError `json:"error,omitempty"` } +// Source and destination paths for renaming or moving an entry in the client-provided +// session filesystem. type SessionFsRenameRequest struct { // Destination path using SessionFs conventions Dest string `json:"dest"` @@ -1417,6 +1561,8 @@ type SessionFsRenameRequest struct { Src string `json:"src"` } +// Path to remove from the client-provided session filesystem, with options for recursive +// removal and force. type SessionFsRmRequest struct { // Ignore errors if the path does not exist Force *bool `json:"force,omitempty"` @@ -1428,6 +1574,8 @@ type SessionFsRmRequest struct { SessionID string `json:"sessionId"` } +// Initial working directory, session-state path layout, and path conventions used to +// register the calling SDK client as the session filesystem provider. type SessionFsSetProviderRequest struct { // Path conventions used by this filesystem Conventions SessionFsSetProviderConventions `json:"conventions"` @@ -1437,11 +1585,44 @@ type SessionFsSetProviderRequest struct { SessionStatePath string `json:"sessionStatePath"` } +// Indicates whether the calling client was registered as the session filesystem provider. type SessionFsSetProviderResult struct { // Whether the provider was set successfully Success bool `json:"success"` } +// Database name, SQL query, query type, and optional bind parameters for executing a SQLite +// query against a per-session database. +type SessionFsSqliteRequest struct { + // Logical database name (e.g., 'session') + DbName string `json:"dbName"` + // Optional named bind parameters + Params map[string]any `json:"params,omitempty"` + // SQL query to execute + Query string `json:"query"` + // How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT + // (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected) + QueryType SessionFsSqliteQueryType `json:"queryType"` + // Target session identifier + SessionID string `json:"sessionId"` +} + +// Query results including rows, columns, and rows affected, or a filesystem error if +// execution failed. +type SessionFsSqliteResult struct { + // Column names from the result set + Columns []string `json:"columns"` + // Describes a filesystem error. + Error *SessionFsError `json:"error,omitempty"` + // Last inserted row ID (for INSERT) + LastInsertRowid *float64 `json:"lastInsertRowid,omitempty"` + // For SELECT: array of row objects. For others: empty array. + Rows []map[string]any `json:"rows"` + // Number of rows affected (for INSERT/UPDATE/DELETE) + RowsAffected int64 `json:"rowsAffected"` +} + +// Path whose metadata should be returned from the client-provided session filesystem. type SessionFsStatRequest struct { // Path using SessionFs conventions Path string `json:"path"` @@ -1449,6 +1630,7 @@ type SessionFsStatRequest struct { SessionID string `json:"sessionId"` } +// Filesystem metadata for the requested path, or a filesystem error if the stat failed. type SessionFsStatResult struct { // ISO 8601 timestamp of creation Birthtime time.Time `json:"birthtime"` @@ -1464,6 +1646,7 @@ type SessionFsStatResult struct { Size int64 `json:"size"` } +// File path, content to write, and optional mode for the client-provided session filesystem. type SessionFsWriteFileRequest struct { // Content to write Content string `json:"content"` @@ -1475,6 +1658,40 @@ type SessionFsWriteFileRequest struct { SessionID string `json:"sessionId"` } +// Experimental: SessionMcpDisableResult is part of an experimental API and may change or be +// removed. +type SessionMcpDisableResult struct { +} + +// Experimental: SessionMcpEnableResult is part of an experimental API and may change or be +// removed. +type SessionMcpEnableResult struct { +} + +// Experimental: SessionMcpReloadResult is part of an experimental API and may change or be +// removed. +type SessionMcpReloadResult struct { +} + +type SessionModeSetResult struct { +} + +type SessionNameSetResult struct { +} + +type SessionPlanDeleteResult struct { +} + +type SessionPlanUpdateResult struct { +} + +// Experimental: SessionRemoteDisableResult is part of an experimental API and may change or +// be removed. +type SessionRemoteDisableResult struct { +} + +// Source session identifier to fork from, optional event-ID boundary, and optional friendly +// name for the new session. // Experimental: SessionsForkRequest is part of an experimental API and may change or be // removed. type SessionsForkRequest struct { @@ -1487,6 +1704,7 @@ type SessionsForkRequest struct { ToEventID *string `json:"toEventId,omitempty"` } +// Identifier and optional friendly name assigned to the newly forked session. // Experimental: SessionsForkResult is part of an experimental API and may change or be // removed. type SessionsForkResult struct { @@ -1496,6 +1714,23 @@ type SessionsForkResult struct { SessionID string `json:"sessionId"` } +// Experimental: SessionSkillsDisableResult is part of an experimental API and may change or +// be removed. +type SessionSkillsDisableResult struct { +} + +// Experimental: SessionSkillsEnableResult is part of an experimental API and may change or +// be removed. +type SessionSkillsEnableResult struct { +} + +type SessionSuspendResult struct { +} + +type SessionWorkspacesCreateFileResult struct { +} + +// Shell command to run, with optional working directory and timeout in milliseconds. type ShellExecRequest struct { // Shell command to execute Command string `json:"command"` @@ -1505,11 +1740,14 @@ type ShellExecRequest struct { Timeout *int64 `json:"timeout,omitempty"` } +// Identifier of the spawned process, used to correlate streamed output and exit +// notifications. type ShellExecResult struct { // Unique identifier for tracking streamed output ProcessID string `json:"processId"` } +// Identifier of a process previously returned by "shell.exec" and the signal to send. type ShellKillRequest struct { // Process identifier returned by shell.exec ProcessID string `json:"processId"` @@ -1517,11 +1755,14 @@ type ShellKillRequest struct { Signal *ShellKillSignal `json:"signal,omitempty"` } +// Indicates whether the signal was delivered; false if the process was unknown or already +// exited. type ShellKillResult struct { // Whether the signal was sent successfully Killed bool `json:"killed"` } +// Schema for the `Skill` type. type Skill struct { // Description of what the skill does Description string `json:"description"` @@ -1537,12 +1778,14 @@ type Skill struct { UserInvocable bool `json:"userInvocable"` } +// Skills available to the session, with their enabled state. // Experimental: SkillList is part of an experimental API and may change or be removed. type SkillList struct { // Available skills Skills []Skill `json:"skills"` } +// Skill names to mark as disabled in global configuration, replacing any previous list. type SkillsConfigSetDisabledSkillsRequest struct { // List of skill names to disable DisabledSkills []string `json:"disabledSkills"` @@ -1551,6 +1794,7 @@ type SkillsConfigSetDisabledSkillsRequest struct { type SkillsConfigSetDisabledSkillsResult struct { } +// Name of the skill to disable for the session. // Experimental: SkillsDisableRequest is part of an experimental API and may change or be // removed. type SkillsDisableRequest struct { @@ -1558,11 +1802,7 @@ type SkillsDisableRequest struct { Name string `json:"name"` } -// Experimental: SkillsDisableResult is part of an experimental API and may change or be -// removed. -type SkillsDisableResult struct { -} - +// Optional project paths and additional skill directories to include in discovery. type SkillsDiscoverRequest struct { // Optional list of project directory paths to scan for project-scoped skills ProjectPaths []string `json:"projectPaths,omitempty"` @@ -1570,6 +1810,7 @@ type SkillsDiscoverRequest struct { SkillDirectories []string `json:"skillDirectories,omitempty"` } +// Name of the skill to enable for the session. // Experimental: SkillsEnableRequest is part of an experimental API and may change or be // removed. type SkillsEnableRequest struct { @@ -1577,11 +1818,7 @@ type SkillsEnableRequest struct { Name string `json:"name"` } -// Experimental: SkillsEnableResult is part of an experimental API and may change or be -// removed. -type SkillsEnableResult struct { -} - +// Diagnostics from reloading skill definitions, with warnings and errors as separate lists. // Experimental: SkillsLoadDiagnostics is part of an experimental API and may change or be // removed. type SkillsLoadDiagnostics struct { @@ -1591,6 +1828,7 @@ type SkillsLoadDiagnostics struct { Warnings []string `json:"warnings"` } +// Schema for the `SlashCommandInfo` type. type SlashCommandInfo struct { // Canonical aliases without leading slashes Aliases []string `json:"aliases,omitempty"` @@ -1623,6 +1861,8 @@ type SlashCommandInput struct { Required *bool `json:"required,omitempty"` } +// Result of invoking the slash command (text output, prompt to send to the agent, or +// completion). type SlashCommandInvocationResult interface { slashCommandInvocationResult() Kind() SlashCommandInvocationResultKind @@ -1638,6 +1878,7 @@ func (r RawSlashCommandInvocationResultData) Kind() SlashCommandInvocationResult return r.Discriminator } +// Schema for the `SlashCommandAgentPromptResult` type. type SlashCommandAgentPromptResult struct { // Prompt text to display to the user DisplayPrompt string `json:"displayPrompt"` @@ -1655,6 +1896,7 @@ func (SlashCommandAgentPromptResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindAgentPrompt } +// Schema for the `SlashCommandCompletedResult` type. type SlashCommandCompletedResult struct { // Optional user-facing message describing the completed command Message *string `json:"message,omitempty"` @@ -1668,6 +1910,7 @@ func (SlashCommandCompletedResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindCompleted } +// Schema for the `SlashCommandTextResult` type. type SlashCommandTextResult struct { // Whether text contains Markdown Markdown *bool `json:"markdown,omitempty"` @@ -1685,9 +1928,7 @@ func (SlashCommandTextResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindText } -type SuspendResult struct { -} - +// Schema for the `TaskInfo` type. type TaskInfo interface { taskInfo() Type() TaskInfoType @@ -1703,6 +1944,7 @@ func (r RawTaskInfoData) Type() TaskInfoType { return r.Discriminator } +// Schema for the `TaskAgentInfo` type. type TaskAgentInfo struct { // ISO 8601 timestamp when the current active period began ActiveStartedAt *time.Time `json:"activeStartedAt,omitempty"` @@ -1747,6 +1989,7 @@ func (TaskAgentInfo) Type() TaskInfoType { return TaskInfoTypeAgent } +// Schema for the `TaskShellInfo` type. type TaskShellInfo struct { // Whether the shell runs inside a managed PTY session or as an independent background // process @@ -1778,12 +2021,14 @@ func (TaskShellInfo) Type() TaskInfoType { return TaskInfoTypeShell } +// Background tasks currently tracked by the session. // Experimental: TaskList is part of an experimental API and may change or be removed. type TaskList struct { // Currently tracked tasks Tasks []TaskInfo `json:"tasks"` } +// Identifier of the background task to cancel. // Experimental: TasksCancelRequest is part of an experimental API and may change or be // removed. type TasksCancelRequest struct { @@ -1791,6 +2036,7 @@ type TasksCancelRequest struct { ID string `json:"id"` } +// Indicates whether the background task was successfully cancelled. // Experimental: TasksCancelResult is part of an experimental API and may change or be // removed. type TasksCancelResult struct { @@ -1798,6 +2044,7 @@ type TasksCancelResult struct { Cancelled bool `json:"cancelled"` } +// Identifier of the task to promote to background mode. // Experimental: TasksPromoteToBackgroundRequest is part of an experimental API and may // change or be removed. type TasksPromoteToBackgroundRequest struct { @@ -1805,6 +2052,7 @@ type TasksPromoteToBackgroundRequest struct { ID string `json:"id"` } +// Indicates whether the task was successfully promoted to background mode. // Experimental: TasksPromoteToBackgroundResult is part of an experimental API and may // change or be removed. type TasksPromoteToBackgroundResult struct { @@ -1812,6 +2060,7 @@ type TasksPromoteToBackgroundResult struct { Promoted bool `json:"promoted"` } +// Identifier of the completed or cancelled task to remove from tracking. // Experimental: TasksRemoveRequest is part of an experimental API and may change or be // removed. type TasksRemoveRequest struct { @@ -1819,6 +2068,8 @@ type TasksRemoveRequest struct { ID string `json:"id"` } +// Indicates whether the task was removed. False when the task does not exist or is still +// running/idle. // Experimental: TasksRemoveResult is part of an experimental API and may change or be // removed. type TasksRemoveResult struct { @@ -1827,6 +2078,7 @@ type TasksRemoveResult struct { Removed bool `json:"removed"` } +// Identifier of the target agent task, message content, and optional sender agent ID. // Experimental: TasksSendMessageRequest is part of an experimental API and may change or be // removed. type TasksSendMessageRequest struct { @@ -1838,6 +2090,7 @@ type TasksSendMessageRequest struct { Message string `json:"message"` } +// Indicates whether the message was delivered, with an error message when delivery failed. // Experimental: TasksSendMessageResult is part of an experimental API and may change or be // removed. type TasksSendMessageResult struct { @@ -1847,6 +2100,7 @@ type TasksSendMessageResult struct { Sent bool `json:"sent"` } +// Agent type, prompt, name, and optional description and model override for the new task. // Experimental: TasksStartAgentRequest is part of an experimental API and may change or be // removed. type TasksStartAgentRequest struct { @@ -1862,6 +2116,7 @@ type TasksStartAgentRequest struct { Prompt string `json:"prompt"` } +// Identifier assigned to the newly started background agent task. // Experimental: TasksStartAgentResult is part of an experimental API and may change or be // removed. type TasksStartAgentResult struct { @@ -1869,6 +2124,7 @@ type TasksStartAgentResult struct { AgentID string `json:"agentId"` } +// Schema for the `Tool` type. type Tool struct { // Description of what the tool does Description string `json:"description"` @@ -1883,31 +2139,42 @@ type Tool struct { Parameters map[string]any `json:"parameters,omitempty"` } +// Built-in tools available for the requested model, with their parameters and instructions. type ToolList struct { // List of available built-in tools with metadata Tools []Tool `json:"tools"` } +// Optional model identifier whose tool overrides should be applied to the listing. type ToolsListRequest struct { // Optional model ID — when provided, the returned tool list reflects model-specific // overrides Model *string `json:"model,omitempty"` } +// Schema applied to each item in the array. type UIElicitationArrayAnyOfFieldItems struct { + // Selectable options, each with a value and a display label. AnyOf []UIElicitationArrayAnyOfFieldItemsAnyOf `json:"anyOf"` } +// Schema for the `UIElicitationArrayAnyOfFieldItemsAnyOf` type. type UIElicitationArrayAnyOfFieldItemsAnyOf struct { + // Value submitted when this option is selected. Const string `json:"const"` + // Display label for this option. Title string `json:"title"` } +// Schema applied to each item in the array. type UIElicitationArrayEnumFieldItems struct { - Enum []string `json:"enum"` + // Allowed string values for each selected item. + Enum []string `json:"enum"` + // Type discriminator. Always "string". Type UIElicitationArrayEnumFieldItemsType `json:"type"` } +// Schema for the `UIElicitationFieldValue` type. type UIElicitationFieldValue interface { uIElicitationFieldValue() } @@ -1928,6 +2195,7 @@ type UIElicitationStringValue string func (UIElicitationStringValue) uIElicitationFieldValue() {} +// Prompt message and JSON schema describing the form fields to elicit from the user. type UIElicitationRequest struct { // Message describing what information is needed from the user Message string `json:"message"` @@ -1946,6 +2214,8 @@ type UIElicitationResponse struct { // The form values submitted by the user (present when action is 'accept') type UIElicitationResponseContent map[string]UIElicitationFieldValue +// Indicates whether the elicitation response was accepted; false if it was already resolved +// by another client. type UIElicitationResult struct { // Whether the response was accepted. False if the request was already resolved by another // client. @@ -1962,6 +2232,7 @@ type UIElicitationSchema struct { Type UIElicitationSchemaType `json:"type"` } +// Definition for a single elicitation form field. type UIElicitationSchemaProperty interface { uIElicitationSchemaProperty() Type() UIElicitationSchemaPropertyType @@ -1977,13 +2248,20 @@ func (r RawUIElicitationSchemaPropertyData) Type() UIElicitationSchemaPropertyTy return r.Discriminator } +// Multi-select string field where each option pairs a value with a display label. 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"` + // Default values selected when the form is first shown. + Default []string `json:"default,omitempty"` + // Help text describing the field. + Description *string `json:"description,omitempty"` + // Schema applied to each item in the array. + Items UIElicitationArrayAnyOfFieldItems `json:"items"` + // Maximum number of items the user may select. + MaxItems *float64 `json:"maxItems,omitempty"` + // Minimum number of items the user must select. + MinItems *float64 `json:"minItems,omitempty"` + // Human-readable label for the field. + Title *string `json:"title,omitempty"` } func (UIElicitationArrayAnyOfField) uIElicitationSchemaProperty() {} @@ -1991,13 +2269,20 @@ func (UIElicitationArrayAnyOfField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeArray } +// Multi-select string field whose allowed values are defined inline. 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"` + // Default values selected when the form is first shown. + Default []string `json:"default,omitempty"` + // Help text describing the field. + Description *string `json:"description,omitempty"` + // Schema applied to each item in the array. + Items UIElicitationArrayEnumFieldItems `json:"items"` + // Maximum number of items the user may select. + MaxItems *float64 `json:"maxItems,omitempty"` + // Minimum number of items the user must select. + MinItems *float64 `json:"minItems,omitempty"` + // Human-readable label for the field. + Title *string `json:"title,omitempty"` } func (UIElicitationArrayEnumField) uIElicitationSchemaProperty() {} @@ -2005,10 +2290,14 @@ func (UIElicitationArrayEnumField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeArray } +// Boolean field rendered as a yes/no toggle. type UIElicitationSchemaPropertyBoolean struct { - Default *bool `json:"default,omitempty"` + // Default value selected when the form is first shown. + Default *bool `json:"default,omitempty"` + // Help text describing the field. Description *string `json:"description,omitempty"` - Title *string `json:"title,omitempty"` + // Human-readable label for the field. + Title *string `json:"title,omitempty"` } func (UIElicitationSchemaPropertyBoolean) uIElicitationSchemaProperty() {} @@ -2016,11 +2305,17 @@ func (UIElicitationSchemaPropertyBoolean) Type() UIElicitationSchemaPropertyType return UIElicitationSchemaPropertyTypeBoolean } +// Numeric field accepting either a number or an integer. type UIElicitationSchemaPropertyNumber struct { - Default *float64 `json:"default,omitempty"` - Description *string `json:"description,omitempty"` - Maximum *float64 `json:"maximum,omitempty"` - Minimum *float64 `json:"minimum,omitempty"` + // Default value populated in the input when the form is first shown. + Default *float64 `json:"default,omitempty"` + // Help text describing the field. + Description *string `json:"description,omitempty"` + // Maximum allowed value (inclusive). + Maximum *float64 `json:"maximum,omitempty"` + // Minimum allowed value (inclusive). + Minimum *float64 `json:"minimum,omitempty"` + // Human-readable label for the field. Title *string `json:"title,omitempty"` Discriminator UIElicitationSchemaPropertyNumberType `json:"type,omitempty"` } @@ -2033,13 +2328,20 @@ func (r UIElicitationSchemaPropertyNumber) Type() UIElicitationSchemaPropertyTyp return UIElicitationSchemaPropertyType(r.Discriminator) } +// Free-text string field with optional length and format constraints. 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"` + // Default value populated in the input when the form is first shown. + Default *string `json:"default,omitempty"` + // Help text describing the field. + Description *string `json:"description,omitempty"` + // Optional format hint that constrains the accepted input. + Format *UIElicitationSchemaPropertyStringFormat `json:"format,omitempty"` + // Maximum number of characters allowed. + MaxLength *float64 `json:"maxLength,omitempty"` + // Minimum number of characters required. + MinLength *float64 `json:"minLength,omitempty"` + // Human-readable label for the field. + Title *string `json:"title,omitempty"` } func (UIElicitationSchemaPropertyString) uIElicitationSchemaProperty() {} @@ -2047,12 +2349,18 @@ func (UIElicitationSchemaPropertyString) Type() UIElicitationSchemaPropertyType return UIElicitationSchemaPropertyTypeString } +// Single-select string field whose allowed values are defined inline. 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"` + // Default value selected when the form is first shown. + Default *string `json:"default,omitempty"` + // Help text describing the field. + Description *string `json:"description,omitempty"` + // Allowed string values. + Enum []string `json:"enum"` + // Optional display labels for each enum value, in the same order as `enum`. + EnumNames []string `json:"enumNames,omitempty"` + // Human-readable label for the field. + Title *string `json:"title,omitempty"` } func (UIElicitationStringEnumField) uIElicitationSchemaProperty() {} @@ -2060,11 +2368,16 @@ func (UIElicitationStringEnumField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeString } +// Single-select string field where each option pairs a value with a display label. type UIElicitationStringOneOfField struct { - Default *string `json:"default,omitempty"` - Description *string `json:"description,omitempty"` - OneOf []UIElicitationStringOneOfFieldOneOf `json:"oneOf"` - Title *string `json:"title,omitempty"` + // Default value selected when the form is first shown. + Default *string `json:"default,omitempty"` + // Help text describing the field. + Description *string `json:"description,omitempty"` + // Selectable options, each with a value and a display label. + OneOf []UIElicitationStringOneOfFieldOneOf `json:"oneOf"` + // Human-readable label for the field. + Title *string `json:"title,omitempty"` } func (UIElicitationStringOneOfField) uIElicitationSchemaProperty() {} @@ -2072,11 +2385,16 @@ func (UIElicitationStringOneOfField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeString } +// Schema for the `UIElicitationStringOneOfFieldOneOf` type. type UIElicitationStringOneOfFieldOneOf struct { + // Value submitted when this option is selected. Const string `json:"const"` + // Display label for this option. Title string `json:"title"` } +// Pending elicitation request ID and the user's response (accept/decline/cancel + form +// values). type UIHandlePendingElicitationRequest struct { // The unique request ID from the elicitation.requested event RequestID string `json:"requestId"` @@ -2084,6 +2402,8 @@ type UIHandlePendingElicitationRequest struct { Result UIElicitationResponse `json:"result"` } +// Accumulated session usage metrics, including premium request cost, token counts, model +// breakdown, and code-change totals. // Experimental: UsageGetMetricsResult is part of an experimental API and may change or be // removed. type UsageGetMetricsResult struct { @@ -2122,6 +2442,7 @@ type UsageMetricsCodeChanges struct { LinesRemoved int64 `json:"linesRemoved"` } +// Schema for the `UsageMetricsModelMetric` type. type UsageMetricsModelMetric struct { // Request count and cost metrics for this model Requests UsageMetricsModelMetricRequests `json:"requests"` @@ -2141,6 +2462,7 @@ type UsageMetricsModelMetricRequests struct { Count int64 `json:"count"` } +// Schema for the `UsageMetricsModelMetricTokenDetail` type. type UsageMetricsModelMetricTokenDetail struct { // Accumulated token count for this token type TokenCount int64 `json:"tokenCount"` @@ -2160,11 +2482,13 @@ type UsageMetricsModelMetricUsage struct { ReasoningTokens *int64 `json:"reasoningTokens,omitempty"` } +// Schema for the `UsageMetricsTokenDetail` type. type UsageMetricsTokenDetail struct { // Accumulated token count for this token type TokenCount int64 `json:"tokenCount"` } +// Relative path and UTF-8 content for the workspace file to create or overwrite. type WorkspacesCreateFileRequest struct { // File content to write as a UTF-8 string Content string `json:"content"` @@ -2172,9 +2496,7 @@ type WorkspacesCreateFileRequest struct { Path string `json:"path"` } -type WorkspacesCreateFileResult struct { -} - +// Current workspace metadata for the session, or null when not available. type WorkspacesGetWorkspaceResult struct { // Current workspace metadata, or null if not available Workspace *WorkspacesGetWorkspaceResultWorkspace `json:"workspace"` @@ -2199,16 +2521,19 @@ type WorkspacesGetWorkspaceResultWorkspace struct { UserNamed *bool `json:"user_named,omitempty"` } +// Relative paths of files stored in the session workspace files directory. type WorkspacesListFilesResult struct { // Relative file paths in the workspace files directory Files []string `json:"files"` } +// Relative path of the workspace file to read. type WorkspacesReadFileRequest struct { // Relative path within the workspace files directory Path string `json:"path"` } +// Contents of the requested workspace file as a UTF-8 string. type WorkspacesReadFileResult struct { // File content as a UTF-8 string Content string `json:"content"` @@ -2285,6 +2610,7 @@ const ( ExternalToolTextResultForLlmContentTypeText ExternalToolTextResultForLlmContentType = "text" ) +// Allowed values for the `FilterMappingString` enumeration. type FilterMappingString string const ( @@ -2293,6 +2619,7 @@ const ( FilterMappingStringNone FilterMappingString = "none" ) +// Allowed values for the `FilterMappingValue` enumeration. type FilterMappingValue string const ( @@ -2322,6 +2649,7 @@ const ( InstructionsSourcesTypeVscode InstructionsSourcesType = "vscode" ) +// OAuth grant type to use when authenticating to the remote MCP server. type McpServerConfigHTTPOauthGrantType string const ( @@ -2337,6 +2665,7 @@ const ( McpServerConfigHTTPTypeSse McpServerConfigHTTPType = "sse" ) +// Local transport type. Defaults to "local". type McpServerConfigLocalType string const ( @@ -2427,9 +2756,17 @@ const ( PermissionDecisionKindUserNotAvailable PermissionDecisionKind = "user-not-available" ) -// Per-session remote mode. "off" disables remote, "export" exports session events to -// Mission Control without enabling remote steering, "on" enables both export and remote -// steering. +// Reasoning summary mode to request for supported model clients +type ReasoningSummary string + +const ( + ReasoningSummaryConcise ReasoningSummary = "concise" + ReasoningSummaryDetailed ReasoningSummary = "detailed" + ReasoningSummaryNone ReasoningSummary = "none" +) + +// Per-session remote mode. "off" disables remote, "export" exports session events to GitHub +// without enabling remote steering, "on" enables both export and remote steering. type RemoteSessionMode string const ( @@ -2462,6 +2799,16 @@ const ( SessionFsSetProviderConventionsWindows SessionFsSetProviderConventions = "windows" ) +// How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT +// (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected) +type SessionFsSqliteQueryType string + +const ( + SessionFsSqliteQueryTypeExec SessionFsSqliteQueryType = "exec" + SessionFsSqliteQueryTypeQuery SessionFsSqliteQueryType = "query" + SessionFsSqliteQueryTypeRun SessionFsSqliteQueryType = "run" +) + // Log severity level. Determines how the message is displayed in the timeline. Defaults to // "info". type SessionLogLevel string @@ -2580,6 +2927,7 @@ const ( TaskShellInfoStatusRunning TaskShellInfoStatus = "running" ) +// Type discriminator. Always "string". type UIElicitationArrayEnumFieldItemsType string const ( @@ -2595,6 +2943,7 @@ const ( UIElicitationResponseActionDecline UIElicitationResponseAction = "decline" ) +// Numeric type accepted by the field. type UIElicitationSchemaPropertyNumberType string const ( @@ -2602,6 +2951,7 @@ const ( UIElicitationSchemaPropertyNumberTypeNumber UIElicitationSchemaPropertyNumberType = "number" ) +// Optional format hint that constrains the accepted input. type UIElicitationSchemaPropertyStringFormat string const ( @@ -2642,12 +2992,8 @@ type serverApi struct { type ServerAccountApi serverApi -func (a *ServerAccountApi) GetQuota(ctx context.Context, params ...*AccountGetQuotaRequest) (*AccountGetQuotaResult, error) { - var requestParams *AccountGetQuotaRequest - if len(params) > 0 { - requestParams = params[0] - } - raw, err := a.client.Request("account.getQuota", requestParams) +func (a *ServerAccountApi) GetQuota(ctx context.Context, params *AccountGetQuotaRequest) (*AccountGetQuotaResult, error) { + raw, err := a.client.Request("account.getQuota", params) if err != nil { return nil, err } @@ -2752,12 +3098,8 @@ func (s *ServerMcpApi) Config() *ServerMcpConfigApi { type ServerModelsApi serverApi -func (a *ServerModelsApi) List(ctx context.Context, params ...*ModelsListRequest) (*ModelList, error) { - var requestParams *ModelsListRequest - if len(params) > 0 { - requestParams = params[0] - } - raw, err := a.client.Request("models.list", requestParams) +func (a *ServerModelsApi) List(ctx context.Context, params *ModelsListRequest) (*ModelList, error) { + raw, err := a.client.Request("models.list", params) if err != nil { return nil, err } @@ -2921,13 +3263,13 @@ type sessionApi struct { // Experimental: AgentApi contains experimental APIs that may change or be removed. type AgentApi sessionApi -func (a *AgentApi) Deselect(ctx context.Context) (*AgentDeselectResult, error) { +func (a *AgentApi) Deselect(ctx context.Context) (*SessionAgentDeselectResult, error) { req := map[string]any{"sessionId": a.sessionID} raw, err := a.client.Request("session.agent.deselect", req) if err != nil { return nil, err } - var result AgentDeselectResult + var result SessionAgentDeselectResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -3092,7 +3434,7 @@ func (a *CommandsApi) RespondToQueuedCommand(ctx context.Context, params *Comman // Experimental: ExtensionsApi contains experimental APIs that may change or be removed. type ExtensionsApi sessionApi -func (a *ExtensionsApi) Disable(ctx context.Context, params *ExtensionsDisableRequest) (*ExtensionsDisableResult, error) { +func (a *ExtensionsApi) Disable(ctx context.Context, params *ExtensionsDisableRequest) (*SessionExtensionsDisableResult, error) { req := map[string]any{"sessionId": a.sessionID} if params != nil { req["id"] = params.ID @@ -3101,14 +3443,14 @@ func (a *ExtensionsApi) Disable(ctx context.Context, params *ExtensionsDisableRe if err != nil { return nil, err } - var result ExtensionsDisableResult + var result SessionExtensionsDisableResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } return &result, nil } -func (a *ExtensionsApi) Enable(ctx context.Context, params *ExtensionsEnableRequest) (*ExtensionsEnableResult, error) { +func (a *ExtensionsApi) Enable(ctx context.Context, params *ExtensionsEnableRequest) (*SessionExtensionsEnableResult, error) { req := map[string]any{"sessionId": a.sessionID} if params != nil { req["id"] = params.ID @@ -3117,7 +3459,7 @@ func (a *ExtensionsApi) Enable(ctx context.Context, params *ExtensionsEnableRequ if err != nil { return nil, err } - var result ExtensionsEnableResult + var result SessionExtensionsEnableResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -3137,13 +3479,13 @@ func (a *ExtensionsApi) List(ctx context.Context) (*ExtensionList, error) { return &result, nil } -func (a *ExtensionsApi) Reload(ctx context.Context) (*ExtensionsReloadResult, error) { +func (a *ExtensionsApi) Reload(ctx context.Context) (*SessionExtensionsReloadResult, error) { req := map[string]any{"sessionId": a.sessionID} raw, err := a.client.Request("session.extensions.reload", req) if err != nil { return nil, err } - var result ExtensionsReloadResult + var result SessionExtensionsReloadResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -3221,7 +3563,7 @@ func (a *InstructionsApi) GetSources(ctx context.Context) (*InstructionsGetSourc // Experimental: McpApi contains experimental APIs that may change or be removed. type McpApi sessionApi -func (a *McpApi) Disable(ctx context.Context, params *McpDisableRequest) (*McpDisableResult, error) { +func (a *McpApi) Disable(ctx context.Context, params *McpDisableRequest) (*SessionMcpDisableResult, error) { req := map[string]any{"sessionId": a.sessionID} if params != nil { req["serverName"] = params.ServerName @@ -3230,14 +3572,14 @@ func (a *McpApi) Disable(ctx context.Context, params *McpDisableRequest) (*McpDi if err != nil { return nil, err } - var result McpDisableResult + var result SessionMcpDisableResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } return &result, nil } -func (a *McpApi) Enable(ctx context.Context, params *McpEnableRequest) (*McpEnableResult, error) { +func (a *McpApi) Enable(ctx context.Context, params *McpEnableRequest) (*SessionMcpEnableResult, error) { req := map[string]any{"sessionId": a.sessionID} if params != nil { req["serverName"] = params.ServerName @@ -3246,7 +3588,7 @@ func (a *McpApi) Enable(ctx context.Context, params *McpEnableRequest) (*McpEnab if err != nil { return nil, err } - var result McpEnableResult + var result SessionMcpEnableResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -3266,13 +3608,13 @@ func (a *McpApi) List(ctx context.Context) (*McpServerList, error) { return &result, nil } -func (a *McpApi) Reload(ctx context.Context) (*McpReloadResult, error) { +func (a *McpApi) Reload(ctx context.Context) (*SessionMcpReloadResult, error) { req := map[string]any{"sessionId": a.sessionID} raw, err := a.client.Request("session.mcp.reload", req) if err != nil { return nil, err } - var result McpReloadResult + var result SessionMcpReloadResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -3327,7 +3669,7 @@ func (a *ModeApi) Get(ctx context.Context) (*SessionMode, error) { return &result, nil } -func (a *ModeApi) Set(ctx context.Context, params *ModeSetRequest) (*ModeSetResult, error) { +func (a *ModeApi) Set(ctx context.Context, params *ModeSetRequest) (*SessionModeSetResult, error) { req := map[string]any{"sessionId": a.sessionID} if params != nil { req["mode"] = params.Mode @@ -3336,7 +3678,7 @@ func (a *ModeApi) Set(ctx context.Context, params *ModeSetRequest) (*ModeSetResu if err != nil { return nil, err } - var result ModeSetResult + var result SessionModeSetResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -3368,6 +3710,9 @@ func (a *ModelApi) SwitchTo(ctx context.Context, params *ModelSwitchToRequest) ( if params.ReasoningEffort != nil { req["reasoningEffort"] = *params.ReasoningEffort } + if params.ReasoningSummary != nil { + req["reasoningSummary"] = *params.ReasoningSummary + } } raw, err := a.client.Request("session.model.switchTo", req) if err != nil { @@ -3395,7 +3740,7 @@ func (a *NameApi) Get(ctx context.Context) (*NameGetResult, error) { return &result, nil } -func (a *NameApi) Set(ctx context.Context, params *NameSetRequest) (*NameSetResult, error) { +func (a *NameApi) Set(ctx context.Context, params *NameSetRequest) (*SessionNameSetResult, error) { req := map[string]any{"sessionId": a.sessionID} if params != nil { req["name"] = params.Name @@ -3404,7 +3749,7 @@ func (a *NameApi) Set(ctx context.Context, params *NameSetRequest) (*NameSetResu if err != nil { return nil, err } - var result NameSetResult + var result SessionNameSetResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -3461,13 +3806,13 @@ func (a *PermissionsApi) SetApproveAll(ctx context.Context, params *PermissionsS type PlanApi sessionApi -func (a *PlanApi) Delete(ctx context.Context) (*PlanDeleteResult, error) { +func (a *PlanApi) Delete(ctx context.Context) (*SessionPlanDeleteResult, error) { req := map[string]any{"sessionId": a.sessionID} raw, err := a.client.Request("session.plan.delete", req) if err != nil { return nil, err } - var result PlanDeleteResult + var result SessionPlanDeleteResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -3487,7 +3832,7 @@ func (a *PlanApi) Read(ctx context.Context) (*PlanReadResult, error) { return &result, nil } -func (a *PlanApi) Update(ctx context.Context, params *PlanUpdateRequest) (*PlanUpdateResult, error) { +func (a *PlanApi) Update(ctx context.Context, params *PlanUpdateRequest) (*SessionPlanUpdateResult, error) { req := map[string]any{"sessionId": a.sessionID} if params != nil { req["content"] = params.Content @@ -3496,7 +3841,7 @@ func (a *PlanApi) Update(ctx context.Context, params *PlanUpdateRequest) (*PlanU if err != nil { return nil, err } - var result PlanUpdateResult + var result SessionPlanUpdateResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -3522,13 +3867,13 @@ func (a *PluginsApi) List(ctx context.Context) (*PluginList, error) { // Experimental: RemoteApi contains experimental APIs that may change or be removed. type RemoteApi sessionApi -func (a *RemoteApi) Disable(ctx context.Context) (*RemoteDisableResult, error) { +func (a *RemoteApi) Disable(ctx context.Context) (*SessionRemoteDisableResult, error) { req := map[string]any{"sessionId": a.sessionID} raw, err := a.client.Request("session.remote.disable", req) if err != nil { return nil, err } - var result RemoteDisableResult + var result SessionRemoteDisableResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -3599,7 +3944,7 @@ func (a *ShellApi) Kill(ctx context.Context, params *ShellKillRequest) (*ShellKi // Experimental: SkillsApi contains experimental APIs that may change or be removed. type SkillsApi sessionApi -func (a *SkillsApi) Disable(ctx context.Context, params *SkillsDisableRequest) (*SkillsDisableResult, error) { +func (a *SkillsApi) Disable(ctx context.Context, params *SkillsDisableRequest) (*SessionSkillsDisableResult, error) { req := map[string]any{"sessionId": a.sessionID} if params != nil { req["name"] = params.Name @@ -3608,14 +3953,14 @@ func (a *SkillsApi) Disable(ctx context.Context, params *SkillsDisableRequest) ( if err != nil { return nil, err } - var result SkillsDisableResult + var result SessionSkillsDisableResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } return &result, nil } -func (a *SkillsApi) Enable(ctx context.Context, params *SkillsEnableRequest) (*SkillsEnableResult, error) { +func (a *SkillsApi) Enable(ctx context.Context, params *SkillsEnableRequest) (*SessionSkillsEnableResult, error) { req := map[string]any{"sessionId": a.sessionID} if params != nil { req["name"] = params.Name @@ -3624,7 +3969,7 @@ func (a *SkillsApi) Enable(ctx context.Context, params *SkillsEnableRequest) (*S if err != nil { return nil, err } - var result SkillsEnableResult + var result SessionSkillsEnableResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -3843,7 +4188,7 @@ func (a *UsageApi) GetMetrics(ctx context.Context) (*UsageGetMetricsResult, erro type WorkspacesApi sessionApi -func (a *WorkspacesApi) CreateFile(ctx context.Context, params *WorkspacesCreateFileRequest) (*WorkspacesCreateFileResult, error) { +func (a *WorkspacesApi) CreateFile(ctx context.Context, params *WorkspacesCreateFileRequest) (*SessionWorkspacesCreateFileResult, error) { req := map[string]any{"sessionId": a.sessionID} if params != nil { req["content"] = params.Content @@ -3853,7 +4198,7 @@ func (a *WorkspacesApi) CreateFile(ctx context.Context, params *WorkspacesCreate if err != nil { return nil, err } - var result WorkspacesCreateFileResult + var result SessionWorkspacesCreateFileResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -3956,13 +4301,13 @@ func (a *SessionRpc) Log(ctx context.Context, params *LogRequest) (*LogResult, e return &result, nil } -func (a *SessionRpc) Suspend(ctx context.Context) (*SuspendResult, error) { +func (a *SessionRpc) Suspend(ctx context.Context) (*SessionSuspendResult, error) { req := map[string]any{"sessionId": a.common.sessionID} raw, err := a.common.client.Request("session.suspend", req) if err != nil { return nil, err } - var result SuspendResult + var result SessionSuspendResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -4006,6 +4351,7 @@ type SessionFsHandler interface { ReadFile(request *SessionFsReadFileRequest) (*SessionFsReadFileResult, error) Rename(request *SessionFsRenameRequest) (*SessionFsError, error) Rm(request *SessionFsRmRequest) (*SessionFsError, error) + Sqlite(request *SessionFsSqliteRequest) (*SessionFsSqliteResult, error) Stat(request *SessionFsStatRequest) (*SessionFsStatResult, error) WriteFile(request *SessionFsWriteFileRequest) (*SessionFsError, error) } @@ -4181,6 +4527,25 @@ func RegisterClientSessionApiHandlers(client *jsonrpc2.Client, getHandlers func( } return raw, nil }) + client.SetRequestHandler("sessionFs.sqlite", func(params json.RawMessage) (json.RawMessage, *jsonrpc2.Error) { + var request SessionFsSqliteRequest + if err := json.Unmarshal(params, &request); err != nil { + return nil, &jsonrpc2.Error{Code: -32602, Message: fmt.Sprintf("Invalid params: %v", err)} + } + handlers := getHandlers(request.SessionID) + if handlers == nil || handlers.SessionFs == nil { + return nil, &jsonrpc2.Error{Code: -32603, Message: fmt.Sprintf("No sessionFs handler registered for session: %s", request.SessionID)} + } + result, err := handlers.SessionFs.Sqlite(&request) + if err != nil { + return nil, clientSessionHandlerError(err) + } + raw, err := json.Marshal(result) + if err != nil { + return nil, &jsonrpc2.Error{Code: -32603, Message: fmt.Sprintf("Failed to marshal response: %v", err)} + } + return raw, nil + }) client.SetRequestHandler("sessionFs.stat", func(params json.RawMessage) (json.RawMessage, *jsonrpc2.Error) { var request SessionFsStatRequest if err := json.Unmarshal(params, &request); err != nil { diff --git a/go/zsession_encoding.go b/go/zsession_encoding.go index fc603c5ca..d52dea428 100644 --- a/go/zsession_encoding.go +++ b/go/zsession_encoding.go @@ -670,7 +670,6 @@ func (r *UserMessageData) UnmarshalJSON(data []byte) error { Attachments []json.RawMessage `json:"attachments,omitempty"` Content string `json:"content"` InteractionID *string `json:"interactionId,omitempty"` - IsAutopilotContinuation *bool `json:"isAutopilotContinuation,omitempty"` NativeDocumentPathFallbackPaths []string `json:"nativeDocumentPathFallbackPaths,omitempty"` ParentAgentTaskID *string `json:"parentAgentTaskId,omitempty"` Source *string `json:"source,omitempty"` @@ -694,7 +693,6 @@ func (r *UserMessageData) UnmarshalJSON(data []byte) error { } r.Content = raw.Content r.InteractionID = raw.InteractionID - r.IsAutopilotContinuation = raw.IsAutopilotContinuation r.NativeDocumentPathFallbackPaths = raw.NativeDocumentPathFallbackPaths r.ParentAgentTaskID = raw.ParentAgentTaskID r.Source = raw.Source @@ -1103,18 +1101,6 @@ func unmarshalPermissionRequest(data []byte) (PermissionRequest, error) { return nil, err } return &d, nil - case PermissionRequestKindExtensionManagement: - var d PermissionRequestExtensionManagement - if err := json.Unmarshal(data, &d); err != nil { - return nil, err - } - return &d, nil - case PermissionRequestKindExtensionPermissionAccess: - var d PermissionRequestExtensionPermissionAccess - if err := json.Unmarshal(data, &d); err != nil { - return nil, err - } - return &d, nil case PermissionRequestKindHook: var d PermissionRequestHook if err := json.Unmarshal(data, &d); err != nil { @@ -1184,28 +1170,6 @@ func (r PermissionRequestCustomTool) MarshalJSON() ([]byte, error) { }) } -func (r PermissionRequestExtensionManagement) MarshalJSON() ([]byte, error) { - type alias PermissionRequestExtensionManagement - return json.Marshal(struct { - Kind PermissionRequestKind `json:"kind"` - alias - }{ - Kind: r.Kind(), - alias: alias(r), - }) -} - -func (r PermissionRequestExtensionPermissionAccess) MarshalJSON() ([]byte, error) { - type alias PermissionRequestExtensionPermissionAccess - return json.Marshal(struct { - Kind PermissionRequestKind `json:"kind"` - alias - }{ - Kind: r.Kind(), - alias: alias(r), - }) -} - func (r PermissionRequestHook) MarshalJSON() ([]byte, error) { type alias PermissionRequestHook return json.Marshal(struct { @@ -1308,18 +1272,6 @@ func unmarshalPermissionPromptRequest(data []byte) (PermissionPromptRequest, err return nil, err } return &d, nil - case PermissionPromptRequestKindExtensionManagement: - var d PermissionPromptRequestExtensionManagement - if err := json.Unmarshal(data, &d); err != nil { - return nil, err - } - return &d, nil - case PermissionPromptRequestKindExtensionPermissionAccess: - var d PermissionPromptRequestExtensionPermissionAccess - if err := json.Unmarshal(data, &d); err != nil { - return nil, err - } - return &d, nil case PermissionPromptRequestKindHook: var d PermissionPromptRequestHook if err := json.Unmarshal(data, &d); err != nil { @@ -1400,28 +1352,6 @@ func (r PermissionPromptRequestCustomTool) MarshalJSON() ([]byte, error) { }) } -func (r PermissionPromptRequestExtensionManagement) MarshalJSON() ([]byte, error) { - type alias PermissionPromptRequestExtensionManagement - return json.Marshal(struct { - Kind PermissionPromptRequestKind `json:"kind"` - alias - }{ - Kind: r.Kind(), - alias: alias(r), - }) -} - -func (r PermissionPromptRequestExtensionPermissionAccess) MarshalJSON() ([]byte, error) { - type alias PermissionPromptRequestExtensionPermissionAccess - return json.Marshal(struct { - Kind PermissionPromptRequestKind `json:"kind"` - alias - }{ - Kind: r.Kind(), - alias: alias(r), - }) -} - func (r PermissionPromptRequestHook) MarshalJSON() ([]byte, error) { type alias PermissionPromptRequestHook return json.Marshal(struct { @@ -1648,18 +1578,6 @@ func unmarshalUserToolSessionApproval(data []byte) (UserToolSessionApproval, err return nil, err } return &d, nil - case UserToolSessionApprovalKindExtensionManagement: - var d UserToolSessionApprovalExtensionManagement - if err := json.Unmarshal(data, &d); err != nil { - return nil, err - } - return &d, nil - case UserToolSessionApprovalKindExtensionPermissionAccess: - var d UserToolSessionApprovalExtensionPermissionAccess - if err := json.Unmarshal(data, &d); err != nil { - return nil, err - } - return &d, nil case UserToolSessionApprovalKindMcp: var d UserToolSessionApprovalMcp if err := json.Unmarshal(data, &d); err != nil { @@ -1722,28 +1640,6 @@ func (r UserToolSessionApprovalCustomTool) MarshalJSON() ([]byte, error) { }) } -func (r UserToolSessionApprovalExtensionManagement) MarshalJSON() ([]byte, error) { - type alias UserToolSessionApprovalExtensionManagement - return json.Marshal(struct { - Kind UserToolSessionApprovalKind `json:"kind"` - alias - }{ - Kind: r.Kind(), - alias: alias(r), - }) -} - -func (r UserToolSessionApprovalExtensionPermissionAccess) MarshalJSON() ([]byte, error) { - type alias UserToolSessionApprovalExtensionPermissionAccess - return json.Marshal(struct { - Kind UserToolSessionApprovalKind `json:"kind"` - alias - }{ - Kind: r.Kind(), - alias: alias(r), - }) -} - func (r UserToolSessionApprovalMcp) MarshalJSON() ([]byte, error) { type alias UserToolSessionApprovalMcp return json.Marshal(struct { diff --git a/go/zsession_events.go b/go/zsession_events.go index fb4b852e2..0e33397de 100644 --- a/go/zsession_events.go +++ b/go/zsession_events.go @@ -168,10 +168,6 @@ func (*AssistantReasoningData) Type() SessionEventType { return SessionEventType // Assistant response containing text content, optional tool requests, and interaction metadata type AssistantMessageData struct { - // Raw Anthropic content array with advisor blocks (server_tool_use, advisor_tool_result) for verbatim round-tripping - AnthropicAdvisorBlocks []any `json:"anthropicAdvisorBlocks,omitempty"` - // Anthropic advisor model ID used for this response, for timeline display on replay - AnthropicAdvisorModel *string `json:"anthropicAdvisorModel,omitempty"` // The assistant's text response content Content string `json:"content"` // Encrypted reasoning content from OpenAI models. Session-bound and stripped on resume. @@ -180,8 +176,6 @@ type AssistantMessageData struct { InteractionID *string `json:"interactionId,omitempty"` // Unique identifier for this assistant message MessageID string `json:"messageId"` - // Model that produced this assistant message, if known - Model *string `json:"model,omitempty"` // Actual output token count from the API response (completion_tokens), used for accurate token accounting OutputTokens *float64 `json:"outputTokens,omitempty"` // Tool call ID of the parent tool invocation when this event originates from a sub-agent @@ -522,8 +516,6 @@ func (*SessionInfoData) Type() SessionEventType { return SessionEventTypeSession type AssistantUsageData struct { // Completion ID from the model provider (e.g., chatcmpl-abc123) APICallID *string `json:"apiCallId,omitempty"` - // API endpoint used for this model call, matching CAPI supported_endpoints vocabulary - APIEndpoint *AssistantUsageAPIEndpoint `json:"apiEndpoint,omitempty"` // Number of tokens read from prompt cache CacheReadTokens *float64 `json:"cacheReadTokens,omitempty"` // Number of tokens written to prompt cache @@ -775,7 +767,7 @@ func (*SessionScheduleCancelledData) Type() SessionEventType { return SessionEventTypeSessionScheduleCancelled } -// Scheduled prompt registered via /every or /after +// Scheduled prompt registered via /every type SessionScheduleCreatedData struct { // Sequential id assigned to the scheduled prompt within the session ID int64 `json:"id"` @@ -783,8 +775,6 @@ type SessionScheduleCreatedData struct { IntervalMs int64 `json:"intervalMs"` // Prompt text that gets enqueued on every tick Prompt string `json:"prompt"` - // Whether the schedule re-arms after each tick (`/every`) or fires once (`/after`) - Recurring *bool `json:"recurring,omitempty"` } func (*SessionScheduleCreatedData) sessionEventData() {} @@ -830,8 +820,6 @@ type SessionStartData struct { Context *WorkingDirectoryContext `json:"context,omitempty"` // Version string of the Copilot application CopilotVersion string `json:"copilotVersion"` - // When set, identifies a parent session whose context this session continues — e.g., a detached headless rem-agent run launched on the parent's interactive shutdown. Telemetry from this session is reported under the parent's session_id. - DetachedFromSpawningParentSessionID *string `json:"detachedFromSpawningParentSessionId,omitempty"` // Identifier of the software producing the events (e.g., "copilot-agent") Producer string `json:"producer"` // Reasoning effort level used for model calls, if applicable (e.g. "low", "medium", "high", "xhigh") @@ -1148,8 +1136,6 @@ type SubagentStartedData struct { AgentDisplayName string `json:"agentDisplayName"` // Internal name of the sub-agent AgentName string `json:"agentName"` - // Model the sub-agent will run with, when known at start. Surfaced in the timeline for auto-selected sub-agents (e.g. rubber-duck). - Model *string `json:"model,omitempty"` // Tool call ID of the parent tool invocation that spawned this sub-agent ToolCallID string `json:"toolCallId"` } @@ -1261,8 +1247,8 @@ func (*ToolExecutionStartData) Type() SessionEventType { return SessionEventType // Turn abort information including the reason for termination type AbortData struct { - // Finite reason code describing why the current turn was aborted - Reason AbortReason `json:"reason"` + // Reason the current turn was aborted (e.g., "user initiated") + Reason string `json:"reason"` } func (*AbortData) sessionEventData() {} @@ -1341,8 +1327,6 @@ type UserMessageData struct { Content string `json:"content"` // CAPI interaction ID for correlating this user message with its turn InteractionID *string `json:"interactionId,omitempty"` - // True when this user message was auto-injected by autopilot's continuation loop rather than typed by the user; used to distinguish autopilot-driven turns in telemetry. - IsAutopilotContinuation *bool `json:"isAutopilotContinuation,omitempty"` // Path-backed native document attachments that stayed on the tagged_files path flow because native upload would exceed the request size limit NativeDocumentPathFallbackPaths []string `json:"nativeDocumentPathFallbackPaths,omitempty"` // Parent agent task ID for background telemetry correlated to this user turn @@ -1670,36 +1654,6 @@ func (PermissionPromptRequestCustomTool) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindCustomTool } -// Extension management permission prompt -type PermissionPromptRequestExtensionManagement struct { - // Name of the extension being managed - ExtensionName *string `json:"extensionName,omitempty"` - // The extension management operation (scaffold, reload) - Operation string `json:"operation"` - // Tool call ID that triggered this permission request - ToolCallID *string `json:"toolCallId,omitempty"` -} - -func (PermissionPromptRequestExtensionManagement) permissionPromptRequest() {} -func (PermissionPromptRequestExtensionManagement) Kind() PermissionPromptRequestKind { - return PermissionPromptRequestKindExtensionManagement -} - -// Extension permission access prompt -type PermissionPromptRequestExtensionPermissionAccess struct { - // Capabilities the extension is requesting - Capabilities []string `json:"capabilities"` - // Name of the extension requesting permission access - ExtensionName string `json:"extensionName"` - // Tool call ID that triggered this permission request - ToolCallID *string `json:"toolCallId,omitempty"` -} - -func (PermissionPromptRequestExtensionPermissionAccess) permissionPromptRequest() {} -func (PermissionPromptRequestExtensionPermissionAccess) Kind() PermissionPromptRequestKind { - return PermissionPromptRequestKindExtensionPermissionAccess -} - // Hook confirmation permission prompt type PermissionPromptRequestHook struct { // Optional message from the hook explaining why confirmation is needed @@ -1858,36 +1812,6 @@ func (PermissionRequestCustomTool) Kind() PermissionRequestKind { return PermissionRequestKindCustomTool } -// Extension management permission request -type PermissionRequestExtensionManagement struct { - // Name of the extension being managed - ExtensionName *string `json:"extensionName,omitempty"` - // The extension management operation (scaffold, reload) - Operation string `json:"operation"` - // Tool call ID that triggered this permission request - ToolCallID *string `json:"toolCallId,omitempty"` -} - -func (PermissionRequestExtensionManagement) permissionRequest() {} -func (PermissionRequestExtensionManagement) Kind() PermissionRequestKind { - return PermissionRequestKindExtensionManagement -} - -// Extension permission access request -type PermissionRequestExtensionPermissionAccess struct { - // Capabilities the extension is requesting - Capabilities []string `json:"capabilities"` - // Name of the extension requesting permission access - ExtensionName string `json:"extensionName"` - // Tool call ID that triggered this permission request - ToolCallID *string `json:"toolCallId,omitempty"` -} - -func (PermissionRequestExtensionPermissionAccess) permissionRequest() {} -func (PermissionRequestExtensionPermissionAccess) Kind() PermissionRequestKind { - return PermissionRequestKindExtensionPermissionAccess -} - // Hook confirmation permission request type PermissionRequestHook struct { // Optional message from the hook explaining why confirmation is needed @@ -2666,26 +2590,6 @@ func (UserToolSessionApprovalCustomTool) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindCustomTool } -type UserToolSessionApprovalExtensionManagement struct { - // Optional operation identifier - Operation *string `json:"operation,omitempty"` -} - -func (UserToolSessionApprovalExtensionManagement) userToolSessionApproval() {} -func (UserToolSessionApprovalExtensionManagement) Kind() UserToolSessionApprovalKind { - return UserToolSessionApprovalKindExtensionManagement -} - -type UserToolSessionApprovalExtensionPermissionAccess struct { - // Extension name - ExtensionName string `json:"extensionName"` -} - -func (UserToolSessionApprovalExtensionPermissionAccess) userToolSessionApproval() {} -func (UserToolSessionApprovalExtensionPermissionAccess) Kind() UserToolSessionApprovalKind { - return UserToolSessionApprovalKindExtensionPermissionAccess -} - type UserToolSessionApprovalMcp struct { // MCP server name ServerName string `json:"serverName"` @@ -2742,15 +2646,6 @@ type WorkingDirectoryContext struct { RepositoryHost *string `json:"repositoryHost,omitempty"` } -// Finite reason code describing why the current turn was aborted -type AbortReason string - -const ( - AbortReasonRemoteCommand AbortReason = "remote_command" - AbortReasonUserAbort AbortReason = "user_abort" - AbortReasonUserInitiated AbortReason = "user_initiated" -) - // Tool call type: "function" for standard tool calls, "custom" for grammar-based tool calls. Defaults to "function" when absent. type AssistantMessageToolRequestType string @@ -2759,16 +2654,6 @@ const ( AssistantMessageToolRequestTypeFunction AssistantMessageToolRequestType = "function" ) -// API endpoint used for this model call, matching CAPI supported_endpoints vocabulary -type AssistantUsageAPIEndpoint string - -const ( - AssistantUsageAPIEndpointChatCompletions AssistantUsageAPIEndpoint = "/chat/completions" - AssistantUsageAPIEndpointResponses AssistantUsageAPIEndpoint = "/responses" - AssistantUsageAPIEndpointV1Messages AssistantUsageAPIEndpoint = "/v1/messages" - AssistantUsageAPIEndpointWsResponses AssistantUsageAPIEndpoint = "ws:/responses" -) - // The user action: "accept" (submitted form), "decline" (explicitly refused), or "cancel" (dismissed) type ElicitationCompletedAction string @@ -2863,17 +2748,15 @@ const ( type PermissionPromptRequestKind string const ( - PermissionPromptRequestKindCommands PermissionPromptRequestKind = "commands" - PermissionPromptRequestKindCustomTool PermissionPromptRequestKind = "custom-tool" - PermissionPromptRequestKindExtensionManagement PermissionPromptRequestKind = "extension-management" - PermissionPromptRequestKindExtensionPermissionAccess PermissionPromptRequestKind = "extension-permission-access" - PermissionPromptRequestKindHook PermissionPromptRequestKind = "hook" - PermissionPromptRequestKindMcp PermissionPromptRequestKind = "mcp" - PermissionPromptRequestKindMemory PermissionPromptRequestKind = "memory" - PermissionPromptRequestKindPath PermissionPromptRequestKind = "path" - PermissionPromptRequestKindRead PermissionPromptRequestKind = "read" - PermissionPromptRequestKindURL PermissionPromptRequestKind = "url" - PermissionPromptRequestKindWrite PermissionPromptRequestKind = "write" + PermissionPromptRequestKindCommands PermissionPromptRequestKind = "commands" + PermissionPromptRequestKindCustomTool PermissionPromptRequestKind = "custom-tool" + PermissionPromptRequestKindHook PermissionPromptRequestKind = "hook" + PermissionPromptRequestKindMcp PermissionPromptRequestKind = "mcp" + PermissionPromptRequestKindMemory PermissionPromptRequestKind = "memory" + PermissionPromptRequestKindPath PermissionPromptRequestKind = "path" + PermissionPromptRequestKindRead PermissionPromptRequestKind = "read" + PermissionPromptRequestKindURL PermissionPromptRequestKind = "url" + PermissionPromptRequestKindWrite PermissionPromptRequestKind = "write" ) // Whether this is a store or vote memory operation @@ -2905,16 +2788,14 @@ const ( type PermissionRequestKind string const ( - PermissionRequestKindCustomTool PermissionRequestKind = "custom-tool" - PermissionRequestKindExtensionManagement PermissionRequestKind = "extension-management" - PermissionRequestKindExtensionPermissionAccess PermissionRequestKind = "extension-permission-access" - PermissionRequestKindHook PermissionRequestKind = "hook" - PermissionRequestKindMcp PermissionRequestKind = "mcp" - PermissionRequestKindMemory PermissionRequestKind = "memory" - PermissionRequestKindRead PermissionRequestKind = "read" - PermissionRequestKindShell PermissionRequestKind = "shell" - PermissionRequestKindURL PermissionRequestKind = "url" - PermissionRequestKindWrite PermissionRequestKind = "write" + PermissionRequestKindCustomTool PermissionRequestKind = "custom-tool" + PermissionRequestKindHook PermissionRequestKind = "hook" + PermissionRequestKindMcp PermissionRequestKind = "mcp" + PermissionRequestKindMemory PermissionRequestKind = "memory" + PermissionRequestKindRead PermissionRequestKind = "read" + PermissionRequestKindShell PermissionRequestKind = "shell" + PermissionRequestKindURL PermissionRequestKind = "url" + PermissionRequestKindWrite PermissionRequestKind = "write" ) // Whether this is a store or vote memory operation @@ -3047,14 +2928,12 @@ const ( type UserToolSessionApprovalKind string const ( - UserToolSessionApprovalKindCommands UserToolSessionApprovalKind = "commands" - UserToolSessionApprovalKindCustomTool UserToolSessionApprovalKind = "custom-tool" - UserToolSessionApprovalKindExtensionManagement UserToolSessionApprovalKind = "extension-management" - UserToolSessionApprovalKindExtensionPermissionAccess UserToolSessionApprovalKind = "extension-permission-access" - UserToolSessionApprovalKindMcp UserToolSessionApprovalKind = "mcp" - UserToolSessionApprovalKindMemory UserToolSessionApprovalKind = "memory" - UserToolSessionApprovalKindRead UserToolSessionApprovalKind = "read" - UserToolSessionApprovalKindWrite UserToolSessionApprovalKind = "write" + UserToolSessionApprovalKindCommands UserToolSessionApprovalKind = "commands" + UserToolSessionApprovalKindCustomTool UserToolSessionApprovalKind = "custom-tool" + UserToolSessionApprovalKindMcp UserToolSessionApprovalKind = "mcp" + UserToolSessionApprovalKindMemory UserToolSessionApprovalKind = "memory" + UserToolSessionApprovalKindRead UserToolSessionApprovalKind = "read" + UserToolSessionApprovalKindWrite UserToolSessionApprovalKind = "write" ) // Hosting platform type of the repository (github or ado) diff --git a/nodejs/src/client.ts b/nodejs/src/client.ts index 264e0a575..d402ab853 100644 --- a/nodejs/src/client.ts +++ b/nodejs/src/client.ts @@ -33,7 +33,7 @@ import { } from "./generated/rpc.js"; import { getSdkProtocolVersion } from "./sdkProtocolVersion.js"; import { CopilotSession, NO_RESULT_PERMISSION_V2_ERROR } from "./session.js"; -import { createSessionFsAdapter } from "./sessionFsProvider.js"; +import { createSessionFsAdapter, type SessionFsProvider } from "./sessionFsProvider.js"; import { getTraceContext } from "./telemetry.js"; import type { AutoModeSwitchRequest, @@ -450,6 +450,24 @@ export class CopilotClient { } } + private setupSessionFs(session: CopilotSession, config: { createSessionFsHandler?: (session: CopilotSession) => SessionFsProvider }): void { + if (!this.sessionFsConfig) { + return; + } + if (!config.createSessionFsHandler) { + throw new Error( + "createSessionFsHandler is required in session config when sessionFs is enabled in client options." + ); + } + const provider = config.createSessionFsHandler(session); + if (this.sessionFsConfig.capabilities?.sqlite && !provider.sqlite) { + throw new Error( + "SessionFsConfig declares capabilities.sqlite but the provider does not implement sqlite." + ); + } + session.clientSessionApis.sessionFs = createSessionFsAdapter(provider); + } + /** * Starts the CLI server and establishes a connection. * @@ -493,6 +511,7 @@ export class CopilotClient { initialCwd: this.sessionFsConfig.initialCwd, sessionStatePath: this.sessionFsConfig.sessionStatePath, conventions: this.sessionFsConfig.conventions, + capabilities: this.sessionFsConfig.capabilities, }); } @@ -778,17 +797,7 @@ export class CopilotClient { session.on(config.onEvent); } this.sessions.set(sessionId, session); - if (this.sessionFsConfig) { - if (config.createSessionFsHandler) { - session.clientSessionApis.sessionFs = createSessionFsAdapter( - config.createSessionFsHandler(session) - ); - } else { - throw new Error( - "createSessionFsHandler is required in session config when sessionFs is enabled in client options." - ); - } - } + this.setupSessionFs(session, config); try { const response = await this.connection!.sendRequest("session.create", { @@ -930,17 +939,7 @@ export class CopilotClient { session.on(config.onEvent); } this.sessions.set(sessionId, session); - if (this.sessionFsConfig) { - if (config.createSessionFsHandler) { - session.clientSessionApis.sessionFs = createSessionFsAdapter( - config.createSessionFsHandler(session) - ); - } else { - throw new Error( - "createSessionFsHandler is required in session config when sessionFs is enabled in client options." - ); - } - } + this.setupSessionFs(session, config); try { const response = await this.connection!.sendRequest("session.resume", { diff --git a/nodejs/src/generated/api.schema.json b/nodejs/src/generated/api.schema.json new file mode 100644 index 000000000..25300440f --- /dev/null +++ b/nodejs/src/generated/api.schema.json @@ -0,0 +1,7920 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "CopilotApi", + "description": "Describes all JSON-RPC methods exposed by the Copilot CLI server. SDK codegen tools consume this to produce typed client wrappers.", + "server": { + "ping": { + "rpcMethod": "ping", + "description": "Checks server responsiveness and returns protocol information.", + "params": { + "$ref": "#/definitions/PingRequest", + "description": "Optional message to echo back to the caller." + }, + "result": { + "$ref": "#/definitions/PingResult", + "description": "Server liveness response, including the echoed message, current timestamp, and protocol version." + } + }, + "connect": { + "rpcMethod": "connect", + "description": "Performs the SDK server connection handshake and validates the optional connection token.", + "params": { + "$ref": "#/definitions/ConnectRequest", + "description": "Optional connection token presented by the SDK client during the handshake." + }, + "result": { + "$ref": "#/definitions/ConnectResult", + "description": "Handshake result reporting the server's protocol version and package version on success." + }, + "visibility": "internal" + }, + "models": { + "list": { + "rpcMethod": "models.list", + "description": "Lists Copilot models available to the authenticated user.", + "params": { + "$ref": "#/definitions/ModelsListRequest", + "description": "Optional GitHub token used to list models for a specific user instead of the global auth context." + }, + "result": { + "$ref": "#/definitions/ModelList", + "description": "List of Copilot models available to the resolved user, including capabilities and billing metadata." + } + } + }, + "tools": { + "list": { + "rpcMethod": "tools.list", + "description": "Lists built-in tools available for a model.", + "params": { + "$ref": "#/definitions/ToolsListRequest", + "description": "Optional model identifier whose tool overrides should be applied to the listing." + }, + "result": { + "$ref": "#/definitions/ToolList", + "description": "Built-in tools available for the requested model, with their parameters and instructions." + } + } + }, + "account": { + "getQuota": { + "rpcMethod": "account.getQuota", + "description": "Gets Copilot quota usage for the authenticated user or supplied GitHub token.", + "params": { + "$ref": "#/definitions/AccountGetQuotaRequest", + "description": "Optional GitHub token used to look up quota for a specific user instead of the global auth context." + }, + "result": { + "$ref": "#/definitions/AccountGetQuotaResult", + "description": "Quota usage snapshots for the resolved user, keyed by quota type." + } + } + }, + "mcp": { + "config": { + "list": { + "rpcMethod": "mcp.config.list", + "description": "Lists MCP servers from user configuration.", + "params": null, + "result": { + "$ref": "#/definitions/McpConfigList", + "description": "User-configured MCP servers, keyed by server name." + } + }, + "add": { + "rpcMethod": "mcp.config.add", + "description": "Adds an MCP server to user configuration.", + "params": { + "$ref": "#/definitions/McpConfigAddRequest", + "description": "MCP server name and configuration to add to user configuration." + }, + "result": { + "type": "null" + } + }, + "update": { + "rpcMethod": "mcp.config.update", + "description": "Updates an MCP server in user configuration.", + "params": { + "$ref": "#/definitions/McpConfigUpdateRequest", + "description": "MCP server name and replacement configuration to write to user configuration." + }, + "result": { + "type": "null" + } + }, + "remove": { + "rpcMethod": "mcp.config.remove", + "description": "Removes an MCP server from user configuration.", + "params": { + "$ref": "#/definitions/McpConfigRemoveRequest", + "description": "MCP server name to remove from user configuration." + }, + "result": { + "type": "null" + } + }, + "enable": { + "rpcMethod": "mcp.config.enable", + "description": "Enables MCP servers in user configuration for new sessions.", + "params": { + "$ref": "#/definitions/McpConfigEnableRequest", + "description": "MCP server names to enable for new sessions." + }, + "result": { + "type": "null" + } + }, + "disable": { + "rpcMethod": "mcp.config.disable", + "description": "Disables MCP servers in user configuration for new sessions.", + "params": { + "$ref": "#/definitions/McpConfigDisableRequest", + "description": "MCP server names to disable for new sessions." + }, + "result": { + "type": "null" + } + } + }, + "discover": { + "rpcMethod": "mcp.discover", + "description": "Discovers MCP servers from user, workspace, plugin, and builtin sources.", + "params": { + "$ref": "#/definitions/McpDiscoverRequest", + "description": "Optional working directory used as context for MCP server discovery." + }, + "result": { + "$ref": "#/definitions/McpDiscoverResult", + "description": "MCP servers discovered from user, workspace, plugin, and built-in sources." + } + } + }, + "skills": { + "config": { + "setDisabledSkills": { + "rpcMethod": "skills.config.setDisabledSkills", + "description": "Replaces the global list of disabled skills.", + "params": { + "$ref": "#/definitions/SkillsConfigSetDisabledSkillsRequest", + "description": "Skill names to mark as disabled in global configuration, replacing any previous list." + }, + "result": { + "type": "null" + } + } + }, + "discover": { + "rpcMethod": "skills.discover", + "description": "Discovers skills across global and project sources.", + "params": { + "$ref": "#/definitions/SkillsDiscoverRequest", + "description": "Optional project paths and additional skill directories to include in discovery." + }, + "result": { + "$ref": "#/definitions/ServerSkillList", + "description": "Skills discovered across global and project sources." + } + } + }, + "sessionFs": { + "setProvider": { + "rpcMethod": "sessionFs.setProvider", + "description": "Registers an SDK client as the session filesystem provider.", + "params": { + "$ref": "#/definitions/SessionFsSetProviderRequest", + "description": "Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider." + }, + "result": { + "$ref": "#/definitions/SessionFsSetProviderResult", + "description": "Indicates whether the calling client was registered as the session filesystem provider." + } + } + }, + "sessions": { + "fork": { + "rpcMethod": "sessions.fork", + "description": "Creates a new session by forking persisted history from an existing session.", + "params": { + "$ref": "#/definitions/SessionsForkRequest", + "description": "Source session identifier to fork from, optional event-ID boundary, and optional friendly name for the new session." + }, + "result": { + "$ref": "#/definitions/SessionsForkResult", + "description": "Identifier and optional friendly name assigned to the newly forked session." + }, + "stability": "experimental" + } + } + }, + "session": { + "suspend": { + "rpcMethod": "session.suspend", + "description": "Suspends the session while preserving persisted state for later resume.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "type": "null" + } + }, + "auth": { + "getStatus": { + "rpcMethod": "session.auth.getStatus", + "description": "Gets authentication status and account metadata for the session.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/SessionAuthStatus", + "description": "Authentication status and account metadata for the session." + } + } + }, + "model": { + "getCurrent": { + "rpcMethod": "session.model.getCurrent", + "description": "Gets the currently selected model for the session.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/CurrentModel", + "description": "The currently selected model for the session." + } + }, + "switchTo": { + "rpcMethod": "session.model.switchTo", + "description": "Switches the session to a model and optional reasoning configuration.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "modelId": { + "type": "string", + "description": "Model identifier to switch to" + }, + "reasoningEffort": { + "type": "string", + "description": "Reasoning effort level to use for the model. \"none\" disables reasoning." + }, + "reasoningSummary": { + "$ref": "#/definitions/ReasoningSummary", + "description": "Reasoning summary mode to request for supported model clients" + }, + "modelCapabilities": { + "$ref": "#/definitions/ModelCapabilitiesOverride", + "description": "Override individual model capabilities resolved by the runtime" + } + }, + "required": [ + "sessionId", + "modelId" + ], + "additionalProperties": false, + "description": "Target model identifier and optional reasoning effort, summary, and capability overrides.", + "title": "ModelSwitchToRequest" + }, + "result": { + "$ref": "#/definitions/ModelSwitchToResult", + "description": "The model identifier active on the session after the switch." + } + } + }, + "mode": { + "get": { + "rpcMethod": "session.mode.get", + "description": "Gets the current agent interaction mode.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/SessionMode", + "description": "The agent mode. Valid values: \"interactive\", \"plan\", \"autopilot\"." + } + }, + "set": { + "rpcMethod": "session.mode.set", + "description": "Sets the current agent interaction mode.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "mode": { + "$ref": "#/definitions/SessionMode", + "description": "The agent mode. Valid values: \"interactive\", \"plan\", \"autopilot\"." + } + }, + "required": [ + "sessionId", + "mode" + ], + "additionalProperties": false, + "description": "Agent interaction mode to apply to the session.", + "title": "ModeSetRequest" + }, + "result": { + "type": "null" + } + } + }, + "name": { + "get": { + "rpcMethod": "session.name.get", + "description": "Gets the session's friendly name.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/NameGetResult", + "description": "The session's friendly name, or null when not yet set." + } + }, + "set": { + "rpcMethod": "session.name.set", + "description": "Sets the session's friendly name.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100, + "description": "New session name (1–100 characters, trimmed of leading/trailing whitespace)" + } + }, + "required": [ + "sessionId", + "name" + ], + "additionalProperties": false, + "description": "New friendly name to apply to the session.", + "title": "NameSetRequest" + }, + "result": { + "type": "null" + } + } + }, + "plan": { + "read": { + "rpcMethod": "session.plan.read", + "description": "Reads the session plan file from the workspace.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/PlanReadResult", + "description": "Existence, contents, and resolved path of the session plan file." + } + }, + "update": { + "rpcMethod": "session.plan.update", + "description": "Writes new content to the session plan file.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "content": { + "type": "string", + "description": "The new content for the plan file" + } + }, + "required": [ + "sessionId", + "content" + ], + "additionalProperties": false, + "description": "Replacement contents to write to the session plan file.", + "title": "PlanUpdateRequest" + }, + "result": { + "type": "null" + } + }, + "delete": { + "rpcMethod": "session.plan.delete", + "description": "Deletes the session plan file from the workspace.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "type": "null" + } + } + }, + "workspaces": { + "getWorkspace": { + "rpcMethod": "session.workspaces.getWorkspace", + "description": "Gets current workspace metadata for the session.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/WorkspacesGetWorkspaceResult", + "description": "Current workspace metadata for the session, or null when not available." + } + }, + "listFiles": { + "rpcMethod": "session.workspaces.listFiles", + "description": "Lists files stored in the session workspace files directory.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/WorkspacesListFilesResult", + "description": "Relative paths of files stored in the session workspace files directory." + } + }, + "readFile": { + "rpcMethod": "session.workspaces.readFile", + "description": "Reads a file from the session workspace files directory.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "path": { + "type": "string", + "description": "Relative path within the workspace files directory" + } + }, + "required": [ + "sessionId", + "path" + ], + "additionalProperties": false, + "description": "Relative path of the workspace file to read.", + "title": "WorkspacesReadFileRequest" + }, + "result": { + "$ref": "#/definitions/WorkspacesReadFileResult", + "description": "Contents of the requested workspace file as a UTF-8 string." + } + }, + "createFile": { + "rpcMethod": "session.workspaces.createFile", + "description": "Creates or overwrites a file in the session workspace files directory.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "path": { + "type": "string", + "description": "Relative path within the workspace files directory" + }, + "content": { + "type": "string", + "description": "File content to write as a UTF-8 string" + } + }, + "required": [ + "sessionId", + "path", + "content" + ], + "additionalProperties": false, + "description": "Relative path and UTF-8 content for the workspace file to create or overwrite.", + "title": "WorkspacesCreateFileRequest" + }, + "result": { + "type": "null" + } + } + }, + "instructions": { + "getSources": { + "rpcMethod": "session.instructions.getSources", + "description": "Gets instruction sources loaded for the session.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/InstructionsGetSourcesResult", + "description": "Instruction sources loaded for the session, in merge order." + } + } + }, + "fleet": { + "start": { + "rpcMethod": "session.fleet.start", + "description": "Starts fleet mode by submitting the fleet orchestration prompt to the session.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "prompt": { + "type": "string", + "description": "Optional user prompt to combine with fleet instructions" + } + }, + "additionalProperties": false, + "description": "Optional user prompt to combine with the fleet orchestration instructions.", + "title": "FleetStartRequest", + "required": [ + "sessionId" + ] + }, + "result": { + "$ref": "#/definitions/FleetStartResult", + "description": "Indicates whether fleet mode was successfully activated." + }, + "stability": "experimental" + } + }, + "agent": { + "list": { + "rpcMethod": "session.agent.list", + "description": "Lists custom agents available to the session.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/AgentList", + "description": "Custom agents available to the session." + }, + "stability": "experimental" + }, + "getCurrent": { + "rpcMethod": "session.agent.getCurrent", + "description": "Gets the currently selected custom agent for the session.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/AgentGetCurrentResult", + "description": "The currently selected custom agent, or null when using the default agent." + }, + "stability": "experimental" + }, + "select": { + "rpcMethod": "session.agent.select", + "description": "Selects a custom agent for subsequent turns in the session.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "name": { + "type": "string", + "description": "Name of the custom agent to select" + } + }, + "required": [ + "sessionId", + "name" + ], + "additionalProperties": false, + "description": "Name of the custom agent to select for subsequent turns.", + "title": "AgentSelectRequest" + }, + "result": { + "$ref": "#/definitions/AgentSelectResult", + "description": "The newly selected custom agent." + }, + "stability": "experimental" + }, + "deselect": { + "rpcMethod": "session.agent.deselect", + "description": "Clears the selected custom agent and returns the session to the default agent.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "type": "null" + }, + "stability": "experimental" + }, + "reload": { + "rpcMethod": "session.agent.reload", + "description": "Reloads custom agent definitions and returns the refreshed list.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/AgentReloadResult", + "description": "Custom agents available to the session after reloading definitions from disk." + }, + "stability": "experimental" + } + }, + "tasks": { + "startAgent": { + "rpcMethod": "session.tasks.startAgent", + "description": "Starts a background agent task in the session.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "agentType": { + "type": "string", + "description": "Type of agent to start (e.g., 'explore', 'task', 'general-purpose')" + }, + "prompt": { + "type": "string", + "description": "Task prompt for the agent" + }, + "name": { + "type": "string", + "description": "Short name for the agent, used to generate a human-readable ID" + }, + "description": { + "type": "string", + "description": "Short description of the task" + }, + "model": { + "type": "string", + "description": "Optional model override" + } + }, + "required": [ + "sessionId", + "agentType", + "prompt", + "name" + ], + "additionalProperties": false, + "description": "Agent type, prompt, name, and optional description and model override for the new task.", + "title": "TasksStartAgentRequest" + }, + "result": { + "$ref": "#/definitions/TasksStartAgentResult", + "description": "Identifier assigned to the newly started background agent task." + }, + "stability": "experimental" + }, + "list": { + "rpcMethod": "session.tasks.list", + "description": "Lists background tasks tracked by the session.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/TaskList", + "description": "Background tasks currently tracked by the session." + }, + "stability": "experimental" + }, + "promoteToBackground": { + "rpcMethod": "session.tasks.promoteToBackground", + "description": "Promotes an eligible synchronously-waited task so it continues running in the background.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "id": { + "type": "string", + "description": "Task identifier" + } + }, + "required": [ + "sessionId", + "id" + ], + "additionalProperties": false, + "description": "Identifier of the task to promote to background mode.", + "title": "TasksPromoteToBackgroundRequest" + }, + "result": { + "$ref": "#/definitions/TasksPromoteToBackgroundResult", + "description": "Indicates whether the task was successfully promoted to background mode." + }, + "stability": "experimental" + }, + "cancel": { + "rpcMethod": "session.tasks.cancel", + "description": "Cancels a background task.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "id": { + "type": "string", + "description": "Task identifier" + } + }, + "required": [ + "sessionId", + "id" + ], + "additionalProperties": false, + "description": "Identifier of the background task to cancel.", + "title": "TasksCancelRequest" + }, + "result": { + "$ref": "#/definitions/TasksCancelResult", + "description": "Indicates whether the background task was successfully cancelled." + }, + "stability": "experimental" + }, + "remove": { + "rpcMethod": "session.tasks.remove", + "description": "Removes a completed or cancelled background task from tracking.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "id": { + "type": "string", + "description": "Task identifier" + } + }, + "required": [ + "sessionId", + "id" + ], + "additionalProperties": false, + "description": "Identifier of the completed or cancelled task to remove from tracking.", + "title": "TasksRemoveRequest" + }, + "result": { + "$ref": "#/definitions/TasksRemoveResult", + "description": "Indicates whether the task was removed. False when the task does not exist or is still running/idle." + }, + "stability": "experimental" + }, + "sendMessage": { + "rpcMethod": "session.tasks.sendMessage", + "description": "Sends a message to a background agent task.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "id": { + "type": "string", + "description": "Agent task identifier" + }, + "message": { + "type": "string", + "description": "Message content to send to the agent" + }, + "fromAgentId": { + "type": "string", + "description": "Agent ID of the sender, if sent on behalf of another agent" + } + }, + "required": [ + "sessionId", + "id", + "message" + ], + "additionalProperties": false, + "description": "Identifier of the target agent task, message content, and optional sender agent ID.", + "title": "TasksSendMessageRequest" + }, + "result": { + "$ref": "#/definitions/TasksSendMessageResult", + "description": "Indicates whether the message was delivered, with an error message when delivery failed." + }, + "stability": "experimental" + } + }, + "skills": { + "list": { + "rpcMethod": "session.skills.list", + "description": "Lists skills available to the session.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/SkillList", + "description": "Skills available to the session, with their enabled state." + }, + "stability": "experimental" + }, + "enable": { + "rpcMethod": "session.skills.enable", + "description": "Enables a skill for the session.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "name": { + "type": "string", + "description": "Name of the skill to enable" + } + }, + "required": [ + "sessionId", + "name" + ], + "additionalProperties": false, + "description": "Name of the skill to enable for the session.", + "title": "SkillsEnableRequest" + }, + "result": { + "type": "null" + }, + "stability": "experimental" + }, + "disable": { + "rpcMethod": "session.skills.disable", + "description": "Disables a skill for the session.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "name": { + "type": "string", + "description": "Name of the skill to disable" + } + }, + "required": [ + "sessionId", + "name" + ], + "additionalProperties": false, + "description": "Name of the skill to disable for the session.", + "title": "SkillsDisableRequest" + }, + "result": { + "type": "null" + }, + "stability": "experimental" + }, + "reload": { + "rpcMethod": "session.skills.reload", + "description": "Reloads skill definitions for the session.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/SkillsLoadDiagnostics", + "description": "Diagnostics from reloading skill definitions, with warnings and errors as separate lists." + }, + "stability": "experimental" + } + }, + "mcp": { + "list": { + "rpcMethod": "session.mcp.list", + "description": "Lists MCP servers configured for the session and their connection status.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/McpServerList", + "description": "MCP servers configured for the session, with their connection status." + }, + "stability": "experimental" + }, + "enable": { + "rpcMethod": "session.mcp.enable", + "description": "Enables an MCP server for the session.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "serverName": { + "type": "string", + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$", + "description": "Name of the MCP server to enable" + } + }, + "required": [ + "sessionId", + "serverName" + ], + "additionalProperties": false, + "description": "Name of the MCP server to enable for the session.", + "title": "McpEnableRequest" + }, + "result": { + "type": "null" + }, + "stability": "experimental" + }, + "disable": { + "rpcMethod": "session.mcp.disable", + "description": "Disables an MCP server for the session.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "serverName": { + "type": "string", + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$", + "description": "Name of the MCP server to disable" + } + }, + "required": [ + "sessionId", + "serverName" + ], + "additionalProperties": false, + "description": "Name of the MCP server to disable for the session.", + "title": "McpDisableRequest" + }, + "result": { + "type": "null" + }, + "stability": "experimental" + }, + "reload": { + "rpcMethod": "session.mcp.reload", + "description": "Reloads MCP server connections for the session.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "type": "null" + }, + "stability": "experimental" + }, + "oauth": { + "login": { + "rpcMethod": "session.mcp.oauth.login", + "description": "Starts OAuth authentication for a remote MCP server.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "serverName": { + "type": "string", + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$", + "description": "Name of the remote MCP server to authenticate" + }, + "forceReauth": { + "type": "boolean", + "description": "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." + }, + "clientName": { + "type": "string", + "description": "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." + }, + "callbackSuccessMessage": { + "type": "string", + "description": "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." + } + }, + "required": [ + "sessionId", + "serverName" + ], + "additionalProperties": false, + "description": "Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, and the callback success-page copy.", + "title": "McpOauthLoginRequest" + }, + "result": { + "$ref": "#/definitions/McpOauthLoginResult", + "description": "OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server." + }, + "stability": "experimental" + } + } + }, + "plugins": { + "list": { + "rpcMethod": "session.plugins.list", + "description": "Lists plugins installed for the session.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/PluginList", + "description": "Plugins installed for the session, with their enabled state and version metadata." + }, + "stability": "experimental" + } + }, + "extensions": { + "list": { + "rpcMethod": "session.extensions.list", + "description": "Lists extensions discovered for the session and their current status.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/ExtensionList", + "description": "Extensions discovered for the session, with their current status." + }, + "stability": "experimental" + }, + "enable": { + "rpcMethod": "session.extensions.enable", + "description": "Enables an extension for the session.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "id": { + "type": "string", + "description": "Source-qualified extension ID to enable" + } + }, + "required": [ + "sessionId", + "id" + ], + "additionalProperties": false, + "description": "Source-qualified extension identifier to enable for the session.", + "title": "ExtensionsEnableRequest" + }, + "result": { + "type": "null" + }, + "stability": "experimental" + }, + "disable": { + "rpcMethod": "session.extensions.disable", + "description": "Disables an extension for the session.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "id": { + "type": "string", + "description": "Source-qualified extension ID to disable" + } + }, + "required": [ + "sessionId", + "id" + ], + "additionalProperties": false, + "description": "Source-qualified extension identifier to disable for the session.", + "title": "ExtensionsDisableRequest" + }, + "result": { + "type": "null" + }, + "stability": "experimental" + }, + "reload": { + "rpcMethod": "session.extensions.reload", + "description": "Reloads extension definitions and processes for the session.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "type": "null" + }, + "stability": "experimental" + } + }, + "tools": { + "handlePendingToolCall": { + "rpcMethod": "session.tools.handlePendingToolCall", + "description": "Provides the result for a pending external tool call.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "requestId": { + "type": "string", + "description": "Request ID of the pending tool call" + }, + "result": { + "$ref": "#/definitions/ExternalToolResult", + "description": "Tool call result (string or expanded result object)" + }, + "error": { + "type": "string", + "description": "Error message if the tool call failed" + } + }, + "required": [ + "sessionId", + "requestId" + ], + "additionalProperties": false, + "description": "Pending external tool call request ID, with the tool result or an error describing why it failed.", + "title": "HandlePendingToolCallRequest" + }, + "result": { + "$ref": "#/definitions/HandlePendingToolCallResult", + "description": "Indicates whether the external tool call result was handled successfully." + } + } + }, + "commands": { + "list": { + "rpcMethod": "session.commands.list", + "description": "Lists slash commands available in the session.", + "params": { + "anyOf": [ + { + "not": {} + }, + { + "type": "object", + "properties": { + "includeBuiltins": { + "type": "boolean", + "description": "Include runtime built-in commands" + }, + "includeSkills": { + "type": "boolean", + "description": "Include enabled user-invocable skills and commands" + }, + "includeClientCommands": { + "type": "boolean", + "description": "Include commands registered by protocol clients, including SDK clients and extensions" + } + }, + "additionalProperties": false + } + ], + "description": "Optional filters controlling which command sources to include in the listing.", + "title": "CommandsListRequest", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ] + }, + "result": { + "$ref": "#/definitions/CommandList", + "description": "Slash commands available in the session, after applying any include/exclude filters." + } + }, + "invoke": { + "rpcMethod": "session.commands.invoke", + "description": "Invokes a slash command in the session.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "name": { + "type": "string", + "description": "Command name. Leading slashes are stripped and the name is matched case-insensitively." + }, + "input": { + "type": "string", + "description": "Raw input after the command name" + } + }, + "required": [ + "sessionId", + "name" + ], + "additionalProperties": false, + "description": "Slash command name and optional raw input string to invoke.", + "title": "CommandsInvokeRequest" + }, + "result": { + "$ref": "#/definitions/SlashCommandInvocationResult", + "description": "Result of invoking the slash command (text output, prompt to send to the agent, or completion)." + } + }, + "handlePendingCommand": { + "rpcMethod": "session.commands.handlePendingCommand", + "description": "Reports completion of a pending client-handled slash command.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "requestId": { + "type": "string", + "description": "Request ID from the command invocation event" + }, + "error": { + "type": "string", + "description": "Error message if the command handler failed" + } + }, + "required": [ + "sessionId", + "requestId" + ], + "additionalProperties": false, + "description": "Pending command request ID and an optional error if the client handler failed.", + "title": "CommandsHandlePendingCommandRequest" + }, + "result": { + "$ref": "#/definitions/CommandsHandlePendingCommandResult", + "description": "Indicates whether the pending client-handled command was completed successfully." + } + }, + "respondToQueuedCommand": { + "rpcMethod": "session.commands.respondToQueuedCommand", + "description": "Responds to a queued command request from the session.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "requestId": { + "type": "string", + "description": "Request ID from the queued command event" + }, + "result": { + "$ref": "#/definitions/QueuedCommandResult", + "description": "Result of the queued command execution" + } + }, + "required": [ + "sessionId", + "requestId", + "result" + ], + "additionalProperties": false, + "description": "Queued command request ID and the result indicating whether the client handled it.", + "title": "CommandsRespondToQueuedCommandRequest" + }, + "result": { + "$ref": "#/definitions/CommandsRespondToQueuedCommandResult", + "description": "Indicates whether the queued-command response was accepted by the session." + } + } + }, + "ui": { + "elicitation": { + "rpcMethod": "session.ui.elicitation", + "description": "Requests structured input from a UI-capable client.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "message": { + "type": "string", + "description": "Message describing what information is needed from the user" + }, + "requestedSchema": { + "$ref": "#/definitions/UIElicitationSchema", + "description": "JSON Schema describing the form fields to present to the user" + } + }, + "required": [ + "sessionId", + "message", + "requestedSchema" + ], + "additionalProperties": false, + "description": "Prompt message and JSON schema describing the form fields to elicit from the user.", + "title": "UIElicitationRequest" + }, + "result": { + "$ref": "#/definitions/UIElicitationResponse", + "description": "The elicitation response (accept with form values, decline, or cancel)" + } + }, + "handlePendingElicitation": { + "rpcMethod": "session.ui.handlePendingElicitation", + "description": "Provides the user response for a pending elicitation request.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "requestId": { + "type": "string", + "description": "The unique request ID from the elicitation.requested event" + }, + "result": { + "$ref": "#/definitions/UIElicitationResponse", + "description": "The elicitation response (accept with form values, decline, or cancel)" + } + }, + "required": [ + "sessionId", + "requestId", + "result" + ], + "additionalProperties": false, + "description": "Pending elicitation request ID and the user's response (accept/decline/cancel + form values).", + "title": "UIHandlePendingElicitationRequest" + }, + "result": { + "$ref": "#/definitions/UIElicitationResult", + "description": "Indicates whether the elicitation response was accepted; false if it was already resolved by another client." + } + } + }, + "permissions": { + "handlePendingPermissionRequest": { + "rpcMethod": "session.permissions.handlePendingPermissionRequest", + "description": "Provides a decision for a pending tool permission request.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "requestId": { + "type": "string", + "description": "Request ID of the pending permission request" + }, + "result": { + "$ref": "#/definitions/PermissionDecision", + "description": "Decision to apply to a pending permission request." + } + }, + "required": [ + "sessionId", + "requestId", + "result" + ], + "additionalProperties": false, + "description": "Pending permission request ID and the decision to apply (approve/reject and scope).", + "title": "PermissionDecisionRequest" + }, + "result": { + "$ref": "#/definitions/PermissionRequestResult", + "description": "Indicates whether the permission decision was applied; false when the request was already resolved." + } + }, + "setApproveAll": { + "rpcMethod": "session.permissions.setApproveAll", + "description": "Enables or disables automatic approval of tool permission requests for the session.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "enabled": { + "type": "boolean", + "description": "Whether to auto-approve all tool permission requests" + } + }, + "required": [ + "sessionId", + "enabled" + ], + "additionalProperties": false, + "description": "Whether to auto-approve all tool permission requests for the rest of the session.", + "title": "PermissionsSetApproveAllRequest" + }, + "result": { + "$ref": "#/definitions/PermissionsSetApproveAllResult", + "description": "Indicates whether the operation succeeded." + } + }, + "resetSessionApprovals": { + "rpcMethod": "session.permissions.resetSessionApprovals", + "description": "Clears session-scoped tool permission approvals.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "additionalProperties": false, + "description": "No parameters; clears all session-scoped tool permission approvals.", + "title": "PermissionsResetSessionApprovalsRequest", + "required": [ + "sessionId" + ] + }, + "result": { + "$ref": "#/definitions/PermissionsResetSessionApprovalsResult", + "description": "Indicates whether the operation succeeded." + } + } + }, + "log": { + "rpcMethod": "session.log", + "description": "Emits a user-visible session log event.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "message": { + "type": "string", + "description": "Human-readable message" + }, + "level": { + "$ref": "#/definitions/SessionLogLevel", + "description": "Log severity level. Determines how the message is displayed in the timeline. Defaults to \"info\"." + }, + "ephemeral": { + "type": "boolean", + "description": "When true, the message is transient and not persisted to the session event log on disk" + }, + "url": { + "type": "string", + "format": "uri", + "description": "Optional URL the user can open in their browser for more details" + } + }, + "required": [ + "sessionId", + "message" + ], + "additionalProperties": false, + "description": "Message text, optional severity level, persistence flag, and optional follow-up URL.", + "title": "LogRequest" + }, + "result": { + "$ref": "#/definitions/LogResult", + "description": "Identifier of the session event that was emitted for the log message." + } + }, + "shell": { + "exec": { + "rpcMethod": "session.shell.exec", + "description": "Starts a shell command and streams output through session notifications.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "command": { + "type": "string", + "description": "Shell command to execute" + }, + "cwd": { + "type": "string", + "description": "Working directory (defaults to session working directory)" + }, + "timeout": { + "type": "integer", + "minimum": 0, + "description": "Timeout in milliseconds (default: 30000)", + "format": "duration" + } + }, + "required": [ + "sessionId", + "command" + ], + "additionalProperties": false, + "description": "Shell command to run, with optional working directory and timeout in milliseconds.", + "title": "ShellExecRequest" + }, + "result": { + "$ref": "#/definitions/ShellExecResult", + "description": "Identifier of the spawned process, used to correlate streamed output and exit notifications." + } + }, + "kill": { + "rpcMethod": "session.shell.kill", + "description": "Sends a signal to a shell process previously started via \"shell.exec\".", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "processId": { + "type": "string", + "description": "Process identifier returned by shell.exec" + }, + "signal": { + "$ref": "#/definitions/ShellKillSignal", + "description": "Signal to send (default: SIGTERM)" + } + }, + "required": [ + "sessionId", + "processId" + ], + "additionalProperties": false, + "description": "Identifier of a process previously returned by \"shell.exec\" and the signal to send.", + "title": "ShellKillRequest" + }, + "result": { + "$ref": "#/definitions/ShellKillResult", + "description": "Indicates whether the signal was delivered; false if the process was unknown or already exited." + } + } + }, + "history": { + "compact": { + "rpcMethod": "session.history.compact", + "description": "Compacts the session history to reduce context usage.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/HistoryCompactResult", + "description": "Compaction outcome with the number of tokens and messages removed and the resulting context window breakdown." + }, + "stability": "experimental" + }, + "truncate": { + "rpcMethod": "session.history.truncate", + "description": "Truncates persisted session history to a specific event.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "eventId": { + "type": "string", + "description": "Event ID to truncate to. This event and all events after it are removed from the session." + } + }, + "required": [ + "sessionId", + "eventId" + ], + "additionalProperties": false, + "description": "Identifier of the event to truncate to; this event and all later events are removed.", + "title": "HistoryTruncateRequest" + }, + "result": { + "$ref": "#/definitions/HistoryTruncateResult", + "description": "Number of events that were removed by the truncation." + }, + "stability": "experimental" + } + }, + "usage": { + "getMetrics": { + "rpcMethod": "session.usage.getMetrics", + "description": "Gets accumulated usage metrics for the session.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "$ref": "#/definitions/UsageGetMetricsResult", + "description": "Accumulated session usage metrics, including premium request cost, token counts, model breakdown, and code-change totals." + }, + "stability": "experimental" + } + }, + "remote": { + "enable": { + "rpcMethod": "session.remote.enable", + "description": "Enables remote session export or steering.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "mode": { + "$ref": "#/definitions/RemoteSessionMode", + "description": "Per-session remote mode. \"off\" disables remote, \"export\" exports session events to GitHub without enabling remote steering, \"on\" enables both export and remote steering." + } + }, + "additionalProperties": false, + "description": "Optional remote session mode (\"off\", \"export\", or \"on\"); defaults to enabling both export and remote steering.", + "title": "RemoteEnableRequest", + "required": [ + "sessionId" + ] + }, + "result": { + "$ref": "#/definitions/RemoteEnableResult", + "description": "GitHub URL for the session and a flag indicating whether remote steering is enabled." + }, + "stability": "experimental" + }, + "disable": { + "rpcMethod": "session.remote.disable", + "description": "Disables remote session export and steering.", + "params": { + "type": "object", + "description": "Identifies the target session.", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false + }, + "result": { + "type": "null" + }, + "stability": "experimental" + } + } + }, + "clientSession": { + "sessionFs": { + "readFile": { + "rpcMethod": "sessionFs.readFile", + "description": "Reads a file from the client-provided session filesystem.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + } + }, + "required": [ + "sessionId", + "path" + ], + "additionalProperties": false, + "description": "Path of the file to read from the client-provided session filesystem.", + "title": "SessionFsReadFileRequest" + }, + "result": { + "$ref": "#/definitions/SessionFsReadFileResult", + "description": "File content as a UTF-8 string, or a filesystem error if the read failed." + } + }, + "writeFile": { + "rpcMethod": "sessionFs.writeFile", + "description": "Writes a file in the client-provided session filesystem.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + }, + "content": { + "type": "string", + "description": "Content to write" + }, + "mode": { + "type": "integer", + "minimum": 0, + "description": "Optional POSIX-style mode for newly created files" + } + }, + "required": [ + "sessionId", + "path", + "content" + ], + "additionalProperties": false, + "description": "File path, content to write, and optional mode for the client-provided session filesystem.", + "title": "SessionFsWriteFileRequest" + }, + "result": { + "anyOf": [ + { + "not": {} + }, + { + "$ref": "#/definitions/SessionFsError", + "description": "Describes a filesystem error." + } + ], + "description": "Describes a filesystem error." + } + }, + "appendFile": { + "rpcMethod": "sessionFs.appendFile", + "description": "Appends content to a file in the client-provided session filesystem.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + }, + "content": { + "type": "string", + "description": "Content to append" + }, + "mode": { + "type": "integer", + "minimum": 0, + "description": "Optional POSIX-style mode for newly created files" + } + }, + "required": [ + "sessionId", + "path", + "content" + ], + "additionalProperties": false, + "description": "File path, content to append, and optional mode for the client-provided session filesystem.", + "title": "SessionFsAppendFileRequest" + }, + "result": { + "anyOf": [ + { + "not": {} + }, + { + "$ref": "#/definitions/SessionFsError", + "description": "Describes a filesystem error." + } + ], + "description": "Describes a filesystem error." + } + }, + "exists": { + "rpcMethod": "sessionFs.exists", + "description": "Checks whether a path exists in the client-provided session filesystem.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + } + }, + "required": [ + "sessionId", + "path" + ], + "additionalProperties": false, + "description": "Path to test for existence in the client-provided session filesystem.", + "title": "SessionFsExistsRequest" + }, + "result": { + "$ref": "#/definitions/SessionFsExistsResult", + "description": "Indicates whether the requested path exists in the client-provided session filesystem." + } + }, + "stat": { + "rpcMethod": "sessionFs.stat", + "description": "Gets metadata for a path in the client-provided session filesystem.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + } + }, + "required": [ + "sessionId", + "path" + ], + "additionalProperties": false, + "description": "Path whose metadata should be returned from the client-provided session filesystem.", + "title": "SessionFsStatRequest" + }, + "result": { + "$ref": "#/definitions/SessionFsStatResult", + "description": "Filesystem metadata for the requested path, or a filesystem error if the stat failed." + } + }, + "mkdir": { + "rpcMethod": "sessionFs.mkdir", + "description": "Creates a directory in the client-provided session filesystem.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + }, + "recursive": { + "type": "boolean", + "description": "Create parent directories as needed" + }, + "mode": { + "type": "integer", + "minimum": 0, + "description": "Optional POSIX-style mode for newly created directories" + } + }, + "required": [ + "sessionId", + "path" + ], + "additionalProperties": false, + "description": "Directory path to create in the client-provided session filesystem, with options for recursive creation and POSIX mode.", + "title": "SessionFsMkdirRequest" + }, + "result": { + "anyOf": [ + { + "not": {} + }, + { + "$ref": "#/definitions/SessionFsError", + "description": "Describes a filesystem error." + } + ], + "description": "Describes a filesystem error." + } + }, + "readdir": { + "rpcMethod": "sessionFs.readdir", + "description": "Lists entry names in a directory from the client-provided session filesystem.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + } + }, + "required": [ + "sessionId", + "path" + ], + "additionalProperties": false, + "description": "Directory path whose entries should be listed from the client-provided session filesystem.", + "title": "SessionFsReaddirRequest" + }, + "result": { + "$ref": "#/definitions/SessionFsReaddirResult", + "description": "Names of entries in the requested directory, or a filesystem error if the read failed." + } + }, + "readdirWithTypes": { + "rpcMethod": "sessionFs.readdirWithTypes", + "description": "Lists directory entries with type information from the client-provided session filesystem.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + } + }, + "required": [ + "sessionId", + "path" + ], + "additionalProperties": false, + "description": "Directory path whose entries (with type information) should be listed from the client-provided session filesystem.", + "title": "SessionFsReaddirWithTypesRequest" + }, + "result": { + "$ref": "#/definitions/SessionFsReaddirWithTypesResult", + "description": "Entries in the requested directory paired with file/directory type information, or a filesystem error if the read failed." + } + }, + "rm": { + "rpcMethod": "sessionFs.rm", + "description": "Removes a file or directory from the client-provided session filesystem.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + }, + "recursive": { + "type": "boolean", + "description": "Remove directories and their contents recursively" + }, + "force": { + "type": "boolean", + "description": "Ignore errors if the path does not exist" + } + }, + "required": [ + "sessionId", + "path" + ], + "additionalProperties": false, + "description": "Path to remove from the client-provided session filesystem, with options for recursive removal and force.", + "title": "SessionFsRmRequest" + }, + "result": { + "anyOf": [ + { + "not": {} + }, + { + "$ref": "#/definitions/SessionFsError", + "description": "Describes a filesystem error." + } + ], + "description": "Describes a filesystem error." + } + }, + "rename": { + "rpcMethod": "sessionFs.rename", + "description": "Renames or moves a path in the client-provided session filesystem.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "src": { + "type": "string", + "description": "Source path using SessionFs conventions" + }, + "dest": { + "type": "string", + "description": "Destination path using SessionFs conventions" + } + }, + "required": [ + "sessionId", + "src", + "dest" + ], + "additionalProperties": false, + "description": "Source and destination paths for renaming or moving an entry in the client-provided session filesystem.", + "title": "SessionFsRenameRequest" + }, + "result": { + "anyOf": [ + { + "not": {} + }, + { + "$ref": "#/definitions/SessionFsError", + "description": "Describes a filesystem error." + } + ], + "description": "Describes a filesystem error." + } + }, + "sqlite": { + "rpcMethod": "sessionFs.sqlite", + "description": "Executes a SQLite query against a per-session database in the client-provided session filesystem.", + "params": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Target session identifier" + }, + "dbName": { + "type": "string", + "description": "Logical database name (e.g., 'session')" + }, + "query": { + "type": "string", + "description": "SQL query to execute" + }, + "queryType": { + "$ref": "#/definitions/SessionFsSqliteQueryType", + "description": "How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected)" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "null" + ] + }, + "description": "Optional named bind parameters" + } + }, + "required": [ + "sessionId", + "dbName", + "query", + "queryType" + ], + "additionalProperties": false, + "description": "Database name, SQL query, query type, and optional bind parameters for executing a SQLite query against a per-session database.", + "title": "SessionFsSqliteRequest" + }, + "result": { + "$ref": "#/definitions/SessionFsSqliteResult", + "description": "Query results including rows, columns, and rows affected, or a filesystem error if execution failed." + } + } + } + }, + "definitions": { + "AccountGetQuotaRequest": { + "anyOf": [ + { + "not": {} + }, + { + "type": "object", + "properties": { + "gitHubToken": { + "type": "string", + "description": "GitHub token for per-user quota lookup. When provided, resolves this token to determine the user's quota instead of using the global auth." + } + }, + "additionalProperties": false + } + ], + "description": "Optional GitHub token used to look up quota for a specific user instead of the global auth context.", + "title": "AccountGetQuotaRequest" + }, + "AccountGetQuotaResult": { + "type": "object", + "properties": { + "quotaSnapshots": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/AccountQuotaSnapshot" + }, + "description": "Quota snapshots keyed by type (e.g., chat, completions, premium_interactions)" + } + }, + "required": [ + "quotaSnapshots" + ], + "additionalProperties": false, + "description": "Quota usage snapshots for the resolved user, keyed by quota type.", + "title": "AccountGetQuotaResult" + }, + "AccountQuotaSnapshot": { + "type": "object", + "properties": { + "isUnlimitedEntitlement": { + "type": "boolean", + "description": "Whether the user has an unlimited usage entitlement" + }, + "entitlementRequests": { + "type": "integer", + "description": "Number of requests included in the entitlement" + }, + "usedRequests": { + "type": "integer", + "minimum": 0, + "description": "Number of requests used so far this period" + }, + "usageAllowedWithExhaustedQuota": { + "type": "boolean", + "description": "Whether usage is still permitted after quota exhaustion" + }, + "remainingPercentage": { + "type": "number", + "description": "Percentage of entitlement remaining" + }, + "overage": { + "type": "number", + "minimum": 0, + "description": "Number of overage requests made this period" + }, + "overageAllowedWithExhaustedQuota": { + "type": "boolean", + "description": "Whether overage is allowed when quota is exhausted" + }, + "resetDate": { + "type": "string", + "description": "Date when the quota resets (ISO 8601 string)" + } + }, + "required": [ + "isUnlimitedEntitlement", + "entitlementRequests", + "usedRequests", + "usageAllowedWithExhaustedQuota", + "remainingPercentage", + "overage", + "overageAllowedWithExhaustedQuota" + ], + "additionalProperties": false, + "title": "AccountQuotaSnapshot", + "description": "Schema for the `AccountQuotaSnapshot` type." + }, + "AgentGetCurrentResult": { + "type": "object", + "properties": { + "agent": { + "$ref": "#/definitions/AgentInfo", + "description": "Currently selected custom agent, or null if using the default agent" + } + }, + "required": [ + "agent" + ], + "additionalProperties": false, + "description": "The currently selected custom agent, or null when using the default agent.", + "title": "AgentGetCurrentResult" + }, + "AgentInfo": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Unique identifier of the custom agent" + }, + "displayName": { + "type": "string", + "description": "Human-readable display name" + }, + "description": { + "type": "string", + "description": "Description of the agent's purpose" + }, + "path": { + "type": "string", + "description": "Absolute local file path of the agent definition. Only set for file-based agents loaded from disk; remote agents do not have a path." + } + }, + "required": [ + "name", + "displayName", + "description" + ], + "additionalProperties": false, + "title": "AgentInfo", + "description": "Schema for the `AgentInfo` type." + }, + "AgentList": { + "type": "object", + "properties": { + "agents": { + "type": "array", + "items": { + "$ref": "#/definitions/AgentInfo" + }, + "description": "Available custom agents" + } + }, + "required": [ + "agents" + ], + "additionalProperties": false, + "description": "Custom agents available to the session.", + "title": "AgentList" + }, + "AgentReloadResult": { + "type": "object", + "properties": { + "agents": { + "type": "array", + "items": { + "$ref": "#/definitions/AgentInfo" + }, + "description": "Reloaded custom agents" + } + }, + "required": [ + "agents" + ], + "additionalProperties": false, + "description": "Custom agents available to the session after reloading definitions from disk.", + "title": "AgentReloadResult" + }, + "AgentSelectRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the custom agent to select" + } + }, + "required": [ + "name" + ], + "additionalProperties": false, + "description": "Name of the custom agent to select for subsequent turns.", + "title": "AgentSelectRequest" + }, + "AgentSelectResult": { + "type": "object", + "properties": { + "agent": { + "$ref": "#/definitions/AgentInfo", + "description": "The newly selected custom agent" + } + }, + "required": [ + "agent" + ], + "additionalProperties": false, + "description": "The newly selected custom agent.", + "title": "AgentSelectResult" + }, + "AuthInfoType": { + "type": "string", + "enum": [ + "hmac", + "env", + "user", + "gh-cli", + "api-key", + "token", + "copilot-api-token" + ], + "description": "Authentication type", + "title": "AuthInfoType" + }, + "CommandList": { + "type": "object", + "properties": { + "commands": { + "type": "array", + "items": { + "$ref": "#/definitions/SlashCommandInfo" + }, + "description": "Commands available in this session" + } + }, + "required": [ + "commands" + ], + "additionalProperties": false, + "description": "Slash commands available in the session, after applying any include/exclude filters.", + "title": "CommandList" + }, + "CommandsHandlePendingCommandRequest": { + "type": "object", + "properties": { + "requestId": { + "type": "string", + "description": "Request ID from the command invocation event" + }, + "error": { + "type": "string", + "description": "Error message if the command handler failed" + } + }, + "required": [ + "requestId" + ], + "additionalProperties": false, + "description": "Pending command request ID and an optional error if the client handler failed.", + "title": "CommandsHandlePendingCommandRequest" + }, + "CommandsHandlePendingCommandResult": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "description": "Whether the command was handled successfully" + } + }, + "required": [ + "success" + ], + "additionalProperties": false, + "description": "Indicates whether the pending client-handled command was completed successfully.", + "title": "CommandsHandlePendingCommandResult" + }, + "CommandsInvokeRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Command name. Leading slashes are stripped and the name is matched case-insensitively." + }, + "input": { + "type": "string", + "description": "Raw input after the command name" + } + }, + "required": [ + "name" + ], + "additionalProperties": false, + "description": "Slash command name and optional raw input string to invoke.", + "title": "CommandsInvokeRequest" + }, + "CommandsListRequest": { + "anyOf": [ + { + "not": {} + }, + { + "type": "object", + "properties": { + "includeBuiltins": { + "type": "boolean", + "description": "Include runtime built-in commands" + }, + "includeSkills": { + "type": "boolean", + "description": "Include enabled user-invocable skills and commands" + }, + "includeClientCommands": { + "type": "boolean", + "description": "Include commands registered by protocol clients, including SDK clients and extensions" + } + }, + "additionalProperties": false + } + ], + "description": "Optional filters controlling which command sources to include in the listing.", + "title": "CommandsListRequest" + }, + "CommandsRespondToQueuedCommandRequest": { + "type": "object", + "properties": { + "requestId": { + "type": "string", + "description": "Request ID from the queued command event" + }, + "result": { + "$ref": "#/definitions/QueuedCommandResult", + "description": "Result of the queued command execution" + } + }, + "required": [ + "requestId", + "result" + ], + "additionalProperties": false, + "description": "Queued command request ID and the result indicating whether the client handled it.", + "title": "CommandsRespondToQueuedCommandRequest" + }, + "CommandsRespondToQueuedCommandResult": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "description": "Whether the response was accepted (false if the requestId was not found or already resolved)" + } + }, + "required": [ + "success" + ], + "additionalProperties": false, + "description": "Indicates whether the queued-command response was accepted by the session.", + "title": "CommandsRespondToQueuedCommandResult" + }, + "ConnectRequest": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN" + } + }, + "additionalProperties": false, + "description": "Optional connection token presented by the SDK client during the handshake.", + "title": "ConnectRequest", + "visibility": "internal" + }, + "ConnectResult": { + "type": "object", + "properties": { + "ok": { + "type": "boolean", + "const": true, + "description": "Always true on success" + }, + "protocolVersion": { + "type": "integer", + "description": "Server protocol version number" + }, + "version": { + "type": "string", + "description": "Server package version" + } + }, + "required": [ + "ok", + "protocolVersion", + "version" + ], + "additionalProperties": false, + "description": "Handshake result reporting the server's protocol version and package version on success.", + "title": "ConnectResult", + "visibility": "internal" + }, + "CurrentModel": { + "type": "object", + "properties": { + "modelId": { + "type": "string", + "description": "Currently active model identifier" + } + }, + "additionalProperties": false, + "description": "The currently selected model for the session.", + "title": "CurrentModel" + }, + "DiscoveredMcpServer": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$", + "description": "Server name (config key)" + }, + "type": { + "$ref": "#/definitions/DiscoveredMcpServerType", + "description": "Server transport type: stdio, http, sse, or memory (local configs are normalized to stdio)" + }, + "source": { + "$ref": "#/definitions/DiscoveredMcpServerSource", + "description": "Configuration source" + }, + "enabled": { + "type": "boolean", + "description": "Whether the server is enabled (not in the disabled list)" + } + }, + "required": [ + "name", + "source", + "enabled" + ], + "additionalProperties": false, + "title": "DiscoveredMcpServer", + "description": "Schema for the `DiscoveredMcpServer` type." + }, + "DiscoveredMcpServerSource": { + "type": "string", + "enum": [ + "user", + "workspace", + "plugin", + "builtin" + ], + "description": "Configuration source", + "title": "DiscoveredMcpServerSource" + }, + "DiscoveredMcpServerType": { + "type": "string", + "enum": [ + "stdio", + "http", + "sse", + "memory" + ], + "description": "Server transport type: stdio, http, sse, or memory (local configs are normalized to stdio)", + "title": "DiscoveredMcpServerType" + }, + "EmbeddedBlobResourceContents": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "URI identifying the resource" + }, + "mimeType": { + "type": "string", + "description": "MIME type of the blob content" + }, + "blob": { + "type": "string", + "description": "Base64-encoded binary content of the resource", + "contentEncoding": "base64" + } + }, + "required": [ + "uri", + "blob" + ], + "additionalProperties": false, + "title": "EmbeddedBlobResourceContents", + "description": "Schema for the `EmbeddedBlobResourceContents` type." + }, + "EmbeddedTextResourceContents": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "URI identifying the resource" + }, + "mimeType": { + "type": "string", + "description": "MIME type of the text content" + }, + "text": { + "type": "string", + "description": "Text content of the resource" + } + }, + "required": [ + "uri", + "text" + ], + "additionalProperties": false, + "title": "EmbeddedTextResourceContents", + "description": "Schema for the `EmbeddedTextResourceContents` type." + }, + "Extension": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper')" + }, + "name": { + "type": "string", + "description": "Extension name (directory name)" + }, + "source": { + "$ref": "#/definitions/ExtensionSource", + "description": "Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)" + }, + "status": { + "$ref": "#/definitions/ExtensionStatus", + "description": "Current status: running, disabled, failed, or starting" + }, + "pid": { + "type": "integer", + "description": "Process ID if the extension is running" + } + }, + "required": [ + "id", + "name", + "source", + "status" + ], + "additionalProperties": false, + "title": "Extension", + "description": "Schema for the `Extension` type." + }, + "ExtensionList": { + "type": "object", + "properties": { + "extensions": { + "type": "array", + "items": { + "$ref": "#/definitions/Extension" + }, + "description": "Discovered extensions and their current status" + } + }, + "required": [ + "extensions" + ], + "additionalProperties": false, + "description": "Extensions discovered for the session, with their current status.", + "title": "ExtensionList" + }, + "ExtensionsDisableRequest": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Source-qualified extension ID to disable" + } + }, + "required": [ + "id" + ], + "additionalProperties": false, + "description": "Source-qualified extension identifier to disable for the session.", + "title": "ExtensionsDisableRequest" + }, + "ExtensionsEnableRequest": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Source-qualified extension ID to enable" + } + }, + "required": [ + "id" + ], + "additionalProperties": false, + "description": "Source-qualified extension identifier to enable for the session.", + "title": "ExtensionsEnableRequest" + }, + "ExtensionSource": { + "type": "string", + "enum": [ + "project", + "user" + ], + "description": "Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)", + "title": "ExtensionSource" + }, + "ExtensionStatus": { + "type": "string", + "enum": [ + "running", + "disabled", + "failed", + "starting" + ], + "description": "Current status: running, disabled, failed, or starting", + "title": "ExtensionStatus" + }, + "ExternalToolResult": { + "anyOf": [ + { + "type": "string", + "description": "Simple string tool result" + }, + { + "$ref": "#/definitions/ExternalToolTextResultForLlm", + "description": "Expanded external tool result payload" + } + ], + "description": "Tool call result (string or expanded result object)", + "title": "ExternalToolResult" + }, + "ExternalToolTextResultForLlm": { + "type": "object", + "properties": { + "textResultForLlm": { + "type": "string", + "description": "Text result returned to the model" + }, + "resultType": { + "type": "string", + "description": "Execution outcome classification. Optional for back-compat; normalized to 'success' (or 'failure' when error is present) when missing or unrecognized." + }, + "error": { + "type": "string", + "description": "Optional error message for failed executions" + }, + "sessionLog": { + "type": "string", + "description": "Detailed log content for timeline display" + }, + "toolTelemetry": { + "type": "object", + "additionalProperties": {}, + "description": "Optional tool-specific telemetry" + }, + "contents": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalToolTextResultForLlmContent", + "description": "A content block within a tool result, which may be text, terminal output, image, audio, or a resource" + }, + "description": "Structured content blocks from the tool" + } + }, + "required": [ + "textResultForLlm" + ], + "additionalProperties": true, + "description": "Expanded external tool result payload", + "title": "ExternalToolTextResultForLlm" + }, + "ExternalToolTextResultForLlmContent": { + "anyOf": [ + { + "$ref": "#/definitions/ExternalToolTextResultForLlmContentText", + "description": "Plain text content block" + }, + { + "$ref": "#/definitions/ExternalToolTextResultForLlmContentTerminal", + "description": "Terminal/shell output content block with optional exit code and working directory" + }, + { + "$ref": "#/definitions/ExternalToolTextResultForLlmContentImage", + "description": "Image content block with base64-encoded data" + }, + { + "$ref": "#/definitions/ExternalToolTextResultForLlmContentAudio", + "description": "Audio content block with base64-encoded data" + }, + { + "$ref": "#/definitions/ExternalToolTextResultForLlmContentResourceLink", + "description": "Resource link content block referencing an external resource" + }, + { + "$ref": "#/definitions/ExternalToolTextResultForLlmContentResource", + "description": "Embedded resource content block with inline text or binary data" + } + ], + "description": "A content block within a tool result, which may be text, terminal output, image, audio, or a resource", + "title": "ExternalToolTextResultForLlmContent" + }, + "ExternalToolTextResultForLlmContentAudio": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "audio", + "description": "Content block type discriminator" + }, + "data": { + "type": "string", + "description": "Base64-encoded audio data", + "contentEncoding": "base64" + }, + "mimeType": { + "type": "string", + "description": "MIME type of the audio (e.g., audio/wav, audio/mpeg)" + } + }, + "required": [ + "type", + "data", + "mimeType" + ], + "additionalProperties": false, + "description": "Audio content block with base64-encoded data", + "title": "ExternalToolTextResultForLlmContentAudio" + }, + "ExternalToolTextResultForLlmContentImage": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "image", + "description": "Content block type discriminator" + }, + "data": { + "type": "string", + "description": "Base64-encoded image data", + "contentEncoding": "base64" + }, + "mimeType": { + "type": "string", + "description": "MIME type of the image (e.g., image/png, image/jpeg)" + } + }, + "required": [ + "type", + "data", + "mimeType" + ], + "additionalProperties": false, + "description": "Image content block with base64-encoded data", + "title": "ExternalToolTextResultForLlmContentImage" + }, + "ExternalToolTextResultForLlmContentResource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "resource", + "description": "Content block type discriminator" + }, + "resource": { + "$ref": "#/definitions/ExternalToolTextResultForLlmContentResourceDetails", + "description": "The embedded resource contents, either text or base64-encoded binary" + } + }, + "required": [ + "type", + "resource" + ], + "additionalProperties": false, + "description": "Embedded resource content block with inline text or binary data", + "title": "ExternalToolTextResultForLlmContentResource" + }, + "ExternalToolTextResultForLlmContentResourceDetails": { + "anyOf": [ + { + "$ref": "#/definitions/EmbeddedTextResourceContents" + }, + { + "$ref": "#/definitions/EmbeddedBlobResourceContents" + } + ], + "description": "The embedded resource contents, either text or base64-encoded binary", + "title": "ExternalToolTextResultForLlmContentResourceDetails" + }, + "ExternalToolTextResultForLlmContentResourceLink": { + "type": "object", + "properties": { + "icons": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalToolTextResultForLlmContentResourceLinkIcon", + "description": "Icon image for a resource" + }, + "description": "Icons associated with this resource" + }, + "name": { + "type": "string", + "description": "Resource name identifier" + }, + "title": { + "type": "string", + "description": "Human-readable display title for the resource" + }, + "uri": { + "type": "string", + "description": "URI identifying the resource" + }, + "description": { + "type": "string", + "description": "Human-readable description of the resource" + }, + "mimeType": { + "type": "string", + "description": "MIME type of the resource content" + }, + "size": { + "type": "number", + "description": "Size of the resource in bytes" + }, + "type": { + "type": "string", + "const": "resource_link", + "description": "Content block type discriminator" + } + }, + "required": [ + "name", + "uri", + "type" + ], + "additionalProperties": false, + "description": "Resource link content block referencing an external resource", + "title": "ExternalToolTextResultForLlmContentResourceLink" + }, + "ExternalToolTextResultForLlmContentResourceLinkIcon": { + "type": "object", + "properties": { + "src": { + "type": "string", + "description": "URL or path to the icon image" + }, + "mimeType": { + "type": "string", + "description": "MIME type of the icon image" + }, + "sizes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Available icon sizes (e.g., ['16x16', '32x32'])" + }, + "theme": { + "$ref": "#/definitions/ExternalToolTextResultForLlmContentResourceLinkIconTheme", + "description": "Theme variant this icon is intended for" + } + }, + "required": [ + "src" + ], + "additionalProperties": false, + "description": "Icon image for a resource", + "title": "ExternalToolTextResultForLlmContentResourceLinkIcon" + }, + "ExternalToolTextResultForLlmContentResourceLinkIconTheme": { + "type": "string", + "enum": [ + "light", + "dark" + ], + "description": "Theme variant this icon is intended for", + "title": "ExternalToolTextResultForLlmContentResourceLinkIconTheme" + }, + "ExternalToolTextResultForLlmContentTerminal": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "terminal", + "description": "Content block type discriminator" + }, + "text": { + "type": "string", + "description": "Terminal/shell output text" + }, + "exitCode": { + "type": "number", + "description": "Process exit code, if the command has completed" + }, + "cwd": { + "type": "string", + "description": "Working directory where the command was executed" + } + }, + "required": [ + "type", + "text" + ], + "additionalProperties": false, + "description": "Terminal/shell output content block with optional exit code and working directory", + "title": "ExternalToolTextResultForLlmContentTerminal" + }, + "ExternalToolTextResultForLlmContentText": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text", + "description": "Content block type discriminator" + }, + "text": { + "type": "string", + "description": "The text content" + } + }, + "required": [ + "type", + "text" + ], + "additionalProperties": false, + "description": "Plain text content block", + "title": "ExternalToolTextResultForLlmContentText" + }, + "FilterMapping": { + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/FilterMappingValue" + } + }, + { + "$ref": "#/definitions/FilterMappingString" + } + ], + "description": "Content filtering mode to apply to all tools, or a map of tool name to content filtering mode.", + "title": "FilterMapping" + }, + "FilterMappingString": { + "type": "string", + "enum": [ + "none", + "markdown", + "hidden_characters" + ], + "title": "FilterMappingString", + "description": "Allowed values for the `FilterMappingString` enumeration." + }, + "FilterMappingValue": { + "type": "string", + "enum": [ + "none", + "markdown", + "hidden_characters" + ], + "title": "FilterMappingValue", + "description": "Allowed values for the `FilterMappingValue` enumeration." + }, + "FleetStartRequest": { + "type": "object", + "properties": { + "prompt": { + "type": "string", + "description": "Optional user prompt to combine with fleet instructions" + } + }, + "additionalProperties": false, + "description": "Optional user prompt to combine with the fleet orchestration instructions.", + "title": "FleetStartRequest" + }, + "FleetStartResult": { + "type": "object", + "properties": { + "started": { + "type": "boolean", + "description": "Whether fleet mode was successfully activated" + } + }, + "required": [ + "started" + ], + "additionalProperties": false, + "description": "Indicates whether fleet mode was successfully activated.", + "title": "FleetStartResult" + }, + "HandlePendingToolCallRequest": { + "type": "object", + "properties": { + "requestId": { + "type": "string", + "description": "Request ID of the pending tool call" + }, + "result": { + "$ref": "#/definitions/ExternalToolResult", + "description": "Tool call result (string or expanded result object)" + }, + "error": { + "type": "string", + "description": "Error message if the tool call failed" + } + }, + "required": [ + "requestId" + ], + "additionalProperties": false, + "description": "Pending external tool call request ID, with the tool result or an error describing why it failed.", + "title": "HandlePendingToolCallRequest" + }, + "HandlePendingToolCallResult": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "description": "Whether the tool call result was handled successfully" + } + }, + "required": [ + "success" + ], + "additionalProperties": false, + "description": "Indicates whether the external tool call result was handled successfully.", + "title": "HandlePendingToolCallResult" + }, + "HistoryCompactContextWindow": { + "type": "object", + "properties": { + "tokenLimit": { + "type": "integer", + "minimum": 0, + "description": "Maximum token count for the model's context window" + }, + "currentTokens": { + "type": "integer", + "minimum": 0, + "description": "Current total tokens in the context window (system + conversation + tool definitions)" + }, + "messagesLength": { + "type": "integer", + "minimum": 0, + "description": "Current number of messages in the conversation" + }, + "systemTokens": { + "type": "integer", + "minimum": 0, + "description": "Token count from system message(s)" + }, + "conversationTokens": { + "type": "integer", + "minimum": 0, + "description": "Token count from non-system messages (user, assistant, tool)" + }, + "toolDefinitionsTokens": { + "type": "integer", + "minimum": 0, + "description": "Token count from tool definitions" + } + }, + "required": [ + "tokenLimit", + "currentTokens", + "messagesLength" + ], + "additionalProperties": false, + "description": "Post-compaction context window usage breakdown", + "title": "HistoryCompactContextWindow" + }, + "HistoryCompactResult": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "description": "Whether compaction completed successfully" + }, + "tokensRemoved": { + "type": "integer", + "minimum": 0, + "description": "Number of tokens freed by compaction" + }, + "messagesRemoved": { + "type": "integer", + "minimum": 0, + "description": "Number of messages removed during compaction" + }, + "contextWindow": { + "$ref": "#/definitions/HistoryCompactContextWindow", + "description": "Post-compaction context window usage breakdown" + } + }, + "required": [ + "success", + "tokensRemoved", + "messagesRemoved" + ], + "additionalProperties": false, + "description": "Compaction outcome with the number of tokens and messages removed and the resulting context window breakdown.", + "title": "HistoryCompactResult" + }, + "HistoryTruncateRequest": { + "type": "object", + "properties": { + "eventId": { + "type": "string", + "description": "Event ID to truncate to. This event and all events after it are removed from the session." + } + }, + "required": [ + "eventId" + ], + "additionalProperties": false, + "description": "Identifier of the event to truncate to; this event and all later events are removed.", + "title": "HistoryTruncateRequest" + }, + "HistoryTruncateResult": { + "type": "object", + "properties": { + "eventsRemoved": { + "type": "integer", + "minimum": 0, + "description": "Number of events that were removed" + } + }, + "required": [ + "eventsRemoved" + ], + "additionalProperties": false, + "description": "Number of events that were removed by the truncation.", + "title": "HistoryTruncateResult" + }, + "InstructionsGetSourcesResult": { + "type": "object", + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/InstructionsSources" + }, + "description": "Instruction sources for the session" + } + }, + "required": [ + "sources" + ], + "additionalProperties": false, + "description": "Instruction sources loaded for the session, in merge order.", + "title": "InstructionsGetSourcesResult" + }, + "InstructionsSources": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this source (used for toggling)" + }, + "label": { + "type": "string", + "description": "Human-readable label" + }, + "sourcePath": { + "type": "string", + "description": "File path relative to repo or absolute for home" + }, + "content": { + "type": "string", + "description": "Raw content of the instruction file" + }, + "type": { + "$ref": "#/definitions/InstructionsSourcesType", + "description": "Category of instruction source — used for merge logic" + }, + "location": { + "$ref": "#/definitions/InstructionsSourcesLocation", + "description": "Where this source lives — used for UI grouping" + }, + "applyTo": { + "type": "string", + "description": "Glob pattern from frontmatter — when set, this instruction applies only to matching files" + }, + "description": { + "type": "string", + "description": "Short description (body after frontmatter) for use in instruction tables" + } + }, + "required": [ + "id", + "label", + "sourcePath", + "content", + "type", + "location" + ], + "additionalProperties": false, + "title": "InstructionsSources", + "description": "Schema for the `InstructionsSources` type." + }, + "InstructionsSourcesLocation": { + "type": "string", + "enum": [ + "user", + "repository", + "working-directory" + ], + "description": "Where this source lives — used for UI grouping", + "title": "InstructionsSourcesLocation" + }, + "InstructionsSourcesType": { + "type": "string", + "enum": [ + "home", + "repo", + "model", + "vscode", + "nested-agents", + "child-instructions" + ], + "description": "Category of instruction source — used for merge logic", + "title": "InstructionsSourcesType" + }, + "LogRequest": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable message" + }, + "level": { + "$ref": "#/definitions/SessionLogLevel", + "description": "Log severity level. Determines how the message is displayed in the timeline. Defaults to \"info\"." + }, + "ephemeral": { + "type": "boolean", + "description": "When true, the message is transient and not persisted to the session event log on disk" + }, + "url": { + "type": "string", + "format": "uri", + "description": "Optional URL the user can open in their browser for more details" + } + }, + "required": [ + "message" + ], + "additionalProperties": false, + "description": "Message text, optional severity level, persistence flag, and optional follow-up URL.", + "title": "LogRequest" + }, + "LogResult": { + "type": "object", + "properties": { + "eventId": { + "type": "string", + "format": "uuid", + "description": "The unique identifier of the emitted session event" + } + }, + "required": [ + "eventId" + ], + "additionalProperties": false, + "description": "Identifier of the session event that was emitted for the log message.", + "title": "LogResult" + }, + "McpConfigAddRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$", + "description": "Unique name for the MCP server" + }, + "config": { + "$ref": "#/definitions/McpServerConfig", + "description": "MCP server configuration (local/stdio or remote/http)" + } + }, + "required": [ + "name", + "config" + ], + "additionalProperties": false, + "description": "MCP server name and configuration to add to user configuration.", + "title": "McpConfigAddRequest" + }, + "McpConfigDisableRequest": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$", + "description": "MCP server name used as a configuration key." + }, + "description": "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." + } + }, + "required": [ + "names" + ], + "additionalProperties": false, + "description": "MCP server names to disable for new sessions.", + "title": "McpConfigDisableRequest" + }, + "McpConfigEnableRequest": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$", + "description": "MCP server name used as a configuration key." + }, + "description": "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." + } + }, + "required": [ + "names" + ], + "additionalProperties": false, + "description": "MCP server names to enable for new sessions.", + "title": "McpConfigEnableRequest" + }, + "McpConfigList": { + "type": "object", + "properties": { + "servers": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/McpServerConfig", + "description": "MCP server configuration (local/stdio or remote/http)" + }, + "propertyNames": { + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$" + }, + "description": "All MCP servers from user config, keyed by name" + } + }, + "required": [ + "servers" + ], + "additionalProperties": false, + "description": "User-configured MCP servers, keyed by server name.", + "title": "McpConfigList" + }, + "McpConfigRemoveRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$", + "description": "Name of the MCP server to remove" + } + }, + "required": [ + "name" + ], + "additionalProperties": false, + "description": "MCP server name to remove from user configuration.", + "title": "McpConfigRemoveRequest" + }, + "McpConfigUpdateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$", + "description": "Name of the MCP server to update" + }, + "config": { + "$ref": "#/definitions/McpServerConfig", + "description": "MCP server configuration (local/stdio or remote/http)" + } + }, + "required": [ + "name", + "config" + ], + "additionalProperties": false, + "description": "MCP server name and replacement configuration to write to user configuration.", + "title": "McpConfigUpdateRequest" + }, + "McpDisableRequest": { + "type": "object", + "properties": { + "serverName": { + "type": "string", + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$", + "description": "Name of the MCP server to disable" + } + }, + "required": [ + "serverName" + ], + "additionalProperties": false, + "description": "Name of the MCP server to disable for the session.", + "title": "McpDisableRequest" + }, + "McpDiscoverRequest": { + "type": "object", + "properties": { + "workingDirectory": { + "type": "string", + "description": "Working directory used as context for discovery (e.g., plugin resolution)" + } + }, + "additionalProperties": false, + "description": "Optional working directory used as context for MCP server discovery.", + "title": "McpDiscoverRequest" + }, + "McpDiscoverResult": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/DiscoveredMcpServer" + }, + "description": "MCP servers discovered from all sources" + } + }, + "required": [ + "servers" + ], + "additionalProperties": false, + "description": "MCP servers discovered from user, workspace, plugin, and built-in sources.", + "title": "McpDiscoverResult" + }, + "McpEnableRequest": { + "type": "object", + "properties": { + "serverName": { + "type": "string", + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$", + "description": "Name of the MCP server to enable" + } + }, + "required": [ + "serverName" + ], + "additionalProperties": false, + "description": "Name of the MCP server to enable for the session.", + "title": "McpEnableRequest" + }, + "McpOauthLoginRequest": { + "type": "object", + "properties": { + "serverName": { + "type": "string", + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$", + "description": "Name of the remote MCP server to authenticate" + }, + "forceReauth": { + "type": "boolean", + "description": "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." + }, + "clientName": { + "type": "string", + "description": "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." + }, + "callbackSuccessMessage": { + "type": "string", + "description": "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." + } + }, + "required": [ + "serverName" + ], + "additionalProperties": false, + "description": "Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, and the callback success-page copy.", + "title": "McpOauthLoginRequest" + }, + "McpOauthLoginResult": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "description": "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." + } + }, + "additionalProperties": false, + "description": "OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server.", + "title": "McpOauthLoginResult" + }, + "McpServer": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$", + "description": "Server name (config key)" + }, + "status": { + "$ref": "#/definitions/McpServerStatus", + "description": "Connection status: connected, failed, needs-auth, pending, disabled, or not_configured" + }, + "source": { + "$ref": "#/definitions/McpServerSource", + "description": "Configuration source: user, workspace, plugin, or builtin" + }, + "error": { + "type": "string", + "description": "Error message if the server failed to connect" + } + }, + "required": [ + "name", + "status" + ], + "additionalProperties": false, + "title": "McpServer", + "description": "Schema for the `McpServer` type." + }, + "McpServerConfig": { + "anyOf": [ + { + "$ref": "#/definitions/McpServerConfigLocal", + "description": "Local MCP server configuration launched as a child process." + }, + { + "$ref": "#/definitions/McpServerConfigHttp", + "description": "Remote MCP server configuration accessed over HTTP or SSE." + } + ], + "description": "MCP server configuration (local/stdio or remote/http)", + "title": "McpServerConfig" + }, + "McpServerConfigHttp": { + "type": "object", + "properties": { + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tools to include. Defaults to all tools if not specified." + }, + "type": { + "$ref": "#/definitions/McpServerConfigHttpType", + "description": "Remote transport type. Defaults to \"http\" when omitted." + }, + "isDefaultServer": { + "type": "boolean", + "description": "Whether this server is a built-in fallback used when the user has not configured their own server." + }, + "filterMapping": { + "$ref": "#/definitions/FilterMapping", + "description": "Content filtering mode to apply to all tools, or a map of tool name to content filtering mode." + }, + "timeout": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 0, + "description": "Timeout in milliseconds for tool calls to this server.", + "format": "duration" + }, + "url": { + "type": "string", + "format": "uri", + "description": "URL of the remote MCP server endpoint." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "HTTP headers to include in requests to the remote MCP server." + }, + "oauthClientId": { + "type": "string", + "description": "OAuth client ID for a pre-registered remote MCP OAuth client." + }, + "oauthPublicClient": { + "type": "boolean", + "description": "Whether the configured OAuth client is public and does not require a client secret." + }, + "oauthGrantType": { + "$ref": "#/definitions/McpServerConfigHttpOauthGrantType", + "description": "OAuth grant type to use when authenticating to the remote MCP server." + } + }, + "required": [ + "url" + ], + "additionalProperties": false, + "description": "Remote MCP server configuration accessed over HTTP or SSE.", + "title": "McpServerConfigHttp" + }, + "McpServerConfigHttpOauthGrantType": { + "type": "string", + "enum": [ + "authorization_code", + "client_credentials" + ], + "description": "OAuth grant type to use when authenticating to the remote MCP server.", + "title": "McpServerConfigHttpOauthGrantType" + }, + "McpServerConfigHttpType": { + "type": "string", + "enum": [ + "http", + "sse" + ], + "default": "http", + "description": "Remote transport type. Defaults to \"http\" when omitted.", + "title": "McpServerConfigHttpType" + }, + "McpServerConfigLocal": { + "type": "object", + "properties": { + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tools to include. Defaults to all tools if not specified." + }, + "type": { + "$ref": "#/definitions/McpServerConfigLocalType", + "description": "Local transport type. Defaults to \"local\"." + }, + "isDefaultServer": { + "type": "boolean", + "description": "Whether this server is a built-in fallback used when the user has not configured their own server." + }, + "filterMapping": { + "$ref": "#/definitions/FilterMapping", + "description": "Content filtering mode to apply to all tools, or a map of tool name to content filtering mode." + }, + "timeout": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 0, + "description": "Timeout in milliseconds for tool calls to this server.", + "format": "duration" + }, + "command": { + "type": "string", + "description": "Executable command used to start the local MCP server process." + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Command-line arguments passed to the local MCP server process." + }, + "cwd": { + "type": "string", + "description": "Working directory for the local MCP server process." + }, + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables to pass to the local MCP server process." + } + }, + "required": [ + "command", + "args" + ], + "additionalProperties": false, + "description": "Local MCP server configuration launched as a child process.", + "title": "McpServerConfigLocal" + }, + "McpServerConfigLocalType": { + "type": "string", + "enum": [ + "local", + "stdio" + ], + "description": "Local transport type. Defaults to \"local\".", + "title": "McpServerConfigLocalType" + }, + "McpServerList": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/McpServer" + }, + "description": "Configured MCP servers" + } + }, + "required": [ + "servers" + ], + "additionalProperties": false, + "description": "MCP servers configured for the session, with their connection status.", + "title": "McpServerList" + }, + "McpServerSource": { + "type": "string", + "enum": [ + "user", + "workspace", + "plugin", + "builtin" + ], + "description": "Configuration source: user, workspace, plugin, or builtin", + "title": "McpServerSource" + }, + "McpServerStatus": { + "type": "string", + "enum": [ + "connected", + "failed", + "needs-auth", + "pending", + "disabled", + "not_configured" + ], + "description": "Connection status: connected, failed, needs-auth, pending, disabled, or not_configured", + "title": "McpServerStatus" + }, + "Model": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Model identifier (e.g., \"claude-sonnet-4.5\")" + }, + "name": { + "type": "string", + "description": "Display name" + }, + "capabilities": { + "$ref": "#/definitions/ModelCapabilities", + "description": "Model capabilities and limits" + }, + "policy": { + "$ref": "#/definitions/ModelPolicy", + "description": "Policy state (if applicable)" + }, + "billing": { + "$ref": "#/definitions/ModelBilling", + "description": "Billing information" + }, + "supportedReasoningEfforts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Supported reasoning effort levels (only present if model supports reasoning effort)" + }, + "defaultReasoningEffort": { + "type": "string", + "description": "Default reasoning effort level (only present if model supports reasoning effort)" + }, + "modelPickerCategory": { + "$ref": "#/definitions/ModelPickerCategory", + "description": "Model capability category for grouping in the model picker" + }, + "modelPickerPriceCategory": { + "$ref": "#/definitions/ModelPickerPriceCategory", + "description": "Relative cost tier for token-based billing users" + } + }, + "required": [ + "id", + "name", + "capabilities" + ], + "additionalProperties": false, + "title": "Model", + "description": "Schema for the `Model` type." + }, + "ModelBilling": { + "type": "object", + "properties": { + "multiplier": { + "type": "number", + "description": "Billing cost multiplier relative to the base rate" + }, + "tokenPrices": { + "$ref": "#/definitions/ModelBillingTokenPrices", + "description": "Token-level pricing information for this model" + } + }, + "additionalProperties": false, + "description": "Billing information", + "title": "ModelBilling" + }, + "ModelBillingTokenPrices": { + "type": "object", + "properties": { + "inputPrice": { + "type": "integer", + "description": "Price per billing batch of input tokens in nano-AIUs (1 nano-AIU = 0.000000001 AIU, 1 AIU = $0.01 USD)" + }, + "outputPrice": { + "type": "integer", + "description": "Price per billing batch of output tokens in nano-AIUs (1 nano-AIU = 0.000000001 AIU, 1 AIU = $0.01 USD)" + }, + "cachePrice": { + "type": "integer", + "description": "Price per billing batch of cached tokens in nano-AIUs (1 nano-AIU = 0.000000001 AIU, 1 AIU = $0.01 USD)" + }, + "batchSize": { + "type": "integer", + "description": "Number of tokens per standard billing batch" + } + }, + "additionalProperties": false, + "description": "Token-level pricing information for this model", + "title": "ModelBillingTokenPrices" + }, + "ModelCapabilities": { + "type": "object", + "properties": { + "supports": { + "$ref": "#/definitions/ModelCapabilitiesSupports", + "description": "Feature flags indicating what the model supports" + }, + "limits": { + "$ref": "#/definitions/ModelCapabilitiesLimits", + "description": "Token limits for prompts, outputs, and context window" + } + }, + "additionalProperties": false, + "description": "Model capabilities and limits", + "title": "ModelCapabilities" + }, + "ModelCapabilitiesLimits": { + "type": "object", + "properties": { + "max_prompt_tokens": { + "type": "integer", + "minimum": 0, + "description": "Maximum number of prompt/input tokens" + }, + "max_output_tokens": { + "type": "integer", + "minimum": 0, + "description": "Maximum number of output/completion tokens" + }, + "max_context_window_tokens": { + "type": "integer", + "minimum": 0, + "description": "Maximum total context window size in tokens" + }, + "vision": { + "$ref": "#/definitions/ModelCapabilitiesLimitsVision", + "description": "Vision-specific limits" + } + }, + "additionalProperties": false, + "description": "Token limits for prompts, outputs, and context window", + "title": "ModelCapabilitiesLimits" + }, + "ModelCapabilitiesLimitsVision": { + "type": "object", + "properties": { + "supported_media_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "MIME types the model accepts" + }, + "max_prompt_images": { + "type": "integer", + "minimum": 1, + "description": "Maximum number of images per prompt" + }, + "max_prompt_image_size": { + "type": "integer", + "minimum": 0, + "description": "Maximum image size in bytes" + } + }, + "required": [ + "supported_media_types", + "max_prompt_images", + "max_prompt_image_size" + ], + "additionalProperties": false, + "description": "Vision-specific limits", + "title": "ModelCapabilitiesLimitsVision" + }, + "ModelCapabilitiesOverride": { + "type": "object", + "properties": { + "supports": { + "$ref": "#/definitions/ModelCapabilitiesOverrideSupports", + "description": "Feature flags indicating what the model supports" + }, + "limits": { + "$ref": "#/definitions/ModelCapabilitiesOverrideLimits", + "description": "Token limits for prompts, outputs, and context window" + } + }, + "additionalProperties": false, + "description": "Override individual model capabilities resolved by the runtime", + "title": "ModelCapabilitiesOverride" + }, + "ModelCapabilitiesOverrideLimits": { + "type": "object", + "properties": { + "max_prompt_tokens": { + "type": "integer", + "minimum": 0, + "description": "Maximum number of prompt/input tokens" + }, + "max_output_tokens": { + "type": "integer", + "minimum": 0, + "description": "Maximum number of output/completion tokens" + }, + "max_context_window_tokens": { + "type": "integer", + "minimum": 0, + "description": "Maximum total context window size in tokens" + }, + "vision": { + "$ref": "#/definitions/ModelCapabilitiesOverrideLimitsVision", + "description": "Vision-specific limits" + } + }, + "additionalProperties": false, + "description": "Token limits for prompts, outputs, and context window", + "title": "ModelCapabilitiesOverrideLimits" + }, + "ModelCapabilitiesOverrideLimitsVision": { + "type": "object", + "properties": { + "supported_media_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "MIME types the model accepts" + }, + "max_prompt_images": { + "type": "integer", + "minimum": 1, + "description": "Maximum number of images per prompt" + }, + "max_prompt_image_size": { + "type": "integer", + "minimum": 0, + "description": "Maximum image size in bytes" + } + }, + "additionalProperties": false, + "description": "Vision-specific limits", + "title": "ModelCapabilitiesOverrideLimitsVision" + }, + "ModelCapabilitiesOverrideSupports": { + "type": "object", + "properties": { + "vision": { + "type": "boolean", + "description": "Whether this model supports vision/image input" + }, + "reasoningEffort": { + "type": "boolean", + "description": "Whether this model supports reasoning effort configuration" + } + }, + "additionalProperties": false, + "description": "Feature flags indicating what the model supports", + "title": "ModelCapabilitiesOverrideSupports" + }, + "ModelCapabilitiesSupports": { + "type": "object", + "properties": { + "vision": { + "type": "boolean", + "description": "Whether this model supports vision/image input" + }, + "reasoningEffort": { + "type": "boolean", + "description": "Whether this model supports reasoning effort configuration" + } + }, + "additionalProperties": false, + "description": "Feature flags indicating what the model supports", + "title": "ModelCapabilitiesSupports" + }, + "ModelList": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/Model" + }, + "description": "List of available models with full metadata" + } + }, + "required": [ + "models" + ], + "additionalProperties": false, + "description": "List of Copilot models available to the resolved user, including capabilities and billing metadata.", + "title": "ModelList" + }, + "ModelPickerCategory": { + "type": "string", + "enum": [ + "lightweight", + "versatile", + "powerful" + ], + "description": "Model capability category for grouping in the model picker", + "title": "ModelPickerCategory" + }, + "ModelPickerPriceCategory": { + "type": "string", + "enum": [ + "low", + "medium", + "high", + "very_high" + ], + "description": "Relative cost tier for token-based billing users", + "title": "ModelPickerPriceCategory" + }, + "ModelPolicy": { + "type": "object", + "properties": { + "state": { + "type": "string", + "description": "Current policy state for this model" + }, + "terms": { + "type": "string", + "description": "Usage terms or conditions for this model" + } + }, + "required": [ + "state" + ], + "additionalProperties": false, + "description": "Policy state (if applicable)", + "title": "ModelPolicy" + }, + "ModelsListRequest": { + "anyOf": [ + { + "not": {} + }, + { + "type": "object", + "properties": { + "gitHubToken": { + "type": "string", + "description": "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." + } + }, + "additionalProperties": false + } + ], + "description": "Optional GitHub token used to list models for a specific user instead of the global auth context.", + "title": "ModelsListRequest" + }, + "ModelSwitchToRequest": { + "type": "object", + "properties": { + "modelId": { + "type": "string", + "description": "Model identifier to switch to" + }, + "reasoningEffort": { + "type": "string", + "description": "Reasoning effort level to use for the model. \"none\" disables reasoning." + }, + "reasoningSummary": { + "$ref": "#/definitions/ReasoningSummary", + "description": "Reasoning summary mode to request for supported model clients" + }, + "modelCapabilities": { + "$ref": "#/definitions/ModelCapabilitiesOverride", + "description": "Override individual model capabilities resolved by the runtime" + } + }, + "required": [ + "modelId" + ], + "additionalProperties": false, + "description": "Target model identifier and optional reasoning effort, summary, and capability overrides.", + "title": "ModelSwitchToRequest" + }, + "ModelSwitchToResult": { + "type": "object", + "properties": { + "modelId": { + "type": "string", + "description": "Currently active model identifier after the switch" + } + }, + "additionalProperties": false, + "description": "The model identifier active on the session after the switch.", + "title": "ModelSwitchToResult" + }, + "ModeSetRequest": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/definitions/SessionMode", + "description": "The agent mode. Valid values: \"interactive\", \"plan\", \"autopilot\"." + } + }, + "required": [ + "mode" + ], + "additionalProperties": false, + "description": "Agent interaction mode to apply to the session.", + "title": "ModeSetRequest" + }, + "NameGetResult": { + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ], + "description": "The session name (user-set or auto-generated), or null if not yet set" + } + }, + "required": [ + "name" + ], + "additionalProperties": false, + "description": "The session's friendly name, or null when not yet set.", + "title": "NameGetResult" + }, + "NameSetRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100, + "description": "New session name (1–100 characters, trimmed of leading/trailing whitespace)" + } + }, + "required": [ + "name" + ], + "additionalProperties": false, + "description": "New friendly name to apply to the session.", + "title": "NameSetRequest" + }, + "PermissionDecision": { + "anyOf": [ + { + "$ref": "#/definitions/PermissionDecisionApproveOnce" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForSession" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForLocation" + }, + { + "$ref": "#/definitions/PermissionDecisionApprovePermanently" + }, + { + "$ref": "#/definitions/PermissionDecisionReject" + }, + { + "$ref": "#/definitions/PermissionDecisionUserNotAvailable" + } + ], + "description": "Decision to apply to a pending permission request.", + "title": "PermissionDecision" + }, + "PermissionDecisionApproveForLocation": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "approve-for-location", + "description": "Approved and persisted for this project location" + }, + "approval": { + "$ref": "#/definitions/PermissionDecisionApproveForLocationApproval", + "description": "The approval to persist for this location" + }, + "locationKey": { + "type": "string", + "description": "The location key (git root or cwd) to persist the approval to" + } + }, + "required": [ + "kind", + "approval", + "locationKey" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForLocation", + "description": "Schema for the `PermissionDecisionApproveForLocation` type." + }, + "PermissionDecisionApproveForLocationApproval": { + "anyOf": [ + { + "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalCommands" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalRead" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalWrite" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalMcp" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalMcpSampling" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalMemory" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalCustomTool" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalExtensionManagement" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess" + } + ], + "description": "The approval to persist for this location", + "title": "PermissionDecisionApproveForLocationApproval" + }, + "PermissionDecisionApproveForLocationApprovalCommands": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "commands", + "description": "Approval scoped to specific command identifiers." + }, + "commandIdentifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Command identifiers covered by this approval." + } + }, + "required": [ + "kind", + "commandIdentifiers" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForLocationApprovalCommands", + "description": "Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type." + }, + "PermissionDecisionApproveForLocationApprovalCustomTool": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "custom-tool", + "description": "Approval covering a custom tool." + }, + "toolName": { + "type": "string", + "description": "Custom tool name." + } + }, + "required": [ + "kind", + "toolName" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForLocationApprovalCustomTool", + "description": "Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type." + }, + "PermissionDecisionApproveForLocationApprovalExtensionManagement": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "extension-management", + "description": "Approval covering extension lifecycle operations such as enable, disable, or reload." + }, + "operation": { + "type": "string", + "description": "Optional operation identifier; when omitted, the approval covers all extension management operations." + } + }, + "required": [ + "kind" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForLocationApprovalExtensionManagement", + "description": "Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type." + }, + "PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "extension-permission-access", + "description": "Approval covering an extension's request to access a permission-gated capability." + }, + "extensionName": { + "type": "string", + "description": "Extension name." + } + }, + "required": [ + "kind", + "extensionName" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess", + "description": "Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` type." + }, + "PermissionDecisionApproveForLocationApprovalMcp": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "mcp", + "description": "Approval covering an MCP tool." + }, + "serverName": { + "type": "string", + "description": "MCP server name." + }, + "toolName": { + "type": [ + "string", + "null" + ], + "description": "MCP tool name, or null to cover every tool on the server." + } + }, + "required": [ + "kind", + "serverName", + "toolName" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForLocationApprovalMcp", + "description": "Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type." + }, + "PermissionDecisionApproveForLocationApprovalMcpSampling": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "mcp-sampling", + "description": "Approval covering MCP sampling requests for a server." + }, + "serverName": { + "type": "string", + "description": "MCP server name." + } + }, + "required": [ + "kind", + "serverName" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForLocationApprovalMcpSampling", + "description": "Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type." + }, + "PermissionDecisionApproveForLocationApprovalMemory": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "memory", + "description": "Approval covering writes to long-term memory." + } + }, + "required": [ + "kind" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForLocationApprovalMemory", + "description": "Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type." + }, + "PermissionDecisionApproveForLocationApprovalRead": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "read", + "description": "Approval covering read-only filesystem operations." + } + }, + "required": [ + "kind" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForLocationApprovalRead", + "description": "Schema for the `PermissionDecisionApproveForLocationApprovalRead` type." + }, + "PermissionDecisionApproveForLocationApprovalWrite": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "write", + "description": "Approval covering filesystem write operations." + } + }, + "required": [ + "kind" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForLocationApprovalWrite", + "description": "Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type." + }, + "PermissionDecisionApproveForSession": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "approve-for-session", + "description": "Approved and remembered for the rest of the session" + }, + "approval": { + "$ref": "#/definitions/PermissionDecisionApproveForSessionApproval", + "description": "The approval to add as a session-scoped rule" + }, + "domain": { + "type": "string", + "description": "The URL domain to approve for this session" + } + }, + "required": [ + "kind" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForSession", + "description": "Schema for the `PermissionDecisionApproveForSession` type." + }, + "PermissionDecisionApproveForSessionApproval": { + "anyOf": [ + { + "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalCommands" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalRead" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalWrite" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalMcp" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalMcpSampling" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalMemory" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalCustomTool" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalExtensionManagement" + }, + { + "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess" + } + ], + "description": "The approval to add as a session-scoped rule", + "title": "PermissionDecisionApproveForSessionApproval" + }, + "PermissionDecisionApproveForSessionApprovalCommands": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "commands", + "description": "Approval scoped to specific command identifiers." + }, + "commandIdentifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Command identifiers covered by this approval." + } + }, + "required": [ + "kind", + "commandIdentifiers" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForSessionApprovalCommands", + "description": "Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type." + }, + "PermissionDecisionApproveForSessionApprovalCustomTool": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "custom-tool", + "description": "Approval covering a custom tool." + }, + "toolName": { + "type": "string", + "description": "Custom tool name." + } + }, + "required": [ + "kind", + "toolName" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForSessionApprovalCustomTool", + "description": "Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type." + }, + "PermissionDecisionApproveForSessionApprovalExtensionManagement": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "extension-management", + "description": "Approval covering extension lifecycle operations such as enable, disable, or reload." + }, + "operation": { + "type": "string", + "description": "Optional operation identifier; when omitted, the approval covers all extension management operations." + } + }, + "required": [ + "kind" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForSessionApprovalExtensionManagement", + "description": "Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type." + }, + "PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "extension-permission-access", + "description": "Approval covering an extension's request to access a permission-gated capability." + }, + "extensionName": { + "type": "string", + "description": "Extension name." + } + }, + "required": [ + "kind", + "extensionName" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess", + "description": "Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` type." + }, + "PermissionDecisionApproveForSessionApprovalMcp": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "mcp", + "description": "Approval covering an MCP tool." + }, + "serverName": { + "type": "string", + "description": "MCP server name." + }, + "toolName": { + "type": [ + "string", + "null" + ], + "description": "MCP tool name, or null to cover every tool on the server." + } + }, + "required": [ + "kind", + "serverName", + "toolName" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForSessionApprovalMcp", + "description": "Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type." + }, + "PermissionDecisionApproveForSessionApprovalMcpSampling": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "mcp-sampling", + "description": "Approval covering MCP sampling requests for a server." + }, + "serverName": { + "type": "string", + "description": "MCP server name." + } + }, + "required": [ + "kind", + "serverName" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForSessionApprovalMcpSampling", + "description": "Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type." + }, + "PermissionDecisionApproveForSessionApprovalMemory": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "memory", + "description": "Approval covering writes to long-term memory." + } + }, + "required": [ + "kind" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForSessionApprovalMemory", + "description": "Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type." + }, + "PermissionDecisionApproveForSessionApprovalRead": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "read", + "description": "Approval covering read-only filesystem operations." + } + }, + "required": [ + "kind" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForSessionApprovalRead", + "description": "Schema for the `PermissionDecisionApproveForSessionApprovalRead` type." + }, + "PermissionDecisionApproveForSessionApprovalWrite": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "write", + "description": "Approval covering filesystem write operations." + } + }, + "required": [ + "kind" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveForSessionApprovalWrite", + "description": "Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type." + }, + "PermissionDecisionApproveOnce": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "approve-once", + "description": "The permission request was approved for this one instance" + } + }, + "required": [ + "kind" + ], + "additionalProperties": false, + "title": "PermissionDecisionApproveOnce", + "description": "Schema for the `PermissionDecisionApproveOnce` type." + }, + "PermissionDecisionApprovePermanently": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "approve-permanently", + "description": "Approved and persisted across sessions" + }, + "domain": { + "type": "string", + "description": "The URL domain to approve permanently" + } + }, + "required": [ + "kind", + "domain" + ], + "additionalProperties": false, + "title": "PermissionDecisionApprovePermanently", + "description": "Schema for the `PermissionDecisionApprovePermanently` type." + }, + "PermissionDecisionReject": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "reject", + "description": "Denied by the user during an interactive prompt" + }, + "feedback": { + "type": "string", + "description": "Optional feedback from the user explaining the denial" + } + }, + "required": [ + "kind" + ], + "additionalProperties": false, + "title": "PermissionDecisionReject", + "description": "Schema for the `PermissionDecisionReject` type." + }, + "PermissionDecisionRequest": { + "type": "object", + "properties": { + "requestId": { + "type": "string", + "description": "Request ID of the pending permission request" + }, + "result": { + "$ref": "#/definitions/PermissionDecision", + "description": "Decision to apply to a pending permission request." + } + }, + "required": [ + "requestId", + "result" + ], + "additionalProperties": false, + "description": "Pending permission request ID and the decision to apply (approve/reject and scope).", + "title": "PermissionDecisionRequest" + }, + "PermissionDecisionUserNotAvailable": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "user-not-available", + "description": "Denied because user confirmation was unavailable" + } + }, + "required": [ + "kind" + ], + "additionalProperties": false, + "title": "PermissionDecisionUserNotAvailable", + "description": "Schema for the `PermissionDecisionUserNotAvailable` type." + }, + "PermissionRequestResult": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "description": "Whether the permission request was handled successfully" + } + }, + "required": [ + "success" + ], + "additionalProperties": false, + "description": "Indicates whether the permission decision was applied; false when the request was already resolved.", + "title": "PermissionRequestResult" + }, + "PermissionsResetSessionApprovalsRequest": { + "type": "object", + "properties": {}, + "additionalProperties": false, + "description": "No parameters; clears all session-scoped tool permission approvals.", + "title": "PermissionsResetSessionApprovalsRequest" + }, + "PermissionsResetSessionApprovalsResult": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "description": "Whether the operation succeeded" + } + }, + "required": [ + "success" + ], + "additionalProperties": false, + "description": "Indicates whether the operation succeeded.", + "title": "PermissionsResetSessionApprovalsResult" + }, + "PermissionsSetApproveAllRequest": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether to auto-approve all tool permission requests" + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "description": "Whether to auto-approve all tool permission requests for the rest of the session.", + "title": "PermissionsSetApproveAllRequest" + }, + "PermissionsSetApproveAllResult": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "description": "Whether the operation succeeded" + } + }, + "required": [ + "success" + ], + "additionalProperties": false, + "description": "Indicates whether the operation succeeded.", + "title": "PermissionsSetApproveAllResult" + }, + "PingRequest": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Optional message to echo back" + } + }, + "additionalProperties": false, + "description": "Optional message to echo back to the caller.", + "title": "PingRequest" + }, + "PingResult": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Echoed message (or default greeting)" + }, + "timestamp": { + "type": "integer", + "description": "Server timestamp in milliseconds" + }, + "protocolVersion": { + "type": "integer", + "description": "Server protocol version number" + } + }, + "required": [ + "message", + "timestamp", + "protocolVersion" + ], + "additionalProperties": false, + "description": "Server liveness response, including the echoed message, current timestamp, and protocol version.", + "title": "PingResult" + }, + "PlanReadResult": { + "type": "object", + "properties": { + "exists": { + "type": "boolean", + "description": "Whether the plan file exists in the workspace" + }, + "content": { + "type": [ + "string", + "null" + ], + "description": "The content of the plan file, or null if it does not exist" + }, + "path": { + "type": [ + "string", + "null" + ], + "description": "Absolute file path of the plan file, or null if workspace is not enabled" + } + }, + "required": [ + "exists", + "content", + "path" + ], + "additionalProperties": false, + "description": "Existence, contents, and resolved path of the session plan file.", + "title": "PlanReadResult" + }, + "PlanUpdateRequest": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The new content for the plan file" + } + }, + "required": [ + "content" + ], + "additionalProperties": false, + "description": "Replacement contents to write to the session plan file.", + "title": "PlanUpdateRequest" + }, + "Plugin": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Plugin name" + }, + "marketplace": { + "type": "string", + "description": "Marketplace the plugin came from" + }, + "version": { + "type": "string", + "description": "Installed version" + }, + "enabled": { + "type": "boolean", + "description": "Whether the plugin is currently enabled" + } + }, + "required": [ + "name", + "marketplace", + "enabled" + ], + "additionalProperties": false, + "title": "Plugin", + "description": "Schema for the `Plugin` type." + }, + "PluginList": { + "type": "object", + "properties": { + "plugins": { + "type": "array", + "items": { + "$ref": "#/definitions/Plugin" + }, + "description": "Installed plugins" + } + }, + "required": [ + "plugins" + ], + "additionalProperties": false, + "description": "Plugins installed for the session, with their enabled state and version metadata.", + "title": "PluginList" + }, + "QueuedCommandHandled": { + "type": "object", + "properties": { + "handled": { + "type": "boolean", + "const": true, + "description": "The command was handled" + }, + "stopProcessingQueue": { + "type": "boolean", + "description": "If true, stop processing remaining queued items" + } + }, + "required": [ + "handled" + ], + "additionalProperties": false, + "title": "QueuedCommandHandled", + "description": "Schema for the `QueuedCommandHandled` type." + }, + "QueuedCommandNotHandled": { + "type": "object", + "properties": { + "handled": { + "type": "boolean", + "const": false, + "description": "The command was not handled" + } + }, + "required": [ + "handled" + ], + "additionalProperties": false, + "title": "QueuedCommandNotHandled", + "description": "Schema for the `QueuedCommandNotHandled` type." + }, + "QueuedCommandResult": { + "anyOf": [ + { + "$ref": "#/definitions/QueuedCommandHandled" + }, + { + "$ref": "#/definitions/QueuedCommandNotHandled" + } + ], + "description": "Result of the queued command execution", + "title": "QueuedCommandResult" + }, + "ReasoningSummary": { + "type": "string", + "enum": [ + "none", + "concise", + "detailed" + ], + "description": "Reasoning summary mode to request for supported model clients", + "title": "ReasoningSummary" + }, + "RemoteEnableRequest": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/definitions/RemoteSessionMode", + "description": "Per-session remote mode. \"off\" disables remote, \"export\" exports session events to GitHub without enabling remote steering, \"on\" enables both export and remote steering." + } + }, + "additionalProperties": false, + "description": "Optional remote session mode (\"off\", \"export\", or \"on\"); defaults to enabling both export and remote steering.", + "title": "RemoteEnableRequest" + }, + "RemoteEnableResult": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "GitHub frontend URL for this session" + }, + "remoteSteerable": { + "type": "boolean", + "description": "Whether remote steering is enabled" + } + }, + "required": [ + "remoteSteerable" + ], + "additionalProperties": false, + "description": "GitHub URL for the session and a flag indicating whether remote steering is enabled.", + "title": "RemoteEnableResult" + }, + "RemoteSessionMode": { + "type": "string", + "enum": [ + "off", + "export", + "on" + ], + "description": "Per-session remote mode. \"off\" disables remote, \"export\" exports session events to GitHub without enabling remote steering, \"on\" enables both export and remote steering.", + "title": "RemoteSessionMode" + }, + "ServerSkill": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Unique identifier for the skill" + }, + "description": { + "type": "string", + "description": "Description of what the skill does" + }, + "source": { + "type": "string", + "description": "Source location type (e.g., project, personal-copilot, plugin, builtin)" + }, + "userInvocable": { + "type": "boolean", + "description": "Whether the skill can be invoked by the user as a slash command" + }, + "enabled": { + "type": "boolean", + "description": "Whether the skill is currently enabled (based on global config)" + }, + "path": { + "type": "string", + "description": "Absolute path to the skill file" + }, + "projectPath": { + "type": "string", + "description": "The project path this skill belongs to (only for project/inherited skills)" + } + }, + "required": [ + "name", + "description", + "source", + "userInvocable", + "enabled" + ], + "additionalProperties": false, + "title": "ServerSkill", + "description": "Schema for the `ServerSkill` type." + }, + "ServerSkillList": { + "type": "object", + "properties": { + "skills": { + "type": "array", + "items": { + "$ref": "#/definitions/ServerSkill" + }, + "description": "All discovered skills across all sources" + } + }, + "required": [ + "skills" + ], + "additionalProperties": false, + "description": "Skills discovered across global and project sources.", + "title": "ServerSkillList" + }, + "SessionAuthStatus": { + "type": "object", + "properties": { + "isAuthenticated": { + "type": "boolean", + "description": "Whether the session has resolved authentication" + }, + "authType": { + "$ref": "#/definitions/AuthInfoType", + "description": "Authentication type" + }, + "host": { + "type": "string", + "description": "Authentication host URL" + }, + "login": { + "type": "string", + "description": "Authenticated login/username, if available" + }, + "statusMessage": { + "type": "string", + "description": "Human-readable authentication status description" + }, + "copilotPlan": { + "type": "string", + "description": "Copilot plan tier (e.g., individual_pro, business)" + } + }, + "required": [ + "isAuthenticated" + ], + "additionalProperties": false, + "description": "Authentication status and account metadata for the session.", + "title": "SessionAuthStatus" + }, + "SessionFsAppendFileRequest": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + }, + "content": { + "type": "string", + "description": "Content to append" + }, + "mode": { + "type": "integer", + "minimum": 0, + "description": "Optional POSIX-style mode for newly created files" + } + }, + "required": [ + "path", + "content" + ], + "additionalProperties": false, + "description": "File path, content to append, and optional mode for the client-provided session filesystem.", + "title": "SessionFsAppendFileRequest" + }, + "SessionFsError": { + "type": "object", + "properties": { + "code": { + "$ref": "#/definitions/SessionFsErrorCode", + "description": "Error classification" + }, + "message": { + "type": "string", + "description": "Free-form detail about the error, for logging/diagnostics" + } + }, + "required": [ + "code" + ], + "additionalProperties": false, + "description": "Describes a filesystem error.", + "title": "SessionFsError" + }, + "SessionFsErrorCode": { + "type": "string", + "enum": [ + "ENOENT", + "UNKNOWN" + ], + "description": "Error classification", + "title": "SessionFsErrorCode" + }, + "SessionFsExistsRequest": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + } + }, + "required": [ + "path" + ], + "additionalProperties": false, + "description": "Path to test for existence in the client-provided session filesystem.", + "title": "SessionFsExistsRequest" + }, + "SessionFsExistsResult": { + "type": "object", + "properties": { + "exists": { + "type": "boolean", + "description": "Whether the path exists" + } + }, + "required": [ + "exists" + ], + "additionalProperties": false, + "description": "Indicates whether the requested path exists in the client-provided session filesystem.", + "title": "SessionFsExistsResult" + }, + "SessionFsMkdirRequest": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + }, + "recursive": { + "type": "boolean", + "description": "Create parent directories as needed" + }, + "mode": { + "type": "integer", + "minimum": 0, + "description": "Optional POSIX-style mode for newly created directories" + } + }, + "required": [ + "path" + ], + "additionalProperties": false, + "description": "Directory path to create in the client-provided session filesystem, with options for recursive creation and POSIX mode.", + "title": "SessionFsMkdirRequest" + }, + "SessionFsReaddirRequest": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + } + }, + "required": [ + "path" + ], + "additionalProperties": false, + "description": "Directory path whose entries should be listed from the client-provided session filesystem.", + "title": "SessionFsReaddirRequest" + }, + "SessionFsReaddirResult": { + "type": "object", + "properties": { + "entries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Entry names in the directory" + }, + "error": { + "$ref": "#/definitions/SessionFsError", + "description": "Describes a filesystem error." + } + }, + "required": [ + "entries" + ], + "additionalProperties": false, + "description": "Names of entries in the requested directory, or a filesystem error if the read failed.", + "title": "SessionFsReaddirResult" + }, + "SessionFsReaddirWithTypesEntry": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Entry name" + }, + "type": { + "$ref": "#/definitions/SessionFsReaddirWithTypesEntryType", + "description": "Entry type" + } + }, + "required": [ + "name", + "type" + ], + "additionalProperties": false, + "title": "SessionFsReaddirWithTypesEntry", + "description": "Schema for the `SessionFsReaddirWithTypesEntry` type." + }, + "SessionFsReaddirWithTypesEntryType": { + "type": "string", + "enum": [ + "file", + "directory" + ], + "description": "Entry type", + "title": "SessionFsReaddirWithTypesEntryType" + }, + "SessionFsReaddirWithTypesRequest": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + } + }, + "required": [ + "path" + ], + "additionalProperties": false, + "description": "Directory path whose entries (with type information) should be listed from the client-provided session filesystem.", + "title": "SessionFsReaddirWithTypesRequest" + }, + "SessionFsReaddirWithTypesResult": { + "type": "object", + "properties": { + "entries": { + "type": "array", + "items": { + "$ref": "#/definitions/SessionFsReaddirWithTypesEntry" + }, + "description": "Directory entries with type information" + }, + "error": { + "$ref": "#/definitions/SessionFsError", + "description": "Describes a filesystem error." + } + }, + "required": [ + "entries" + ], + "additionalProperties": false, + "description": "Entries in the requested directory paired with file/directory type information, or a filesystem error if the read failed.", + "title": "SessionFsReaddirWithTypesResult" + }, + "SessionFsReadFileRequest": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + } + }, + "required": [ + "path" + ], + "additionalProperties": false, + "description": "Path of the file to read from the client-provided session filesystem.", + "title": "SessionFsReadFileRequest" + }, + "SessionFsReadFileResult": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "File content as UTF-8 string" + }, + "error": { + "$ref": "#/definitions/SessionFsError", + "description": "Describes a filesystem error." + } + }, + "required": [ + "content" + ], + "additionalProperties": false, + "description": "File content as a UTF-8 string, or a filesystem error if the read failed.", + "title": "SessionFsReadFileResult" + }, + "SessionFsRenameRequest": { + "type": "object", + "properties": { + "src": { + "type": "string", + "description": "Source path using SessionFs conventions" + }, + "dest": { + "type": "string", + "description": "Destination path using SessionFs conventions" + } + }, + "required": [ + "src", + "dest" + ], + "additionalProperties": false, + "description": "Source and destination paths for renaming or moving an entry in the client-provided session filesystem.", + "title": "SessionFsRenameRequest" + }, + "SessionFsRmRequest": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + }, + "recursive": { + "type": "boolean", + "description": "Remove directories and their contents recursively" + }, + "force": { + "type": "boolean", + "description": "Ignore errors if the path does not exist" + } + }, + "required": [ + "path" + ], + "additionalProperties": false, + "description": "Path to remove from the client-provided session filesystem, with options for recursive removal and force.", + "title": "SessionFsRmRequest" + }, + "SessionFsSetProviderConventions": { + "type": "string", + "enum": [ + "windows", + "posix" + ], + "description": "Path conventions used by this filesystem", + "title": "SessionFsSetProviderConventions" + }, + "SessionFsSetProviderRequest": { + "type": "object", + "properties": { + "initialCwd": { + "type": "string", + "description": "Initial working directory for sessions" + }, + "sessionStatePath": { + "type": "string", + "description": "Path within each session's SessionFs where the runtime stores files for that session" + }, + "conventions": { + "$ref": "#/definitions/SessionFsSetProviderConventions", + "description": "Path conventions used by this filesystem" + } + }, + "required": [ + "initialCwd", + "sessionStatePath", + "conventions" + ], + "additionalProperties": false, + "description": "Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider.", + "title": "SessionFsSetProviderRequest" + }, + "SessionFsSetProviderResult": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "description": "Whether the provider was set successfully" + } + }, + "required": [ + "success" + ], + "additionalProperties": false, + "description": "Indicates whether the calling client was registered as the session filesystem provider.", + "title": "SessionFsSetProviderResult" + }, + "SessionFsSqliteQueryType": { + "type": "string", + "enum": [ + "exec", + "query", + "run" + ], + "description": "How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected)", + "title": "SessionFsSqliteQueryType" + }, + "SessionFsSqliteRequest": { + "type": "object", + "properties": { + "dbName": { + "type": "string", + "description": "Logical database name (e.g., 'session')" + }, + "query": { + "type": "string", + "description": "SQL query to execute" + }, + "queryType": { + "$ref": "#/definitions/SessionFsSqliteQueryType", + "description": "How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected)" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "null" + ] + }, + "description": "Optional named bind parameters" + } + }, + "required": [ + "dbName", + "query", + "queryType" + ], + "additionalProperties": false, + "description": "Database name, SQL query, query type, and optional bind parameters for executing a SQLite query against a per-session database.", + "title": "SessionFsSqliteRequest" + }, + "SessionFsSqliteResult": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + }, + "description": "For SELECT: array of row objects. For others: empty array." + }, + "columns": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Column names from the result set" + }, + "rowsAffected": { + "type": "integer", + "minimum": 0, + "description": "Number of rows affected (for INSERT/UPDATE/DELETE)" + }, + "lastInsertRowid": { + "type": "number", + "description": "Last inserted row ID (for INSERT)" + }, + "error": { + "$ref": "#/definitions/SessionFsError", + "description": "Describes a filesystem error." + } + }, + "required": [ + "rows", + "columns", + "rowsAffected" + ], + "additionalProperties": false, + "description": "Query results including rows, columns, and rows affected, or a filesystem error if execution failed.", + "title": "SessionFsSqliteResult" + }, + "SessionFsStatRequest": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + } + }, + "required": [ + "path" + ], + "additionalProperties": false, + "description": "Path whose metadata should be returned from the client-provided session filesystem.", + "title": "SessionFsStatRequest" + }, + "SessionFsStatResult": { + "type": "object", + "properties": { + "isFile": { + "type": "boolean", + "description": "Whether the path is a file" + }, + "isDirectory": { + "type": "boolean", + "description": "Whether the path is a directory" + }, + "size": { + "type": "integer", + "minimum": 0, + "description": "File size in bytes" + }, + "mtime": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp of last modification" + }, + "birthtime": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp of creation" + }, + "error": { + "$ref": "#/definitions/SessionFsError", + "description": "Describes a filesystem error." + } + }, + "required": [ + "isFile", + "isDirectory", + "size", + "mtime", + "birthtime" + ], + "additionalProperties": false, + "description": "Filesystem metadata for the requested path, or a filesystem error if the stat failed.", + "title": "SessionFsStatResult" + }, + "SessionFsWriteFileRequest": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Path using SessionFs conventions" + }, + "content": { + "type": "string", + "description": "Content to write" + }, + "mode": { + "type": "integer", + "minimum": 0, + "description": "Optional POSIX-style mode for newly created files" + } + }, + "required": [ + "path", + "content" + ], + "additionalProperties": false, + "description": "File path, content to write, and optional mode for the client-provided session filesystem.", + "title": "SessionFsWriteFileRequest" + }, + "SessionLogLevel": { + "type": "string", + "enum": [ + "info", + "warning", + "error" + ], + "description": "Log severity level. Determines how the message is displayed in the timeline. Defaults to \"info\".", + "title": "SessionLogLevel" + }, + "SessionMode": { + "type": "string", + "enum": [ + "interactive", + "plan", + "autopilot" + ], + "description": "The agent mode. Valid values: \"interactive\", \"plan\", \"autopilot\".", + "title": "SessionMode" + }, + "SessionsForkRequest": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Source session ID to fork from" + }, + "toEventId": { + "type": "string", + "description": "Optional event ID boundary. When provided, the fork includes only events before this ID (exclusive). When omitted, all events are included." + }, + "name": { + "type": "string", + "description": "Optional friendly name to assign to the forked session." + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false, + "description": "Source session identifier to fork from, optional event-ID boundary, and optional friendly name for the new session.", + "title": "SessionsForkRequest" + }, + "SessionsForkResult": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "The new forked session's ID" + }, + "name": { + "type": "string", + "description": "Friendly name assigned to the forked session, if any." + } + }, + "required": [ + "sessionId" + ], + "additionalProperties": false, + "description": "Identifier and optional friendly name assigned to the newly forked session.", + "title": "SessionsForkResult" + }, + "ShellExecRequest": { + "type": "object", + "properties": { + "command": { + "type": "string", + "description": "Shell command to execute" + }, + "cwd": { + "type": "string", + "description": "Working directory (defaults to session working directory)" + }, + "timeout": { + "type": "integer", + "minimum": 0, + "description": "Timeout in milliseconds (default: 30000)", + "format": "duration" + } + }, + "required": [ + "command" + ], + "additionalProperties": false, + "description": "Shell command to run, with optional working directory and timeout in milliseconds.", + "title": "ShellExecRequest" + }, + "ShellExecResult": { + "type": "object", + "properties": { + "processId": { + "type": "string", + "description": "Unique identifier for tracking streamed output" + } + }, + "required": [ + "processId" + ], + "additionalProperties": false, + "description": "Identifier of the spawned process, used to correlate streamed output and exit notifications.", + "title": "ShellExecResult" + }, + "ShellKillRequest": { + "type": "object", + "properties": { + "processId": { + "type": "string", + "description": "Process identifier returned by shell.exec" + }, + "signal": { + "$ref": "#/definitions/ShellKillSignal", + "description": "Signal to send (default: SIGTERM)" + } + }, + "required": [ + "processId" + ], + "additionalProperties": false, + "description": "Identifier of a process previously returned by \"shell.exec\" and the signal to send.", + "title": "ShellKillRequest" + }, + "ShellKillResult": { + "type": "object", + "properties": { + "killed": { + "type": "boolean", + "description": "Whether the signal was sent successfully" + } + }, + "required": [ + "killed" + ], + "additionalProperties": false, + "description": "Indicates whether the signal was delivered; false if the process was unknown or already exited.", + "title": "ShellKillResult" + }, + "ShellKillSignal": { + "type": "string", + "enum": [ + "SIGTERM", + "SIGKILL", + "SIGINT" + ], + "description": "Signal to send (default: SIGTERM)", + "title": "ShellKillSignal" + }, + "Skill": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Unique identifier for the skill" + }, + "description": { + "type": "string", + "description": "Description of what the skill does" + }, + "source": { + "type": "string", + "description": "Source location type (e.g., project, personal, plugin)" + }, + "userInvocable": { + "type": "boolean", + "description": "Whether the skill can be invoked by the user as a slash command" + }, + "enabled": { + "type": "boolean", + "description": "Whether the skill is currently enabled" + }, + "path": { + "type": "string", + "description": "Absolute path to the skill file" + } + }, + "required": [ + "name", + "description", + "source", + "userInvocable", + "enabled" + ], + "additionalProperties": false, + "title": "Skill", + "description": "Schema for the `Skill` type." + }, + "SkillList": { + "type": "object", + "properties": { + "skills": { + "type": "array", + "items": { + "$ref": "#/definitions/Skill" + }, + "description": "Available skills" + } + }, + "required": [ + "skills" + ], + "additionalProperties": false, + "description": "Skills available to the session, with their enabled state.", + "title": "SkillList" + }, + "SkillsConfigSetDisabledSkillsRequest": { + "type": "object", + "properties": { + "disabledSkills": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of skill names to disable" + } + }, + "required": [ + "disabledSkills" + ], + "additionalProperties": false, + "description": "Skill names to mark as disabled in global configuration, replacing any previous list.", + "title": "SkillsConfigSetDisabledSkillsRequest" + }, + "SkillsDisableRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the skill to disable" + } + }, + "required": [ + "name" + ], + "additionalProperties": false, + "description": "Name of the skill to disable for the session.", + "title": "SkillsDisableRequest" + }, + "SkillsDiscoverRequest": { + "type": "object", + "properties": { + "projectPaths": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional list of project directory paths to scan for project-scoped skills" + }, + "skillDirectories": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional list of additional skill directory paths to include" + } + }, + "additionalProperties": false, + "description": "Optional project paths and additional skill directories to include in discovery.", + "title": "SkillsDiscoverRequest" + }, + "SkillsEnableRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the skill to enable" + } + }, + "required": [ + "name" + ], + "additionalProperties": false, + "description": "Name of the skill to enable for the session.", + "title": "SkillsEnableRequest" + }, + "SkillsLoadDiagnostics": { + "type": "object", + "properties": { + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Warnings emitted while loading skills (e.g. skills that loaded but had issues)" + }, + "errors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Errors emitted while loading skills (e.g. skills that failed to load entirely)" + } + }, + "required": [ + "warnings", + "errors" + ], + "additionalProperties": false, + "description": "Diagnostics from reloading skill definitions, with warnings and errors as separate lists.", + "title": "SkillsLoadDiagnostics" + }, + "SlashCommandAgentPromptMode": { + "type": "string", + "enum": [ + "interactive", + "plan", + "autopilot" + ], + "description": "Optional target session mode", + "title": "SlashCommandAgentPromptMode" + }, + "SlashCommandAgentPromptResult": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "agent-prompt", + "description": "Agent prompt result discriminator" + }, + "prompt": { + "type": "string", + "description": "Prompt to submit to the agent" + }, + "displayPrompt": { + "type": "string", + "description": "Prompt text to display to the user" + }, + "mode": { + "$ref": "#/definitions/SlashCommandAgentPromptMode", + "description": "Optional target session mode" + }, + "runtimeSettingsChanged": { + "type": "boolean", + "description": "True when the invocation mutated user runtime settings; consumers caching settings should refresh" + } + }, + "required": [ + "kind", + "prompt", + "displayPrompt" + ], + "additionalProperties": false, + "title": "SlashCommandAgentPromptResult", + "description": "Schema for the `SlashCommandAgentPromptResult` type." + }, + "SlashCommandCompletedResult": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "completed", + "description": "Completed result discriminator" + }, + "message": { + "type": "string", + "description": "Optional user-facing message describing the completed command" + }, + "runtimeSettingsChanged": { + "type": "boolean", + "description": "True when the invocation mutated user runtime settings; consumers caching settings should refresh" + } + }, + "required": [ + "kind" + ], + "additionalProperties": false, + "title": "SlashCommandCompletedResult", + "description": "Schema for the `SlashCommandCompletedResult` type." + }, + "SlashCommandInfo": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Canonical command name without a leading slash" + }, + "aliases": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Canonical aliases without leading slashes" + }, + "description": { + "type": "string", + "description": "Human-readable command description" + }, + "kind": { + "$ref": "#/definitions/SlashCommandKind", + "description": "Coarse command category for grouping and behavior: runtime built-in, skill-backed command, or SDK/client-owned command" + }, + "input": { + "$ref": "#/definitions/SlashCommandInput", + "description": "Optional unstructured input hint" + }, + "allowDuringAgentExecution": { + "type": "boolean", + "description": "Whether the command may run while an agent turn is active" + }, + "experimental": { + "type": "boolean", + "description": "Whether the command is experimental" + } + }, + "required": [ + "name", + "description", + "kind", + "allowDuringAgentExecution" + ], + "additionalProperties": false, + "title": "SlashCommandInfo", + "description": "Schema for the `SlashCommandInfo` type." + }, + "SlashCommandInput": { + "type": "object", + "properties": { + "hint": { + "type": "string", + "description": "Hint to display when command input has not been provided" + }, + "required": { + "type": "boolean", + "description": "When true, the command requires non-empty input; clients should render the input hint as required" + }, + "completion": { + "$ref": "#/definitions/SlashCommandInputCompletion", + "description": "Optional completion hint for the input (e.g. 'directory' for filesystem path completion)" + }, + "preserveMultilineInput": { + "type": "boolean", + "description": "When true, clients should pass the full text after the command name as a single argument rather than splitting on whitespace" + } + }, + "required": [ + "hint" + ], + "additionalProperties": false, + "description": "Optional unstructured input hint", + "title": "SlashCommandInput" + }, + "SlashCommandInputCompletion": { + "type": "string", + "enum": [ + "directory" + ], + "description": "Optional completion hint for the input (e.g. 'directory' for filesystem path completion)", + "title": "SlashCommandInputCompletion" + }, + "SlashCommandInvocationResult": { + "anyOf": [ + { + "$ref": "#/definitions/SlashCommandTextResult" + }, + { + "$ref": "#/definitions/SlashCommandAgentPromptResult" + }, + { + "$ref": "#/definitions/SlashCommandCompletedResult" + } + ], + "description": "Result of invoking the slash command (text output, prompt to send to the agent, or completion).", + "title": "SlashCommandInvocationResult" + }, + "SlashCommandKind": { + "type": "string", + "enum": [ + "builtin", + "skill", + "client" + ], + "description": "Coarse command category for grouping and behavior: runtime built-in, skill-backed command, or SDK/client-owned command", + "title": "SlashCommandKind" + }, + "SlashCommandTextResult": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "text", + "description": "Text result discriminator" + }, + "text": { + "type": "string", + "description": "Text output for the client to render" + }, + "markdown": { + "type": "boolean", + "description": "Whether text contains Markdown" + }, + "preserveAnsi": { + "type": "boolean", + "description": "Whether ANSI sequences should be preserved" + }, + "runtimeSettingsChanged": { + "type": "boolean", + "description": "True when the invocation mutated user runtime settings; consumers caching settings should refresh" + } + }, + "required": [ + "kind", + "text" + ], + "additionalProperties": false, + "title": "SlashCommandTextResult", + "description": "Schema for the `SlashCommandTextResult` type." + }, + "TaskAgentInfo": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "agent", + "description": "Task kind" + }, + "id": { + "type": "string", + "description": "Unique task identifier" + }, + "toolCallId": { + "type": "string", + "description": "Tool call ID associated with this agent task" + }, + "description": { + "type": "string", + "description": "Short description of the task" + }, + "status": { + "$ref": "#/definitions/TaskAgentInfoStatus", + "description": "Current lifecycle status of the task" + }, + "startedAt": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when the task was started" + }, + "completedAt": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when the task finished" + }, + "activeTimeMs": { + "type": "integer", + "description": "Accumulated active execution time in milliseconds", + "format": "duration" + }, + "activeStartedAt": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when the current active period began" + }, + "error": { + "type": "string", + "description": "Error message when the task failed" + }, + "agentType": { + "type": "string", + "description": "Type of agent running this task" + }, + "prompt": { + "type": "string", + "description": "Prompt passed to the agent" + }, + "result": { + "type": "string", + "description": "Result text from the task when available" + }, + "model": { + "type": "string", + "description": "Model used for the task when specified" + }, + "executionMode": { + "$ref": "#/definitions/TaskAgentInfoExecutionMode", + "description": "How the agent is currently being managed by the runtime" + }, + "canPromoteToBackground": { + "type": "boolean", + "description": "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." + }, + "latestResponse": { + "type": "string", + "description": "Most recent response text from the agent" + }, + "idleSince": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when the agent entered idle state" + } + }, + "required": [ + "type", + "id", + "toolCallId", + "description", + "status", + "startedAt", + "agentType", + "prompt" + ], + "additionalProperties": false, + "title": "TaskAgentInfo", + "description": "Schema for the `TaskAgentInfo` type." + }, + "TaskAgentInfoExecutionMode": { + "type": "string", + "enum": [ + "sync", + "background" + ], + "description": "How the agent is currently being managed by the runtime", + "title": "TaskAgentInfoExecutionMode" + }, + "TaskAgentInfoStatus": { + "type": "string", + "enum": [ + "running", + "idle", + "completed", + "failed", + "cancelled" + ], + "description": "Current lifecycle status of the task", + "title": "TaskAgentInfoStatus" + }, + "TaskInfo": { + "anyOf": [ + { + "$ref": "#/definitions/TaskAgentInfo" + }, + { + "$ref": "#/definitions/TaskShellInfo" + } + ], + "title": "TaskInfo", + "description": "Schema for the `TaskInfo` type." + }, + "TaskList": { + "type": "object", + "properties": { + "tasks": { + "type": "array", + "items": { + "$ref": "#/definitions/TaskInfo" + }, + "description": "Currently tracked tasks" + } + }, + "required": [ + "tasks" + ], + "additionalProperties": false, + "description": "Background tasks currently tracked by the session.", + "title": "TaskList" + }, + "TasksCancelRequest": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Task identifier" + } + }, + "required": [ + "id" + ], + "additionalProperties": false, + "description": "Identifier of the background task to cancel.", + "title": "TasksCancelRequest" + }, + "TasksCancelResult": { + "type": "object", + "properties": { + "cancelled": { + "type": "boolean", + "description": "Whether the task was successfully cancelled" + } + }, + "required": [ + "cancelled" + ], + "additionalProperties": false, + "description": "Indicates whether the background task was successfully cancelled.", + "title": "TasksCancelResult" + }, + "TaskShellInfo": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "shell", + "description": "Task kind" + }, + "id": { + "type": "string", + "description": "Unique task identifier" + }, + "description": { + "type": "string", + "description": "Short description of the task" + }, + "status": { + "$ref": "#/definitions/TaskShellInfoStatus", + "description": "Current lifecycle status of the task" + }, + "startedAt": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when the task was started" + }, + "completedAt": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when the task finished" + }, + "command": { + "type": "string", + "description": "Command being executed" + }, + "attachmentMode": { + "$ref": "#/definitions/TaskShellInfoAttachmentMode", + "description": "Whether the shell runs inside a managed PTY session or as an independent background process" + }, + "executionMode": { + "$ref": "#/definitions/TaskShellInfoExecutionMode", + "description": "Whether the shell command is currently sync-waited or background-managed" + }, + "canPromoteToBackground": { + "type": "boolean", + "description": "Whether this shell task can be promoted to background mode" + }, + "logPath": { + "type": "string", + "description": "Path to the detached shell log, when available" + }, + "pid": { + "type": "integer", + "description": "Process ID when available" + } + }, + "required": [ + "type", + "id", + "description", + "status", + "startedAt", + "command", + "attachmentMode" + ], + "additionalProperties": false, + "title": "TaskShellInfo", + "description": "Schema for the `TaskShellInfo` type." + }, + "TaskShellInfoAttachmentMode": { + "type": "string", + "enum": [ + "attached", + "detached" + ], + "description": "Whether the shell runs inside a managed PTY session or as an independent background process", + "title": "TaskShellInfoAttachmentMode" + }, + "TaskShellInfoExecutionMode": { + "type": "string", + "enum": [ + "sync", + "background" + ], + "description": "Whether the shell command is currently sync-waited or background-managed", + "title": "TaskShellInfoExecutionMode" + }, + "TaskShellInfoStatus": { + "type": "string", + "enum": [ + "running", + "idle", + "completed", + "failed", + "cancelled" + ], + "description": "Current lifecycle status of the task", + "title": "TaskShellInfoStatus" + }, + "TasksPromoteToBackgroundRequest": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Task identifier" + } + }, + "required": [ + "id" + ], + "additionalProperties": false, + "description": "Identifier of the task to promote to background mode.", + "title": "TasksPromoteToBackgroundRequest" + }, + "TasksPromoteToBackgroundResult": { + "type": "object", + "properties": { + "promoted": { + "type": "boolean", + "description": "Whether the task was successfully promoted to background mode" + } + }, + "required": [ + "promoted" + ], + "additionalProperties": false, + "description": "Indicates whether the task was successfully promoted to background mode.", + "title": "TasksPromoteToBackgroundResult" + }, + "TasksRemoveRequest": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Task identifier" + } + }, + "required": [ + "id" + ], + "additionalProperties": false, + "description": "Identifier of the completed or cancelled task to remove from tracking.", + "title": "TasksRemoveRequest" + }, + "TasksRemoveResult": { + "type": "object", + "properties": { + "removed": { + "type": "boolean", + "description": "Whether the task was removed. Returns false if the task does not exist or is still running/idle (cancel it first)." + } + }, + "required": [ + "removed" + ], + "additionalProperties": false, + "description": "Indicates whether the task was removed. False when the task does not exist or is still running/idle.", + "title": "TasksRemoveResult" + }, + "TasksSendMessageRequest": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Agent task identifier" + }, + "message": { + "type": "string", + "description": "Message content to send to the agent" + }, + "fromAgentId": { + "type": "string", + "description": "Agent ID of the sender, if sent on behalf of another agent" + } + }, + "required": [ + "id", + "message" + ], + "additionalProperties": false, + "description": "Identifier of the target agent task, message content, and optional sender agent ID.", + "title": "TasksSendMessageRequest" + }, + "TasksSendMessageResult": { + "type": "object", + "properties": { + "sent": { + "type": "boolean", + "description": "Whether the message was successfully delivered or steered" + }, + "error": { + "type": "string", + "description": "Error message if delivery failed" + } + }, + "required": [ + "sent" + ], + "additionalProperties": false, + "description": "Indicates whether the message was delivered, with an error message when delivery failed.", + "title": "TasksSendMessageResult" + }, + "TasksStartAgentRequest": { + "type": "object", + "properties": { + "agentType": { + "type": "string", + "description": "Type of agent to start (e.g., 'explore', 'task', 'general-purpose')" + }, + "prompt": { + "type": "string", + "description": "Task prompt for the agent" + }, + "name": { + "type": "string", + "description": "Short name for the agent, used to generate a human-readable ID" + }, + "description": { + "type": "string", + "description": "Short description of the task" + }, + "model": { + "type": "string", + "description": "Optional model override" + } + }, + "required": [ + "agentType", + "prompt", + "name" + ], + "additionalProperties": false, + "description": "Agent type, prompt, name, and optional description and model override for the new task.", + "title": "TasksStartAgentRequest" + }, + "TasksStartAgentResult": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "description": "Generated agent ID for the background task" + } + }, + "required": [ + "agentId" + ], + "additionalProperties": false, + "description": "Identifier assigned to the newly started background agent task.", + "title": "TasksStartAgentResult" + }, + "Tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Tool identifier (e.g., \"bash\", \"grep\", \"str_replace_editor\")" + }, + "namespacedName": { + "type": "string", + "description": "Optional namespaced name for declarative filtering (e.g., \"playwright/navigate\" for MCP tools)" + }, + "description": { + "type": "string", + "description": "Description of what the tool does" + }, + "parameters": { + "type": "object", + "additionalProperties": {}, + "description": "JSON Schema for the tool's input parameters" + }, + "instructions": { + "type": "string", + "description": "Optional instructions for how to use this tool effectively" + } + }, + "required": [ + "name", + "description" + ], + "additionalProperties": false, + "title": "Tool", + "description": "Schema for the `Tool` type." + }, + "ToolList": { + "type": "object", + "properties": { + "tools": { + "type": "array", + "items": { + "$ref": "#/definitions/Tool" + }, + "description": "List of available built-in tools with metadata" + } + }, + "required": [ + "tools" + ], + "additionalProperties": false, + "description": "Built-in tools available for the requested model, with their parameters and instructions.", + "title": "ToolList" + }, + "ToolsListRequest": { + "type": "object", + "properties": { + "model": { + "type": "string", + "description": "Optional model ID — when provided, the returned tool list reflects model-specific overrides" + } + }, + "additionalProperties": false, + "description": "Optional model identifier whose tool overrides should be applied to the listing.", + "title": "ToolsListRequest" + }, + "UIElicitationArrayAnyOfField": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "array", + "description": "Type discriminator. Always \"array\"." + }, + "title": { + "type": "string", + "description": "Human-readable label for the field." + }, + "description": { + "type": "string", + "description": "Help text describing the field." + }, + "minItems": { + "type": "number", + "description": "Minimum number of items the user must select." + }, + "maxItems": { + "type": "number", + "description": "Maximum number of items the user may select." + }, + "items": { + "$ref": "#/definitions/UIElicitationArrayAnyOfFieldItems", + "description": "Schema applied to each item in the array." + }, + "default": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Default values selected when the form is first shown." + } + }, + "required": [ + "type", + "items" + ], + "additionalProperties": false, + "description": "Multi-select string field where each option pairs a value with a display label.", + "title": "UIElicitationArrayAnyOfField" + }, + "UIElicitationArrayAnyOfFieldItems": { + "type": "object", + "properties": { + "anyOf": { + "type": "array", + "items": { + "$ref": "#/definitions/UIElicitationArrayAnyOfFieldItemsAnyOf" + }, + "description": "Selectable options, each with a value and a display label." + } + }, + "required": [ + "anyOf" + ], + "additionalProperties": false, + "description": "Schema applied to each item in the array.", + "title": "UIElicitationArrayAnyOfFieldItems" + }, + "UIElicitationArrayAnyOfFieldItemsAnyOf": { + "type": "object", + "properties": { + "const": { + "type": "string", + "description": "Value submitted when this option is selected." + }, + "title": { + "type": "string", + "description": "Display label for this option." + } + }, + "required": [ + "const", + "title" + ], + "additionalProperties": false, + "title": "UIElicitationArrayAnyOfFieldItemsAnyOf", + "description": "Schema for the `UIElicitationArrayAnyOfFieldItemsAnyOf` type." + }, + "UIElicitationArrayEnumField": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "array", + "description": "Type discriminator. Always \"array\"." + }, + "title": { + "type": "string", + "description": "Human-readable label for the field." + }, + "description": { + "type": "string", + "description": "Help text describing the field." + }, + "minItems": { + "type": "number", + "description": "Minimum number of items the user must select." + }, + "maxItems": { + "type": "number", + "description": "Maximum number of items the user may select." + }, + "items": { + "$ref": "#/definitions/UIElicitationArrayEnumFieldItems", + "description": "Schema applied to each item in the array." + }, + "default": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Default values selected when the form is first shown." + } + }, + "required": [ + "type", + "items" + ], + "additionalProperties": false, + "description": "Multi-select string field whose allowed values are defined inline.", + "title": "UIElicitationArrayEnumField" + }, + "UIElicitationArrayEnumFieldItems": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "string", + "description": "Type discriminator. Always \"string\"." + }, + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed string values for each selected item." + } + }, + "required": [ + "type", + "enum" + ], + "additionalProperties": false, + "description": "Schema applied to each item in the array.", + "title": "UIElicitationArrayEnumFieldItems" + }, + "UIElicitationFieldValue": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "title": "UIElicitationFieldValue", + "description": "Schema for the `UIElicitationFieldValue` type." + }, + "UIElicitationRequest": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Message describing what information is needed from the user" + }, + "requestedSchema": { + "$ref": "#/definitions/UIElicitationSchema", + "description": "JSON Schema describing the form fields to present to the user" + } + }, + "required": [ + "message", + "requestedSchema" + ], + "additionalProperties": false, + "description": "Prompt message and JSON schema describing the form fields to elicit from the user.", + "title": "UIElicitationRequest" + }, + "UIElicitationResponse": { + "type": "object", + "properties": { + "action": { + "$ref": "#/definitions/UIElicitationResponseAction", + "description": "The user's response: accept (submitted), decline (rejected), or cancel (dismissed)" + }, + "content": { + "$ref": "#/definitions/UIElicitationResponseContent", + "description": "The form values submitted by the user (present when action is 'accept')" + } + }, + "required": [ + "action" + ], + "additionalProperties": false, + "description": "The elicitation response (accept with form values, decline, or cancel)", + "title": "UIElicitationResponse" + }, + "UIElicitationResponseAction": { + "type": "string", + "enum": [ + "accept", + "decline", + "cancel" + ], + "description": "The user's response: accept (submitted), decline (rejected), or cancel (dismissed)", + "title": "UIElicitationResponseAction" + }, + "UIElicitationResponseContent": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UIElicitationFieldValue" + }, + "description": "The form values submitted by the user (present when action is 'accept')", + "title": "UIElicitationResponseContent" + }, + "UIElicitationResult": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "description": "Whether the response was accepted. False if the request was already resolved by another client." + } + }, + "required": [ + "success" + ], + "additionalProperties": false, + "description": "Indicates whether the elicitation response was accepted; false if it was already resolved by another client.", + "title": "UIElicitationResult" + }, + "UIElicitationSchema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "object", + "description": "Schema type indicator (always 'object')" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UIElicitationSchemaProperty", + "description": "Definition for a single elicitation form field." + }, + "description": "Form field definitions, keyed by field name" + }, + "required": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of required field names" + } + }, + "required": [ + "type", + "properties" + ], + "additionalProperties": false, + "description": "JSON Schema describing the form fields to present to the user", + "title": "UIElicitationSchema" + }, + "UIElicitationSchemaProperty": { + "anyOf": [ + { + "$ref": "#/definitions/UIElicitationStringEnumField", + "description": "Single-select string field whose allowed values are defined inline." + }, + { + "$ref": "#/definitions/UIElicitationStringOneOfField", + "description": "Single-select string field where each option pairs a value with a display label." + }, + { + "$ref": "#/definitions/UIElicitationArrayEnumField", + "description": "Multi-select string field whose allowed values are defined inline." + }, + { + "$ref": "#/definitions/UIElicitationArrayAnyOfField", + "description": "Multi-select string field where each option pairs a value with a display label." + }, + { + "$ref": "#/definitions/UIElicitationSchemaPropertyBoolean", + "description": "Boolean field rendered as a yes/no toggle." + }, + { + "$ref": "#/definitions/UIElicitationSchemaPropertyString", + "description": "Free-text string field with optional length and format constraints." + }, + { + "$ref": "#/definitions/UIElicitationSchemaPropertyNumber", + "description": "Numeric field accepting either a number or an integer." + } + ], + "description": "Definition for a single elicitation form field.", + "title": "UIElicitationSchemaProperty" + }, + "UIElicitationSchemaPropertyBoolean": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "boolean", + "description": "Type discriminator. Always \"boolean\"." + }, + "title": { + "type": "string", + "description": "Human-readable label for the field." + }, + "description": { + "type": "string", + "description": "Help text describing the field." + }, + "default": { + "type": "boolean", + "description": "Default value selected when the form is first shown." + } + }, + "required": [ + "type" + ], + "additionalProperties": false, + "description": "Boolean field rendered as a yes/no toggle.", + "title": "UIElicitationSchemaPropertyBoolean" + }, + "UIElicitationSchemaPropertyNumber": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/UIElicitationSchemaPropertyNumberType", + "description": "Numeric type accepted by the field." + }, + "title": { + "type": "string", + "description": "Human-readable label for the field." + }, + "description": { + "type": "string", + "description": "Help text describing the field." + }, + "minimum": { + "type": "number", + "description": "Minimum allowed value (inclusive)." + }, + "maximum": { + "type": "number", + "description": "Maximum allowed value (inclusive)." + }, + "default": { + "type": "number", + "description": "Default value populated in the input when the form is first shown." + } + }, + "required": [ + "type" + ], + "additionalProperties": false, + "description": "Numeric field accepting either a number or an integer.", + "title": "UIElicitationSchemaPropertyNumber" + }, + "UIElicitationSchemaPropertyNumberType": { + "type": "string", + "enum": [ + "number", + "integer" + ], + "description": "Numeric type accepted by the field.", + "title": "UIElicitationSchemaPropertyNumberType" + }, + "UIElicitationSchemaPropertyString": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "string", + "description": "Type discriminator. Always \"string\"." + }, + "title": { + "type": "string", + "description": "Human-readable label for the field." + }, + "description": { + "type": "string", + "description": "Help text describing the field." + }, + "minLength": { + "type": "number", + "description": "Minimum number of characters required." + }, + "maxLength": { + "type": "number", + "description": "Maximum number of characters allowed." + }, + "format": { + "$ref": "#/definitions/UIElicitationSchemaPropertyStringFormat", + "description": "Optional format hint that constrains the accepted input." + }, + "default": { + "type": "string", + "description": "Default value populated in the input when the form is first shown." + } + }, + "required": [ + "type" + ], + "additionalProperties": false, + "description": "Free-text string field with optional length and format constraints.", + "title": "UIElicitationSchemaPropertyString" + }, + "UIElicitationSchemaPropertyStringFormat": { + "type": "string", + "enum": [ + "email", + "uri", + "date", + "date-time" + ], + "description": "Optional format hint that constrains the accepted input.", + "title": "UIElicitationSchemaPropertyStringFormat" + }, + "UIElicitationStringEnumField": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "string", + "description": "Type discriminator. Always \"string\"." + }, + "title": { + "type": "string", + "description": "Human-readable label for the field." + }, + "description": { + "type": "string", + "description": "Help text describing the field." + }, + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed string values." + }, + "enumNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional display labels for each enum value, in the same order as `enum`." + }, + "default": { + "type": "string", + "description": "Default value selected when the form is first shown." + } + }, + "required": [ + "type", + "enum" + ], + "additionalProperties": false, + "description": "Single-select string field whose allowed values are defined inline.", + "title": "UIElicitationStringEnumField" + }, + "UIElicitationStringOneOfField": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "string", + "description": "Type discriminator. Always \"string\"." + }, + "title": { + "type": "string", + "description": "Human-readable label for the field." + }, + "description": { + "type": "string", + "description": "Help text describing the field." + }, + "oneOf": { + "type": "array", + "items": { + "$ref": "#/definitions/UIElicitationStringOneOfFieldOneOf" + }, + "description": "Selectable options, each with a value and a display label." + }, + "default": { + "type": "string", + "description": "Default value selected when the form is first shown." + } + }, + "required": [ + "type", + "oneOf" + ], + "additionalProperties": false, + "description": "Single-select string field where each option pairs a value with a display label.", + "title": "UIElicitationStringOneOfField" + }, + "UIElicitationStringOneOfFieldOneOf": { + "type": "object", + "properties": { + "const": { + "type": "string", + "description": "Value submitted when this option is selected." + }, + "title": { + "type": "string", + "description": "Display label for this option." + } + }, + "required": [ + "const", + "title" + ], + "additionalProperties": false, + "title": "UIElicitationStringOneOfFieldOneOf", + "description": "Schema for the `UIElicitationStringOneOfFieldOneOf` type." + }, + "UIHandlePendingElicitationRequest": { + "type": "object", + "properties": { + "requestId": { + "type": "string", + "description": "The unique request ID from the elicitation.requested event" + }, + "result": { + "$ref": "#/definitions/UIElicitationResponse", + "description": "The elicitation response (accept with form values, decline, or cancel)" + } + }, + "required": [ + "requestId", + "result" + ], + "additionalProperties": false, + "description": "Pending elicitation request ID and the user's response (accept/decline/cancel + form values).", + "title": "UIHandlePendingElicitationRequest" + }, + "UsageGetMetricsResult": { + "type": "object", + "properties": { + "totalPremiumRequestCost": { + "type": "number", + "description": "Total user-initiated premium request cost across all models (may be fractional due to multipliers)" + }, + "totalUserRequests": { + "type": "integer", + "minimum": 0, + "description": "Raw count of user-initiated API requests" + }, + "totalNanoAiu": { + "type": "integer", + "minimum": 0, + "description": "Session-wide accumulated nano-AI units cost" + }, + "tokenDetails": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UsageMetricsTokenDetail" + }, + "description": "Session-wide per-token-type accumulated token counts" + }, + "totalApiDurationMs": { + "type": "number", + "minimum": 0, + "description": "Total time spent in model API calls (milliseconds)", + "format": "duration" + }, + "sessionStartTime": { + "type": "integer", + "description": "Session start timestamp (epoch milliseconds)" + }, + "codeChanges": { + "$ref": "#/definitions/UsageMetricsCodeChanges", + "description": "Aggregated code change metrics" + }, + "modelMetrics": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UsageMetricsModelMetric" + }, + "description": "Per-model token and request metrics, keyed by model identifier" + }, + "currentModel": { + "type": "string", + "description": "Currently active model identifier" + }, + "lastCallInputTokens": { + "type": "integer", + "minimum": 0, + "description": "Input tokens from the most recent main-agent API call" + }, + "lastCallOutputTokens": { + "type": "integer", + "minimum": 0, + "description": "Output tokens from the most recent main-agent API call" + } + }, + "required": [ + "totalPremiumRequestCost", + "totalUserRequests", + "totalApiDurationMs", + "sessionStartTime", + "codeChanges", + "modelMetrics", + "lastCallInputTokens", + "lastCallOutputTokens" + ], + "additionalProperties": false, + "description": "Accumulated session usage metrics, including premium request cost, token counts, model breakdown, and code-change totals.", + "title": "UsageGetMetricsResult" + }, + "UsageMetricsCodeChanges": { + "type": "object", + "properties": { + "linesAdded": { + "type": "integer", + "description": "Total lines of code added" + }, + "linesRemoved": { + "type": "integer", + "description": "Total lines of code removed" + }, + "filesModifiedCount": { + "type": "integer", + "description": "Number of distinct files modified" + } + }, + "required": [ + "linesAdded", + "linesRemoved", + "filesModifiedCount" + ], + "additionalProperties": false, + "description": "Aggregated code change metrics", + "title": "UsageMetricsCodeChanges" + }, + "UsageMetricsModelMetric": { + "type": "object", + "properties": { + "requests": { + "$ref": "#/definitions/UsageMetricsModelMetricRequests", + "description": "Request count and cost metrics for this model" + }, + "usage": { + "$ref": "#/definitions/UsageMetricsModelMetricUsage", + "description": "Token usage metrics for this model" + }, + "totalNanoAiu": { + "type": "integer", + "minimum": 0, + "description": "Accumulated nano-AI units cost for this model" + }, + "tokenDetails": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UsageMetricsModelMetricTokenDetail" + }, + "description": "Token count details per type" + } + }, + "required": [ + "requests", + "usage" + ], + "additionalProperties": false, + "title": "UsageMetricsModelMetric", + "description": "Schema for the `UsageMetricsModelMetric` type." + }, + "UsageMetricsModelMetricRequests": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Number of API requests made with this model" + }, + "cost": { + "type": "number", + "description": "User-initiated premium request cost (with multiplier applied)" + } + }, + "required": [ + "count", + "cost" + ], + "additionalProperties": false, + "description": "Request count and cost metrics for this model", + "title": "UsageMetricsModelMetricRequests" + }, + "UsageMetricsModelMetricTokenDetail": { + "type": "object", + "properties": { + "tokenCount": { + "type": "integer", + "minimum": 0, + "description": "Accumulated token count for this token type" + } + }, + "required": [ + "tokenCount" + ], + "additionalProperties": false, + "title": "UsageMetricsModelMetricTokenDetail", + "description": "Schema for the `UsageMetricsModelMetricTokenDetail` type." + }, + "UsageMetricsModelMetricUsage": { + "type": "object", + "properties": { + "inputTokens": { + "type": "integer", + "minimum": 0, + "description": "Total input tokens consumed" + }, + "outputTokens": { + "type": "integer", + "minimum": 0, + "description": "Total output tokens produced" + }, + "cacheReadTokens": { + "type": "integer", + "minimum": 0, + "description": "Total tokens read from prompt cache" + }, + "cacheWriteTokens": { + "type": "integer", + "minimum": 0, + "description": "Total tokens written to prompt cache" + }, + "reasoningTokens": { + "type": "integer", + "minimum": 0, + "description": "Total output tokens used for reasoning" + } + }, + "required": [ + "inputTokens", + "outputTokens", + "cacheReadTokens", + "cacheWriteTokens" + ], + "additionalProperties": false, + "description": "Token usage metrics for this model", + "title": "UsageMetricsModelMetricUsage" + }, + "UsageMetricsTokenDetail": { + "type": "object", + "properties": { + "tokenCount": { + "type": "integer", + "minimum": 0, + "description": "Accumulated token count for this token type" + } + }, + "required": [ + "tokenCount" + ], + "additionalProperties": false, + "title": "UsageMetricsTokenDetail", + "description": "Schema for the `UsageMetricsTokenDetail` type." + }, + "WorkspacesCreateFileRequest": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Relative path within the workspace files directory" + }, + "content": { + "type": "string", + "description": "File content to write as a UTF-8 string" + } + }, + "required": [ + "path", + "content" + ], + "additionalProperties": false, + "description": "Relative path and UTF-8 content for the workspace file to create or overwrite.", + "title": "WorkspacesCreateFileRequest" + }, + "WorkspacesGetWorkspaceResult": { + "type": "object", + "properties": { + "workspace": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "cwd": { + "type": "string" + }, + "git_root": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "host_type": { + "type": "string", + "enum": [ + "github", + "ado" + ] + }, + "branch": { + "type": "string" + }, + "name": { + "type": "string" + }, + "user_named": { + "type": "boolean" + }, + "summary_count": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "remote_steerable": { + "type": "boolean" + }, + "mc_task_id": { + "type": "string" + }, + "mc_session_id": { + "type": "string" + }, + "mc_last_event_id": { + "type": "string" + }, + "chronicle_sync_dismissed": { + "type": "boolean" + } + }, + "required": [ + "id" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "Current workspace metadata, or null if not available" + } + }, + "required": [ + "workspace" + ], + "additionalProperties": false, + "description": "Current workspace metadata for the session, or null when not available.", + "title": "WorkspacesGetWorkspaceResult" + }, + "WorkspacesListFilesResult": { + "type": "object", + "properties": { + "files": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Relative file paths in the workspace files directory" + } + }, + "required": [ + "files" + ], + "additionalProperties": false, + "description": "Relative paths of files stored in the session workspace files directory.", + "title": "WorkspacesListFilesResult" + }, + "WorkspacesReadFileRequest": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Relative path within the workspace files directory" + } + }, + "required": [ + "path" + ], + "additionalProperties": false, + "description": "Relative path of the workspace file to read.", + "title": "WorkspacesReadFileRequest" + }, + "WorkspacesReadFileResult": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "File content as a UTF-8 string" + } + }, + "required": [ + "content" + ], + "additionalProperties": false, + "description": "Contents of the requested workspace file as a UTF-8 string.", + "title": "WorkspacesReadFileResult" + } + } +} diff --git a/nodejs/src/generated/rpc.ts b/nodejs/src/generated/rpc.ts index 9160fff57..72204aa89 100644 --- a/nodejs/src/generated/rpc.ts +++ b/nodejs/src/generated/rpc.ts @@ -97,15 +97,30 @@ export type ExternalToolTextResultForLlmContentResourceLinkIconTheme = "light" | export type ExternalToolTextResultForLlmContentResourceDetails = | EmbeddedTextResourceContents | EmbeddedBlobResourceContents; - +/** + * Content filtering mode to apply to all tools, or a map of tool name to content filtering mode. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "FilterMapping". + */ export type FilterMapping = | { [k: string]: FilterMappingValue; } | FilterMappingString; - +/** + * Allowed values for the `FilterMappingValue` enumeration. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "FilterMappingValue". + */ export type FilterMappingValue = "none" | "markdown" | "hidden_characters"; - +/** + * Allowed values for the `FilterMappingString` enumeration. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "FilterMappingString". + */ export type FilterMappingString = "none" | "markdown" | "hidden_characters"; /** * Category of instruction source — used for merge logic @@ -135,7 +150,12 @@ export type SessionLogLevel = "info" | "warning" | "error"; * via the `definition` "McpServerConfig". */ export type McpServerConfig = McpServerConfigLocal | McpServerConfigHttp; - +/** + * Local transport type. Defaults to "local". + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpServerConfigLocalType". + */ export type McpServerConfigLocalType = "local" | "stdio"; /** * Remote transport type. Defaults to "http" when omitted. @@ -144,7 +164,12 @@ export type McpServerConfigLocalType = "local" | "stdio"; * via the `definition` "McpServerConfigHttpType". */ export type McpServerConfigHttpType = "http" | "sse"; - +/** + * OAuth grant type to use when authenticating to the remote MCP server. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpServerConfigHttpOauthGrantType". + */ export type McpServerConfigHttpOauthGrantType = "authorization_code" | "client_credentials"; /** * Connection status: connected, failed, needs-auth, pending, disabled, or not_configured @@ -174,6 +199,13 @@ export type ModelPickerCategory = "lightweight" | "versatile" | "powerful"; * via the `definition` "ModelPickerPriceCategory". */ export type ModelPickerPriceCategory = "low" | "medium" | "high" | "very_high"; +/** + * Reasoning summary mode to request for supported model clients + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ReasoningSummary". + */ +export type ReasoningSummary = "none" | "concise" | "detailed"; /** * The agent mode. Valid values: "interactive", "plan", "autopilot". * @@ -181,7 +213,12 @@ export type ModelPickerPriceCategory = "low" | "medium" | "high" | "very_high"; * via the `definition` "SessionMode". */ export type SessionMode = "interactive" | "plan" | "autopilot"; - +/** + * Decision to apply to a pending permission request. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecision". + */ export type PermissionDecision = | PermissionDecisionApproveOnce | PermissionDecisionApproveForSession @@ -222,7 +259,7 @@ export type PermissionDecisionApproveForLocationApproval = | PermissionDecisionApproveForLocationApprovalExtensionManagement | PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess; /** - * Per-session remote mode. "off" disables remote, "export" exports session events to Mission Control without enabling remote steering, "on" enables both export and remote steering. + * Per-session remote mode. "off" disables remote, "export" exports session events to GitHub without enabling remote steering, "on" enables both export and remote steering. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "RemoteSessionMode". @@ -249,6 +286,13 @@ export type SessionFsReaddirWithTypesEntryType = "file" | "directory"; * via the `definition` "SessionFsSetProviderConventions". */ export type SessionFsSetProviderConventions = "windows" | "posix"; +/** + * How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected) + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsSqliteQueryType". + */ +export type SessionFsSqliteQueryType = "exec" | "query" | "run"; /** * Signal to send (default: SIGTERM) * @@ -263,7 +307,12 @@ export type ShellKillSignal = "SIGTERM" | "SIGKILL" | "SIGINT"; * via the `definition` "SlashCommandAgentPromptMode". */ export type SlashCommandAgentPromptMode = "interactive" | "plan" | "autopilot"; - +/** + * Result of invoking the slash command (text output, prompt to send to the agent, or completion). + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SlashCommandInvocationResult". + */ export type SlashCommandInvocationResult = | SlashCommandTextResult | SlashCommandAgentPromptResult @@ -282,7 +331,12 @@ export type TaskAgentInfoStatus = "running" | "idle" | "completed" | "failed" | * via the `definition` "TaskAgentInfoExecutionMode". */ export type TaskAgentInfoExecutionMode = "sync" | "background"; - +/** + * Schema for the `TaskInfo` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TaskInfo". + */ export type TaskInfo = TaskAgentInfo | TaskShellInfo; /** * Current lifecycle status of the task @@ -305,9 +359,19 @@ export type TaskShellInfoAttachmentMode = "attached" | "detached"; * via the `definition` "TaskShellInfoExecutionMode". */ export type TaskShellInfoExecutionMode = "sync" | "background"; - +/** + * Schema for the `UIElicitationFieldValue` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationFieldValue". + */ export type UIElicitationFieldValue = string | number | boolean | string[]; - +/** + * Definition for a single elicitation form field. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationSchemaProperty". + */ export type UIElicitationSchemaProperty = | UIElicitationStringEnumField | UIElicitationStringOneOfField @@ -316,9 +380,19 @@ export type UIElicitationSchemaProperty = | UIElicitationSchemaPropertyBoolean | UIElicitationSchemaPropertyString | UIElicitationSchemaPropertyNumber; - +/** + * Optional format hint that constrains the accepted input. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationSchemaPropertyStringFormat". + */ export type UIElicitationSchemaPropertyStringFormat = "email" | "uri" | "date" | "date-time"; - +/** + * Numeric type accepted by the field. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationSchemaPropertyNumberType". + */ export type UIElicitationSchemaPropertyNumberType = "number" | "integer"; /** * The user's response: accept (submitted), decline (rejected), or cancel (dismissed) @@ -334,7 +408,12 @@ export interface AccountGetQuotaRequest { */ gitHubToken?: string; } - +/** + * Quota usage snapshots for the resolved user, keyed by quota type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "AccountGetQuotaResult". + */ export interface AccountGetQuotaResult { /** * Quota snapshots keyed by type (e.g., chat, completions, premium_interactions) @@ -343,7 +422,12 @@ export interface AccountGetQuotaResult { [k: string]: AccountQuotaSnapshot; }; } - +/** + * Schema for the `AccountQuotaSnapshot` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "AccountQuotaSnapshot". + */ export interface AccountQuotaSnapshot { /** * Whether the user has an unlimited usage entitlement @@ -378,7 +462,12 @@ export interface AccountQuotaSnapshot { */ resetDate?: string; } - +/** + * The currently selected custom agent, or null when using the default agent. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "AgentGetCurrentResult". + */ /** @experimental */ export interface AgentGetCurrentResult { /** @@ -386,7 +475,12 @@ export interface AgentGetCurrentResult { */ agent?: AgentInfo | null; } - +/** + * Schema for the `AgentInfo` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "AgentInfo". + */ export interface AgentInfo { /** * Unique identifier of the custom agent @@ -405,7 +499,12 @@ export interface AgentInfo { */ path?: string; } - +/** + * Custom agents available to the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "AgentList". + */ /** @experimental */ export interface AgentList { /** @@ -413,7 +512,12 @@ export interface AgentList { */ agents: AgentInfo[]; } - +/** + * Custom agents available to the session after reloading definitions from disk. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "AgentReloadResult". + */ /** @experimental */ export interface AgentReloadResult { /** @@ -421,7 +525,12 @@ export interface AgentReloadResult { */ agents: AgentInfo[]; } - +/** + * Name of the custom agent to select for subsequent turns. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "AgentSelectRequest". + */ /** @experimental */ export interface AgentSelectRequest { /** @@ -429,19 +538,34 @@ export interface AgentSelectRequest { */ name: string; } - +/** + * The newly selected custom agent. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "AgentSelectResult". + */ /** @experimental */ export interface AgentSelectResult { agent: AgentInfo; } - +/** + * Slash commands available in the session, after applying any include/exclude filters. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "CommandList". + */ export interface CommandList { /** * Commands available in this session */ commands: SlashCommandInfo[]; } - +/** + * Schema for the `SlashCommandInfo` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SlashCommandInfo". + */ export interface SlashCommandInfo { /** * Canonical command name without a leading slash @@ -487,7 +611,12 @@ export interface SlashCommandInput { */ preserveMultilineInput?: boolean; } - +/** + * Pending command request ID and an optional error if the client handler failed. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "CommandsHandlePendingCommandRequest". + */ export interface CommandsHandlePendingCommandRequest { /** * Request ID from the command invocation event @@ -498,14 +627,24 @@ export interface CommandsHandlePendingCommandRequest { */ error?: string; } - +/** + * Indicates whether the pending client-handled command was completed successfully. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "CommandsHandlePendingCommandResult". + */ export interface CommandsHandlePendingCommandResult { /** * Whether the command was handled successfully */ success: boolean; } - +/** + * Slash command name and optional raw input string to invoke. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "CommandsInvokeRequest". + */ export interface CommandsInvokeRequest { /** * Command name. Leading slashes are stripped and the name is matched case-insensitively. @@ -516,7 +655,12 @@ export interface CommandsInvokeRequest { */ input?: string; } - +/** + * Optional filters controlling which command sources to include in the listing. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "CommandsListRequest". + */ export interface CommandsListRequest { /** * Include runtime built-in commands @@ -531,7 +675,12 @@ export interface CommandsListRequest { */ includeClientCommands?: boolean; } - +/** + * Queued command request ID and the result indicating whether the client handled it. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "CommandsRespondToQueuedCommandRequest". + */ export interface CommandsRespondToQueuedCommandRequest { /** * Request ID from the queued command event @@ -539,7 +688,12 @@ export interface CommandsRespondToQueuedCommandRequest { requestId: string; result: QueuedCommandResult; } - +/** + * Schema for the `QueuedCommandHandled` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "QueuedCommandHandled". + */ export interface QueuedCommandHandled { /** * The command was handled @@ -550,21 +704,36 @@ export interface QueuedCommandHandled { */ stopProcessingQueue?: boolean; } - +/** + * Schema for the `QueuedCommandNotHandled` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "QueuedCommandNotHandled". + */ export interface QueuedCommandNotHandled { /** * The command was not handled */ handled: false; } - +/** + * Indicates whether the queued-command response was accepted by the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "CommandsRespondToQueuedCommandResult". + */ export interface CommandsRespondToQueuedCommandResult { /** * Whether the response was accepted (false if the requestId was not found or already resolved) */ success: boolean; } - +/** + * Optional connection token presented by the SDK client during the handshake. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ConnectRequest". + */ /** @internal */ export interface ConnectRequest { /** @@ -572,7 +741,12 @@ export interface ConnectRequest { */ token?: string; } - +/** + * Handshake result reporting the server's protocol version and package version on success. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ConnectResult". + */ /** @internal */ export interface ConnectResult { /** @@ -588,14 +762,24 @@ export interface ConnectResult { */ version: string; } - +/** + * The currently selected model for the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "CurrentModel". + */ export interface CurrentModel { /** * Currently active model identifier */ modelId?: string; } - +/** + * Schema for the `DiscoveredMcpServer` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "DiscoveredMcpServer". + */ export interface DiscoveredMcpServer { /** * Server name (config key) @@ -608,7 +792,12 @@ export interface DiscoveredMcpServer { */ enabled: boolean; } - +/** + * Schema for the `EmbeddedBlobResourceContents` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "EmbeddedBlobResourceContents". + */ export interface EmbeddedBlobResourceContents { /** * URI identifying the resource @@ -623,7 +812,12 @@ export interface EmbeddedBlobResourceContents { */ blob: string; } - +/** + * Schema for the `EmbeddedTextResourceContents` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "EmbeddedTextResourceContents". + */ export interface EmbeddedTextResourceContents { /** * URI identifying the resource @@ -638,7 +832,12 @@ export interface EmbeddedTextResourceContents { */ text: string; } - +/** + * Schema for the `Extension` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "Extension". + */ export interface Extension { /** * Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper') @@ -655,7 +854,12 @@ export interface Extension { */ pid?: number; } - +/** + * Extensions discovered for the session, with their current status. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ExtensionList". + */ /** @experimental */ export interface ExtensionList { /** @@ -663,7 +867,12 @@ export interface ExtensionList { */ extensions: Extension[]; } - +/** + * Source-qualified extension identifier to disable for the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ExtensionsDisableRequest". + */ /** @experimental */ export interface ExtensionsDisableRequest { /** @@ -671,7 +880,12 @@ export interface ExtensionsDisableRequest { */ id: string; } - +/** + * Source-qualified extension identifier to enable for the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ExtensionsEnableRequest". + */ /** @experimental */ export interface ExtensionsEnableRequest { /** @@ -868,7 +1082,12 @@ export interface ExternalToolTextResultForLlmContentResource { type: "resource"; resource: ExternalToolTextResultForLlmContentResourceDetails; } - +/** + * Optional user prompt to combine with the fleet orchestration instructions. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "FleetStartRequest". + */ /** @experimental */ export interface FleetStartRequest { /** @@ -876,7 +1095,12 @@ export interface FleetStartRequest { */ prompt?: string; } - +/** + * Indicates whether fleet mode was successfully activated. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "FleetStartResult". + */ /** @experimental */ export interface FleetStartResult { /** @@ -884,7 +1108,12 @@ export interface FleetStartResult { */ started: boolean; } - +/** + * Pending external tool call request ID, with the tool result or an error describing why it failed. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "HandlePendingToolCallRequest". + */ export interface HandlePendingToolCallRequest { /** * Request ID of the pending tool call @@ -896,7 +1125,12 @@ export interface HandlePendingToolCallRequest { */ error?: string; } - +/** + * Indicates whether the external tool call result was handled successfully. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "HandlePendingToolCallResult". + */ export interface HandlePendingToolCallResult { /** * Whether the tool call result was handled successfully @@ -935,7 +1169,12 @@ export interface HistoryCompactContextWindow { */ toolDefinitionsTokens?: number; } - +/** + * Compaction outcome with the number of tokens and messages removed and the resulting context window breakdown. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "HistoryCompactResult". + */ /** @experimental */ export interface HistoryCompactResult { /** @@ -952,7 +1191,12 @@ export interface HistoryCompactResult { messagesRemoved: number; contextWindow?: HistoryCompactContextWindow; } - +/** + * Identifier of the event to truncate to; this event and all later events are removed. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "HistoryTruncateRequest". + */ /** @experimental */ export interface HistoryTruncateRequest { /** @@ -960,7 +1204,12 @@ export interface HistoryTruncateRequest { */ eventId: string; } - +/** + * Number of events that were removed by the truncation. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "HistoryTruncateResult". + */ /** @experimental */ export interface HistoryTruncateResult { /** @@ -968,14 +1217,24 @@ export interface HistoryTruncateResult { */ eventsRemoved: number; } - +/** + * Instruction sources loaded for the session, in merge order. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "InstructionsGetSourcesResult". + */ export interface InstructionsGetSourcesResult { /** * Instruction sources for the session */ sources: InstructionsSources[]; } - +/** + * Schema for the `InstructionsSources` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "InstructionsSources". + */ export interface InstructionsSources { /** * Unique identifier for this source (used for toggling) @@ -1004,9 +1263,14 @@ export interface InstructionsSources { */ description?: string; } - -export interface LogRequest { - /** +/** + * Message text, optional severity level, persistence flag, and optional follow-up URL. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "LogRequest". + */ +export interface LogRequest { + /** * Human-readable message */ message: string; @@ -1020,14 +1284,24 @@ export interface LogRequest { */ url?: string; } - +/** + * Identifier of the session event that was emitted for the log message. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "LogResult". + */ export interface LogResult { /** * The unique identifier of the emitted session event */ eventId: string; } - +/** + * MCP server name and configuration to add to user configuration. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpConfigAddRequest". + */ export interface McpConfigAddRequest { /** * Unique name for the MCP server @@ -1035,62 +1309,117 @@ export interface McpConfigAddRequest { name: string; config: McpServerConfig; } - +/** + * Local MCP server configuration launched as a child process. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpServerConfigLocal". + */ export interface McpServerConfigLocal { /** * Tools to include. Defaults to all tools if not specified. */ tools?: string[]; type?: McpServerConfigLocalType; + /** + * Whether this server is a built-in fallback used when the user has not configured their own server. + */ isDefaultServer?: boolean; filterMapping?: FilterMapping; /** * Timeout in milliseconds for tool calls to this server. */ timeout?: number; + /** + * Executable command used to start the local MCP server process. + */ command: string; + /** + * Command-line arguments passed to the local MCP server process. + */ args: string[]; + /** + * Working directory for the local MCP server process. + */ cwd?: string; + /** + * Environment variables to pass to the local MCP server process. + */ env?: { [k: string]: string; }; } - +/** + * Remote MCP server configuration accessed over HTTP or SSE. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpServerConfigHttp". + */ export interface McpServerConfigHttp { /** * Tools to include. Defaults to all tools if not specified. */ tools?: string[]; type?: McpServerConfigHttpType; + /** + * Whether this server is a built-in fallback used when the user has not configured their own server. + */ isDefaultServer?: boolean; filterMapping?: FilterMapping; /** * Timeout in milliseconds for tool calls to this server. */ timeout?: number; + /** + * URL of the remote MCP server endpoint. + */ url: string; + /** + * HTTP headers to include in requests to the remote MCP server. + */ headers?: { [k: string]: string; }; + /** + * OAuth client ID for a pre-registered remote MCP OAuth client. + */ oauthClientId?: string; + /** + * Whether the configured OAuth client is public and does not require a client secret. + */ oauthPublicClient?: boolean; oauthGrantType?: McpServerConfigHttpOauthGrantType; } - +/** + * MCP server names to disable for new sessions. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpConfigDisableRequest". + */ export interface McpConfigDisableRequest { /** * 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[]; } - +/** + * MCP server names to enable for new sessions. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpConfigEnableRequest". + */ export interface McpConfigEnableRequest { /** * 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[]; } - +/** + * User-configured MCP servers, keyed by server name. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpConfigList". + */ export interface McpConfigList { /** * All MCP servers from user config, keyed by name @@ -1099,14 +1428,24 @@ export interface McpConfigList { [k: string]: McpServerConfig; }; } - +/** + * MCP server name to remove from user configuration. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpConfigRemoveRequest". + */ export interface McpConfigRemoveRequest { /** * Name of the MCP server to remove */ name: string; } - +/** + * MCP server name and replacement configuration to write to user configuration. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpConfigUpdateRequest". + */ export interface McpConfigUpdateRequest { /** * Name of the MCP server to update @@ -1114,7 +1453,12 @@ export interface McpConfigUpdateRequest { name: string; config: McpServerConfig; } - +/** + * Name of the MCP server to disable for the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpDisableRequest". + */ /** @experimental */ export interface McpDisableRequest { /** @@ -1122,21 +1466,36 @@ export interface McpDisableRequest { */ serverName: string; } - +/** + * Optional working directory used as context for MCP server discovery. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpDiscoverRequest". + */ export interface McpDiscoverRequest { /** * Working directory used as context for discovery (e.g., plugin resolution) */ workingDirectory?: string; } - +/** + * MCP servers discovered from user, workspace, plugin, and built-in sources. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpDiscoverResult". + */ export interface McpDiscoverResult { /** * MCP servers discovered from all sources */ servers: DiscoveredMcpServer[]; } - +/** + * Name of the MCP server to enable for the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpEnableRequest". + */ /** @experimental */ export interface McpEnableRequest { /** @@ -1144,7 +1503,12 @@ export interface McpEnableRequest { */ serverName: string; } - +/** + * Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, and the callback success-page copy. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpOauthLoginRequest". + */ /** @experimental */ export interface McpOauthLoginRequest { /** @@ -1164,7 +1528,12 @@ export interface McpOauthLoginRequest { */ callbackSuccessMessage?: string; } - +/** + * OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpOauthLoginResult". + */ /** @experimental */ export interface McpOauthLoginResult { /** @@ -1172,7 +1541,12 @@ export interface McpOauthLoginResult { */ authorizationUrl?: string; } - +/** + * Schema for the `McpServer` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpServer". + */ export interface McpServer { /** * Server name (config key) @@ -1185,7 +1559,12 @@ export interface McpServer { */ error?: string; } - +/** + * MCP servers configured for the session, with their connection status. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpServerList". + */ /** @experimental */ export interface McpServerList { /** @@ -1193,7 +1572,12 @@ export interface McpServerList { */ servers: McpServer[]; } - +/** + * Schema for the `Model` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "Model". + */ export interface Model { /** * Model identifier (e.g., "claude-sonnet-4.5") @@ -1354,7 +1738,13 @@ export interface ModelCapabilitiesOverride { * via the `definition` "ModelCapabilitiesOverrideSupports". */ export interface ModelCapabilitiesOverrideSupports { + /** + * Whether this model supports vision/image input + */ vision?: boolean; + /** + * Whether this model supports reasoning effort configuration + */ reasoningEffort?: boolean; } /** @@ -1364,7 +1754,13 @@ export interface ModelCapabilitiesOverrideSupports { * via the `definition` "ModelCapabilitiesOverrideLimits". */ export interface ModelCapabilitiesOverrideLimits { + /** + * Maximum number of prompt/input tokens + */ max_prompt_tokens?: number; + /** + * Maximum number of output/completion tokens + */ max_output_tokens?: number; /** * Maximum total context window size in tokens @@ -1372,7 +1768,12 @@ export interface ModelCapabilitiesOverrideLimits { max_context_window_tokens?: number; vision?: ModelCapabilitiesOverrideLimitsVision; } - +/** + * Vision-specific limits + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ModelCapabilitiesOverrideLimitsVision". + */ export interface ModelCapabilitiesOverrideLimitsVision { /** * MIME types the model accepts @@ -1387,7 +1788,12 @@ export interface ModelCapabilitiesOverrideLimitsVision { */ max_prompt_image_size?: number; } - +/** + * List of Copilot models available to the resolved user, including capabilities and billing metadata. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ModelList". + */ export interface ModelList { /** * List of available models with full metadata @@ -1401,51 +1807,87 @@ export interface ModelsListRequest { */ gitHubToken?: string; } - +/** + * Target model identifier and optional reasoning effort, summary, and capability overrides. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ModelSwitchToRequest". + */ export interface ModelSwitchToRequest { /** * Model identifier to switch to */ modelId: string; /** - * Reasoning effort level to use for the model + * Reasoning effort level to use for the model. "none" disables reasoning. */ reasoningEffort?: string; + reasoningSummary?: ReasoningSummary; modelCapabilities?: ModelCapabilitiesOverride; } - +/** + * The model identifier active on the session after the switch. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ModelSwitchToResult". + */ export interface ModelSwitchToResult { /** * Currently active model identifier after the switch */ modelId?: string; } - +/** + * Agent interaction mode to apply to the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ModeSetRequest". + */ export interface ModeSetRequest { mode: SessionMode; } - +/** + * The session's friendly name, or null when not yet set. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "NameGetResult". + */ export interface NameGetResult { /** * The session name (user-set or auto-generated), or null if not yet set */ name: string | null; } - +/** + * New friendly name to apply to the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "NameSetRequest". + */ export interface NameSetRequest { /** * New session name (1–100 characters, trimmed of leading/trailing whitespace) */ name: string; } - +/** + * Schema for the `PermissionDecisionApproveOnce` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveOnce". + */ export interface PermissionDecisionApproveOnce { /** * The permission request was approved for this one instance */ kind: "approve-once"; } - +/** + * Schema for the `PermissionDecisionApproveForSession` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForSession". + */ export interface PermissionDecisionApproveForSession { /** * Approved and remembered for the rest of the session @@ -1457,50 +1899,148 @@ export interface PermissionDecisionApproveForSession { */ domain?: string; } - +/** + * Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForSessionApprovalCommands". + */ export interface PermissionDecisionApproveForSessionApprovalCommands { + /** + * Approval scoped to specific command identifiers. + */ kind: "commands"; + /** + * Command identifiers covered by this approval. + */ commandIdentifiers: string[]; } - +/** + * Schema for the `PermissionDecisionApproveForSessionApprovalRead` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForSessionApprovalRead". + */ export interface PermissionDecisionApproveForSessionApprovalRead { + /** + * Approval covering read-only filesystem operations. + */ kind: "read"; } - +/** + * Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForSessionApprovalWrite". + */ export interface PermissionDecisionApproveForSessionApprovalWrite { + /** + * Approval covering filesystem write operations. + */ kind: "write"; } - +/** + * Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForSessionApprovalMcp". + */ export interface PermissionDecisionApproveForSessionApprovalMcp { + /** + * Approval covering an MCP tool. + */ kind: "mcp"; + /** + * MCP server name. + */ serverName: string; + /** + * MCP tool name, or null to cover every tool on the server. + */ toolName: string | null; } - +/** + * Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForSessionApprovalMcpSampling". + */ export interface PermissionDecisionApproveForSessionApprovalMcpSampling { + /** + * Approval covering MCP sampling requests for a server. + */ kind: "mcp-sampling"; + /** + * MCP server name. + */ serverName: string; } - +/** + * Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForSessionApprovalMemory". + */ export interface PermissionDecisionApproveForSessionApprovalMemory { + /** + * Approval covering writes to long-term memory. + */ kind: "memory"; } - +/** + * Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForSessionApprovalCustomTool". + */ export interface PermissionDecisionApproveForSessionApprovalCustomTool { + /** + * Approval covering a custom tool. + */ kind: "custom-tool"; + /** + * Custom tool name. + */ toolName: string; } - +/** + * Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForSessionApprovalExtensionManagement". + */ export interface PermissionDecisionApproveForSessionApprovalExtensionManagement { + /** + * Approval covering extension lifecycle operations such as enable, disable, or reload. + */ kind: "extension-management"; + /** + * Optional operation identifier; when omitted, the approval covers all extension management operations. + */ operation?: string; } - +/** + * Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess". + */ export interface PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess { + /** + * Approval covering an extension's request to access a permission-gated capability. + */ kind: "extension-permission-access"; + /** + * Extension name. + */ extensionName: string; } - +/** + * Schema for the `PermissionDecisionApproveForLocation` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForLocation". + */ export interface PermissionDecisionApproveForLocation { /** * Approved and persisted for this project location @@ -1512,50 +2052,148 @@ export interface PermissionDecisionApproveForLocation { */ locationKey: string; } - +/** + * Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForLocationApprovalCommands". + */ export interface PermissionDecisionApproveForLocationApprovalCommands { + /** + * Approval scoped to specific command identifiers. + */ kind: "commands"; + /** + * Command identifiers covered by this approval. + */ commandIdentifiers: string[]; } - +/** + * Schema for the `PermissionDecisionApproveForLocationApprovalRead` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForLocationApprovalRead". + */ export interface PermissionDecisionApproveForLocationApprovalRead { + /** + * Approval covering read-only filesystem operations. + */ kind: "read"; } - +/** + * Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForLocationApprovalWrite". + */ export interface PermissionDecisionApproveForLocationApprovalWrite { + /** + * Approval covering filesystem write operations. + */ kind: "write"; } - +/** + * Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForLocationApprovalMcp". + */ export interface PermissionDecisionApproveForLocationApprovalMcp { + /** + * Approval covering an MCP tool. + */ kind: "mcp"; + /** + * MCP server name. + */ serverName: string; + /** + * MCP tool name, or null to cover every tool on the server. + */ toolName: string | null; } - +/** + * Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForLocationApprovalMcpSampling". + */ export interface PermissionDecisionApproveForLocationApprovalMcpSampling { + /** + * Approval covering MCP sampling requests for a server. + */ kind: "mcp-sampling"; + /** + * MCP server name. + */ serverName: string; } - +/** + * Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForLocationApprovalMemory". + */ export interface PermissionDecisionApproveForLocationApprovalMemory { + /** + * Approval covering writes to long-term memory. + */ kind: "memory"; } - +/** + * Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForLocationApprovalCustomTool". + */ export interface PermissionDecisionApproveForLocationApprovalCustomTool { + /** + * Approval covering a custom tool. + */ kind: "custom-tool"; + /** + * Custom tool name. + */ toolName: string; } - +/** + * Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForLocationApprovalExtensionManagement". + */ export interface PermissionDecisionApproveForLocationApprovalExtensionManagement { + /** + * Approval covering extension lifecycle operations such as enable, disable, or reload. + */ kind: "extension-management"; + /** + * Optional operation identifier; when omitted, the approval covers all extension management operations. + */ operation?: string; } - +/** + * Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess". + */ export interface PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess { + /** + * Approval covering an extension's request to access a permission-gated capability. + */ kind: "extension-permission-access"; + /** + * Extension name. + */ extensionName: string; } - +/** + * Schema for the `PermissionDecisionApprovePermanently` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApprovePermanently". + */ export interface PermissionDecisionApprovePermanently { /** * Approved and persisted across sessions @@ -1566,7 +2204,12 @@ export interface PermissionDecisionApprovePermanently { */ domain: string; } - +/** + * Schema for the `PermissionDecisionReject` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionReject". + */ export interface PermissionDecisionReject { /** * Denied by the user during an interactive prompt @@ -1577,14 +2220,24 @@ export interface PermissionDecisionReject { */ feedback?: string; } - +/** + * Schema for the `PermissionDecisionUserNotAvailable` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionUserNotAvailable". + */ export interface PermissionDecisionUserNotAvailable { /** * Denied because user confirmation was unavailable */ kind: "user-not-available"; } - +/** + * Pending permission request ID and the decision to apply (approve/reject and scope). + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionRequest". + */ export interface PermissionDecisionRequest { /** * Request ID of the pending permission request @@ -1592,44 +2245,79 @@ export interface PermissionDecisionRequest { requestId: string; result: PermissionDecision; } - +/** + * Indicates whether the permission decision was applied; false when the request was already resolved. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionRequestResult". + */ export interface PermissionRequestResult { /** * Whether the permission request was handled successfully */ success: boolean; } - +/** + * No parameters; clears all session-scoped tool permission approvals. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionsResetSessionApprovalsRequest". + */ export interface PermissionsResetSessionApprovalsRequest {} - +/** + * Indicates whether the operation succeeded. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionsResetSessionApprovalsResult". + */ export interface PermissionsResetSessionApprovalsResult { /** * Whether the operation succeeded */ success: boolean; } - +/** + * Whether to auto-approve all tool permission requests for the rest of the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionsSetApproveAllRequest". + */ export interface PermissionsSetApproveAllRequest { /** * Whether to auto-approve all tool permission requests */ enabled: boolean; } - +/** + * Indicates whether the operation succeeded. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionsSetApproveAllResult". + */ export interface PermissionsSetApproveAllResult { /** * Whether the operation succeeded */ success: boolean; } - +/** + * Optional message to echo back to the caller. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PingRequest". + */ export interface PingRequest { /** * Optional message to echo back */ message?: string; } - +/** + * Server liveness response, including the echoed message, current timestamp, and protocol version. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PingResult". + */ export interface PingResult { /** * Echoed message (or default greeting) @@ -1644,7 +2332,12 @@ export interface PingResult { */ protocolVersion: number; } - +/** + * Existence, contents, and resolved path of the session plan file. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PlanReadResult". + */ export interface PlanReadResult { /** * Whether the plan file exists in the workspace @@ -1659,14 +2352,24 @@ export interface PlanReadResult { */ path: string | null; } - +/** + * Replacement contents to write to the session plan file. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PlanUpdateRequest". + */ export interface PlanUpdateRequest { /** * The new content for the plan file */ content: string; } - +/** + * Schema for the `Plugin` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "Plugin". + */ export interface Plugin { /** * Plugin name @@ -1685,7 +2388,12 @@ export interface Plugin { */ enabled: boolean; } - +/** + * Plugins installed for the session, with their enabled state and version metadata. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PluginList". + */ /** @experimental */ export interface PluginList { /** @@ -1693,16 +2401,26 @@ export interface PluginList { */ plugins: Plugin[]; } - +/** + * Optional remote session mode ("off", "export", or "on"); defaults to enabling both export and remote steering. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "RemoteEnableRequest". + */ /** @experimental */ export interface RemoteEnableRequest { mode?: RemoteSessionMode; } - +/** + * GitHub URL for the session and a flag indicating whether remote steering is enabled. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "RemoteEnableResult". + */ /** @experimental */ export interface RemoteEnableResult { /** - * Mission Control frontend URL for this session + * GitHub frontend URL for this session */ url?: string; /** @@ -1710,7 +2428,12 @@ export interface RemoteEnableResult { */ remoteSteerable: boolean; } - +/** + * Schema for the `ServerSkill` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ServerSkill". + */ export interface ServerSkill { /** * Unique identifier for the skill @@ -1741,14 +2464,24 @@ export interface ServerSkill { */ projectPath?: string; } - +/** + * Skills discovered across global and project sources. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ServerSkillList". + */ export interface ServerSkillList { /** * All discovered skills across all sources */ skills: ServerSkill[]; } - +/** + * Authentication status and account metadata for the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionAuthStatus". + */ export interface SessionAuthStatus { /** * Whether the session has resolved authentication @@ -1772,7 +2505,12 @@ export interface SessionAuthStatus { */ copilotPlan?: string; } - +/** + * File path, content to append, and optional mode for the client-provided session filesystem. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsAppendFileRequest". + */ export interface SessionFsAppendFileRequest { /** * Target session identifier @@ -1804,7 +2542,12 @@ export interface SessionFsError { */ message?: string; } - +/** + * Path to test for existence in the client-provided session filesystem. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsExistsRequest". + */ export interface SessionFsExistsRequest { /** * Target session identifier @@ -1815,14 +2558,24 @@ export interface SessionFsExistsRequest { */ path: string; } - +/** + * Indicates whether the requested path exists in the client-provided session filesystem. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsExistsResult". + */ export interface SessionFsExistsResult { /** * Whether the path exists */ exists: boolean; } - +/** + * Directory path to create in the client-provided session filesystem, with options for recursive creation and POSIX mode. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsMkdirRequest". + */ export interface SessionFsMkdirRequest { /** * Target session identifier @@ -1841,7 +2594,12 @@ export interface SessionFsMkdirRequest { */ mode?: number; } - +/** + * Directory path whose entries should be listed from the client-provided session filesystem. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsReaddirRequest". + */ export interface SessionFsReaddirRequest { /** * Target session identifier @@ -1852,7 +2610,12 @@ export interface SessionFsReaddirRequest { */ path: string; } - +/** + * Names of entries in the requested directory, or a filesystem error if the read failed. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsReaddirResult". + */ export interface SessionFsReaddirResult { /** * Entry names in the directory @@ -1860,7 +2623,12 @@ export interface SessionFsReaddirResult { entries: string[]; error?: SessionFsError; } - +/** + * Schema for the `SessionFsReaddirWithTypesEntry` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsReaddirWithTypesEntry". + */ export interface SessionFsReaddirWithTypesEntry { /** * Entry name @@ -1868,7 +2636,12 @@ export interface SessionFsReaddirWithTypesEntry { name: string; type: SessionFsReaddirWithTypesEntryType; } - +/** + * Directory path whose entries (with type information) should be listed from the client-provided session filesystem. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsReaddirWithTypesRequest". + */ export interface SessionFsReaddirWithTypesRequest { /** * Target session identifier @@ -1879,7 +2652,12 @@ export interface SessionFsReaddirWithTypesRequest { */ path: string; } - +/** + * Entries in the requested directory paired with file/directory type information, or a filesystem error if the read failed. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsReaddirWithTypesResult". + */ export interface SessionFsReaddirWithTypesResult { /** * Directory entries with type information @@ -1887,7 +2665,12 @@ export interface SessionFsReaddirWithTypesResult { entries: SessionFsReaddirWithTypesEntry[]; error?: SessionFsError; } - +/** + * Path of the file to read from the client-provided session filesystem. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsReadFileRequest". + */ export interface SessionFsReadFileRequest { /** * Target session identifier @@ -1898,7 +2681,12 @@ export interface SessionFsReadFileRequest { */ path: string; } - +/** + * File content as a UTF-8 string, or a filesystem error if the read failed. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsReadFileResult". + */ export interface SessionFsReadFileResult { /** * File content as UTF-8 string @@ -1906,7 +2694,12 @@ export interface SessionFsReadFileResult { content: string; error?: SessionFsError; } - +/** + * Source and destination paths for renaming or moving an entry in the client-provided session filesystem. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsRenameRequest". + */ export interface SessionFsRenameRequest { /** * Target session identifier @@ -1921,7 +2714,12 @@ export interface SessionFsRenameRequest { */ dest: string; } - +/** + * Path to remove from the client-provided session filesystem, with options for recursive removal and force. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsRmRequest". + */ export interface SessionFsRmRequest { /** * Target session identifier @@ -1940,7 +2738,24 @@ export interface SessionFsRmRequest { */ force?: boolean; } - +/** + * Optional capabilities declared by the provider + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsSetProviderCapabilities". + */ +export interface SessionFsSetProviderCapabilities { + /** + * Whether the provider supports SQLite query/exists operations + */ + sqlite?: boolean; +} +/** + * Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsSetProviderRequest". + */ export interface SessionFsSetProviderRequest { /** * Initial working directory for sessions @@ -1951,15 +2766,88 @@ export interface SessionFsSetProviderRequest { */ sessionStatePath: string; conventions: SessionFsSetProviderConventions; + capabilities?: SessionFsSetProviderCapabilities; } - +/** + * Indicates whether the calling client was registered as the session filesystem provider. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsSetProviderResult". + */ export interface SessionFsSetProviderResult { /** * Whether the provider was set successfully */ success: boolean; } - +/** + * Indicates whether the per-session SQLite database already exists. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsSqliteExistsResult". + */ +export interface SessionFsSqliteExistsResult { + /** + * Whether the session database already exists + */ + exists: boolean; +} +/** + * SQL query, query type, and optional bind parameters for executing a SQLite query against the per-session database. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsSqliteQueryRequest". + */ +export interface SessionFsSqliteQueryRequest { + /** + * Target session identifier + */ + sessionId: string; + /** + * SQL query to execute + */ + query: string; + queryType: SessionFsSqliteQueryType; + /** + * Optional named bind parameters + */ + params?: { + [k: string]: string | number | null; + }; +} +/** + * Query results including rows, columns, and rows affected, or a filesystem error if execution failed. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsSqliteQueryResult". + */ +export interface SessionFsSqliteQueryResult { + /** + * For SELECT: array of row objects. For others: empty array. + */ + rows: { + [k: string]: unknown; + }[]; + /** + * Column names from the result set + */ + columns: string[]; + /** + * Number of rows affected (for INSERT/UPDATE/DELETE) + */ + rowsAffected: number; + /** + * Last inserted row ID (for INSERT) + */ + lastInsertRowid?: number; + error?: SessionFsError; +} +/** + * Path whose metadata should be returned from the client-provided session filesystem. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsStatRequest". + */ export interface SessionFsStatRequest { /** * Target session identifier @@ -1970,7 +2858,12 @@ export interface SessionFsStatRequest { */ path: string; } - +/** + * Filesystem metadata for the requested path, or a filesystem error if the stat failed. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsStatResult". + */ export interface SessionFsStatResult { /** * Whether the path is a file @@ -1994,7 +2887,12 @@ export interface SessionFsStatResult { birthtime: string; error?: SessionFsError; } - +/** + * File path, content to write, and optional mode for the client-provided session filesystem. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsWriteFileRequest". + */ export interface SessionFsWriteFileRequest { /** * Target session identifier @@ -2013,7 +2911,12 @@ export interface SessionFsWriteFileRequest { */ mode?: number; } - +/** + * Source session identifier to fork from, optional event-ID boundary, and optional friendly name for the new session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsForkRequest". + */ /** @experimental */ export interface SessionsForkRequest { /** @@ -2029,7 +2932,12 @@ export interface SessionsForkRequest { */ name?: string; } - +/** + * Identifier and optional friendly name assigned to the newly forked session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsForkResult". + */ /** @experimental */ export interface SessionsForkResult { /** @@ -2041,7 +2949,12 @@ export interface SessionsForkResult { */ name?: string; } - +/** + * Shell command to run, with optional working directory and timeout in milliseconds. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ShellExecRequest". + */ export interface ShellExecRequest { /** * Shell command to execute @@ -2056,14 +2969,24 @@ export interface ShellExecRequest { */ timeout?: number; } - +/** + * Identifier of the spawned process, used to correlate streamed output and exit notifications. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ShellExecResult". + */ export interface ShellExecResult { /** * Unique identifier for tracking streamed output */ processId: string; } - +/** + * Identifier of a process previously returned by "shell.exec" and the signal to send. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ShellKillRequest". + */ export interface ShellKillRequest { /** * Process identifier returned by shell.exec @@ -2071,14 +2994,24 @@ export interface ShellKillRequest { processId: string; signal?: ShellKillSignal; } - +/** + * Indicates whether the signal was delivered; false if the process was unknown or already exited. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ShellKillResult". + */ export interface ShellKillResult { /** * Whether the signal was sent successfully */ killed: boolean; } - +/** + * Schema for the `Skill` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "Skill". + */ export interface Skill { /** * Unique identifier for the skill @@ -2105,7 +3038,12 @@ export interface Skill { */ path?: string; } - +/** + * Skills available to the session, with their enabled state. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SkillList". + */ /** @experimental */ export interface SkillList { /** @@ -2113,14 +3051,24 @@ export interface SkillList { */ skills: Skill[]; } - +/** + * Skill names to mark as disabled in global configuration, replacing any previous list. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SkillsConfigSetDisabledSkillsRequest". + */ export interface SkillsConfigSetDisabledSkillsRequest { /** * List of skill names to disable */ disabledSkills: string[]; } - +/** + * Name of the skill to disable for the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SkillsDisableRequest". + */ /** @experimental */ export interface SkillsDisableRequest { /** @@ -2128,7 +3076,12 @@ export interface SkillsDisableRequest { */ name: string; } - +/** + * Optional project paths and additional skill directories to include in discovery. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SkillsDiscoverRequest". + */ export interface SkillsDiscoverRequest { /** * Optional list of project directory paths to scan for project-scoped skills @@ -2139,7 +3092,12 @@ export interface SkillsDiscoverRequest { */ skillDirectories?: string[]; } - +/** + * Name of the skill to enable for the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SkillsEnableRequest". + */ /** @experimental */ export interface SkillsEnableRequest { /** @@ -2147,7 +3105,12 @@ export interface SkillsEnableRequest { */ name: string; } - +/** + * Diagnostics from reloading skill definitions, with warnings and errors as separate lists. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SkillsLoadDiagnostics". + */ /** @experimental */ export interface SkillsLoadDiagnostics { /** @@ -2159,7 +3122,12 @@ export interface SkillsLoadDiagnostics { */ errors: string[]; } - +/** + * Schema for the `SlashCommandAgentPromptResult` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SlashCommandAgentPromptResult". + */ export interface SlashCommandAgentPromptResult { /** * Agent prompt result discriminator @@ -2179,7 +3147,12 @@ export interface SlashCommandAgentPromptResult { */ runtimeSettingsChanged?: boolean; } - +/** + * Schema for the `SlashCommandCompletedResult` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SlashCommandCompletedResult". + */ export interface SlashCommandCompletedResult { /** * Completed result discriminator @@ -2194,7 +3167,12 @@ export interface SlashCommandCompletedResult { */ runtimeSettingsChanged?: boolean; } - +/** + * Schema for the `SlashCommandTextResult` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SlashCommandTextResult". + */ export interface SlashCommandTextResult { /** * Text result discriminator @@ -2217,7 +3195,12 @@ export interface SlashCommandTextResult { */ runtimeSettingsChanged?: boolean; } - +/** + * Schema for the `TaskAgentInfo` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TaskAgentInfo". + */ export interface TaskAgentInfo { /** * Task kind @@ -2286,7 +3269,12 @@ export interface TaskAgentInfo { */ idleSince?: string; } - +/** + * Schema for the `TaskShellInfo` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TaskShellInfo". + */ export interface TaskShellInfo { /** * Task kind @@ -2328,7 +3316,12 @@ export interface TaskShellInfo { */ pid?: number; } - +/** + * Background tasks currently tracked by the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TaskList". + */ /** @experimental */ export interface TaskList { /** @@ -2336,7 +3329,12 @@ export interface TaskList { */ tasks: TaskInfo[]; } - +/** + * Identifier of the background task to cancel. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TasksCancelRequest". + */ /** @experimental */ export interface TasksCancelRequest { /** @@ -2344,7 +3342,12 @@ export interface TasksCancelRequest { */ id: string; } - +/** + * Indicates whether the background task was successfully cancelled. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TasksCancelResult". + */ /** @experimental */ export interface TasksCancelResult { /** @@ -2352,7 +3355,12 @@ export interface TasksCancelResult { */ cancelled: boolean; } - +/** + * Identifier of the task to promote to background mode. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TasksPromoteToBackgroundRequest". + */ /** @experimental */ export interface TasksPromoteToBackgroundRequest { /** @@ -2360,7 +3368,12 @@ export interface TasksPromoteToBackgroundRequest { */ id: string; } - +/** + * Indicates whether the task was successfully promoted to background mode. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TasksPromoteToBackgroundResult". + */ /** @experimental */ export interface TasksPromoteToBackgroundResult { /** @@ -2368,7 +3381,12 @@ export interface TasksPromoteToBackgroundResult { */ promoted: boolean; } - +/** + * Identifier of the completed or cancelled task to remove from tracking. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TasksRemoveRequest". + */ /** @experimental */ export interface TasksRemoveRequest { /** @@ -2376,7 +3394,12 @@ export interface TasksRemoveRequest { */ id: string; } - +/** + * Indicates whether the task was removed. False when the task does not exist or is still running/idle. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TasksRemoveResult". + */ /** @experimental */ export interface TasksRemoveResult { /** @@ -2384,7 +3407,12 @@ export interface TasksRemoveResult { */ removed: boolean; } - +/** + * Identifier of the target agent task, message content, and optional sender agent ID. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TasksSendMessageRequest". + */ /** @experimental */ export interface TasksSendMessageRequest { /** @@ -2400,7 +3428,12 @@ export interface TasksSendMessageRequest { */ fromAgentId?: string; } - +/** + * Indicates whether the message was delivered, with an error message when delivery failed. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TasksSendMessageResult". + */ /** @experimental */ export interface TasksSendMessageResult { /** @@ -2412,7 +3445,12 @@ export interface TasksSendMessageResult { */ error?: string; } - +/** + * Agent type, prompt, name, and optional description and model override for the new task. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TasksStartAgentRequest". + */ /** @experimental */ export interface TasksStartAgentRequest { /** @@ -2436,7 +3474,12 @@ export interface TasksStartAgentRequest { */ model?: string; } - +/** + * Identifier assigned to the newly started background agent task. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TasksStartAgentResult". + */ /** @experimental */ export interface TasksStartAgentResult { /** @@ -2444,7 +3487,12 @@ export interface TasksStartAgentResult { */ agentId: string; } - +/** + * Schema for the `Tool` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "Tool". + */ export interface Tool { /** * Tool identifier (e.g., "bash", "grep", "str_replace_editor") @@ -2469,55 +3517,146 @@ export interface Tool { */ instructions?: string; } - +/** + * Built-in tools available for the requested model, with their parameters and instructions. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ToolList". + */ export interface ToolList { /** * List of available built-in tools with metadata */ tools: Tool[]; } - +/** + * Optional model identifier whose tool overrides should be applied to the listing. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ToolsListRequest". + */ export interface ToolsListRequest { /** * Optional model ID — when provided, the returned tool list reflects model-specific overrides */ model?: string; } - +/** + * Multi-select string field where each option pairs a value with a display label. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationArrayAnyOfField". + */ export interface UIElicitationArrayAnyOfField { + /** + * Type discriminator. Always "array". + */ type: "array"; + /** + * Human-readable label for the field. + */ title?: string; + /** + * Help text describing the field. + */ description?: string; + /** + * Minimum number of items the user must select. + */ minItems?: number; + /** + * Maximum number of items the user may select. + */ maxItems?: number; items: UIElicitationArrayAnyOfFieldItems; + /** + * Default values selected when the form is first shown. + */ default?: string[]; } - +/** + * Schema applied to each item in the array. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationArrayAnyOfFieldItems". + */ export interface UIElicitationArrayAnyOfFieldItems { + /** + * Selectable options, each with a value and a display label. + */ anyOf: UIElicitationArrayAnyOfFieldItemsAnyOf[]; } - +/** + * Schema for the `UIElicitationArrayAnyOfFieldItemsAnyOf` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationArrayAnyOfFieldItemsAnyOf". + */ export interface UIElicitationArrayAnyOfFieldItemsAnyOf { + /** + * Value submitted when this option is selected. + */ const: string; + /** + * Display label for this option. + */ title: string; } - +/** + * Multi-select string field whose allowed values are defined inline. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationArrayEnumField". + */ export interface UIElicitationArrayEnumField { + /** + * Type discriminator. Always "array". + */ type: "array"; + /** + * Human-readable label for the field. + */ title?: string; + /** + * Help text describing the field. + */ description?: string; + /** + * Minimum number of items the user must select. + */ minItems?: number; + /** + * Maximum number of items the user may select. + */ maxItems?: number; items: UIElicitationArrayEnumFieldItems; + /** + * Default values selected when the form is first shown. + */ default?: string[]; } - +/** + * Schema applied to each item in the array. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationArrayEnumFieldItems". + */ export interface UIElicitationArrayEnumFieldItems { + /** + * Type discriminator. Always "string". + */ type: "string"; + /** + * Allowed string values for each selected item. + */ enum: string[]; } - +/** + * Prompt message and JSON schema describing the form fields to elicit from the user. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationRequest". + */ export interface UIElicitationRequest { /** * Message describing what information is needed from the user @@ -2547,52 +3686,166 @@ export interface UIElicitationSchema { */ required?: string[]; } - +/** + * Single-select string field whose allowed values are defined inline. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationStringEnumField". + */ export interface UIElicitationStringEnumField { + /** + * Type discriminator. Always "string". + */ type: "string"; + /** + * Human-readable label for the field. + */ title?: string; + /** + * Help text describing the field. + */ description?: string; + /** + * Allowed string values. + */ enum: string[]; + /** + * Optional display labels for each enum value, in the same order as `enum`. + */ enumNames?: string[]; + /** + * Default value selected when the form is first shown. + */ default?: string; } - +/** + * Single-select string field where each option pairs a value with a display label. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationStringOneOfField". + */ export interface UIElicitationStringOneOfField { + /** + * Type discriminator. Always "string". + */ type: "string"; + /** + * Human-readable label for the field. + */ title?: string; + /** + * Help text describing the field. + */ description?: string; + /** + * Selectable options, each with a value and a display label. + */ oneOf: UIElicitationStringOneOfFieldOneOf[]; + /** + * Default value selected when the form is first shown. + */ default?: string; } - +/** + * Schema for the `UIElicitationStringOneOfFieldOneOf` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationStringOneOfFieldOneOf". + */ export interface UIElicitationStringOneOfFieldOneOf { + /** + * Value submitted when this option is selected. + */ const: string; + /** + * Display label for this option. + */ title: string; } - +/** + * Boolean field rendered as a yes/no toggle. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationSchemaPropertyBoolean". + */ export interface UIElicitationSchemaPropertyBoolean { + /** + * Type discriminator. Always "boolean". + */ type: "boolean"; + /** + * Human-readable label for the field. + */ title?: string; + /** + * Help text describing the field. + */ description?: string; + /** + * Default value selected when the form is first shown. + */ default?: boolean; } - +/** + * Free-text string field with optional length and format constraints. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationSchemaPropertyString". + */ export interface UIElicitationSchemaPropertyString { + /** + * Type discriminator. Always "string". + */ type: "string"; + /** + * Human-readable label for the field. + */ title?: string; + /** + * Help text describing the field. + */ description?: string; + /** + * Minimum number of characters required. + */ minLength?: number; + /** + * Maximum number of characters allowed. + */ maxLength?: number; format?: UIElicitationSchemaPropertyStringFormat; + /** + * Default value populated in the input when the form is first shown. + */ default?: string; } - +/** + * Numeric field accepting either a number or an integer. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationSchemaPropertyNumber". + */ export interface UIElicitationSchemaPropertyNumber { type: UIElicitationSchemaPropertyNumberType; + /** + * Human-readable label for the field. + */ title?: string; + /** + * Help text describing the field. + */ description?: string; + /** + * Minimum allowed value (inclusive). + */ minimum?: number; + /** + * Maximum allowed value (inclusive). + */ maximum?: number; + /** + * Default value populated in the input when the form is first shown. + */ default?: number; } /** @@ -2614,14 +3867,24 @@ export interface UIElicitationResponse { export interface UIElicitationResponseContent { [k: string]: UIElicitationFieldValue; } - +/** + * Indicates whether the elicitation response was accepted; false if it was already resolved by another client. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIElicitationResult". + */ export interface UIElicitationResult { /** * Whether the response was accepted. False if the request was already resolved by another client. */ success: boolean; } - +/** + * Pending elicitation request ID and the user's response (accept/decline/cancel + form values). + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIHandlePendingElicitationRequest". + */ export interface UIHandlePendingElicitationRequest { /** * The unique request ID from the elicitation.requested event @@ -2629,7 +3892,12 @@ export interface UIHandlePendingElicitationRequest { requestId: string; result: UIElicitationResponse; } - +/** + * Accumulated session usage metrics, including premium request cost, token counts, model breakdown, and code-change totals. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UsageGetMetricsResult". + */ /** @experimental */ export interface UsageGetMetricsResult { /** @@ -2678,7 +3946,12 @@ export interface UsageGetMetricsResult { */ lastCallOutputTokens: number; } - +/** + * Schema for the `UsageMetricsTokenDetail` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UsageMetricsTokenDetail". + */ export interface UsageMetricsTokenDetail { /** * Accumulated token count for this token type @@ -2705,7 +3978,12 @@ export interface UsageMetricsCodeChanges { */ filesModifiedCount: number; } - +/** + * Schema for the `UsageMetricsModelMetric` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UsageMetricsModelMetric". + */ export interface UsageMetricsModelMetric { requests: UsageMetricsModelMetricRequests; usage: UsageMetricsModelMetricUsage; @@ -2764,14 +4042,24 @@ export interface UsageMetricsModelMetricUsage { */ reasoningTokens?: number; } - +/** + * Schema for the `UsageMetricsModelMetricTokenDetail` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UsageMetricsModelMetricTokenDetail". + */ export interface UsageMetricsModelMetricTokenDetail { /** * Accumulated token count for this token type */ tokenCount: number; } - +/** + * Relative path and UTF-8 content for the workspace file to create or overwrite. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "WorkspacesCreateFileRequest". + */ export interface WorkspacesCreateFileRequest { /** * Relative path within the workspace files directory @@ -2782,7 +4070,12 @@ export interface WorkspacesCreateFileRequest { */ content: string; } - +/** + * Current workspace metadata for the session, or null when not available. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "WorkspacesGetWorkspaceResult". + */ export interface WorkspacesGetWorkspaceResult { /** * Current workspace metadata, or null if not available @@ -2806,27 +4099,54 @@ export interface WorkspacesGetWorkspaceResult { chronicle_sync_dismissed?: boolean; } | null; } - +/** + * Relative paths of files stored in the session workspace files directory. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "WorkspacesListFilesResult". + */ export interface WorkspacesListFilesResult { /** * Relative file paths in the workspace files directory */ files: string[]; } - +/** + * Relative path of the workspace file to read. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "WorkspacesReadFileRequest". + */ export interface WorkspacesReadFileRequest { /** * Relative path within the workspace files directory */ path: string; } - +/** + * Contents of the requested workspace file as a UTF-8 string. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "WorkspacesReadFileResult". + */ export interface WorkspacesReadFileResult { /** * File content as a UTF-8 string */ content: string; } +/** + * Identifies the target session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsSqliteExistsRequest". + */ +export interface SessionFsSqliteExistsRequest { + /** + * Target session identifier + */ + sessionId: string; +} /** Create typed server-scoped RPC methods (no session required). */ export function createServerRpc(connection: MessageConnection) { @@ -2834,7 +4154,7 @@ export function createServerRpc(connection: MessageConnection) { ping: async (params: PingRequest): Promise => connection.sendRequest("ping", params), models: { - list: async (params?: ModelsListRequest): Promise => + list: async (params: ModelsListRequest): Promise => connection.sendRequest("models.list", params), }, tools: { @@ -2842,7 +4162,7 @@ export function createServerRpc(connection: MessageConnection) { connection.sendRequest("tools.list", params), }, account: { - getQuota: async (params?: AccountGetQuotaRequest): Promise => + getQuota: async (params: AccountGetQuotaRequest): Promise => connection.sendRequest("account.getQuota", params), }, mcp: { @@ -3090,6 +4410,8 @@ export interface SessionFsHandler { readdirWithTypes(params: SessionFsReaddirWithTypesRequest): Promise; rm(params: SessionFsRmRequest): Promise; rename(params: SessionFsRenameRequest): Promise; + sqliteQuery(params: SessionFsSqliteQueryRequest): Promise; + sqliteExists(params: SessionFsSqliteExistsRequest): Promise; } /** All client session API handler groups. */ @@ -3157,4 +4479,14 @@ export function registerClientSessionApiHandlers( if (!handler) throw new Error(`No sessionFs handler registered for session: ${params.sessionId}`); return handler.rename(params); }); + connection.onRequest("sessionFs.sqliteQuery", async (params: SessionFsSqliteQueryRequest) => { + const handler = getHandlers(params.sessionId).sessionFs; + if (!handler) throw new Error(`No sessionFs handler registered for session: ${params.sessionId}`); + return handler.sqliteQuery(params); + }); + connection.onRequest("sessionFs.sqliteExists", async (params: SessionFsSqliteExistsRequest) => { + const handler = getHandlers(params.sessionId).sessionFs; + if (!handler) throw new Error(`No sessionFs handler registered for session: ${params.sessionId}`); + return handler.sqliteExists(params); + }); } diff --git a/nodejs/src/generated/session-events.ts b/nodejs/src/generated/session-events.ts index 4218d78c2..3668a3ca6 100644 --- a/nodejs/src/generated/session-events.ts +++ b/nodejs/src/generated/session-events.ts @@ -125,18 +125,10 @@ export type UserMessageAttachmentGithubReferenceType = "issue" | "pr" | "discuss * Tool call type: "function" for standard tool calls, "custom" for grammar-based tool calls. Defaults to "function" when absent. */ export type AssistantMessageToolRequestType = "function" | "custom"; -/** - * API endpoint used for this model call, matching CAPI supported_endpoints vocabulary - */ -export type AssistantUsageApiEndpoint = "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses"; /** * Where the failed model call originated */ export type ModelCallFailureSource = "top_level" | "subagent" | "mcp_sampling"; -/** - * Finite reason code describing why the current turn was aborted - */ -export type AbortReason = "user_initiated" | "remote_command" | "user_abort"; /** * A content block within a tool result, which may be text, terminal output, image, audio, or a resource */ @@ -184,9 +176,7 @@ export type PermissionRequest = | PermissionRequestUrl | PermissionRequestMemory | PermissionRequestCustomTool - | PermissionRequestHook - | PermissionRequestExtensionManagement - | PermissionRequestExtensionPermissionAccess; + | PermissionRequestHook; /** * Whether this is a store or vote memory operation */ @@ -207,9 +197,7 @@ export type PermissionPromptRequest = | PermissionPromptRequestMemory | PermissionPromptRequestCustomTool | PermissionPromptRequestPath - | PermissionPromptRequestHook - | PermissionPromptRequestExtensionManagement - | PermissionPromptRequestExtensionPermissionAccess; + | PermissionPromptRequestHook; /** * Whether this is a store or vote memory operation */ @@ -244,9 +232,7 @@ export type UserToolSessionApproval = | UserToolSessionApprovalWrite | UserToolSessionApprovalMcp | UserToolSessionApprovalMemory - | UserToolSessionApprovalCustomTool - | UserToolSessionApprovalExtensionManagement - | UserToolSessionApprovalExtensionPermissionAccess; + | UserToolSessionApprovalCustomTool; /** * Elicitation mode; "form" for structured input, "url" for browser-based. Defaults to "form" when absent. */ @@ -322,10 +308,6 @@ export interface StartData { * Version string of the Copilot application */ copilotVersion: string; - /** - * When set, identifies a parent session whose context this session continues — e.g., a detached headless rem-agent run launched on the parent's interactive shutdown. Telemetry from this session is reported under the parent's session_id. - */ - detachedFromSpawningParentSessionId?: string; /** * Identifier of the software producing the events (e.g., "copilot-agent") */ @@ -630,7 +612,7 @@ export interface ScheduleCreatedEvent { type: "session.schedule_created"; } /** - * Scheduled prompt registered via /every or /after + * Scheduled prompt registered via /every */ export interface ScheduleCreatedData { /** @@ -645,10 +627,6 @@ export interface ScheduleCreatedData { * Prompt text that gets enqueued on every tick */ prompt: string; - /** - * Whether the schedule re-arms after each tick (`/every`) or fires once (`/after`) - */ - recurring?: boolean; } export interface ScheduleCancelledEvent { /** @@ -1590,10 +1568,6 @@ export interface UserMessageData { * CAPI interaction ID for correlating this user message with its turn */ interactionId?: string; - /** - * True when this user message was auto-injected by autopilot's continuation loop rather than typed by the user; used to distinguish autopilot-driven turns in telemetry. - */ - isAutopilotContinuation?: boolean; /** * Path-backed native document attachments that stayed on the tagged_files path flow because native upload would exceed the request size limit */ @@ -1986,14 +1960,6 @@ export interface AssistantMessageEvent { * Assistant response containing text content, optional tool requests, and interaction metadata */ export interface AssistantMessageData { - /** - * Raw Anthropic content array with advisor blocks (server_tool_use, advisor_tool_result) for verbatim round-tripping - */ - anthropicAdvisorBlocks?: unknown[]; - /** - * Anthropic advisor model ID used for this response, for timeline display on replay - */ - anthropicAdvisorModel?: string; /** * The assistant's text response content */ @@ -2010,10 +1976,6 @@ export interface AssistantMessageData { * Unique identifier for this assistant message */ messageId: string; - /** - * Model that produced this assistant message, if known - */ - model?: string; /** * Actual output token count from the API response (completion_tokens), used for accurate token accounting */ @@ -2219,7 +2181,6 @@ export interface AssistantUsageData { * Completion ID from the model provider (e.g., chatcmpl-abc123) */ apiCallId?: string; - apiEndpoint?: AssistantUsageApiEndpoint; /** * Number of tokens read from prompt cache */ @@ -2436,7 +2397,10 @@ export interface AbortEvent { * Turn abort information including the reason for termination */ export interface AbortData { - reason: AbortReason; + /** + * Reason the current turn was aborted (e.g., "user initiated") + */ + reason: string; } export interface ToolUserRequestedEvent { /** @@ -2963,10 +2927,6 @@ export interface SubagentStartedData { * Internal name of the sub-agent */ agentName: string; - /** - * Model the sub-agent will run with, when known at start. Surfaced in the timeline for auto-selected sub-agents (e.g. rubber-duck). - */ - model?: string; /** * Tool call ID of the parent tool invocation that spawned this sub-agent */ @@ -3745,48 +3705,6 @@ export interface PermissionRequestHook { */ toolName: string; } -/** - * Extension management permission request - */ -export interface PermissionRequestExtensionManagement { - /** - * Name of the extension being managed - */ - extensionName?: string; - /** - * Permission kind discriminator - */ - kind: "extension-management"; - /** - * The extension management operation (scaffold, reload) - */ - operation: string; - /** - * Tool call ID that triggered this permission request - */ - toolCallId?: string; -} -/** - * Extension permission access request - */ -export interface PermissionRequestExtensionPermissionAccess { - /** - * Capabilities the extension is requesting - */ - capabilities: string[]; - /** - * Name of the extension requesting permission access - */ - extensionName: string; - /** - * Permission kind discriminator - */ - kind: "extension-permission-access"; - /** - * Tool call ID that triggered this permission request - */ - toolCallId?: string; -} /** * Shell command permission prompt */ @@ -4024,48 +3942,6 @@ export interface PermissionPromptRequestHook { */ toolName: string; } -/** - * Extension management permission prompt - */ -export interface PermissionPromptRequestExtensionManagement { - /** - * Name of the extension being managed - */ - extensionName?: string; - /** - * Prompt kind discriminator - */ - kind: "extension-management"; - /** - * The extension management operation (scaffold, reload) - */ - operation: string; - /** - * Tool call ID that triggered this permission request - */ - toolCallId?: string; -} -/** - * Extension permission access prompt - */ -export interface PermissionPromptRequestExtensionPermissionAccess { - /** - * Capabilities the extension is requesting - */ - capabilities: string[]; - /** - * Name of the extension requesting permission access - */ - extensionName: string; - /** - * Prompt kind discriminator - */ - kind: "extension-permission-access"; - /** - * Tool call ID that triggered this permission request - */ - toolCallId?: string; -} export interface PermissionCompletedEvent { /** * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events. @@ -4169,26 +4045,6 @@ export interface UserToolSessionApprovalCustomTool { */ toolName: string; } -export interface UserToolSessionApprovalExtensionManagement { - /** - * Extension management approval kind - */ - kind: "extension-management"; - /** - * Optional operation identifier - */ - operation?: string; -} -export interface UserToolSessionApprovalExtensionPermissionAccess { - /** - * Extension name - */ - extensionName: string; - /** - * Extension permission access approval kind - */ - kind: "extension-permission-access"; -} export interface PermissionApprovedForLocation { approval: UserToolSessionApproval; /** diff --git a/nodejs/src/index.ts b/nodejs/src/index.ts index 0c6b25ecd..780a0b3b0 100644 --- a/nodejs/src/index.ts +++ b/nodejs/src/index.ts @@ -76,6 +76,9 @@ export type { SessionFsConfig, SessionFsProvider, SessionFsFileInfo, + SessionFsSqliteQueryResult, + SessionFsSqliteQueryType, + SessionFsSqliteProvider, SystemMessageAppendConfig, SystemMessageConfig, SystemMessageCustomizeConfig, diff --git a/nodejs/src/sessionFsProvider.ts b/nodejs/src/sessionFsProvider.ts index 920ea3cd1..37612959d 100644 --- a/nodejs/src/sessionFsProvider.ts +++ b/nodejs/src/sessionFsProvider.ts @@ -7,8 +7,12 @@ import type { SessionFsError, SessionFsStatResult, SessionFsReaddirWithTypesEntry, + SessionFsSqliteQueryResult as GeneratedSqliteQueryResult, + SessionFsSqliteQueryType, } from "./generated/rpc.js"; +export type { SessionFsSqliteQueryType }; + /** * File metadata returned by {@link SessionFsProvider.stat}. * Same shape as the generated {@link SessionFsStatResult} but without the @@ -16,6 +20,37 @@ import type { */ export type SessionFsFileInfo = Omit; +/** + * Result of a SQLite query execution via {@link SessionFsSqliteProvider.query}. + * Same shape as the generated {@link GeneratedSqliteQueryResult} but without the + * `error` field, since providers signal errors by throwing. + */ +export type SessionFsSqliteQueryResult = Omit; + +/** + * SQLite operations for the per-session database. + * Implementers provide query execution and existence checking. + */ +export interface SessionFsSqliteProvider { + /** + * Execute a SQLite query against the per-session database. + * + * @param queryType - How to execute: `"exec"` for DDL/multi-statement, `"query"` for SELECT, `"run"` for INSERT/UPDATE/DELETE. + * @param query - SQL query to execute. + * @param params - Optional named bind parameters. + */ + query( + queryType: SessionFsSqliteQueryType, + query: string, + params?: Record, + ): Promise; + + /** + * Check whether the per-session database already exists, without creating it. + */ + exists(): Promise; +} + /** * Interface for session filesystem providers. Implementers use idiomatic * TypeScript patterns: throw on error, return values directly. Use @@ -55,6 +90,9 @@ export interface SessionFsProvider { /** Renames/moves a file or directory. */ rename(src: string, dest: string): Promise; + + /** Per-session SQLite database operations. Optional — omit if the provider does not support SQLite. */ + sqlite?: SessionFsSqliteProvider; } /** @@ -149,6 +187,19 @@ export function createSessionFsAdapter(provider: SessionFsProvider): SessionFsHa return toSessionFsError(err); } }, + sqliteQuery: async ({ queryType, query, params: bindParams }) => { + if (!provider.sqlite) { + throw new Error("SQLite is not supported by this provider"); + } + const result = await provider.sqlite.query(queryType, query, bindParams); + return result ?? { rows: [], columns: [], rowsAffected: 0 }; + }, + sqliteExists: async () => { + if (!provider.sqlite) { + throw new Error("SQLite is not supported by this provider"); + } + return { exists: await provider.sqlite.exists() }; + }, }; } diff --git a/nodejs/src/types.ts b/nodejs/src/types.ts index 7b9348df0..2443d16fe 100644 --- a/nodejs/src/types.ts +++ b/nodejs/src/types.ts @@ -14,6 +14,9 @@ export type SessionEvent = GeneratedSessionEvent; export type { SessionFsProvider } from "./sessionFsProvider.js"; export { createSessionFsAdapter } from "./sessionFsProvider.js"; export type { SessionFsFileInfo } from "./sessionFsProvider.js"; +export type { SessionFsSqliteQueryResult } from "./sessionFsProvider.js"; +export type { SessionFsSqliteQueryType } from "./sessionFsProvider.js"; +export type { SessionFsSqliteProvider } from "./sessionFsProvider.js"; /** * Options for creating a CopilotClient @@ -1745,6 +1748,20 @@ export interface SessionFsConfig { * Path conventions used by this filesystem provider. */ conventions: "windows" | "posix"; + + /** + * Optional capabilities declared by this provider. + * The runtime uses these to determine which features are available. + */ + capabilities?: { + /** + * Whether this provider supports SQLite query/exists operations. + * When false or omitted, the runtime will not offer SQL tools or + * todo tracking for sessions using this provider. + * @default false + */ + sqlite?: boolean; + }; } /** diff --git a/nodejs/test/e2e/harness/CapiProxy.ts b/nodejs/test/e2e/harness/CapiProxy.ts index a5fffc37a..a6232587e 100644 --- a/nodejs/test/e2e/harness/CapiProxy.ts +++ b/nodejs/test/e2e/harness/CapiProxy.ts @@ -6,6 +6,7 @@ import { CopilotUserResponse, ParsedHttpExchange, } from "../../../../test/harness/replayingCapiProxy"; +import { isCI } from "./sdkTestContext"; const HARNESS_SERVER_PATH = resolve(__dirname, "../../../../test/harness/server.ts"); const NO_PROXY = "127.0.0.1,localhost,::1"; @@ -92,9 +93,13 @@ export class CapiProxy { CURL_CA_BUNDLE: this.startupInfo.caFilePath, GIT_SSL_CAINFO: this.startupInfo.caFilePath, GH_TOKEN: "", - GITHUB_TOKEN: "", GH_ENTERPRISE_TOKEN: "", GITHUB_ENTERPRISE_TOKEN: "", + + // In CI we never want it to make real network requests, so there should be no need for auth + // But when running locally you have to be able to generate snapshots and that does require real auth, + // so you should set GH_TOKEN and we need to pass it through into the test app. + ...(isCI ? { GITHUB_TOKEN: "" } : undefined), }; } diff --git a/nodejs/test/e2e/session_fs.e2e.test.ts b/nodejs/test/e2e/session_fs.e2e.test.ts index a28a2713c..7e3b93b68 100644 --- a/nodejs/test/e2e/session_fs.e2e.test.ts +++ b/nodejs/test/e2e/session_fs.e2e.test.ts @@ -45,12 +45,19 @@ describe("Session Fs", async () => { copilotClientOptions: { sessionFs: sessionFsConfig }, }); - it("should route file operations through the session fs provider", async () => { + it("should route file operations through the session fs provider", { timeout: 60000 }, async () => { const session = await client.createSession({ onPermissionRequest: approveAll, createSessionFsHandler, }); + const errors: SessionEvent[] = []; + session.on((event) => { + if (event.type === "session.error") { + errors.push(event); + } + }); + const msg = await session.sendAndWait({ prompt: "What is 100 + 200?" }); expect(msg?.data.content).toContain("300"); await session.disconnect(); @@ -60,6 +67,9 @@ describe("Session Fs", async () => { ); const content = buf.toString("utf8"); expect(content).toContain("300"); + + // No sqlite capabilities declared — verify no errors from missing sqlite + expect(errors).toHaveLength(0); }); it("should load session data from fs provider on resume", async () => { diff --git a/nodejs/test/e2e/session_fs_sqlite.e2e.test.ts b/nodejs/test/e2e/session_fs_sqlite.e2e.test.ts new file mode 100644 index 000000000..c06e2565d --- /dev/null +++ b/nodejs/test/e2e/session_fs_sqlite.e2e.test.ts @@ -0,0 +1,248 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +import { DatabaseSync } from "node:sqlite"; +import { MemoryProvider, VirtualProvider } from "@platformatic/vfs"; +import { mkdtempSync, realpathSync } from "fs"; +import { tmpdir } from "os"; +import { join } from "path"; +import { describe, expect, it } from "vitest"; +import type { SessionFsReaddirWithTypesEntry } from "../../src/generated/rpc.js"; +import { + approveAll, + CopilotSession, + SessionEvent, + type SessionFsConfig, + type SessionFsProvider, + type SessionFsFileInfo, + type SessionFsSqliteQueryResult, + type SessionFsSqliteQueryType, +} from "../../src/index.js"; +import { createSdkTestContext } from "./harness/sdkTestContext.js"; + +const sessionStatePath = + process.platform === "win32" + ? "/session-state" + : join( + realpathSync(mkdtempSync(join(tmpdir(), "copilot-sqlite-state-"))), + "session-state" + ).replace(/\\/g, "/"); + +const sessionFsConfig: SessionFsConfig = { + initialCwd: "/", + sessionStatePath, + conventions: "posix", + capabilities: { sqlite: true }, +}; + +describe("Session Fs SQLite", async () => { + const provider = new MemoryProvider(); + /** Track which queries were received, per session */ + const sqliteCalls: { sessionId: string; queryType: string; query: string }[] = []; + + const createSessionFsHandler = (session: CopilotSession) => + createTestSessionFsHandlerWithSqlite(session, provider, sqliteCalls); + + // Helpers to build session-namespaced paths for direct provider assertions + const p = (sessionId: string, path: string) => + `/${sessionId}${path.startsWith("/") ? path : "/" + path}`; + + const { copilotClient: client } = await createSdkTestContext({ + copilotClientOptions: { sessionFs: sessionFsConfig }, + }); + + it("should route SQL queries through the sessionFs sqlite handler", { timeout: 60000 }, async () => { + const session = await client.createSession({ + onPermissionRequest: approveAll, + createSessionFsHandler, + }); + + // Ask the agent to create a table and insert data using the SQL tool + const msg = await session.sendAndWait({ + prompt: + 'Use the sql tool to create a table called "items" with columns id (TEXT PRIMARY KEY) and name (TEXT). ' + + 'Then insert a row with id "a1" and name "Widget". ' + + "Then select all rows from items and tell me what you find.", + }); + + expect(msg?.data.content).toContain("Widget"); + + // Verify the sqlite handler was called + const sessionCalls = sqliteCalls.filter((c) => c.sessionId === session.sessionId); + expect(sessionCalls.length).toBeGreaterThan(0); + expect(sessionCalls.some((c) => c.query.toUpperCase().includes("CREATE TABLE"))).toBe(true); + expect(sessionCalls.some((c) => c.query.toUpperCase().includes("INSERT"))).toBe(true); + expect(sessionCalls.some((c) => c.query.toUpperCase().includes("SELECT"))).toBe(true); + + // Verify queryType is set correctly + expect(sessionCalls.some((c) => c.queryType === "exec")).toBe(true); + expect(sessionCalls.some((c) => c.queryType === "query")).toBe(true); + expect(sessionCalls.some((c) => c.queryType === "run")).toBe(true); + + await session.disconnect(); + }); + + it("should allow subagents to use SQL tool via inherited sessionFs", { timeout: 60000 }, async () => { + const session = await client.createSession({ + onPermissionRequest: approveAll, + createSessionFsHandler, + }); + + const events: SessionEvent[] = []; + session.on((event) => { + events.push(event); + }); + + // Ask the agent to use the task tool to spawn a subagent that uses SQL + const msg = await session.sendAndWait({ + prompt: + 'Use the task tool to ask a task agent to do the following: ' + + 'Use the sql tool to run this query: INSERT INTO todos (id, title, status) VALUES (\'subagent-test\', \'Created by subagent\', \'done\')', + }); + + await session.disconnect(); + + // Verify that the subagent's SQL queries were routed through the sessionFs sqlite handler + const sessionCalls = sqliteCalls.filter((c) => c.sessionId === session.sessionId); + const insertCalls = sessionCalls.filter((c) => c.query.toUpperCase().includes("INSERT")); + expect(insertCalls.length).toBeGreaterThan(0); + + // Verify that the sql tool execution in events.jsonl came from the subagent (has agentId) + const buf = await provider.readFile( + p(session.sessionId, `${sessionStatePath}/events.jsonl`) + ); + const content = buf.toString("utf8"); + const lines = content.split("\n").filter(Boolean); + const parsed = lines.map((line) => JSON.parse(line)); + const sqlToolEvents = parsed.filter( + (e: { type?: string; data?: { toolName?: string } }) => + e.type === "tool.execution_start" && e.data?.toolName === "sql" + ); + expect(sqlToolEvents.length).toBeGreaterThan(0); + expect(sqlToolEvents.every((e: { agentId?: string }) => !!e.agentId)).toBe(true); + }); +}); + +function createTestSessionFsHandlerWithSqlite( + session: CopilotSession, + provider: VirtualProvider, + sqliteCalls: { sessionId: string; queryType: string; query: string }[] +): SessionFsProvider { + const sp = (path: string) => + `/${session.sessionId}${path.startsWith("/") ? path : "/" + path}`; + + // Per-session SQLite database (in-memory) + let db: DatabaseSync | undefined; + + function getOrCreateDb(): DatabaseSync { + if (!db) { + db = new DatabaseSync(":memory:"); + db.exec("PRAGMA busy_timeout = 5000"); + } + return db; + } + + return { + async readFile(path: string): Promise { + return (await provider.readFile(sp(path), "utf8")) as string; + }, + async writeFile(path: string, content: string): Promise { + await provider.writeFile(sp(path), content); + }, + async appendFile(path: string, content: string): Promise { + await provider.appendFile(sp(path), content); + }, + async exists(path: string): Promise { + return provider.exists(sp(path)); + }, + async stat(path: string): Promise { + const st = await provider.stat(sp(path)); + return { + isFile: st.isFile(), + isDirectory: st.isDirectory(), + size: st.size, + mtime: new Date(st.mtimeMs).toISOString(), + birthtime: new Date(st.birthtimeMs).toISOString(), + }; + }, + async mkdir(path: string, recursive: boolean, mode?: number): Promise { + await provider.mkdir(sp(path), { recursive, mode }); + }, + async readdir(path: string): Promise { + return (await provider.readdir(sp(path))) as string[]; + }, + async readdirWithTypes( + path: string + ): Promise { + const names = (await provider.readdir(sp(path))) as string[]; + return Promise.all( + names.map(async (name) => { + const st = await provider.stat(sp(`${path}/${name}`)); + return { + name, + type: st.isDirectory() + ? ("directory" as const) + : ("file" as const), + }; + }) + ); + }, + async rm(path: string): Promise { + await provider.unlink(sp(path)); + }, + async rename(src: string, dest: string): Promise { + await provider.rename(sp(src), sp(dest)); + }, + sqlite: { + async query( + queryType: SessionFsSqliteQueryType, + query: string, + params?: Record + ): Promise { + sqliteCalls.push({ sessionId: session.sessionId, queryType, query }); + + const database = getOrCreateDb(); + const trimmed = query.trim(); + if (trimmed.length === 0) { + return undefined; + } + + switch (queryType) { + case "exec": + database.exec(trimmed); + return undefined; + + case "query": { + const stmt = database.prepare(trimmed); + const rows = ( + params ? stmt.all(params) : stmt.all() + ) as Record[]; + const columns = + rows.length > 0 ? Object.keys(rows[0]) : []; + return { rows, columns, rowsAffected: 0 }; + } + + case "run": { + const stmt = database.prepare(trimmed); + const result = params + ? stmt.run(params) + : stmt.run(); + return { + rows: [], + columns: [], + rowsAffected: Number(result.changes), + lastInsertRowid: + result.lastInsertRowid !== undefined + ? Number(result.lastInsertRowid) + : undefined, + }; + } + } + }, + async exists(): Promise { + return db !== undefined; + }, + }, + }; +} diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py index 41049b38d..57788a2a6 100644 --- a/python/copilot/generated/rpc.py +++ b/python/copilot/generated/rpc.py @@ -93,6 +93,8 @@ def to_dict(self) -> dict: @dataclass class AccountQuotaSnapshot: + """Schema for the `AccountQuotaSnapshot` type.""" + entitlement_requests: int """Number of requests included in the entitlement""" @@ -145,8 +147,10 @@ def to_dict(self) -> dict: @dataclass class AgentInfo: - """The newly selected custom agent""" + """Schema for the `AgentInfo` type. + The newly selected custom agent + """ description: str """Description of the agent's purpose""" @@ -182,6 +186,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AgentSelectRequest: + """Name of the custom agent to select for subsequent turns.""" + name: str """Name of the custom agent to select""" @@ -222,6 +228,8 @@ class SlashCommandKind(Enum): @dataclass class CommandsHandlePendingCommandRequest: + """Pending command request ID and an optional error if the client handler failed.""" + request_id: str """Request ID from the command invocation event""" @@ -244,6 +252,8 @@ def to_dict(self) -> dict: @dataclass class CommandsHandlePendingCommandResult: + """Indicates whether the pending client-handled command was completed successfully.""" + success: bool """Whether the command was handled successfully""" @@ -260,6 +270,8 @@ def to_dict(self) -> dict: @dataclass class CommandsInvokeRequest: + """Slash command name and optional raw input string to invoke.""" + name: str """Command name. Leading slashes are stripped and the name is matched case-insensitively.""" @@ -282,6 +294,8 @@ def to_dict(self) -> dict: @dataclass class CommandsListRequest: + """Optional filters controlling which command sources to include in the listing.""" + include_builtins: bool | None = None """Include runtime built-in commands""" @@ -309,34 +323,10 @@ def to_dict(self) -> dict: result["includeSkills"] = from_union([from_bool, from_none], self.include_skills) return result -@dataclass -class QueuedCommandResult: - """Result of the queued command execution""" - - handled: bool - """The command was handled - - The command was not handled - """ - stop_processing_queue: bool | None = None - """If true, stop processing remaining queued items""" - - @staticmethod - def from_dict(obj: Any) -> 'QueuedCommandResult': - assert isinstance(obj, dict) - handled = from_bool(obj.get("handled")) - stop_processing_queue = from_union([from_bool, from_none], obj.get("stopProcessingQueue")) - return QueuedCommandResult(handled, stop_processing_queue) - - def to_dict(self) -> dict: - result: dict = {} - result["handled"] = from_bool(self.handled) - if self.stop_processing_queue is not None: - result["stopProcessingQueue"] = from_union([from_bool, from_none], self.stop_processing_queue) - return result - @dataclass class CommandsRespondToQueuedCommandResult: + """Indicates whether the queued-command response was accepted by the session.""" + success: bool """Whether the response was accepted (false if the requestId was not found or already resolved) @@ -356,6 +346,8 @@ def to_dict(self) -> dict: # Internal: this type is an internal SDK API and is not part of the public surface. @dataclass class ConnectRequest: + """Optional connection token presented by the SDK client during the handshake.""" + token: str | None = None """Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN""" @@ -374,6 +366,8 @@ def to_dict(self) -> dict: # Internal: this type is an internal SDK API and is not part of the public surface. @dataclass class ConnectResult: + """Handshake result reporting the server's protocol version and package version on success.""" + ok: bool """Always true on success""" @@ -400,6 +394,8 @@ def to_dict(self) -> dict: @dataclass class CurrentModel: + """The currently selected model for the session.""" + model_id: str | None = None """Currently active model identifier""" @@ -435,6 +431,8 @@ class DiscoveredMCPServerType(Enum): @dataclass class EmbeddedBlobResourceContents: + """Schema for the `EmbeddedBlobResourceContents` type.""" + blob: str """Base64-encoded binary content of the resource""" @@ -462,6 +460,8 @@ def to_dict(self) -> dict: @dataclass class EmbeddedTextResourceContents: + """Schema for the `EmbeddedTextResourceContents` type.""" + text: str """Text content of the resource""" @@ -504,6 +504,8 @@ class ExtensionStatus(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExtensionsDisableRequest: + """Source-qualified extension identifier to disable for the session.""" + id: str """Source-qualified extension ID to disable""" @@ -521,6 +523,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExtensionsEnableRequest: + """Source-qualified extension identifier to enable for the session.""" + id: str """Source-qualified extension ID to enable""" @@ -541,44 +545,6 @@ class ExternalToolTextResultForLlmContentResourceLinkIconTheme(Enum): DARK = "dark" LIGHT = "light" -@dataclass -class ExternalToolTextResultForLlmContentResourceDetails: - """The embedded resource contents, either text or base64-encoded binary""" - - uri: str - """URI identifying the resource""" - - mime_type: str | None = None - """MIME type of the text content - - MIME type of the blob content - """ - text: str | None = None - """Text content of the resource""" - - blob: str | None = None - """Base64-encoded binary content of the resource""" - - @staticmethod - def from_dict(obj: Any) -> 'ExternalToolTextResultForLlmContentResourceDetails': - assert isinstance(obj, dict) - uri = from_str(obj.get("uri")) - mime_type = from_union([from_str, from_none], obj.get("mimeType")) - text = from_union([from_str, from_none], obj.get("text")) - blob = from_union([from_str, from_none], obj.get("blob")) - return ExternalToolTextResultForLlmContentResourceDetails(uri, mime_type, text, blob) - - def to_dict(self) -> dict: - result: dict = {} - result["uri"] = from_str(self.uri) - if self.mime_type is not None: - result["mimeType"] = from_union([from_str, from_none], self.mime_type) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) - if self.blob is not None: - result["blob"] = from_union([from_str, from_none], self.blob) - return result - class ExternalToolTextResultForLlmContentType(Enum): AUDIO = "audio" IMAGE = "image" @@ -606,6 +572,10 @@ class KindEnum(Enum): TEXT = "text" class FilterMappingString(Enum): + """Allowed values for the `FilterMappingValue` enumeration. + + Allowed values for the `FilterMappingString` enumeration. + """ HIDDEN_CHARACTERS = "hidden_characters" MARKDOWN = "markdown" NONE = "none" @@ -613,6 +583,8 @@ class FilterMappingString(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class FleetStartRequest: + """Optional user prompt to combine with the fleet orchestration instructions.""" + prompt: str | None = None """Optional user prompt to combine with fleet instructions""" @@ -631,6 +603,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class FleetStartResult: + """Indicates whether fleet mode was successfully activated.""" + started: bool """Whether fleet mode was successfully activated""" @@ -647,6 +621,8 @@ def to_dict(self) -> dict: @dataclass class HandlePendingToolCallResult: + """Indicates whether the external tool call result was handled successfully.""" + success: bool """Whether the tool call result was handled successfully""" @@ -710,6 +686,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class HistoryTruncateRequest: + """Identifier of the event to truncate to; this event and all later events are removed.""" + event_id: str """Event ID to truncate to. This event and all events after it are removed from the session.""" @@ -727,6 +705,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class HistoryTruncateResult: + """Number of events that were removed by the truncation.""" + events_removed: int """Number of events that were removed""" @@ -768,6 +748,8 @@ class SessionLogLevel(Enum): @dataclass class LogResult: + """Identifier of the session event that was emitted for the log message.""" + event_id: UUID """The unique identifier of the emitted session event""" @@ -783,12 +765,16 @@ def to_dict(self) -> dict: return result class MCPServerConfigHTTPOauthGrantType(Enum): + """OAuth grant type to use when authenticating to the remote MCP server.""" + AUTHORIZATION_CODE = "authorization_code" CLIENT_CREDENTIALS = "client_credentials" class MCPServerConfigType(Enum): - """Remote transport type. Defaults to "http" when omitted.""" + """Local transport type. Defaults to "local". + Remote transport type. Defaults to "http" when omitted. + """ HTTP = "http" LOCAL = "local" SSE = "sse" @@ -796,6 +782,8 @@ class MCPServerConfigType(Enum): @dataclass class MCPConfigDisableRequest: + """MCP server names to disable for new sessions.""" + names: list[str] """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 @@ -815,6 +803,8 @@ def to_dict(self) -> dict: @dataclass class MCPConfigEnableRequest: + """MCP server names to enable for new sessions.""" + names: list[str] """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. @@ -833,6 +823,8 @@ def to_dict(self) -> dict: @dataclass class MCPConfigRemoveRequest: + """MCP server name to remove from user configuration.""" + name: str """Name of the MCP server to remove""" @@ -849,6 +841,8 @@ def to_dict(self) -> dict: @dataclass class MCPDisableRequest: + """Name of the MCP server to disable for the session.""" + server_name: str """Name of the MCP server to disable""" @@ -865,6 +859,8 @@ def to_dict(self) -> dict: @dataclass class MCPDiscoverRequest: + """Optional working directory used as context for MCP server discovery.""" + working_directory: str | None = None """Working directory used as context for discovery (e.g., plugin resolution)""" @@ -882,6 +878,8 @@ def to_dict(self) -> dict: @dataclass class MCPEnableRequest: + """Name of the MCP server to enable for the session.""" + server_name: str """Name of the MCP server to enable""" @@ -898,6 +896,9 @@ def to_dict(self) -> dict: @dataclass class MCPOauthLoginRequest: + """Remote MCP server name and optional overrides controlling reauthentication, OAuth client + display name, and the callback success-page copy. + """ server_name: str """Name of the remote MCP server to authenticate""" @@ -941,6 +942,9 @@ def to_dict(self) -> dict: @dataclass class MCPOauthLoginResult: + """OAuth authorization URL the caller should open, or empty when cached tokens already + authenticated the server. + """ authorization_url: str | None = None """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 @@ -978,6 +982,8 @@ class MCPServerConfigHTTPType(Enum): SSE = "sse" class MCPServerConfigLocalType(Enum): + """Local transport type. Defaults to "local".""" + LOCAL = "local" STDIO = "stdio" @@ -1118,6 +1124,8 @@ def to_dict(self) -> dict: @dataclass class ModelCapabilitiesOverrideLimitsVision: + """Vision-specific limits""" + max_prompt_image_size: int | None = None """Maximum image size in bytes""" @@ -1150,7 +1158,10 @@ class ModelCapabilitiesOverrideSupports: """Feature flags indicating what the model supports""" reasoning_effort: bool | None = None + """Whether this model supports reasoning effort configuration""" + vision: bool | None = None + """Whether this model supports vision/image input""" @staticmethod def from_dict(obj: Any) -> 'ModelCapabilitiesOverrideSupports': @@ -1167,8 +1178,17 @@ def to_dict(self) -> dict: result["vision"] = from_union([from_bool, from_none], self.vision) return result +class ReasoningSummary(Enum): + """Reasoning summary mode to request for supported model clients""" + + CONCISE = "concise" + DETAILED = "detailed" + NONE = "none" + @dataclass class ModelSwitchToResult: + """The model identifier active on the session after the switch.""" + model_id: str | None = None """Currently active model identifier after the switch""" @@ -1205,6 +1225,8 @@ def to_dict(self) -> dict: @dataclass class NameGetResult: + """The session's friendly name, or null when not yet set.""" + name: str | None = None """The session name (user-set or auto-generated), or null if not yet set""" @@ -1221,6 +1243,8 @@ def to_dict(self) -> dict: @dataclass class NameSetRequest: + """New friendly name to apply to the session.""" + name: str """New session name (1–100 characters, trimmed of leading/trailing whitespace)""" @@ -1301,6 +1325,9 @@ class PermissionDecisionUserNotAvailableKind(Enum): @dataclass class PermissionRequestResult: + """Indicates whether the permission decision was applied; false when the request was already + resolved. + """ success: bool """Whether the permission request was handled successfully""" @@ -1317,6 +1344,7 @@ def to_dict(self) -> dict: @dataclass class PermissionsResetSessionApprovalsRequest: + """No parameters; clears all session-scoped tool permission approvals.""" @staticmethod def from_dict(obj: Any) -> 'PermissionsResetSessionApprovalsRequest': assert isinstance(obj, dict) @@ -1328,6 +1356,8 @@ def to_dict(self) -> dict: @dataclass class PermissionsResetSessionApprovalsResult: + """Indicates whether the operation succeeded.""" + success: bool """Whether the operation succeeded""" @@ -1344,6 +1374,8 @@ def to_dict(self) -> dict: @dataclass class PermissionsSetApproveAllRequest: + """Whether to auto-approve all tool permission requests for the rest of the session.""" + enabled: bool """Whether to auto-approve all tool permission requests""" @@ -1360,6 +1392,8 @@ def to_dict(self) -> dict: @dataclass class PermissionsSetApproveAllResult: + """Indicates whether the operation succeeded.""" + success: bool """Whether the operation succeeded""" @@ -1376,6 +1410,8 @@ def to_dict(self) -> dict: @dataclass class PingRequest: + """Optional message to echo back to the caller.""" + message: str | None = None """Optional message to echo back""" @@ -1393,6 +1429,9 @@ def to_dict(self) -> dict: @dataclass class PingResult: + """Server liveness response, including the echoed message, current timestamp, and protocol + version. + """ message: str """Echoed message (or default greeting)""" @@ -1419,6 +1458,8 @@ def to_dict(self) -> dict: @dataclass class PlanReadResult: + """Existence, contents, and resolved path of the session plan file.""" + exists: bool """Whether the plan file exists in the workspace""" @@ -1445,6 +1486,8 @@ def to_dict(self) -> dict: @dataclass class PlanUpdateRequest: + """Replacement contents to write to the session plan file.""" + content: str """The new content for the plan file""" @@ -1461,6 +1504,8 @@ def to_dict(self) -> dict: @dataclass class Plugin: + """Schema for the `Plugin` type.""" + enabled: bool """Whether the plugin is currently enabled""" @@ -1493,6 +1538,8 @@ def to_dict(self) -> dict: @dataclass class QueuedCommandHandled: + """Schema for the `QueuedCommandHandled` type.""" + handled: bool """The command was handled""" @@ -1515,6 +1562,8 @@ def to_dict(self) -> dict: @dataclass class QueuedCommandNotHandled: + """Schema for the `QueuedCommandNotHandled` type.""" + handled: bool """The command was not handled""" @@ -1530,9 +1579,8 @@ def to_dict(self) -> dict: return result class RemoteSessionMode(Enum): - """Per-session remote mode. "off" disables remote, "export" exports session events to - Mission Control without enabling remote steering, "on" enables both export and remote - steering. + """Per-session remote mode. "off" disables remote, "export" exports session events to GitHub + without enabling remote steering, "on" enables both export and remote steering. """ EXPORT = "export" OFF = "off" @@ -1541,11 +1589,13 @@ class RemoteSessionMode(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class RemoteEnableResult: + """GitHub URL for the session and a flag indicating whether remote steering is enabled.""" + remote_steerable: bool """Whether remote steering is enabled""" url: str | None = None - """Mission Control frontend URL for this session""" + """GitHub frontend URL for this session""" @staticmethod def from_dict(obj: Any) -> 'RemoteEnableResult': @@ -1563,6 +1613,8 @@ def to_dict(self) -> dict: @dataclass class ServerSkill: + """Schema for the `ServerSkill` type.""" + description: str """Description of what the skill does""" @@ -1611,6 +1663,9 @@ def to_dict(self) -> dict: @dataclass class SessionFSAppendFileRequest: + """File path, content to append, and optional mode for the client-provided session + filesystem. + """ content: str """Content to append""" @@ -1649,6 +1704,8 @@ class SessionFSErrorCode(Enum): @dataclass class SessionFSExistsRequest: + """Path to test for existence in the client-provided session filesystem.""" + path: str """Path using SessionFs conventions""" @@ -1670,6 +1727,8 @@ def to_dict(self) -> dict: @dataclass class SessionFSExistsResult: + """Indicates whether the requested path exists in the client-provided session filesystem.""" + exists: bool """Whether the path exists""" @@ -1686,6 +1745,9 @@ def to_dict(self) -> dict: @dataclass class SessionFSMkdirRequest: + """Directory path to create in the client-provided session filesystem, with options for + recursive creation and POSIX mode. + """ path: str """Path using SessionFs conventions""" @@ -1719,6 +1781,8 @@ def to_dict(self) -> dict: @dataclass class SessionFSReadFileRequest: + """Path of the file to read from the client-provided session filesystem.""" + path: str """Path using SessionFs conventions""" @@ -1740,6 +1804,8 @@ def to_dict(self) -> dict: @dataclass class SessionFSReaddirRequest: + """Directory path whose entries should be listed from the client-provided session filesystem.""" + path: str """Path using SessionFs conventions""" @@ -1767,6 +1833,9 @@ class SessionFSReaddirWithTypesEntryType(Enum): @dataclass class SessionFSReaddirWithTypesRequest: + """Directory path whose entries (with type information) should be listed from the + client-provided session filesystem. + """ path: str """Path using SessionFs conventions""" @@ -1788,6 +1857,9 @@ def to_dict(self) -> dict: @dataclass class SessionFSRenameRequest: + """Source and destination paths for renaming or moving an entry in the client-provided + session filesystem. + """ dest: str """Destination path using SessionFs conventions""" @@ -1814,6 +1886,9 @@ def to_dict(self) -> dict: @dataclass class SessionFSRmRequest: + """Path to remove from the client-provided session filesystem, with options for recursive + removal and force. + """ path: str """Path using SessionFs conventions""" @@ -1853,6 +1928,8 @@ class SessionFSSetProviderConventions(Enum): @dataclass class SessionFSSetProviderResult: + """Indicates whether the calling client was registered as the session filesystem provider.""" + success: bool """Whether the provider was set successfully""" @@ -1867,8 +1944,18 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +class SessionFSSqliteQueryType(Enum): + """How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT + (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected) + """ + EXEC = "exec" + QUERY = "query" + RUN = "run" + @dataclass class SessionFSStatRequest: + """Path whose metadata should be returned from the client-provided session filesystem.""" + path: str """Path using SessionFs conventions""" @@ -1890,6 +1977,8 @@ def to_dict(self) -> dict: @dataclass class SessionFSWriteFileRequest: + """File path, content to write, and optional mode for the client-provided session filesystem.""" + content: str """Content to write""" @@ -1923,6 +2012,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionsForkRequest: + """Source session identifier to fork from, optional event-ID boundary, and optional friendly + name for the new session. + """ session_id: str """Source session ID to fork from""" @@ -1954,6 +2046,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionsForkResult: + """Identifier and optional friendly name assigned to the newly forked session.""" + session_id: str """The new forked session's ID""" @@ -1976,6 +2070,8 @@ def to_dict(self) -> dict: @dataclass class ShellExecRequest: + """Shell command to run, with optional working directory and timeout in milliseconds.""" + command: str """Shell command to execute""" @@ -2004,6 +2100,9 @@ def to_dict(self) -> dict: @dataclass class ShellExecResult: + """Identifier of the spawned process, used to correlate streamed output and exit + notifications. + """ process_id: str """Unique identifier for tracking streamed output""" @@ -2027,6 +2126,9 @@ class ShellKillSignal(Enum): @dataclass class ShellKillResult: + """Indicates whether the signal was delivered; false if the process was unknown or already + exited. + """ killed: bool """Whether the signal was sent successfully""" @@ -2043,6 +2145,8 @@ def to_dict(self) -> dict: @dataclass class Skill: + """Schema for the `Skill` type.""" + description: str """Description of what the skill does""" @@ -2083,25 +2187,11 @@ def to_dict(self) -> dict: result["path"] = from_union([from_str, from_none], self.path) return result -@dataclass -class SkillsConfigSetDisabledSkillsRequest: - disabled_skills: list[str] - """List of skill names to disable""" - - @staticmethod - def from_dict(obj: Any) -> 'SkillsConfigSetDisabledSkillsRequest': - assert isinstance(obj, dict) - disabled_skills = from_list(from_str, obj.get("disabledSkills")) - return SkillsConfigSetDisabledSkillsRequest(disabled_skills) - - def to_dict(self) -> dict: - result: dict = {} - result["disabledSkills"] = from_list(from_str, self.disabled_skills) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SkillsDisableRequest: + """Name of the skill to disable for the session.""" + name: str """Name of the skill to disable""" @@ -2118,6 +2208,8 @@ def to_dict(self) -> dict: @dataclass class SkillsDiscoverRequest: + """Optional project paths and additional skill directories to include in discovery.""" + project_paths: list[str] | None = None """Optional list of project directory paths to scan for project-scoped skills""" @@ -2142,6 +2234,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SkillsEnableRequest: + """Name of the skill to enable for the session.""" + name: str """Name of the skill to enable""" @@ -2159,6 +2253,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SkillsLoadDiagnostics: + """Diagnostics from reloading skill definitions, with warnings and errors as separate lists.""" + errors: list[str] """Errors emitted while loading skills (e.g. skills that failed to load entirely)""" @@ -2226,6 +2322,8 @@ class TaskShellInfoType(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TasksCancelRequest: + """Identifier of the background task to cancel.""" + id: str """Task identifier""" @@ -2243,6 +2341,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TasksCancelResult: + """Indicates whether the background task was successfully cancelled.""" + cancelled: bool """Whether the task was successfully cancelled""" @@ -2260,6 +2360,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TasksPromoteToBackgroundRequest: + """Identifier of the task to promote to background mode.""" + id: str """Task identifier""" @@ -2277,6 +2379,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TasksPromoteToBackgroundResult: + """Indicates whether the task was successfully promoted to background mode.""" + promoted: bool """Whether the task was successfully promoted to background mode""" @@ -2294,6 +2398,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TasksRemoveRequest: + """Identifier of the completed or cancelled task to remove from tracking.""" + id: str """Task identifier""" @@ -2311,6 +2417,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TasksRemoveResult: + """Indicates whether the task was removed. False when the task does not exist or is still + running/idle. + """ removed: bool """Whether the task was removed. Returns false if the task does not exist or is still running/idle (cancel it first). @@ -2330,6 +2439,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TasksSendMessageRequest: + """Identifier of the target agent task, message content, and optional sender agent ID.""" + id: str """Agent task identifier""" @@ -2358,6 +2469,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TasksSendMessageResult: + """Indicates whether the message was delivered, with an error message when delivery failed.""" + sent: bool """Whether the message was successfully delivered or steered""" @@ -2381,6 +2494,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TasksStartAgentRequest: + """Agent type, prompt, name, and optional description and model override for the new task.""" + agent_type: str """Type of agent to start (e.g., 'explore', 'task', 'general-purpose')""" @@ -2420,6 +2535,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TasksStartAgentResult: + """Identifier assigned to the newly started background agent task.""" + agent_id: str """Generated agent ID for the background task""" @@ -2436,6 +2553,8 @@ def to_dict(self) -> dict: @dataclass class Tool: + """Schema for the `Tool` type.""" + description: str """Description of what the tool does""" @@ -2476,6 +2595,8 @@ def to_dict(self) -> dict: @dataclass class ToolsListRequest: + """Optional model identifier whose tool overrides should be applied to the listing.""" + model: str | None = None """Optional model ID — when provided, the returned tool list reflects model-specific overrides @@ -2495,8 +2616,13 @@ def to_dict(self) -> dict: @dataclass class UIElicitationArrayAnyOfFieldItemsAnyOf: + """Schema for the `UIElicitationArrayAnyOfFieldItemsAnyOf` type.""" + const: str + """Value submitted when this option is selected.""" + title: str + """Display label for this option.""" @staticmethod def from_dict(obj: Any) -> 'UIElicitationArrayAnyOfFieldItemsAnyOf': @@ -2518,6 +2644,8 @@ class UIElicitationArrayEnumFieldItemsType(Enum): STRING = "string" class UIElicitationSchemaPropertyStringFormat(Enum): + """Optional format hint that constrains the accepted input.""" + DATE = "date" DATE_TIME = "date-time" EMAIL = "email" @@ -2525,8 +2653,13 @@ class UIElicitationSchemaPropertyStringFormat(Enum): @dataclass class UIElicitationStringOneOfFieldOneOf: + """Schema for the `UIElicitationStringOneOfFieldOneOf` type.""" + const: str + """Value submitted when this option is selected.""" + title: str + """Display label for this option.""" @staticmethod def from_dict(obj: Any) -> 'UIElicitationStringOneOfFieldOneOf': @@ -2542,6 +2675,8 @@ def to_dict(self) -> dict: return result class UIElicitationSchemaPropertyType(Enum): + """Numeric type accepted by the field.""" + ARRAY = "array" BOOLEAN = "boolean" INTEGER = "integer" @@ -2560,6 +2695,9 @@ class UIElicitationResponseAction(Enum): @dataclass class UIElicitationResult: + """Indicates whether the elicitation response was accepted; false if it was already resolved + by another client. + """ success: bool """Whether the response was accepted. False if the request was already resolved by another client. @@ -2580,6 +2718,8 @@ class UIElicitationSchemaPropertyBooleanType(Enum): BOOLEAN = "boolean" class UIElicitationSchemaPropertyNumberType(Enum): + """Numeric type accepted by the field.""" + INTEGER = "integer" NUMBER = "number" @@ -2636,6 +2776,8 @@ def to_dict(self) -> dict: @dataclass class UsageMetricsModelMetricTokenDetail: + """Schema for the `UsageMetricsModelMetricTokenDetail` type.""" + token_count: int """Accumulated token count for this token type""" @@ -2691,6 +2833,8 @@ def to_dict(self) -> dict: @dataclass class UsageMetricsTokenDetail: + """Schema for the `UsageMetricsTokenDetail` type.""" + token_count: int """Accumulated token count for this token type""" @@ -2707,6 +2851,8 @@ def to_dict(self) -> dict: @dataclass class WorkspacesCreateFileRequest: + """Relative path and UTF-8 content for the workspace file to create or overwrite.""" + content: str """File content to write as a UTF-8 string""" @@ -2732,6 +2878,8 @@ class HostType(Enum): @dataclass class WorkspacesListFilesResult: + """Relative paths of files stored in the session workspace files directory.""" + files: list[str] """Relative file paths in the workspace files directory""" @@ -2748,6 +2896,8 @@ def to_dict(self) -> dict: @dataclass class WorkspacesReadFileRequest: + """Relative path of the workspace file to read.""" + path: str """Relative path within the workspace files directory""" @@ -2764,6 +2914,8 @@ def to_dict(self) -> dict: @dataclass class WorkspacesReadFileResult: + """Contents of the requested workspace file as a UTF-8 string.""" + content: str """File content as a UTF-8 string""" @@ -2780,6 +2932,8 @@ def to_dict(self) -> dict: @dataclass class AccountGetQuotaResult: + """Quota usage snapshots for the resolved user, keyed by quota type.""" + quota_snapshots: dict[str, AccountQuotaSnapshot] """Quota snapshots keyed by type (e.g., chat, completions, premium_interactions)""" @@ -2797,6 +2951,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AgentGetCurrentResult: + """The currently selected custom agent, or null when using the default agent.""" + agent: AgentInfo | None = None """Currently selected custom agent, or null if using the default agent""" @@ -2815,6 +2971,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AgentList: + """Custom agents available to the session.""" + agents: list[AgentInfo] """Available custom agents""" @@ -2832,6 +2990,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AgentReloadResult: + """Custom agents available to the session after reloading definitions from disk.""" + agents: list[AgentInfo] """Reloaded custom agents""" @@ -2849,6 +3009,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AgentSelectResult: + """The newly selected custom agent.""" + agent: AgentInfo """The newly selected custom agent""" @@ -2865,6 +3027,8 @@ def to_dict(self) -> dict: @dataclass class SessionAuthStatus: + """Authentication status and account metadata for the session.""" + is_authenticated: bool """Whether the session has resolved authentication""" @@ -2948,29 +3112,10 @@ def to_dict(self) -> dict: result["required"] = from_union([from_bool, from_none], self.required) return result -@dataclass -class CommandsRespondToQueuedCommandRequest: - request_id: str - """Request ID from the queued command event""" - - result: QueuedCommandResult - """Result of the queued command execution""" - - @staticmethod - def from_dict(obj: Any) -> 'CommandsRespondToQueuedCommandRequest': - assert isinstance(obj, dict) - request_id = from_str(obj.get("requestId")) - result = QueuedCommandResult.from_dict(obj.get("result")) - return CommandsRespondToQueuedCommandRequest(request_id, result) - - def to_dict(self) -> dict: - result: dict = {} - result["requestId"] = from_str(self.request_id) - result["result"] = to_class(QueuedCommandResult, self.result) - return result - @dataclass class DiscoveredMCPServer: + """Schema for the `DiscoveredMcpServer` type.""" + enabled: bool """Whether the server is enabled (not in the disabled list)""" @@ -3002,35 +3147,79 @@ def to_dict(self) -> dict: return result @dataclass -class Extension: - id: str - """Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper')""" +class ExternalToolTextResultForLlmContentResourceDetails: + """The embedded resource contents, either text or base64-encoded binary - name: str - """Extension name (directory name)""" + Schema for the `EmbeddedTextResourceContents` type. - source: ExtensionSource - """Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)""" + Schema for the `EmbeddedBlobResourceContents` type. + """ + uri: str + """URI identifying the resource""" - status: ExtensionStatus - """Current status: running, disabled, failed, or starting""" + mime_type: str | None = None + """MIME type of the text content - pid: int | None = None - """Process ID if the extension is running""" + MIME type of the blob content + """ + text: str | None = None + """Text content of the resource""" + + blob: str | None = None + """Base64-encoded binary content of the resource""" @staticmethod - def from_dict(obj: Any) -> 'Extension': + def from_dict(obj: Any) -> 'ExternalToolTextResultForLlmContentResourceDetails': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - name = from_str(obj.get("name")) - source = ExtensionSource(obj.get("source")) - status = ExtensionStatus(obj.get("status")) - pid = from_union([from_int, from_none], obj.get("pid")) - return Extension(id, name, source, status, pid) + uri = from_str(obj.get("uri")) + mime_type = from_union([from_str, from_none], obj.get("mimeType")) + text = from_union([from_str, from_none], obj.get("text")) + blob = from_union([from_str, from_none], obj.get("blob")) + return ExternalToolTextResultForLlmContentResourceDetails(uri, mime_type, text, blob) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["uri"] = from_str(self.uri) + if self.mime_type is not None: + result["mimeType"] = from_union([from_str, from_none], self.mime_type) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) + if self.blob is not None: + result["blob"] = from_union([from_str, from_none], self.blob) + return result + +@dataclass +class Extension: + """Schema for the `Extension` type.""" + + id: str + """Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper')""" + + name: str + """Extension name (directory name)""" + + source: ExtensionSource + """Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)""" + + status: ExtensionStatus + """Current status: running, disabled, failed, or starting""" + + pid: int | None = None + """Process ID if the extension is running""" + + @staticmethod + def from_dict(obj: Any) -> 'Extension': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + name = from_str(obj.get("name")) + source = ExtensionSource(obj.get("source")) + status = ExtensionStatus(obj.get("status")) + pid = from_union([from_int, from_none], obj.get("pid")) + return Extension(id, name, source, status, pid) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) result["name"] = from_str(self.name) result["source"] = to_enum(ExtensionSource, self.source) result["status"] = to_enum(ExtensionStatus, self.status) @@ -3130,29 +3319,6 @@ def to_dict(self) -> dict: result["type"] = to_enum(ExternalToolTextResultForLlmContentImageType, self.type) return result -@dataclass -class ExternalToolTextResultForLlmContentResource: - """Embedded resource content block with inline text or binary data""" - - resource: ExternalToolTextResultForLlmContentResourceDetails - """The embedded resource contents, either text or base64-encoded binary""" - - type: ExternalToolTextResultForLlmContentResourceType - """Content block type discriminator""" - - @staticmethod - def from_dict(obj: Any) -> 'ExternalToolTextResultForLlmContentResource': - assert isinstance(obj, dict) - resource = ExternalToolTextResultForLlmContentResourceDetails.from_dict(obj.get("resource")) - type = ExternalToolTextResultForLlmContentResourceType(obj.get("type")) - return ExternalToolTextResultForLlmContentResource(resource, type) - - def to_dict(self) -> dict: - result: dict = {} - result["resource"] = to_class(ExternalToolTextResultForLlmContentResourceDetails, self.resource) - result["type"] = to_enum(ExternalToolTextResultForLlmContentResourceType, self.type) - return result - @dataclass class ExternalToolTextResultForLlmContentTerminal: """Terminal/shell output content block with optional exit code and working directory""" @@ -3213,6 +3379,8 @@ def to_dict(self) -> dict: @dataclass class SlashCommandTextResult: + """Schema for the `SlashCommandTextResult` type.""" + kind: KindEnum """Text result discriminator""" @@ -3255,6 +3423,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class HistoryCompactResult: + """Compaction outcome with the number of tokens and messages removed and the resulting + context window breakdown. + """ messages_removed: int """Number of messages removed during compaction""" @@ -3287,6 +3458,8 @@ def to_dict(self) -> dict: @dataclass class InstructionsSources: + """Schema for the `InstructionsSources` type.""" + content: str """Raw content of the instruction file""" @@ -3340,6 +3513,8 @@ def to_dict(self) -> dict: @dataclass class LogRequest: + """Message text, optional severity level, persistence flag, and optional follow-up URL.""" + message: str """Human-readable message""" @@ -3375,14 +3550,32 @@ def to_dict(self) -> dict: @dataclass class MCPServerConfig: - """MCP server configuration (local/stdio or remote/http)""" + """MCP server configuration (local/stdio or remote/http) + Local MCP server configuration launched as a child process. + + Remote MCP server configuration accessed over HTTP or SSE. + """ args: list[str] | None = None + """Command-line arguments passed to the local MCP server process.""" + command: str | None = None + """Executable command used to start the local MCP server process.""" + cwd: str | None = None + """Working directory for the local MCP server process.""" + env: dict[str, str] | None = None + """Environment variables to pass to the local MCP server process.""" + filter_mapping: dict[str, FilterMappingString] | FilterMappingString | None = None + """Content filtering mode to apply to all tools, or a map of tool name to content filtering + mode. + """ is_default_server: bool | None = None + """Whether this server is a built-in fallback used when the user has not configured their + own server. + """ timeout: int | None = None """Timeout in milliseconds for tool calls to this server.""" @@ -3390,13 +3583,24 @@ class MCPServerConfig: """Tools to include. Defaults to all tools if not specified.""" type: MCPServerConfigType | None = None - """Remote transport type. Defaults to "http" when omitted.""" + """Local transport type. Defaults to "local". + Remote transport type. Defaults to "http" when omitted. + """ headers: dict[str, str] | None = None + """HTTP headers to include in requests to the remote MCP server.""" + oauth_client_id: str | None = None + """OAuth client ID for a pre-registered remote MCP OAuth client.""" + oauth_grant_type: MCPServerConfigHTTPOauthGrantType | None = None + """OAuth grant type to use when authenticating to the remote MCP server.""" + oauth_public_client: bool | None = None + """Whether the configured OAuth client is public and does not require a client secret.""" + url: str | None = None + """URL of the remote MCP server endpoint.""" @staticmethod def from_dict(obj: Any) -> 'MCPServerConfig': @@ -3451,6 +3655,8 @@ def to_dict(self) -> dict: @dataclass class MCPServer: + """Schema for the `McpServer` type.""" + name: str """Server name (config key)""" @@ -3484,13 +3690,31 @@ def to_dict(self) -> dict: @dataclass class MCPServerConfigHTTP: + """Remote MCP server configuration accessed over HTTP or SSE.""" + url: str + """URL of the remote MCP server endpoint.""" + filter_mapping: dict[str, FilterMappingString] | FilterMappingString | None = None + """Content filtering mode to apply to all tools, or a map of tool name to content filtering + mode. + """ headers: dict[str, str] | None = None + """HTTP headers to include in requests to the remote MCP server.""" + is_default_server: bool | None = None + """Whether this server is a built-in fallback used when the user has not configured their + own server. + """ oauth_client_id: str | None = None + """OAuth client ID for a pre-registered remote MCP OAuth client.""" + oauth_grant_type: MCPServerConfigHTTPOauthGrantType | None = None + """OAuth grant type to use when authenticating to the remote MCP server.""" + oauth_public_client: bool | None = None + """Whether the configured OAuth client is public and does not require a client secret.""" + timeout: int | None = None """Timeout in milliseconds for tool calls to this server.""" @@ -3540,12 +3764,28 @@ def to_dict(self) -> dict: @dataclass class MCPServerConfigLocal: + """Local MCP server configuration launched as a child process.""" + args: list[str] + """Command-line arguments passed to the local MCP server process.""" + command: str + """Executable command used to start the local MCP server process.""" + cwd: str | None = None + """Working directory for the local MCP server process.""" + env: dict[str, str] | None = None + """Environment variables to pass to the local MCP server process.""" + filter_mapping: dict[str, FilterMappingString] | FilterMappingString | None = None + """Content filtering mode to apply to all tools, or a map of tool name to content filtering + mode. + """ is_default_server: bool | None = None + """Whether this server is a built-in fallback used when the user has not configured their + own server. + """ timeout: int | None = None """Timeout in milliseconds for tool calls to this server.""" @@ -3553,6 +3793,7 @@ class MCPServerConfigLocal: """Tools to include. Defaults to all tools if not specified.""" type: MCPServerConfigLocalType | None = None + """Local transport type. Defaults to "local".""" @staticmethod def from_dict(obj: Any) -> 'MCPServerConfigLocal': @@ -3590,6 +3831,8 @@ def to_dict(self) -> dict: @dataclass class ModeSetRequest: + """Agent interaction mode to apply to the session.""" + mode: Mode """The agent mode. Valid values: "interactive", "plan", "autopilot".""" @@ -3674,8 +3917,13 @@ class ModelCapabilitiesOverrideLimits: """Maximum total context window size in tokens""" max_output_tokens: int | None = None + """Maximum number of output/completion tokens""" + max_prompt_tokens: int | None = None + """Maximum number of prompt/input tokens""" + vision: ModelCapabilitiesOverrideLimitsVision | None = None + """Vision-specific limits""" @staticmethod def from_dict(obj: Any) -> 'ModelCapabilitiesOverrideLimits': @@ -3698,123 +3946,15 @@ def to_dict(self) -> dict: result["vision"] = from_union([lambda x: to_class(ModelCapabilitiesOverrideLimitsVision, x), from_none], self.vision) return result -@dataclass -class PermissionDecisionApproveForIonApproval: - """The approval to add as a session-scoped rule - - The approval to persist for this location - """ - kind: ApprovalKind - command_identifiers: list[str] | None = None - server_name: str | None = None - tool_name: str | None = None - operation: str | None = None - extension_name: str | None = None - - @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionApproveForIonApproval': - assert isinstance(obj, dict) - kind = ApprovalKind(obj.get("kind")) - command_identifiers = from_union([lambda x: from_list(from_str, x), from_none], obj.get("commandIdentifiers")) - server_name = from_union([from_str, from_none], obj.get("serverName")) - tool_name = from_union([from_none, from_str], obj.get("toolName")) - operation = from_union([from_str, from_none], obj.get("operation")) - extension_name = from_union([from_str, from_none], obj.get("extensionName")) - return PermissionDecisionApproveForIonApproval(kind, command_identifiers, server_name, tool_name, operation, extension_name) - - def to_dict(self) -> dict: - result: dict = {} - result["kind"] = to_enum(ApprovalKind, self.kind) - if self.command_identifiers is not None: - result["commandIdentifiers"] = from_union([lambda x: from_list(from_str, x), from_none], self.command_identifiers) - if self.server_name is not None: - result["serverName"] = from_union([from_str, from_none], self.server_name) - if self.tool_name is not None: - result["toolName"] = from_union([from_none, from_str], self.tool_name) - if self.operation is not None: - result["operation"] = from_union([from_str, from_none], self.operation) - if self.extension_name is not None: - result["extensionName"] = from_union([from_str, from_none], self.extension_name) - return result - -@dataclass -class PermissionDecisionApproveForLocationApproval: - """The approval to persist for this location""" - - kind: ApprovalKind - command_identifiers: list[str] | None = None - server_name: str | None = None - tool_name: str | None = None - operation: str | None = None - extension_name: str | None = None - - @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApproval': - assert isinstance(obj, dict) - kind = ApprovalKind(obj.get("kind")) - command_identifiers = from_union([lambda x: from_list(from_str, x), from_none], obj.get("commandIdentifiers")) - server_name = from_union([from_str, from_none], obj.get("serverName")) - tool_name = from_union([from_none, from_str], obj.get("toolName")) - operation = from_union([from_str, from_none], obj.get("operation")) - extension_name = from_union([from_str, from_none], obj.get("extensionName")) - return PermissionDecisionApproveForLocationApproval(kind, command_identifiers, server_name, tool_name, operation, extension_name) - - def to_dict(self) -> dict: - result: dict = {} - result["kind"] = to_enum(ApprovalKind, self.kind) - if self.command_identifiers is not None: - result["commandIdentifiers"] = from_union([lambda x: from_list(from_str, x), from_none], self.command_identifiers) - if self.server_name is not None: - result["serverName"] = from_union([from_str, from_none], self.server_name) - if self.tool_name is not None: - result["toolName"] = from_union([from_none, from_str], self.tool_name) - if self.operation is not None: - result["operation"] = from_union([from_str, from_none], self.operation) - if self.extension_name is not None: - result["extensionName"] = from_union([from_str, from_none], self.extension_name) - return result - -@dataclass -class PermissionDecisionApproveForSessionApproval: - """The approval to add as a session-scoped rule""" - - kind: ApprovalKind - command_identifiers: list[str] | None = None - server_name: str | None = None - tool_name: str | None = None - operation: str | None = None - extension_name: str | None = None - - @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApproval': - assert isinstance(obj, dict) - kind = ApprovalKind(obj.get("kind")) - command_identifiers = from_union([lambda x: from_list(from_str, x), from_none], obj.get("commandIdentifiers")) - server_name = from_union([from_str, from_none], obj.get("serverName")) - tool_name = from_union([from_none, from_str], obj.get("toolName")) - operation = from_union([from_str, from_none], obj.get("operation")) - extension_name = from_union([from_str, from_none], obj.get("extensionName")) - return PermissionDecisionApproveForSessionApproval(kind, command_identifiers, server_name, tool_name, operation, extension_name) - - def to_dict(self) -> dict: - result: dict = {} - result["kind"] = to_enum(ApprovalKind, self.kind) - if self.command_identifiers is not None: - result["commandIdentifiers"] = from_union([lambda x: from_list(from_str, x), from_none], self.command_identifiers) - if self.server_name is not None: - result["serverName"] = from_union([from_str, from_none], self.server_name) - if self.tool_name is not None: - result["toolName"] = from_union([from_none, from_str], self.tool_name) - if self.operation is not None: - result["operation"] = from_union([from_str, from_none], self.operation) - if self.extension_name is not None: - result["extensionName"] = from_union([from_str, from_none], self.extension_name) - return result - @dataclass class PermissionDecisionApproveForLocationApprovalCommands: + """Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type.""" + command_identifiers: list[str] + """Command identifiers covered by this approval.""" + kind: PermissionDecisionApproveForLocationApprovalCommandsKind + """Approval scoped to specific command identifiers.""" @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalCommands': @@ -3831,8 +3971,13 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveForSessionApprovalCommands: + """Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type.""" + command_identifiers: list[str] + """Command identifiers covered by this approval.""" + kind: PermissionDecisionApproveForLocationApprovalCommandsKind + """Approval scoped to specific command identifiers.""" @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalCommands': @@ -3849,8 +3994,13 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveForLocationApprovalCustomTool: + """Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type.""" + kind: PermissionDecisionApproveForLocationApprovalCustomToolKind + """Approval covering a custom tool.""" + tool_name: str + """Custom tool name.""" @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalCustomTool': @@ -3867,8 +4017,13 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveForSessionApprovalCustomTool: + """Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type.""" + kind: PermissionDecisionApproveForLocationApprovalCustomToolKind + """Approval covering a custom tool.""" + tool_name: str + """Custom tool name.""" @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalCustomTool': @@ -3885,8 +4040,15 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveForLocationApprovalExtensionManagement: + """Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type.""" + kind: PermissionDecisionApproveForLocationApprovalExtensionManagementKind + """Approval covering extension lifecycle operations such as enable, disable, or reload.""" + operation: str | None = None + """Optional operation identifier; when omitted, the approval covers all extension management + operations. + """ @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalExtensionManagement': @@ -3904,8 +4066,15 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveForSessionApprovalExtensionManagement: + """Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type.""" + kind: PermissionDecisionApproveForLocationApprovalExtensionManagementKind + """Approval covering extension lifecycle operations such as enable, disable, or reload.""" + operation: str | None = None + """Optional operation identifier; when omitted, the approval covers all extension management + operations. + """ @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalExtensionManagement': @@ -3922,67 +4091,45 @@ def to_dict(self) -> dict: return result @dataclass -class PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess: - extension_name: str - kind: PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind +class PermissionDecisionApproveForLocationApprovalMCP: + """Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type.""" + + kind: PermissionDecisionApproveForLocationApprovalMCPKind + """Approval covering an MCP tool.""" + + server_name: str + """MCP server name.""" + + tool_name: str | None = None + """MCP tool name, or null to cover every tool on the server.""" @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess': + def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalMCP': assert isinstance(obj, dict) - extension_name = from_str(obj.get("extensionName")) - kind = PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind(obj.get("kind")) - return PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess(extension_name, kind) + kind = PermissionDecisionApproveForLocationApprovalMCPKind(obj.get("kind")) + server_name = from_str(obj.get("serverName")) + tool_name = from_union([from_none, from_str], obj.get("toolName")) + return PermissionDecisionApproveForLocationApprovalMCP(kind, server_name, tool_name) def to_dict(self) -> dict: result: dict = {} - result["extensionName"] = from_str(self.extension_name) - result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind, self.kind) + result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalMCPKind, self.kind) + result["serverName"] = from_str(self.server_name) + result["toolName"] = from_union([from_none, from_str], self.tool_name) return result @dataclass -class PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess: - extension_name: str - kind: PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind - - @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess': - assert isinstance(obj, dict) - extension_name = from_str(obj.get("extensionName")) - kind = PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind(obj.get("kind")) - return PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess(extension_name, kind) - - def to_dict(self) -> dict: - result: dict = {} - result["extensionName"] = from_str(self.extension_name) - result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind, self.kind) - return result +class PermissionDecisionApproveForSessionApprovalMCP: + """Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type.""" -@dataclass -class PermissionDecisionApproveForLocationApprovalMCP: kind: PermissionDecisionApproveForLocationApprovalMCPKind - server_name: str - tool_name: str | None = None - - @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalMCP': - assert isinstance(obj, dict) - kind = PermissionDecisionApproveForLocationApprovalMCPKind(obj.get("kind")) - server_name = from_str(obj.get("serverName")) - tool_name = from_union([from_none, from_str], obj.get("toolName")) - return PermissionDecisionApproveForLocationApprovalMCP(kind, server_name, tool_name) - - def to_dict(self) -> dict: - result: dict = {} - result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalMCPKind, self.kind) - result["serverName"] = from_str(self.server_name) - result["toolName"] = from_union([from_none, from_str], self.tool_name) - return result + """Approval covering an MCP tool.""" -@dataclass -class PermissionDecisionApproveForSessionApprovalMCP: - kind: PermissionDecisionApproveForLocationApprovalMCPKind server_name: str + """MCP server name.""" + tool_name: str | None = None + """MCP tool name, or null to cover every tool on the server.""" @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalMCP': @@ -4001,8 +4148,13 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveForLocationApprovalMCPSampling: + """Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type.""" + kind: PermissionDecisionApproveForLocationApprovalMCPSamplingKind + """Approval covering MCP sampling requests for a server.""" + server_name: str + """MCP server name.""" @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalMCPSampling': @@ -4019,8 +4171,13 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveForSessionApprovalMCPSampling: + """Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type.""" + kind: PermissionDecisionApproveForLocationApprovalMCPSamplingKind + """Approval covering MCP sampling requests for a server.""" + server_name: str + """MCP server name.""" @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalMCPSampling': @@ -4037,7 +4194,10 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveForLocationApprovalMemory: + """Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type.""" + kind: PermissionDecisionApproveForLocationApprovalMemoryKind + """Approval covering writes to long-term memory.""" @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalMemory': @@ -4052,7 +4212,10 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveForSessionApprovalMemory: + """Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type.""" + kind: PermissionDecisionApproveForLocationApprovalMemoryKind + """Approval covering writes to long-term memory.""" @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalMemory': @@ -4067,7 +4230,10 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveForLocationApprovalRead: + """Schema for the `PermissionDecisionApproveForLocationApprovalRead` type.""" + kind: PermissionDecisionApproveForLocationApprovalReadKind + """Approval covering read-only filesystem operations.""" @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalRead': @@ -4082,7 +4248,10 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveForSessionApprovalRead: + """Schema for the `PermissionDecisionApproveForSessionApprovalRead` type.""" + kind: PermissionDecisionApproveForLocationApprovalReadKind + """Approval covering read-only filesystem operations.""" @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalRead': @@ -4097,7 +4266,10 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveForLocationApprovalWrite: + """Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type.""" + kind: PermissionDecisionApproveForLocationApprovalWriteKind + """Approval covering filesystem write operations.""" @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalWrite': @@ -4112,7 +4284,10 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveForSessionApprovalWrite: + """Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type.""" + kind: PermissionDecisionApproveForLocationApprovalWriteKind + """Approval covering filesystem write operations.""" @staticmethod def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalWrite': @@ -4127,6 +4302,8 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApproveOnce: + """Schema for the `PermissionDecisionApproveOnce` type.""" + kind: PermissionDecisionApproveOnceKind """The permission request was approved for this one instance""" @@ -4143,6 +4320,8 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionApprovePermanently: + """Schema for the `PermissionDecisionApprovePermanently` type.""" + domain: str """The URL domain to approve permanently""" @@ -4164,6 +4343,8 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionReject: + """Schema for the `PermissionDecisionReject` type.""" + kind: PermissionDecisionRejectKind """Denied by the user during an interactive prompt""" @@ -4186,6 +4367,8 @@ def to_dict(self) -> dict: @dataclass class PermissionDecisionUserNotAvailable: + """Schema for the `PermissionDecisionUserNotAvailable` type.""" + kind: PermissionDecisionUserNotAvailableKind """Denied because user confirmation was unavailable""" @@ -4203,6 +4386,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PluginList: + """Plugins installed for the session, with their enabled state and version metadata.""" + plugins: list[Plugin] """Installed plugins""" @@ -4217,13 +4402,45 @@ def to_dict(self) -> dict: result["plugins"] = from_list(lambda x: to_class(Plugin, x), self.plugins) return result +@dataclass +class QueuedCommandResult: + """Result of the queued command execution + + Schema for the `QueuedCommandHandled` type. + + Schema for the `QueuedCommandNotHandled` type. + """ + handled: bool + """The command was handled + + The command was not handled + """ + stop_processing_queue: bool | None = None + """If true, stop processing remaining queued items""" + + @staticmethod + def from_dict(obj: Any) -> 'QueuedCommandResult': + assert isinstance(obj, dict) + handled = from_bool(obj.get("handled")) + stop_processing_queue = from_union([from_bool, from_none], obj.get("stopProcessingQueue")) + return QueuedCommandResult(handled, stop_processing_queue) + + def to_dict(self) -> dict: + result: dict = {} + result["handled"] = from_bool(self.handled) + if self.stop_processing_queue is not None: + result["stopProcessingQueue"] = from_union([from_bool, from_none], self.stop_processing_queue) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class RemoteEnableRequest: + """Optional remote session mode ("off", "export", or "on"); defaults to enabling both export + and remote steering. + """ mode: RemoteSessionMode | None = None - """Per-session remote mode. "off" disables remote, "export" exports session events to - Mission Control without enabling remote steering, "on" enables both export and remote - steering. + """Per-session remote mode. "off" disables remote, "export" exports session events to GitHub + without enabling remote steering, "on" enables both export and remote steering. """ @staticmethod @@ -4240,6 +4457,8 @@ def to_dict(self) -> dict: @dataclass class ServerSkillList: + """Skills discovered across global and project sources.""" + skills: list[ServerSkill] """All discovered skills across all sources""" @@ -4280,6 +4499,8 @@ def to_dict(self) -> dict: @dataclass class SessionFSReaddirWithTypesEntry: + """Schema for the `SessionFsReaddirWithTypesEntry` type.""" + name: str """Entry name""" @@ -4301,6 +4522,9 @@ def to_dict(self) -> dict: @dataclass class SessionFSSetProviderRequest: + """Initial working directory, session-state path layout, and path conventions used to + register the calling SDK client as the session filesystem provider. + """ conventions: SessionFSSetProviderConventions """Path conventions used by this filesystem""" @@ -4325,8 +4549,51 @@ def to_dict(self) -> dict: result["sessionStatePath"] = from_str(self.session_state_path) return result +@dataclass +class SessionFSSqliteRequest: + """Database name, SQL query, query type, and optional bind parameters for executing a SQLite + query against a per-session database. + """ + db_name: str + """Logical database name (e.g., 'session')""" + + query: str + """SQL query to execute""" + + query_type: SessionFSSqliteQueryType + """How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT + (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected) + """ + session_id: str + """Target session identifier""" + + params: dict[str, Optional[float | str]] | None = None + """Optional named bind parameters""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionFSSqliteRequest': + assert isinstance(obj, dict) + db_name = from_str(obj.get("dbName")) + query = from_str(obj.get("query")) + query_type = SessionFSSqliteQueryType(obj.get("queryType")) + session_id = from_str(obj.get("sessionId")) + params = from_union([lambda x: from_dict(lambda x: from_union([from_none, from_float, from_str], x), x), from_none], obj.get("params")) + return SessionFSSqliteRequest(db_name, query, query_type, session_id, params) + + def to_dict(self) -> dict: + result: dict = {} + result["dbName"] = from_str(self.db_name) + result["query"] = from_str(self.query) + result["queryType"] = to_enum(SessionFSSqliteQueryType, self.query_type) + result["sessionId"] = from_str(self.session_id) + if self.params is not None: + result["params"] = from_union([lambda x: from_dict(lambda x: from_union([from_none, to_float, from_str], x), x), from_none], self.params) + return result + @dataclass class ShellKillRequest: + """Identifier of a process previously returned by "shell.exec" and the signal to send.""" + process_id: str """Process identifier returned by shell.exec""" @@ -4350,6 +4617,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SkillList: + """Skills available to the session, with their enabled state.""" + skills: list[Skill] """Available skills""" @@ -4364,8 +4633,28 @@ def to_dict(self) -> dict: result["skills"] = from_list(lambda x: to_class(Skill, x), self.skills) return result +@dataclass +class SkillsConfigSetDisabledSkillsRequest: + """Skill names to mark as disabled in global configuration, replacing any previous list.""" + + disabled_skills: list[str] + """List of skill names to disable""" + + @staticmethod + def from_dict(obj: Any) -> 'SkillsConfigSetDisabledSkillsRequest': + assert isinstance(obj, dict) + disabled_skills = from_list(from_str, obj.get("disabledSkills")) + return SkillsConfigSetDisabledSkillsRequest(disabled_skills) + + def to_dict(self) -> dict: + result: dict = {} + result["disabledSkills"] = from_list(from_str, self.disabled_skills) + return result + @dataclass class SlashCommandAgentPromptResult: + """Schema for the `SlashCommandAgentPromptResult` type.""" + display_prompt: str """Prompt text to display to the user""" @@ -4406,6 +4695,8 @@ def to_dict(self) -> dict: @dataclass class SlashCommandCompletedResult: + """Schema for the `SlashCommandCompletedResult` type.""" + kind: SlashCommandCompletedResultKind """Completed result discriminator""" @@ -4434,77 +4725,10 @@ def to_dict(self) -> dict: result["runtimeSettingsChanged"] = from_union([from_bool, from_none], self.runtime_settings_changed) return result -@dataclass -class SlashCommandInvocationResult: - kind: SlashCommandInvocationResultKind - """Text result discriminator - - Agent prompt result discriminator - - Completed result discriminator - """ - markdown: bool | None = None - """Whether text contains Markdown""" - - preserve_ansi: bool | None = None - """Whether ANSI sequences should be preserved""" - - runtime_settings_changed: bool | None = None - """True when the invocation mutated user runtime settings; consumers caching settings should - refresh - """ - text: str | None = None - """Text output for the client to render""" - - display_prompt: str | None = None - """Prompt text to display to the user""" - - mode: Mode | None = None - """Optional target session mode""" - - prompt: str | None = None - """Prompt to submit to the agent""" - - message: str | None = None - """Optional user-facing message describing the completed command""" - - @staticmethod - def from_dict(obj: Any) -> 'SlashCommandInvocationResult': - assert isinstance(obj, dict) - kind = SlashCommandInvocationResultKind(obj.get("kind")) - markdown = from_union([from_bool, from_none], obj.get("markdown")) - preserve_ansi = from_union([from_bool, from_none], obj.get("preserveAnsi")) - runtime_settings_changed = from_union([from_bool, from_none], obj.get("runtimeSettingsChanged")) - text = from_union([from_str, from_none], obj.get("text")) - display_prompt = from_union([from_str, from_none], obj.get("displayPrompt")) - mode = from_union([Mode, from_none], obj.get("mode")) - prompt = from_union([from_str, from_none], obj.get("prompt")) - message = from_union([from_str, from_none], obj.get("message")) - return SlashCommandInvocationResult(kind, markdown, preserve_ansi, runtime_settings_changed, text, display_prompt, mode, prompt, message) - - def to_dict(self) -> dict: - result: dict = {} - result["kind"] = to_enum(SlashCommandInvocationResultKind, self.kind) - if self.markdown is not None: - result["markdown"] = from_union([from_bool, from_none], self.markdown) - if self.preserve_ansi is not None: - result["preserveAnsi"] = from_union([from_bool, from_none], self.preserve_ansi) - if self.runtime_settings_changed is not None: - result["runtimeSettingsChanged"] = from_union([from_bool, from_none], self.runtime_settings_changed) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) - if self.display_prompt is not None: - result["displayPrompt"] = from_union([from_str, from_none], self.display_prompt) - if self.mode is not None: - result["mode"] = from_union([lambda x: to_enum(Mode, x), from_none], self.mode) - if self.prompt is not None: - result["prompt"] = from_union([from_str, from_none], self.prompt) - if self.message is not None: - result["message"] = from_union([from_str, from_none], self.message) - return result - @dataclass class TaskShellInfo: + """Schema for the `TaskShellInfo` type.""" + attachment_mode: TaskShellInfoAttachmentMode """Whether the shell runs inside a managed PTY session or as an independent background process @@ -4582,6 +4806,8 @@ def to_dict(self) -> dict: @dataclass class ToolList: + """Built-in tools available for the requested model, with their parameters and instructions.""" + tools: list[Tool] """List of available built-in tools with metadata""" @@ -4598,7 +4824,10 @@ def to_dict(self) -> dict: @dataclass class UIElicitationArrayAnyOfFieldItems: + """Schema applied to each item in the array.""" + any_of: list[UIElicitationArrayAnyOfFieldItemsAnyOf] + """Selectable options, each with a value and a display label.""" @staticmethod def from_dict(obj: Any) -> 'UIElicitationArrayAnyOfFieldItems': @@ -4613,8 +4842,13 @@ def to_dict(self) -> dict: @dataclass class UIElicitationArrayEnumFieldItems: + """Schema applied to each item in the array.""" + enum: list[str] + """Allowed string values for each selected item.""" + type: UIElicitationArrayEnumFieldItemsType + """Type discriminator. Always "string".""" @staticmethod def from_dict(obj: Any) -> 'UIElicitationArrayEnumFieldItems': @@ -4631,9 +4865,16 @@ def to_dict(self) -> dict: @dataclass class UIElicitationArrayFieldItems: + """Schema applied to each item in the array.""" + enum: list[str] | None = None + """Allowed string values for each selected item.""" + type: UIElicitationArrayEnumFieldItemsType | None = None + """Type discriminator. Always "string".""" + any_of: list[UIElicitationArrayAnyOfFieldItemsAnyOf] | None = None + """Selectable options, each with a value and a display label.""" @staticmethod def from_dict(obj: Any) -> 'UIElicitationArrayFieldItems': @@ -4655,12 +4896,25 @@ def to_dict(self) -> dict: @dataclass class UIElicitationStringEnumField: + """Single-select string field whose allowed values are defined inline.""" + enum: list[str] + """Allowed string values.""" + type: UIElicitationArrayEnumFieldItemsType + """Type discriminator. Always "string".""" + default: str | None = None + """Default value selected when the form is first shown.""" + description: str | None = None + """Help text describing the field.""" + enum_names: list[str] | None = None + """Optional display labels for each enum value, in the same order as `enum`.""" + title: str | None = None + """Human-readable label for the field.""" @staticmethod def from_dict(obj: Any) -> 'UIElicitationStringEnumField': @@ -4689,13 +4943,28 @@ def to_dict(self) -> dict: @dataclass class UIElicitationSchemaPropertyString: + """Free-text string field with optional length and format constraints.""" + type: UIElicitationArrayEnumFieldItemsType + """Type discriminator. Always "string".""" + default: str | None = None + """Default value populated in the input when the form is first shown.""" + description: str | None = None + """Help text describing the field.""" + format: UIElicitationSchemaPropertyStringFormat | None = None + """Optional format hint that constrains the accepted input.""" + max_length: float | None = None + """Maximum number of characters allowed.""" + min_length: float | None = None + """Minimum number of characters required.""" + title: str | None = None + """Human-readable label for the field.""" @staticmethod def from_dict(obj: Any) -> 'UIElicitationSchemaPropertyString': @@ -4728,11 +4997,22 @@ def to_dict(self) -> dict: @dataclass class UIElicitationStringOneOfField: + """Single-select string field where each option pairs a value with a display label.""" + one_of: list[UIElicitationStringOneOfFieldOneOf] + """Selectable options, each with a value and a display label.""" + type: UIElicitationArrayEnumFieldItemsType + """Type discriminator. Always "string".""" + default: str | None = None + """Default value selected when the form is first shown.""" + description: str | None = None + """Help text describing the field.""" + title: str | None = None + """Human-readable label for the field.""" @staticmethod def from_dict(obj: Any) -> 'UIElicitationStringOneOfField': @@ -4782,10 +5062,19 @@ def to_dict(self) -> dict: @dataclass class UIElicitationSchemaPropertyBoolean: + """Boolean field rendered as a yes/no toggle.""" + type: UIElicitationSchemaPropertyBooleanType + """Type discriminator. Always "boolean".""" + default: bool | None = None + """Default value selected when the form is first shown.""" + description: str | None = None + """Help text describing the field.""" + title: str | None = None + """Human-readable label for the field.""" @staticmethod def from_dict(obj: Any) -> 'UIElicitationSchemaPropertyBoolean': @@ -4809,12 +5098,25 @@ def to_dict(self) -> dict: @dataclass class UIElicitationSchemaPropertyNumber: + """Numeric field accepting either a number or an integer.""" + type: UIElicitationSchemaPropertyNumberType + """Numeric type accepted by the field.""" + default: float | None = None + """Default value populated in the input when the form is first shown.""" + description: str | None = None + """Help text describing the field.""" + maximum: float | None = None + """Maximum allowed value (inclusive).""" + minimum: float | None = None + """Minimum allowed value (inclusive).""" + title: str | None = None + """Human-readable label for the field.""" @staticmethod def from_dict(obj: Any) -> 'UIElicitationSchemaPropertyNumber': @@ -4844,6 +5146,8 @@ def to_dict(self) -> dict: @dataclass class UsageMetricsModelMetric: + """Schema for the `UsageMetricsModelMetric` type.""" + requests: UsageMetricsModelMetricRequests """Request count and cost metrics for this model""" @@ -4952,6 +5256,8 @@ def to_dict(self) -> dict: @dataclass class SlashCommandInfo: + """Schema for the `SlashCommandInfo` type.""" + allow_during_agent_execution: bool """Whether the command may run while an agent turn is active""" @@ -5002,6 +5308,8 @@ def to_dict(self) -> dict: @dataclass class MCPDiscoverResult: + """MCP servers discovered from user, workspace, plugin, and built-in sources.""" + servers: list[DiscoveredMCPServer] """MCP servers discovered from all sources""" @@ -5016,9 +5324,34 @@ def to_dict(self) -> dict: result["servers"] = from_list(lambda x: to_class(DiscoveredMCPServer, x), self.servers) return result +@dataclass +class ExternalToolTextResultForLlmContentResource: + """Embedded resource content block with inline text or binary data""" + + resource: ExternalToolTextResultForLlmContentResourceDetails + """The embedded resource contents, either text or base64-encoded binary""" + + type: ExternalToolTextResultForLlmContentResourceType + """Content block type discriminator""" + + @staticmethod + def from_dict(obj: Any) -> 'ExternalToolTextResultForLlmContentResource': + assert isinstance(obj, dict) + resource = ExternalToolTextResultForLlmContentResourceDetails.from_dict(obj.get("resource")) + type = ExternalToolTextResultForLlmContentResourceType(obj.get("type")) + return ExternalToolTextResultForLlmContentResource(resource, type) + + def to_dict(self) -> dict: + result: dict = {} + result["resource"] = to_class(ExternalToolTextResultForLlmContentResourceDetails, self.resource) + result["type"] = to_enum(ExternalToolTextResultForLlmContentResourceType, self.type) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExtensionList: + """Extensions discovered for the session, with their current status.""" + extensions: list[Extension] """Discovered extensions and their current status""" @@ -5033,6 +5366,54 @@ def to_dict(self) -> dict: result["extensions"] = from_list(lambda x: to_class(Extension, x), self.extensions) return result +@dataclass +class PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess: + """Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` + type. + """ + extension_name: str + """Extension name.""" + + kind: PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind + """Approval covering an extension's request to access a permission-gated capability.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess': + assert isinstance(obj, dict) + extension_name = from_str(obj.get("extensionName")) + kind = PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind(obj.get("kind")) + return PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess(extension_name, kind) + + def to_dict(self) -> dict: + result: dict = {} + result["extensionName"] = from_str(self.extension_name) + result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind, self.kind) + return result + +@dataclass +class PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess: + """Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` + type. + """ + extension_name: str + """Extension name.""" + + kind: PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind + """Approval covering an extension's request to access a permission-gated capability.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess': + assert isinstance(obj, dict) + extension_name = from_str(obj.get("extensionName")) + kind = PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind(obj.get("kind")) + return PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess(extension_name, kind) + + def to_dict(self) -> dict: + result: dict = {} + result["extensionName"] = from_str(self.extension_name) + result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind, self.kind) + return result + @dataclass class ExternalToolTextResultForLlmContent: """A content block within a tool result, which may be text, terminal output, image, audio, @@ -5204,6 +5585,8 @@ def to_dict(self) -> dict: @dataclass class InstructionsGetSourcesResult: + """Instruction sources loaded for the session, in merge order.""" + sources: list[InstructionsSources] """Instruction sources for the session""" @@ -5220,6 +5603,8 @@ def to_dict(self) -> dict: @dataclass class MCPConfigAddRequest: + """MCP server name and configuration to add to user configuration.""" + config: MCPServerConfig """MCP server configuration (local/stdio or remote/http)""" @@ -5241,6 +5626,8 @@ def to_dict(self) -> dict: @dataclass class MCPConfigList: + """User-configured MCP servers, keyed by server name.""" + servers: dict[str, MCPServerConfig] """All MCP servers from user config, keyed by name""" @@ -5257,6 +5644,8 @@ def to_dict(self) -> dict: @dataclass class MCPConfigUpdateRequest: + """MCP server name and replacement configuration to write to user configuration.""" + config: MCPServerConfig """MCP server configuration (local/stdio or remote/http)""" @@ -5278,6 +5667,8 @@ def to_dict(self) -> dict: @dataclass class MCPServerList: + """MCP servers configured for the session, with their connection status.""" + servers: list[MCPServer] """Configured MCP servers""" @@ -5318,115 +5709,32 @@ def to_dict(self) -> dict: return result @dataclass -class PermissionDecision: - kind: PermissionDecisionKind - """The permission request was approved for this one instance - - Approved and remembered for the rest of the session - - Approved and persisted for this project location - - Approved and persisted across sessions - - Denied by the user during an interactive prompt - - Denied because user confirmation was unavailable - """ - approval: PermissionDecisionApproveForIonApproval | None = None - """The approval to add as a session-scoped rule - - The approval to persist for this location - """ - domain: str | None = None - """The URL domain to approve for this session - - The URL domain to approve permanently - """ - location_key: str | None = None - """The location key (git root or cwd) to persist the approval to""" - - feedback: str | None = None - """Optional feedback from the user explaining the denial""" - - @staticmethod - def from_dict(obj: Any) -> 'PermissionDecision': - assert isinstance(obj, dict) - kind = PermissionDecisionKind(obj.get("kind")) - approval = from_union([PermissionDecisionApproveForIonApproval.from_dict, from_none], obj.get("approval")) - domain = from_union([from_str, from_none], obj.get("domain")) - location_key = from_union([from_str, from_none], obj.get("locationKey")) - feedback = from_union([from_str, from_none], obj.get("feedback")) - return PermissionDecision(kind, approval, domain, location_key, feedback) - - def to_dict(self) -> dict: - result: dict = {} - result["kind"] = to_enum(PermissionDecisionKind, self.kind) - if self.approval is not None: - result["approval"] = from_union([lambda x: to_class(PermissionDecisionApproveForIonApproval, x), from_none], self.approval) - if self.domain is not None: - result["domain"] = from_union([from_str, from_none], self.domain) - if self.location_key is not None: - result["locationKey"] = from_union([from_str, from_none], self.location_key) - if self.feedback is not None: - result["feedback"] = from_union([from_str, from_none], self.feedback) - return result - -@dataclass -class PermissionDecisionApproveForLocation: - approval: PermissionDecisionApproveForLocationApproval - """The approval to persist for this location""" - - kind: PermissionDecisionApproveForLocationKind - """Approved and persisted for this project location""" - - location_key: str - """The location key (git root or cwd) to persist the approval to""" - - @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocation': - assert isinstance(obj, dict) - approval = PermissionDecisionApproveForLocationApproval.from_dict(obj.get("approval")) - kind = PermissionDecisionApproveForLocationKind(obj.get("kind")) - location_key = from_str(obj.get("locationKey")) - return PermissionDecisionApproveForLocation(approval, kind, location_key) - - def to_dict(self) -> dict: - result: dict = {} - result["approval"] = to_class(PermissionDecisionApproveForLocationApproval, self.approval) - result["kind"] = to_enum(PermissionDecisionApproveForLocationKind, self.kind) - result["locationKey"] = from_str(self.location_key) - return result - -@dataclass -class PermissionDecisionApproveForSession: - kind: PermissionDecisionApproveForSessionKind - """Approved and remembered for the rest of the session""" +class CommandsRespondToQueuedCommandRequest: + """Queued command request ID and the result indicating whether the client handled it.""" - approval: PermissionDecisionApproveForSessionApproval | None = None - """The approval to add as a session-scoped rule""" + request_id: str + """Request ID from the queued command event""" - domain: str | None = None - """The URL domain to approve for this session""" + result: QueuedCommandResult + """Result of the queued command execution""" @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionApproveForSession': + def from_dict(obj: Any) -> 'CommandsRespondToQueuedCommandRequest': assert isinstance(obj, dict) - kind = PermissionDecisionApproveForSessionKind(obj.get("kind")) - approval = from_union([PermissionDecisionApproveForSessionApproval.from_dict, from_none], obj.get("approval")) - domain = from_union([from_str, from_none], obj.get("domain")) - return PermissionDecisionApproveForSession(kind, approval, domain) + request_id = from_str(obj.get("requestId")) + result = QueuedCommandResult.from_dict(obj.get("result")) + return CommandsRespondToQueuedCommandRequest(request_id, result) def to_dict(self) -> dict: result: dict = {} - result["kind"] = to_enum(PermissionDecisionApproveForSessionKind, self.kind) - if self.approval is not None: - result["approval"] = from_union([lambda x: to_class(PermissionDecisionApproveForSessionApproval, x), from_none], self.approval) - if self.domain is not None: - result["domain"] = from_union([from_str, from_none], self.domain) + result["requestId"] = from_str(self.request_id) + result["result"] = to_class(QueuedCommandResult, self.result) return result @dataclass class SessionFSReadFileResult: + """File content as a UTF-8 string, or a filesystem error if the read failed.""" + content: str """File content as UTF-8 string""" @@ -5449,6 +5757,8 @@ def to_dict(self) -> dict: @dataclass class SessionFSReaddirResult: + """Names of entries in the requested directory, or a filesystem error if the read failed.""" + entries: list[str] """Entry names in the directory""" @@ -5469,8 +5779,51 @@ def to_dict(self) -> dict: result["error"] = from_union([lambda x: to_class(SessionFSError, x), from_none], self.error) return result +@dataclass +class SessionFSSqliteResult: + """Query results including rows, columns, and rows affected, or a filesystem error if + execution failed. + """ + columns: list[str] + """Column names from the result set""" + + rows: list[dict[str, Any]] + """For SELECT: array of row objects. For others: empty array.""" + + rows_affected: int + """Number of rows affected (for INSERT/UPDATE/DELETE)""" + + error: SessionFSError | None = None + """Describes a filesystem error.""" + + last_insert_rowid: float | None = None + """Last inserted row ID (for INSERT)""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionFSSqliteResult': + assert isinstance(obj, dict) + columns = from_list(from_str, obj.get("columns")) + rows = from_list(lambda x: from_dict(lambda x: x, x), obj.get("rows")) + rows_affected = from_int(obj.get("rowsAffected")) + error = from_union([SessionFSError.from_dict, from_none], obj.get("error")) + last_insert_rowid = from_union([from_float, from_none], obj.get("lastInsertRowid")) + return SessionFSSqliteResult(columns, rows, rows_affected, error, last_insert_rowid) + + def to_dict(self) -> dict: + result: dict = {} + result["columns"] = from_list(from_str, self.columns) + result["rows"] = from_list(lambda x: from_dict(lambda x: x, x), self.rows) + result["rowsAffected"] = from_int(self.rows_affected) + if self.error is not None: + result["error"] = from_union([lambda x: to_class(SessionFSError, x), from_none], self.error) + if self.last_insert_rowid is not None: + result["lastInsertRowid"] = from_union([to_float, from_none], self.last_insert_rowid) + return result + @dataclass class SessionFSStatResult: + """Filesystem metadata for the requested path, or a filesystem error if the stat failed.""" + birthtime: datetime """ISO 8601 timestamp of creation""" @@ -5513,6 +5866,9 @@ def to_dict(self) -> dict: @dataclass class SessionFSReaddirWithTypesResult: + """Entries in the requested directory paired with file/directory type information, or a + filesystem error if the read failed. + """ entries: list[SessionFSReaddirWithTypesEntry] """Directory entries with type information""" @@ -5533,15 +5889,108 @@ def to_dict(self) -> dict: result["error"] = from_union([lambda x: to_class(SessionFSError, x), from_none], self.error) return result +@dataclass +class SlashCommandInvocationResult: + """Result of invoking the slash command (text output, prompt to send to the agent, or + completion). + + Schema for the `SlashCommandTextResult` type. + + Schema for the `SlashCommandAgentPromptResult` type. + + Schema for the `SlashCommandCompletedResult` type. + """ + kind: SlashCommandInvocationResultKind + """Text result discriminator + + Agent prompt result discriminator + + Completed result discriminator + """ + markdown: bool | None = None + """Whether text contains Markdown""" + + preserve_ansi: bool | None = None + """Whether ANSI sequences should be preserved""" + + runtime_settings_changed: bool | None = None + """True when the invocation mutated user runtime settings; consumers caching settings should + refresh + """ + text: str | None = None + """Text output for the client to render""" + + display_prompt: str | None = None + """Prompt text to display to the user""" + + mode: Mode | None = None + """Optional target session mode""" + + prompt: str | None = None + """Prompt to submit to the agent""" + + message: str | None = None + """Optional user-facing message describing the completed command""" + + @staticmethod + def from_dict(obj: Any) -> 'SlashCommandInvocationResult': + assert isinstance(obj, dict) + kind = SlashCommandInvocationResultKind(obj.get("kind")) + markdown = from_union([from_bool, from_none], obj.get("markdown")) + preserve_ansi = from_union([from_bool, from_none], obj.get("preserveAnsi")) + runtime_settings_changed = from_union([from_bool, from_none], obj.get("runtimeSettingsChanged")) + text = from_union([from_str, from_none], obj.get("text")) + display_prompt = from_union([from_str, from_none], obj.get("displayPrompt")) + mode = from_union([Mode, from_none], obj.get("mode")) + prompt = from_union([from_str, from_none], obj.get("prompt")) + message = from_union([from_str, from_none], obj.get("message")) + return SlashCommandInvocationResult(kind, markdown, preserve_ansi, runtime_settings_changed, text, display_prompt, mode, prompt, message) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(SlashCommandInvocationResultKind, self.kind) + if self.markdown is not None: + result["markdown"] = from_union([from_bool, from_none], self.markdown) + if self.preserve_ansi is not None: + result["preserveAnsi"] = from_union([from_bool, from_none], self.preserve_ansi) + if self.runtime_settings_changed is not None: + result["runtimeSettingsChanged"] = from_union([from_bool, from_none], self.runtime_settings_changed) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) + if self.display_prompt is not None: + result["displayPrompt"] = from_union([from_str, from_none], self.display_prompt) + if self.mode is not None: + result["mode"] = from_union([lambda x: to_enum(Mode, x), from_none], self.mode) + if self.prompt is not None: + result["prompt"] = from_union([from_str, from_none], self.prompt) + if self.message is not None: + result["message"] = from_union([from_str, from_none], self.message) + return result + @dataclass class UIElicitationArrayAnyOfField: + """Multi-select string field where each option pairs a value with a display label.""" + items: UIElicitationArrayAnyOfFieldItems + """Schema applied to each item in the array.""" + type: UIElicitationArrayAnyOfFieldType + """Type discriminator. Always "array".""" + default: list[str] | None = None + """Default values selected when the form is first shown.""" + description: str | None = None + """Help text describing the field.""" + max_items: float | None = None + """Maximum number of items the user may select.""" + min_items: float | None = None + """Minimum number of items the user must select.""" + title: str | None = None + """Human-readable label for the field.""" @staticmethod def from_dict(obj: Any) -> 'UIElicitationArrayAnyOfField': @@ -5573,13 +6022,28 @@ def to_dict(self) -> dict: @dataclass class UIElicitationArrayEnumField: + """Multi-select string field whose allowed values are defined inline.""" + items: UIElicitationArrayEnumFieldItems + """Schema applied to each item in the array.""" + type: UIElicitationArrayAnyOfFieldType + """Type discriminator. Always "array".""" + default: list[str] | None = None + """Default values selected when the form is first shown.""" + description: str | None = None + """Help text describing the field.""" + max_items: float | None = None + """Maximum number of items the user may select.""" + min_items: float | None = None + """Minimum number of items the user must select.""" + title: str | None = None + """Human-readable label for the field.""" @staticmethod def from_dict(obj: Any) -> 'UIElicitationArrayEnumField': @@ -5611,21 +6075,76 @@ def to_dict(self) -> dict: @dataclass class UIElicitationSchemaProperty: + """Definition for a single elicitation form field. + + Single-select string field whose allowed values are defined inline. + + Single-select string field where each option pairs a value with a display label. + + Multi-select string field whose allowed values are defined inline. + + Multi-select string field where each option pairs a value with a display label. + + Boolean field rendered as a yes/no toggle. + + Free-text string field with optional length and format constraints. + + Numeric field accepting either a number or an integer. + """ type: UIElicitationSchemaPropertyType + """Type discriminator. Always "string". + + Type discriminator. Always "array". + + Type discriminator. Always "boolean". + + Numeric type accepted by the field. + """ default: float | bool | list[str] | str | None = None + """Default value selected when the form is first shown. + + Default values selected when the form is first shown. + + Default value populated in the input when the form is first shown. + """ description: str | None = None + """Help text describing the field.""" + enum: list[str] | None = None + """Allowed string values.""" + enum_names: list[str] | None = None + """Optional display labels for each enum value, in the same order as `enum`.""" + title: str | None = None + """Human-readable label for the field.""" + one_of: list[UIElicitationStringOneOfFieldOneOf] | None = None + """Selectable options, each with a value and a display label.""" + items: UIElicitationArrayFieldItems | None = None + """Schema applied to each item in the array.""" + max_items: float | None = None + """Maximum number of items the user may select.""" + min_items: float | None = None + """Minimum number of items the user must select.""" + format: UIElicitationSchemaPropertyStringFormat | None = None + """Optional format hint that constrains the accepted input.""" + max_length: float | None = None + """Maximum number of characters allowed.""" + min_length: float | None = None + """Minimum number of characters required.""" + maximum: float | None = None + """Maximum allowed value (inclusive).""" + minimum: float | None = None + """Minimum allowed value (inclusive).""" @staticmethod def from_dict(obj: Any) -> 'UIElicitationSchemaProperty': @@ -5682,6 +6201,9 @@ def to_dict(self) -> dict: @dataclass class UIHandlePendingElicitationRequest: + """Pending elicitation request ID and the user's response (accept/decline/cancel + form + values). + """ request_id: str """The unique request ID from the elicitation.requested event""" @@ -5704,6 +6226,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UsageGetMetricsResult: + """Accumulated session usage metrics, including premium request cost, token counts, model + breakdown, and code-change totals. + """ code_changes: UsageMetricsCodeChanges """Aggregated code change metrics""" @@ -5774,34 +6299,317 @@ def to_dict(self) -> dict: @dataclass class WorkspacesGetWorkspaceResult: + """Current workspace metadata for the session, or null when not available.""" + workspace: Workspace | None = None """Current workspace metadata, or null if not available""" @staticmethod - def from_dict(obj: Any) -> 'WorkspacesGetWorkspaceResult': + def from_dict(obj: Any) -> 'WorkspacesGetWorkspaceResult': + assert isinstance(obj, dict) + workspace = from_union([Workspace.from_dict, from_none], obj.get("workspace")) + return WorkspacesGetWorkspaceResult(workspace) + + def to_dict(self) -> dict: + result: dict = {} + result["workspace"] = from_union([lambda x: to_class(Workspace, x), from_none], self.workspace) + return result + +@dataclass +class CommandList: + """Slash commands available in the session, after applying any include/exclude filters.""" + + commands: list[SlashCommandInfo] + """Commands available in this session""" + + @staticmethod + def from_dict(obj: Any) -> 'CommandList': + assert isinstance(obj, dict) + commands = from_list(SlashCommandInfo.from_dict, obj.get("commands")) + return CommandList(commands) + + def to_dict(self) -> dict: + result: dict = {} + result["commands"] = from_list(lambda x: to_class(SlashCommandInfo, x), self.commands) + return result + +@dataclass +class PermissionDecisionApproveForLocationApproval: + """The approval to persist for this location + + Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalRead` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` + type. + """ + kind: ApprovalKind + """Approval scoped to specific command identifiers. + + Approval covering read-only filesystem operations. + + Approval covering filesystem write operations. + + Approval covering an MCP tool. + + Approval covering MCP sampling requests for a server. + + Approval covering writes to long-term memory. + + Approval covering a custom tool. + + Approval covering extension lifecycle operations such as enable, disable, or reload. + + Approval covering an extension's request to access a permission-gated capability. + """ + command_identifiers: list[str] | None = None + """Command identifiers covered by this approval.""" + + server_name: str | None = None + """MCP server name.""" + + tool_name: str | None = None + """MCP tool name, or null to cover every tool on the server. + + Custom tool name. + """ + operation: str | None = None + """Optional operation identifier; when omitted, the approval covers all extension management + operations. + """ + extension_name: str | None = None + """Extension name.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApproval': + assert isinstance(obj, dict) + kind = ApprovalKind(obj.get("kind")) + command_identifiers = from_union([lambda x: from_list(from_str, x), from_none], obj.get("commandIdentifiers")) + server_name = from_union([from_str, from_none], obj.get("serverName")) + tool_name = from_union([from_none, from_str], obj.get("toolName")) + operation = from_union([from_str, from_none], obj.get("operation")) + extension_name = from_union([from_str, from_none], obj.get("extensionName")) + return PermissionDecisionApproveForLocationApproval(kind, command_identifiers, server_name, tool_name, operation, extension_name) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(ApprovalKind, self.kind) + if self.command_identifiers is not None: + result["commandIdentifiers"] = from_union([lambda x: from_list(from_str, x), from_none], self.command_identifiers) + if self.server_name is not None: + result["serverName"] = from_union([from_str, from_none], self.server_name) + if self.tool_name is not None: + result["toolName"] = from_union([from_none, from_str], self.tool_name) + if self.operation is not None: + result["operation"] = from_union([from_str, from_none], self.operation) + if self.extension_name is not None: + result["extensionName"] = from_union([from_str, from_none], self.extension_name) + return result + +@dataclass +class PermissionDecisionApproveForIonApproval: + """The approval to add as a session-scoped rule + + Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalRead` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` + type. + + The approval to persist for this location + + Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalRead` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type. + + Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` + type. + """ + kind: ApprovalKind + """Approval scoped to specific command identifiers. + + Approval covering read-only filesystem operations. + + Approval covering filesystem write operations. + + Approval covering an MCP tool. + + Approval covering MCP sampling requests for a server. + + Approval covering writes to long-term memory. + + Approval covering a custom tool. + + Approval covering extension lifecycle operations such as enable, disable, or reload. + + Approval covering an extension's request to access a permission-gated capability. + """ + command_identifiers: list[str] | None = None + """Command identifiers covered by this approval.""" + + server_name: str | None = None + """MCP server name.""" + + tool_name: str | None = None + """MCP tool name, or null to cover every tool on the server. + + Custom tool name. + """ + operation: str | None = None + """Optional operation identifier; when omitted, the approval covers all extension management + operations. + """ + extension_name: str | None = None + """Extension name.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionApproveForIonApproval': assert isinstance(obj, dict) - workspace = from_union([Workspace.from_dict, from_none], obj.get("workspace")) - return WorkspacesGetWorkspaceResult(workspace) + kind = ApprovalKind(obj.get("kind")) + command_identifiers = from_union([lambda x: from_list(from_str, x), from_none], obj.get("commandIdentifiers")) + server_name = from_union([from_str, from_none], obj.get("serverName")) + tool_name = from_union([from_none, from_str], obj.get("toolName")) + operation = from_union([from_str, from_none], obj.get("operation")) + extension_name = from_union([from_str, from_none], obj.get("extensionName")) + return PermissionDecisionApproveForIonApproval(kind, command_identifiers, server_name, tool_name, operation, extension_name) def to_dict(self) -> dict: result: dict = {} - result["workspace"] = from_union([lambda x: to_class(Workspace, x), from_none], self.workspace) + result["kind"] = to_enum(ApprovalKind, self.kind) + if self.command_identifiers is not None: + result["commandIdentifiers"] = from_union([lambda x: from_list(from_str, x), from_none], self.command_identifiers) + if self.server_name is not None: + result["serverName"] = from_union([from_str, from_none], self.server_name) + if self.tool_name is not None: + result["toolName"] = from_union([from_none, from_str], self.tool_name) + if self.operation is not None: + result["operation"] = from_union([from_str, from_none], self.operation) + if self.extension_name is not None: + result["extensionName"] = from_union([from_str, from_none], self.extension_name) return result @dataclass -class CommandList: - commands: list[SlashCommandInfo] - """Commands available in this session""" +class PermissionDecisionApproveForSessionApproval: + """The approval to add as a session-scoped rule + + Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalRead` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type. + + Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` + type. + """ + kind: ApprovalKind + """Approval scoped to specific command identifiers. + + Approval covering read-only filesystem operations. + + Approval covering filesystem write operations. + + Approval covering an MCP tool. + + Approval covering MCP sampling requests for a server. + + Approval covering writes to long-term memory. + + Approval covering a custom tool. + + Approval covering extension lifecycle operations such as enable, disable, or reload. + + Approval covering an extension's request to access a permission-gated capability. + """ + command_identifiers: list[str] | None = None + """Command identifiers covered by this approval.""" + + server_name: str | None = None + """MCP server name.""" + + tool_name: str | None = None + """MCP tool name, or null to cover every tool on the server. + + Custom tool name. + """ + operation: str | None = None + """Optional operation identifier; when omitted, the approval covers all extension management + operations. + """ + extension_name: str | None = None + """Extension name.""" @staticmethod - def from_dict(obj: Any) -> 'CommandList': + def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApproval': assert isinstance(obj, dict) - commands = from_list(SlashCommandInfo.from_dict, obj.get("commands")) - return CommandList(commands) + kind = ApprovalKind(obj.get("kind")) + command_identifiers = from_union([lambda x: from_list(from_str, x), from_none], obj.get("commandIdentifiers")) + server_name = from_union([from_str, from_none], obj.get("serverName")) + tool_name = from_union([from_none, from_str], obj.get("toolName")) + operation = from_union([from_str, from_none], obj.get("operation")) + extension_name = from_union([from_str, from_none], obj.get("extensionName")) + return PermissionDecisionApproveForSessionApproval(kind, command_identifiers, server_name, tool_name, operation, extension_name) def to_dict(self) -> dict: result: dict = {} - result["commands"] = from_list(lambda x: to_class(SlashCommandInfo, x), self.commands) + result["kind"] = to_enum(ApprovalKind, self.kind) + if self.command_identifiers is not None: + result["commandIdentifiers"] = from_union([lambda x: from_list(from_str, x), from_none], self.command_identifiers) + if self.server_name is not None: + result["serverName"] = from_union([from_str, from_none], self.server_name) + if self.tool_name is not None: + result["toolName"] = from_union([from_none, from_str], self.tool_name) + if self.operation is not None: + result["operation"] = from_union([from_str, from_none], self.operation) + if self.extension_name is not None: + result["extensionName"] = from_union([from_str, from_none], self.extension_name) return result @dataclass @@ -5853,26 +6661,6 @@ def to_dict(self) -> dict: result["toolTelemetry"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.tool_telemetry) return result -@dataclass -class PermissionDecisionRequest: - request_id: str - """Request ID of the pending permission request""" - - result: PermissionDecision - - @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionRequest': - assert isinstance(obj, dict) - request_id = from_str(obj.get("requestId")) - result = PermissionDecision.from_dict(obj.get("result")) - return PermissionDecisionRequest(request_id, result) - - def to_dict(self) -> dict: - result: dict = {} - result["requestId"] = from_str(self.request_id) - result["result"] = to_class(PermissionDecision, self.result) - return result - @dataclass class UIElicitationSchema: """JSON Schema describing the form fields to present to the user""" @@ -5902,8 +6690,69 @@ def to_dict(self) -> dict: result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) return result +@dataclass +class PermissionDecisionApproveForLocation: + """Schema for the `PermissionDecisionApproveForLocation` type.""" + + approval: PermissionDecisionApproveForLocationApproval + """The approval to persist for this location""" + + kind: PermissionDecisionApproveForLocationKind + """Approved and persisted for this project location""" + + location_key: str + """The location key (git root or cwd) to persist the approval to""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocation': + assert isinstance(obj, dict) + approval = PermissionDecisionApproveForLocationApproval.from_dict(obj.get("approval")) + kind = PermissionDecisionApproveForLocationKind(obj.get("kind")) + location_key = from_str(obj.get("locationKey")) + return PermissionDecisionApproveForLocation(approval, kind, location_key) + + def to_dict(self) -> dict: + result: dict = {} + result["approval"] = to_class(PermissionDecisionApproveForLocationApproval, self.approval) + result["kind"] = to_enum(PermissionDecisionApproveForLocationKind, self.kind) + result["locationKey"] = from_str(self.location_key) + return result + +@dataclass +class PermissionDecisionApproveForSession: + """Schema for the `PermissionDecisionApproveForSession` type.""" + + kind: PermissionDecisionApproveForSessionKind + """Approved and remembered for the rest of the session""" + + approval: PermissionDecisionApproveForSessionApproval | None = None + """The approval to add as a session-scoped rule""" + + domain: str | None = None + """The URL domain to approve for this session""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionApproveForSession': + assert isinstance(obj, dict) + kind = PermissionDecisionApproveForSessionKind(obj.get("kind")) + approval = from_union([PermissionDecisionApproveForSessionApproval.from_dict, from_none], obj.get("approval")) + domain = from_union([from_str, from_none], obj.get("domain")) + return PermissionDecisionApproveForSession(kind, approval, domain) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(PermissionDecisionApproveForSessionKind, self.kind) + if self.approval is not None: + result["approval"] = from_union([lambda x: to_class(PermissionDecisionApproveForSessionApproval, x), from_none], self.approval) + if self.domain is not None: + result["domain"] = from_union([from_str, from_none], self.domain) + return result + @dataclass class HandlePendingToolCallRequest: + """Pending external tool call request ID, with the tool result or an error describing why it + failed. + """ request_id: str """Request ID of the pending tool call""" @@ -5932,6 +6781,8 @@ def to_dict(self) -> dict: @dataclass class UIElicitationRequest: + """Prompt message and JSON schema describing the form fields to elicit from the user.""" + message: str """Message describing what information is needed from the user""" @@ -5951,6 +6802,97 @@ def to_dict(self) -> dict: result["requestedSchema"] = to_class(UIElicitationSchema, self.requested_schema) return result +@dataclass +class PermissionDecision: + """Decision to apply to a pending permission request. + + Schema for the `PermissionDecisionApproveOnce` type. + + Schema for the `PermissionDecisionApproveForSession` type. + + Schema for the `PermissionDecisionApproveForLocation` type. + + Schema for the `PermissionDecisionApprovePermanently` type. + + Schema for the `PermissionDecisionReject` type. + + Schema for the `PermissionDecisionUserNotAvailable` type. + """ + kind: PermissionDecisionKind + """The permission request was approved for this one instance + + Approved and remembered for the rest of the session + + Approved and persisted for this project location + + Approved and persisted across sessions + + Denied by the user during an interactive prompt + + Denied because user confirmation was unavailable + """ + approval: PermissionDecisionApproveForIonApproval | None = None + """The approval to add as a session-scoped rule + + The approval to persist for this location + """ + domain: str | None = None + """The URL domain to approve for this session + + The URL domain to approve permanently + """ + location_key: str | None = None + """The location key (git root or cwd) to persist the approval to""" + + feedback: str | None = None + """Optional feedback from the user explaining the denial""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecision': + assert isinstance(obj, dict) + kind = PermissionDecisionKind(obj.get("kind")) + approval = from_union([PermissionDecisionApproveForIonApproval.from_dict, from_none], obj.get("approval")) + domain = from_union([from_str, from_none], obj.get("domain")) + location_key = from_union([from_str, from_none], obj.get("locationKey")) + feedback = from_union([from_str, from_none], obj.get("feedback")) + return PermissionDecision(kind, approval, domain, location_key, feedback) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(PermissionDecisionKind, self.kind) + if self.approval is not None: + result["approval"] = from_union([lambda x: to_class(PermissionDecisionApproveForIonApproval, x), from_none], self.approval) + if self.domain is not None: + result["domain"] = from_union([from_str, from_none], self.domain) + if self.location_key is not None: + result["locationKey"] = from_union([from_str, from_none], self.location_key) + if self.feedback is not None: + result["feedback"] = from_union([from_str, from_none], self.feedback) + return result + +@dataclass +class PermissionDecisionRequest: + """Pending permission request ID and the decision to apply (approve/reject and scope).""" + + request_id: str + """Request ID of the pending permission request""" + + result: PermissionDecision + """Decision to apply to a pending permission request.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionRequest': + assert isinstance(obj, dict) + request_id = from_str(obj.get("requestId")) + result = PermissionDecision.from_dict(obj.get("result")) + return PermissionDecisionRequest(request_id, result) + + def to_dict(self) -> dict: + result: dict = {} + result["requestId"] = from_str(self.request_id) + result["result"] = to_class(PermissionDecision, self.result) + return result + @dataclass class ModelCapabilities: """Model capabilities and limits""" @@ -5985,6 +6927,8 @@ class ModelPickerCategory(Enum): @dataclass class Model: + """Schema for the `Model` type.""" + capabilities: ModelCapabilities """Model capabilities and limits""" @@ -6047,6 +6991,9 @@ def to_dict(self) -> dict: @dataclass class ModelList: + """List of Copilot models available to the resolved user, including capabilities and billing + metadata. + """ models: list[Model] """List of available models with full metadata""" @@ -6063,6 +7010,8 @@ def to_dict(self) -> dict: @dataclass class ModelSwitchToRequest: + """Target model identifier and optional reasoning effort, summary, and capability overrides.""" + model_id: str """Model identifier to switch to""" @@ -6070,7 +7019,10 @@ class ModelSwitchToRequest: """Override individual model capabilities resolved by the runtime""" reasoning_effort: str | None = None - """Reasoning effort level to use for the model""" + """Reasoning effort level to use for the model. "none" disables reasoning.""" + + reasoning_summary: ReasoningSummary | None = None + """Reasoning summary mode to request for supported model clients""" @staticmethod def from_dict(obj: Any) -> 'ModelSwitchToRequest': @@ -6078,7 +7030,8 @@ def from_dict(obj: Any) -> 'ModelSwitchToRequest': model_id = from_str(obj.get("modelId")) model_capabilities = from_union([ModelCapabilitiesOverride.from_dict, from_none], obj.get("modelCapabilities")) reasoning_effort = from_union([from_str, from_none], obj.get("reasoningEffort")) - return ModelSwitchToRequest(model_id, model_capabilities, reasoning_effort) + reasoning_summary = from_union([ReasoningSummary, from_none], obj.get("reasoningSummary")) + return ModelSwitchToRequest(model_id, model_capabilities, reasoning_effort, reasoning_summary) def to_dict(self) -> dict: result: dict = {} @@ -6087,10 +7040,14 @@ def to_dict(self) -> dict: result["modelCapabilities"] = from_union([lambda x: to_class(ModelCapabilitiesOverride, x), from_none], self.model_capabilities) if self.reasoning_effort is not None: result["reasoningEffort"] = from_union([from_str, from_none], self.reasoning_effort) + if self.reasoning_summary is not None: + result["reasoningSummary"] = from_union([lambda x: to_enum(ReasoningSummary, x), from_none], self.reasoning_summary) return result @dataclass class TaskAgentInfo: + """Schema for the `TaskAgentInfo` type.""" + agent_type: str """Type of agent running this task""" @@ -6204,6 +7161,12 @@ def to_dict(self) -> dict: @dataclass class TaskInfo: + """Schema for the `TaskInfo` type. + + Schema for the `TaskAgentInfo` type. + + Schema for the `TaskShellInfo` type. + """ description: str """Short description of the task""" @@ -6350,6 +7313,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TaskList: + """Background tasks currently tracked by the session.""" + tasks: list[TaskInfo] """Currently tracked tasks""" @@ -6511,6 +7476,7 @@ class RPC: queued_command_handled: QueuedCommandHandled queued_command_not_handled: QueuedCommandNotHandled queued_command_result: QueuedCommandResult + reasoning_summary: ReasoningSummary remote_enable_request: RemoteEnableRequest remote_enable_result: RemoteEnableResult remote_session_mode: RemoteSessionMode @@ -6536,6 +7502,9 @@ class RPC: session_fs_set_provider_conventions: SessionFSSetProviderConventions session_fs_set_provider_request: SessionFSSetProviderRequest session_fs_set_provider_result: SessionFSSetProviderResult + session_fs_sqlite_query_type: SessionFSSqliteQueryType + session_fs_sqlite_request: SessionFSSqliteRequest + session_fs_sqlite_result: SessionFSSqliteResult session_fs_stat_request: SessionFSStatRequest session_fs_stat_result: SessionFSStatResult session_fs_write_file_request: SessionFSWriteFileRequest @@ -6769,6 +7738,7 @@ def from_dict(obj: Any) -> 'RPC': queued_command_handled = QueuedCommandHandled.from_dict(obj.get("QueuedCommandHandled")) queued_command_not_handled = QueuedCommandNotHandled.from_dict(obj.get("QueuedCommandNotHandled")) queued_command_result = QueuedCommandResult.from_dict(obj.get("QueuedCommandResult")) + reasoning_summary = ReasoningSummary(obj.get("ReasoningSummary")) remote_enable_request = RemoteEnableRequest.from_dict(obj.get("RemoteEnableRequest")) remote_enable_result = RemoteEnableResult.from_dict(obj.get("RemoteEnableResult")) remote_session_mode = RemoteSessionMode(obj.get("RemoteSessionMode")) @@ -6794,6 +7764,9 @@ def from_dict(obj: Any) -> 'RPC': session_fs_set_provider_conventions = SessionFSSetProviderConventions(obj.get("SessionFsSetProviderConventions")) session_fs_set_provider_request = SessionFSSetProviderRequest.from_dict(obj.get("SessionFsSetProviderRequest")) session_fs_set_provider_result = SessionFSSetProviderResult.from_dict(obj.get("SessionFsSetProviderResult")) + session_fs_sqlite_query_type = SessionFSSqliteQueryType(obj.get("SessionFsSqliteQueryType")) + session_fs_sqlite_request = SessionFSSqliteRequest.from_dict(obj.get("SessionFsSqliteRequest")) + session_fs_sqlite_result = SessionFSSqliteResult.from_dict(obj.get("SessionFsSqliteResult")) session_fs_stat_request = SessionFSStatRequest.from_dict(obj.get("SessionFsStatRequest")) session_fs_stat_result = SessionFSStatResult.from_dict(obj.get("SessionFsStatResult")) session_fs_write_file_request = SessionFSWriteFileRequest.from_dict(obj.get("SessionFsWriteFileRequest")) @@ -6878,7 +7851,7 @@ def from_dict(obj: Any) -> 'RPC': workspaces_list_files_result = WorkspacesListFilesResult.from_dict(obj.get("WorkspacesListFilesResult")) workspaces_read_file_request = WorkspacesReadFileRequest.from_dict(obj.get("WorkspacesReadFileRequest")) workspaces_read_file_result = WorkspacesReadFileResult.from_dict(obj.get("WorkspacesReadFileResult")) - return RPC(account_get_quota_request, account_get_quota_result, account_quota_snapshot, agent_get_current_result, agent_info, agent_list, agent_reload_result, agent_select_request, agent_select_result, auth_info_type, command_list, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, connect_request, connect_result, current_model, discovered_mcp_server, discovered_mcp_server_source, discovered_mcp_server_type, embedded_blob_resource_contents, embedded_text_resource_contents, extension, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, filter_mapping, filter_mapping_string, filter_mapping_value, fleet_start_request, fleet_start_result, handle_pending_tool_call_request, handle_pending_tool_call_result, history_compact_context_window, history_compact_result, history_truncate_request, history_truncate_result, instructions_get_sources_result, instructions_sources, instructions_sources_location, instructions_sources_type, log_request, log_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_enable_request, mcp_oauth_login_request, mcp_oauth_login_result, mcp_server, mcp_server_config, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_local, mcp_server_config_local_type, mcp_server_list, mcp_server_source, mcp_server_status, model, model_billing, model_billing_token_prices, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_picker_category, model_picker_price_category, model_policy, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, name_get_result, name_set_request, permission_decision, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_reject, permission_decision_request, permission_decision_user_not_available, permission_request_result, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_approve_all_request, permissions_set_approve_all_result, ping_request, ping_result, plan_read_result, plan_update_request, plugin, plugin_list, queued_command_handled, queued_command_not_handled, queued_command_result, remote_enable_request, remote_enable_result, remote_session_mode, server_skill, server_skill_list, session_auth_status, session_fs_append_file_request, session_fs_error, session_fs_error_code, session_fs_exists_request, session_fs_exists_result, session_fs_mkdir_request, session_fs_readdir_request, session_fs_readdir_result, session_fs_readdir_with_types_entry, session_fs_readdir_with_types_entry_type, session_fs_readdir_with_types_request, session_fs_readdir_with_types_result, session_fs_read_file_request, session_fs_read_file_result, session_fs_rename_request, session_fs_rm_request, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_log_level, session_mode, sessions_fork_request, sessions_fork_result, shell_exec_request, shell_exec_result, shell_kill_request, shell_kill_result, shell_kill_signal, skill, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_load_diagnostics, slash_command_agent_prompt_mode, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_text_result, task_agent_info, task_agent_info_execution_mode, task_agent_info_status, task_info, task_list, tasks_cancel_request, tasks_cancel_result, task_shell_info, task_shell_info_attachment_mode, task_shell_info_execution_mode, task_shell_info_status, tasks_promote_to_background_request, tasks_promote_to_background_result, tasks_remove_request, tasks_remove_result, tasks_send_message_request, tasks_send_message_result, tasks_start_agent_request, tasks_start_agent_result, tool, tool_list, tools_list_request, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_handle_pending_elicitation_request, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, workspaces_create_file_request, workspaces_get_workspace_result, workspaces_list_files_result, workspaces_read_file_request, workspaces_read_file_result) + return RPC(account_get_quota_request, account_get_quota_result, account_quota_snapshot, agent_get_current_result, agent_info, agent_list, agent_reload_result, agent_select_request, agent_select_result, auth_info_type, command_list, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, connect_request, connect_result, current_model, discovered_mcp_server, discovered_mcp_server_source, discovered_mcp_server_type, embedded_blob_resource_contents, embedded_text_resource_contents, extension, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, filter_mapping, filter_mapping_string, filter_mapping_value, fleet_start_request, fleet_start_result, handle_pending_tool_call_request, handle_pending_tool_call_result, history_compact_context_window, history_compact_result, history_truncate_request, history_truncate_result, instructions_get_sources_result, instructions_sources, instructions_sources_location, instructions_sources_type, log_request, log_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_enable_request, mcp_oauth_login_request, mcp_oauth_login_result, mcp_server, mcp_server_config, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_local, mcp_server_config_local_type, mcp_server_list, mcp_server_source, mcp_server_status, model, model_billing, model_billing_token_prices, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_picker_category, model_picker_price_category, model_policy, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, name_get_result, name_set_request, permission_decision, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_reject, permission_decision_request, permission_decision_user_not_available, permission_request_result, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_approve_all_request, permissions_set_approve_all_result, ping_request, ping_result, plan_read_result, plan_update_request, plugin, plugin_list, queued_command_handled, queued_command_not_handled, queued_command_result, reasoning_summary, remote_enable_request, remote_enable_result, remote_session_mode, server_skill, server_skill_list, session_auth_status, session_fs_append_file_request, session_fs_error, session_fs_error_code, session_fs_exists_request, session_fs_exists_result, session_fs_mkdir_request, session_fs_readdir_request, session_fs_readdir_result, session_fs_readdir_with_types_entry, session_fs_readdir_with_types_entry_type, session_fs_readdir_with_types_request, session_fs_readdir_with_types_result, session_fs_read_file_request, session_fs_read_file_result, session_fs_rename_request, session_fs_rm_request, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_sqlite_query_type, session_fs_sqlite_request, session_fs_sqlite_result, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_log_level, session_mode, sessions_fork_request, sessions_fork_result, shell_exec_request, shell_exec_result, shell_kill_request, shell_kill_result, shell_kill_signal, skill, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_load_diagnostics, slash_command_agent_prompt_mode, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_text_result, task_agent_info, task_agent_info_execution_mode, task_agent_info_status, task_info, task_list, tasks_cancel_request, tasks_cancel_result, task_shell_info, task_shell_info_attachment_mode, task_shell_info_execution_mode, task_shell_info_status, tasks_promote_to_background_request, tasks_promote_to_background_result, tasks_remove_request, tasks_remove_result, tasks_send_message_request, tasks_send_message_result, tasks_start_agent_request, tasks_start_agent_result, tool, tool_list, tools_list_request, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_handle_pending_elicitation_request, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, workspaces_create_file_request, workspaces_get_workspace_result, workspaces_list_files_result, workspaces_read_file_request, workspaces_read_file_result) def to_dict(self) -> dict: result: dict = {} @@ -7027,6 +8000,7 @@ def to_dict(self) -> dict: result["QueuedCommandHandled"] = to_class(QueuedCommandHandled, self.queued_command_handled) result["QueuedCommandNotHandled"] = to_class(QueuedCommandNotHandled, self.queued_command_not_handled) result["QueuedCommandResult"] = to_class(QueuedCommandResult, self.queued_command_result) + result["ReasoningSummary"] = to_enum(ReasoningSummary, self.reasoning_summary) result["RemoteEnableRequest"] = to_class(RemoteEnableRequest, self.remote_enable_request) result["RemoteEnableResult"] = to_class(RemoteEnableResult, self.remote_enable_result) result["RemoteSessionMode"] = to_enum(RemoteSessionMode, self.remote_session_mode) @@ -7052,6 +8026,9 @@ def to_dict(self) -> dict: result["SessionFsSetProviderConventions"] = to_enum(SessionFSSetProviderConventions, self.session_fs_set_provider_conventions) result["SessionFsSetProviderRequest"] = to_class(SessionFSSetProviderRequest, self.session_fs_set_provider_request) result["SessionFsSetProviderResult"] = to_class(SessionFSSetProviderResult, self.session_fs_set_provider_result) + result["SessionFsSqliteQueryType"] = to_enum(SessionFSSqliteQueryType, self.session_fs_sqlite_query_type) + result["SessionFsSqliteRequest"] = to_class(SessionFSSqliteRequest, self.session_fs_sqlite_request) + result["SessionFsSqliteResult"] = to_class(SessionFSSqliteResult, self.session_fs_sqlite_result) result["SessionFsStatRequest"] = to_class(SessionFSStatRequest, self.session_fs_stat_request) result["SessionFsStatResult"] = to_class(SessionFSStatResult, self.session_fs_stat_result) result["SessionFsWriteFileRequest"] = to_class(SessionFSWriteFileRequest, self.session_fs_write_file_request) @@ -7188,8 +8165,8 @@ class ServerModelsApi: def __init__(self, client: "JsonRpcClient"): self._client = client - async def list(self, params: ModelsListRequest | None = None, *, timeout: float | None = None) -> ModelList: - params_dict = {k: v for k, v in params.to_dict().items() if v is not None} if params is not None else {} + async def list(self, params: ModelsListRequest, *, timeout: float | None = None) -> ModelList: + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} return ModelList.from_dict(_patch_model_capabilities(await self._client.request("models.list", params_dict, **_timeout_kwargs(timeout)))) @@ -7206,8 +8183,8 @@ class ServerAccountApi: def __init__(self, client: "JsonRpcClient"): self._client = client - async def get_quota(self, params: AccountGetQuotaRequest | None = None, *, timeout: float | None = None) -> AccountGetQuotaResult: - params_dict = {k: v for k, v in params.to_dict().items() if v is not None} if params is not None else {} + async def get_quota(self, params: AccountGetQuotaRequest, *, timeout: float | None = None) -> AccountGetQuotaResult: + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} return AccountGetQuotaResult.from_dict(await self._client.request("account.getQuota", params_dict, **_timeout_kwargs(timeout))) @@ -7763,6 +8740,8 @@ async def rm(self, params: SessionFSRmRequest) -> SessionFSError | None: pass async def rename(self, params: SessionFSRenameRequest) -> SessionFSError | None: pass + async def sqlite(self, params: SessionFSSqliteRequest) -> SessionFSSqliteResult: + pass @dataclass class ClientSessionApiHandlers: @@ -7843,3 +8822,10 @@ async def handle_session_fs_rename(params: dict) -> dict | None: result = await handler.rename(request) return result.to_dict() if result is not None else None client.set_request_handler("sessionFs.rename", handle_session_fs_rename) + async def handle_session_fs_sqlite(params: dict) -> dict | None: + request = SessionFSSqliteRequest.from_dict(params) + handler = get_handlers(request.session_id).session_fs + if handler is None: raise RuntimeError(f"No session_fs handler registered for session: {request.session_id}") + result = await handler.sqlite(request) + return result.to_dict() + client.set_request_handler("sessionFs.sqlite", handle_session_fs_sqlite) diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py index 8bab188bb..1fe1af32b 100644 --- a/python/copilot/generated/session_events.py +++ b/python/copilot/generated/session_events.py @@ -260,19 +260,19 @@ def to_dict(self) -> dict: @dataclass class AbortData: "Turn abort information including the reason for termination" - reason: AbortReason + reason: str @staticmethod def from_dict(obj: Any) -> "AbortData": assert isinstance(obj, dict) - reason = parse_enum(AbortReason, obj.get("reason")) + reason = from_str(obj.get("reason")) return AbortData( reason=reason, ) def to_dict(self) -> dict: result: dict = {} - result["reason"] = to_enum(AbortReason, self.reason) + result["reason"] = from_str(self.reason) return result @@ -300,11 +300,8 @@ class AssistantMessageData: "Assistant response containing text content, optional tool requests, and interaction metadata" content: str message_id: str - anthropic_advisor_blocks: list[Any] | None = None - anthropic_advisor_model: str | None = None encrypted_content: str | None = None interaction_id: str | None = None - model: str | None = None output_tokens: float | None = None # Deprecated: this field is deprecated. parent_tool_call_id: str | None = None @@ -320,11 +317,8 @@ def from_dict(obj: Any) -> "AssistantMessageData": assert isinstance(obj, dict) content = from_str(obj.get("content")) message_id = from_str(obj.get("messageId")) - anthropic_advisor_blocks = from_union([from_none, lambda x: from_list(lambda x: x, x)], obj.get("anthropicAdvisorBlocks")) - anthropic_advisor_model = from_union([from_none, from_str], obj.get("anthropicAdvisorModel")) encrypted_content = from_union([from_none, from_str], obj.get("encryptedContent")) interaction_id = from_union([from_none, from_str], obj.get("interactionId")) - model = from_union([from_none, from_str], obj.get("model")) output_tokens = from_union([from_none, from_float], obj.get("outputTokens")) parent_tool_call_id = from_union([from_none, from_str], obj.get("parentToolCallId")) phase = from_union([from_none, from_str], obj.get("phase")) @@ -336,11 +330,8 @@ def from_dict(obj: Any) -> "AssistantMessageData": return AssistantMessageData( content=content, message_id=message_id, - anthropic_advisor_blocks=anthropic_advisor_blocks, - anthropic_advisor_model=anthropic_advisor_model, encrypted_content=encrypted_content, interaction_id=interaction_id, - model=model, output_tokens=output_tokens, parent_tool_call_id=parent_tool_call_id, phase=phase, @@ -355,16 +346,10 @@ def to_dict(self) -> dict: result: dict = {} result["content"] = from_str(self.content) result["messageId"] = from_str(self.message_id) - if self.anthropic_advisor_blocks is not None: - result["anthropicAdvisorBlocks"] = from_union([from_none, lambda x: from_list(lambda x: x, x)], self.anthropic_advisor_blocks) - if self.anthropic_advisor_model is not None: - result["anthropicAdvisorModel"] = from_union([from_none, from_str], self.anthropic_advisor_model) if self.encrypted_content is not None: result["encryptedContent"] = from_union([from_none, from_str], self.encrypted_content) if self.interaction_id is not None: result["interactionId"] = from_union([from_none, from_str], self.interaction_id) - if self.model is not None: - result["model"] = from_union([from_none, from_str], self.model) if self.output_tokens is not None: result["outputTokens"] = from_union([from_none, to_float], self.output_tokens) if self.parent_tool_call_id is not None: @@ -657,7 +642,6 @@ class AssistantUsageData: "LLM API call usage metrics including tokens, costs, quotas, and billing information" model: str api_call_id: str | None = None - api_endpoint: AssistantUsageApiEndpoint | None = None cache_read_tokens: float | None = None cache_write_tokens: float | None = None copilot_usage: AssistantUsageCopilotUsage | None = None @@ -680,7 +664,6 @@ def from_dict(obj: Any) -> "AssistantUsageData": assert isinstance(obj, dict) model = from_str(obj.get("model")) api_call_id = from_union([from_none, from_str], obj.get("apiCallId")) - api_endpoint = from_union([from_none, lambda x: parse_enum(AssistantUsageApiEndpoint, x)], obj.get("apiEndpoint")) cache_read_tokens = from_union([from_none, from_float], obj.get("cacheReadTokens")) cache_write_tokens = from_union([from_none, from_float], obj.get("cacheWriteTokens")) copilot_usage = from_union([from_none, AssistantUsageCopilotUsage.from_dict], obj.get("copilotUsage")) @@ -699,7 +682,6 @@ def from_dict(obj: Any) -> "AssistantUsageData": return AssistantUsageData( model=model, api_call_id=api_call_id, - api_endpoint=api_endpoint, cache_read_tokens=cache_read_tokens, cache_write_tokens=cache_write_tokens, copilot_usage=copilot_usage, @@ -722,8 +704,6 @@ def to_dict(self) -> dict: result["model"] = from_str(self.model) if self.api_call_id is not None: result["apiCallId"] = from_union([from_none, from_str], self.api_call_id) - if self.api_endpoint is not None: - result["apiEndpoint"] = from_union([from_none, lambda x: to_enum(AssistantUsageApiEndpoint, x)], self.api_endpoint) if self.cache_read_tokens is not None: result["cacheReadTokens"] = from_union([from_none, to_float], self.cache_read_tokens) if self.cache_write_tokens is not None: @@ -1767,19 +1747,16 @@ class PermissionPromptRequest: action: PermissionPromptRequestMemoryAction | None = None args: Any | None = None can_offer_session_approval: bool | None = None - capabilities: list[str] | None = None citations: str | None = None command_identifiers: list[str] | None = None diff: str | None = None direction: PermissionPromptRequestMemoryDirection | None = None - extension_name: str | None = None fact: str | None = None file_name: str | None = None full_command_text: str | None = None hook_message: str | None = None intention: str | None = None new_file_contents: str | None = None - operation: str | None = None path: str | None = None paths: list[str] | None = None reason: str | None = None @@ -1801,19 +1778,16 @@ def from_dict(obj: Any) -> "PermissionPromptRequest": action = from_union([from_none, lambda x: parse_enum(PermissionPromptRequestMemoryAction, x)], obj.get("action", "store")) args = from_union([from_none, lambda x: x], obj.get("args")) can_offer_session_approval = from_union([from_none, from_bool], obj.get("canOfferSessionApproval")) - capabilities = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("capabilities")) citations = from_union([from_none, from_str], obj.get("citations")) command_identifiers = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("commandIdentifiers")) diff = from_union([from_none, from_str], obj.get("diff")) direction = from_union([from_none, lambda x: parse_enum(PermissionPromptRequestMemoryDirection, x)], obj.get("direction")) - extension_name = from_union([from_none, from_str], obj.get("extensionName")) fact = from_union([from_none, from_str], obj.get("fact")) file_name = from_union([from_none, from_str], obj.get("fileName")) full_command_text = from_union([from_none, from_str], obj.get("fullCommandText")) hook_message = from_union([from_none, from_str], obj.get("hookMessage")) intention = from_union([from_none, from_str], obj.get("intention")) new_file_contents = from_union([from_none, from_str], obj.get("newFileContents")) - operation = from_union([from_none, from_str], obj.get("operation")) path = from_union([from_none, from_str], obj.get("path")) paths = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("paths")) reason = from_union([from_none, from_str], obj.get("reason")) @@ -1832,19 +1806,16 @@ def from_dict(obj: Any) -> "PermissionPromptRequest": action=action, args=args, can_offer_session_approval=can_offer_session_approval, - capabilities=capabilities, citations=citations, command_identifiers=command_identifiers, diff=diff, direction=direction, - extension_name=extension_name, fact=fact, file_name=file_name, full_command_text=full_command_text, hook_message=hook_message, intention=intention, new_file_contents=new_file_contents, - operation=operation, path=path, paths=paths, reason=reason, @@ -1870,8 +1841,6 @@ def to_dict(self) -> dict: result["args"] = from_union([from_none, lambda x: x], self.args) if self.can_offer_session_approval is not None: result["canOfferSessionApproval"] = from_union([from_none, from_bool], self.can_offer_session_approval) - if self.capabilities is not None: - result["capabilities"] = from_union([from_none, lambda x: from_list(from_str, x)], self.capabilities) if self.citations is not None: result["citations"] = from_union([from_none, from_str], self.citations) if self.command_identifiers is not None: @@ -1880,8 +1849,6 @@ def to_dict(self) -> dict: result["diff"] = from_union([from_none, from_str], self.diff) if self.direction is not None: result["direction"] = from_union([from_none, lambda x: to_enum(PermissionPromptRequestMemoryDirection, x)], self.direction) - if self.extension_name is not None: - result["extensionName"] = from_union([from_none, from_str], self.extension_name) if self.fact is not None: result["fact"] = from_union([from_none, from_str], self.fact) if self.file_name is not None: @@ -1894,8 +1861,6 @@ def to_dict(self) -> dict: result["intention"] = from_union([from_none, from_str], self.intention) if self.new_file_contents is not None: result["newFileContents"] = from_union([from_none, from_str], self.new_file_contents) - if self.operation is not None: - result["operation"] = from_union([from_none, from_str], self.operation) if self.path is not None: result["path"] = from_union([from_none, from_str], self.path) if self.paths is not None: @@ -1930,12 +1895,10 @@ class PermissionRequest: action: PermissionRequestMemoryAction | None = None args: Any = None can_offer_session_approval: bool | None = None - capabilities: list[str] | None = None citations: str | None = None commands: list[PermissionRequestShellCommand] | None = None diff: str | None = None direction: PermissionRequestMemoryDirection | None = None - extension_name: str | None = None fact: str | None = None file_name: str | None = None full_command_text: str | None = None @@ -1943,7 +1906,6 @@ class PermissionRequest: hook_message: str | None = None intention: str | None = None new_file_contents: str | None = None - operation: str | None = None path: str | None = None possible_paths: list[str] | None = None possible_urls: list[PermissionRequestShellPossibleUrl] | None = None @@ -1966,12 +1928,10 @@ def from_dict(obj: Any) -> "PermissionRequest": action = from_union([from_none, lambda x: parse_enum(PermissionRequestMemoryAction, x)], obj.get("action", "store")) args = obj.get("args") can_offer_session_approval = from_union([from_none, from_bool], obj.get("canOfferSessionApproval")) - capabilities = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("capabilities")) citations = from_union([from_none, from_str], obj.get("citations")) commands = from_union([from_none, lambda x: from_list(PermissionRequestShellCommand.from_dict, x)], obj.get("commands")) diff = from_union([from_none, from_str], obj.get("diff")) direction = from_union([from_none, lambda x: parse_enum(PermissionRequestMemoryDirection, x)], obj.get("direction")) - extension_name = from_union([from_none, from_str], obj.get("extensionName")) fact = from_union([from_none, from_str], obj.get("fact")) file_name = from_union([from_none, from_str], obj.get("fileName")) full_command_text = from_union([from_none, from_str], obj.get("fullCommandText")) @@ -1979,7 +1939,6 @@ def from_dict(obj: Any) -> "PermissionRequest": hook_message = from_union([from_none, from_str], obj.get("hookMessage")) intention = from_union([from_none, from_str], obj.get("intention")) new_file_contents = from_union([from_none, from_str], obj.get("newFileContents")) - operation = from_union([from_none, from_str], obj.get("operation")) path = from_union([from_none, from_str], obj.get("path")) possible_paths = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("possiblePaths")) possible_urls = from_union([from_none, lambda x: from_list(PermissionRequestShellPossibleUrl.from_dict, x)], obj.get("possibleUrls")) @@ -1999,12 +1958,10 @@ def from_dict(obj: Any) -> "PermissionRequest": action=action, args=args, can_offer_session_approval=can_offer_session_approval, - capabilities=capabilities, citations=citations, commands=commands, diff=diff, direction=direction, - extension_name=extension_name, fact=fact, file_name=file_name, full_command_text=full_command_text, @@ -2012,7 +1969,6 @@ def from_dict(obj: Any) -> "PermissionRequest": hook_message=hook_message, intention=intention, new_file_contents=new_file_contents, - operation=operation, path=path, possible_paths=possible_paths, possible_urls=possible_urls, @@ -2038,8 +1994,6 @@ def to_dict(self) -> dict: result["args"] = self.args if self.can_offer_session_approval is not None: result["canOfferSessionApproval"] = from_union([from_none, from_bool], self.can_offer_session_approval) - if self.capabilities is not None: - result["capabilities"] = from_union([from_none, lambda x: from_list(from_str, x)], self.capabilities) if self.citations is not None: result["citations"] = from_union([from_none, from_str], self.citations) if self.commands is not None: @@ -2048,8 +2002,6 @@ def to_dict(self) -> dict: result["diff"] = from_union([from_none, from_str], self.diff) if self.direction is not None: result["direction"] = from_union([from_none, lambda x: to_enum(PermissionRequestMemoryDirection, x)], self.direction) - if self.extension_name is not None: - result["extensionName"] = from_union([from_none, from_str], self.extension_name) if self.fact is not None: result["fact"] = from_union([from_none, from_str], self.fact) if self.file_name is not None: @@ -2064,8 +2016,6 @@ def to_dict(self) -> dict: result["intention"] = from_union([from_none, from_str], self.intention) if self.new_file_contents is not None: result["newFileContents"] = from_union([from_none, from_str], self.new_file_contents) - if self.operation is not None: - result["operation"] = from_union([from_none, from_str], self.operation) if self.path is not None: result["path"] = from_union([from_none, from_str], self.path) if self.possible_paths is not None: @@ -2903,11 +2853,10 @@ def to_dict(self) -> dict: @dataclass class SessionScheduleCreatedData: - "Scheduled prompt registered via /every or /after" + "Scheduled prompt registered via /every" id: int interval_ms: int prompt: str - recurring: bool | None = None @staticmethod def from_dict(obj: Any) -> "SessionScheduleCreatedData": @@ -2915,12 +2864,10 @@ def from_dict(obj: Any) -> "SessionScheduleCreatedData": id = from_int(obj.get("id")) interval_ms = from_int(obj.get("intervalMs")) prompt = from_str(obj.get("prompt")) - recurring = from_union([from_none, from_bool], obj.get("recurring")) return SessionScheduleCreatedData( id=id, interval_ms=interval_ms, prompt=prompt, - recurring=recurring, ) def to_dict(self) -> dict: @@ -2928,8 +2875,6 @@ def to_dict(self) -> dict: result["id"] = to_int(self.id) result["intervalMs"] = to_int(self.interval_ms) result["prompt"] = from_str(self.prompt) - if self.recurring is not None: - result["recurring"] = from_union([from_none, from_bool], self.recurring) return result @@ -3063,7 +3008,6 @@ class SessionStartData: version: float already_in_use: bool | None = None context: WorkingDirectoryContext | None = None - detached_from_spawning_parent_session_id: str | None = None reasoning_effort: str | None = None remote_steerable: bool | None = None selected_model: str | None = None @@ -3078,7 +3022,6 @@ def from_dict(obj: Any) -> "SessionStartData": version = from_float(obj.get("version")) already_in_use = from_union([from_none, from_bool], obj.get("alreadyInUse")) context = from_union([from_none, WorkingDirectoryContext.from_dict], obj.get("context")) - detached_from_spawning_parent_session_id = from_union([from_none, from_str], obj.get("detachedFromSpawningParentSessionId")) reasoning_effort = from_union([from_none, from_str], obj.get("reasoningEffort")) remote_steerable = from_union([from_none, from_bool], obj.get("remoteSteerable")) selected_model = from_union([from_none, from_str], obj.get("selectedModel")) @@ -3090,7 +3033,6 @@ def from_dict(obj: Any) -> "SessionStartData": version=version, already_in_use=already_in_use, context=context, - detached_from_spawning_parent_session_id=detached_from_spawning_parent_session_id, reasoning_effort=reasoning_effort, remote_steerable=remote_steerable, selected_model=selected_model, @@ -3107,8 +3049,6 @@ def to_dict(self) -> dict: result["alreadyInUse"] = from_union([from_none, from_bool], self.already_in_use) if self.context is not None: result["context"] = from_union([from_none, lambda x: to_class(WorkingDirectoryContext, x)], self.context) - if self.detached_from_spawning_parent_session_id is not None: - result["detachedFromSpawningParentSessionId"] = from_union([from_none, from_str], self.detached_from_spawning_parent_session_id) if self.reasoning_effort is not None: result["reasoningEffort"] = from_union([from_none, from_str], self.reasoning_effort) if self.remote_steerable is not None: @@ -3709,7 +3649,6 @@ class SubagentStartedData: agent_display_name: str agent_name: str tool_call_id: str - model: str | None = None @staticmethod def from_dict(obj: Any) -> "SubagentStartedData": @@ -3718,13 +3657,11 @@ def from_dict(obj: Any) -> "SubagentStartedData": agent_display_name = from_str(obj.get("agentDisplayName")) agent_name = from_str(obj.get("agentName")) tool_call_id = from_str(obj.get("toolCallId")) - model = from_union([from_none, from_str], obj.get("model")) return SubagentStartedData( agent_description=agent_description, agent_display_name=agent_display_name, agent_name=agent_name, tool_call_id=tool_call_id, - model=model, ) def to_dict(self) -> dict: @@ -3733,8 +3670,6 @@ def to_dict(self) -> dict: result["agentDisplayName"] = from_str(self.agent_display_name) result["agentName"] = from_str(self.agent_name) result["toolCallId"] = from_str(self.tool_call_id) - if self.model is not None: - result["model"] = from_union([from_none, from_str], self.model) return result @@ -4510,7 +4445,6 @@ class UserMessageData: agent_mode: UserMessageAgentMode | None = None attachments: list[UserMessageAttachment] | None = None interaction_id: str | None = None - is_autopilot_continuation: bool | None = None native_document_path_fallback_paths: list[str] | None = None parent_agent_task_id: str | None = None source: str | None = None @@ -4524,7 +4458,6 @@ def from_dict(obj: Any) -> "UserMessageData": agent_mode = from_union([from_none, lambda x: parse_enum(UserMessageAgentMode, x)], obj.get("agentMode")) attachments = from_union([from_none, lambda x: from_list(UserMessageAttachment.from_dict, x)], obj.get("attachments")) interaction_id = from_union([from_none, from_str], obj.get("interactionId")) - is_autopilot_continuation = from_union([from_none, from_bool], obj.get("isAutopilotContinuation")) native_document_path_fallback_paths = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("nativeDocumentPathFallbackPaths")) parent_agent_task_id = from_union([from_none, from_str], obj.get("parentAgentTaskId")) source = from_union([from_none, from_str], obj.get("source")) @@ -4535,7 +4468,6 @@ def from_dict(obj: Any) -> "UserMessageData": agent_mode=agent_mode, attachments=attachments, interaction_id=interaction_id, - is_autopilot_continuation=is_autopilot_continuation, native_document_path_fallback_paths=native_document_path_fallback_paths, parent_agent_task_id=parent_agent_task_id, source=source, @@ -4552,8 +4484,6 @@ def to_dict(self) -> dict: result["attachments"] = from_union([from_none, lambda x: from_list(lambda x: to_class(UserMessageAttachment, x), x)], self.attachments) if self.interaction_id is not None: result["interactionId"] = from_union([from_none, from_str], self.interaction_id) - if self.is_autopilot_continuation is not None: - result["isAutopilotContinuation"] = from_union([from_none, from_bool], self.is_autopilot_continuation) if self.native_document_path_fallback_paths is not None: result["nativeDocumentPathFallbackPaths"] = from_union([from_none, lambda x: from_list(from_str, x)], self.native_document_path_fallback_paths) if self.parent_agent_task_id is not None: @@ -4572,8 +4502,6 @@ class UserToolSessionApproval: "The approval to add as a session-scoped rule" kind: UserToolSessionApprovalKind command_identifiers: list[str] | None = None - extension_name: str | None = None - operation: str | None = None server_name: str | None = None tool_name: str | None = None @@ -4582,15 +4510,11 @@ def from_dict(obj: Any) -> "UserToolSessionApproval": assert isinstance(obj, dict) kind = parse_enum(UserToolSessionApprovalKind, obj.get("kind")) command_identifiers = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("commandIdentifiers")) - extension_name = from_union([from_none, from_str], obj.get("extensionName")) - operation = from_union([from_none, from_str], obj.get("operation")) server_name = from_union([from_none, from_str], obj.get("serverName")) tool_name = from_union([from_none, from_str], obj.get("toolName")) return UserToolSessionApproval( kind=kind, command_identifiers=command_identifiers, - extension_name=extension_name, - operation=operation, server_name=server_name, tool_name=tool_name, ) @@ -4600,10 +4524,6 @@ def to_dict(self) -> dict: result["kind"] = to_enum(UserToolSessionApprovalKind, self.kind) if self.command_identifiers is not None: result["commandIdentifiers"] = from_union([from_none, lambda x: from_list(from_str, x)], self.command_identifiers) - if self.extension_name is not None: - result["extensionName"] = from_union([from_none, from_str], self.extension_name) - if self.operation is not None: - result["operation"] = from_union([from_none, from_str], self.operation) if self.server_name is not None: result["serverName"] = from_union([from_none, from_str], self.server_name) if self.tool_name is not None: @@ -4665,27 +4585,12 @@ def to_dict(self) -> dict: return result -class AbortReason(Enum): - "Finite reason code describing why the current turn was aborted" - USER_INITIATED = "user_initiated" - REMOTE_COMMAND = "remote_command" - USER_ABORT = "user_abort" - - class AssistantMessageToolRequestType(Enum): "Tool call type: \"function\" for standard tool calls, \"custom\" for grammar-based tool calls. Defaults to \"function\" when absent." FUNCTION = "function" CUSTOM = "custom" -class AssistantUsageApiEndpoint(Enum): - "API endpoint used for this model call, matching CAPI supported_endpoints vocabulary" - CHAT_COMPLETIONS = "/chat/completions" - V1_MESSAGES = "/v1/messages" - RESPONSES = "/responses" - WS_RESPONSES = "ws:/responses" - - class ElicitationCompletedAction(Enum): "The user action: \"accept\" (submitted form), \"decline\" (explicitly refused), or \"cancel\" (dismissed)" ACCEPT = "accept" @@ -4757,8 +4662,6 @@ class PermissionPromptRequestKind(Enum): CUSTOM_TOOL = "custom-tool" PATH = "path" HOOK = "hook" - EXTENSION_MANAGEMENT = "extension-management" - EXTENSION_PERMISSION_ACCESS = "extension-permission-access" class PermissionPromptRequestMemoryAction(Enum): @@ -4790,8 +4693,6 @@ class PermissionRequestKind(Enum): MEMORY = "memory" CUSTOM_TOOL = "custom-tool" HOOK = "hook" - EXTENSION_MANAGEMENT = "extension-management" - EXTENSION_PERMISSION_ACCESS = "extension-permission-access" class PermissionRequestMemoryAction(Enum): @@ -4902,8 +4803,6 @@ class UserToolSessionApprovalKind(Enum): MCP = "mcp" MEMORY = "memory" CUSTOM_TOOL = "custom-tool" - EXTENSION_MANAGEMENT = "extension-management" - EXTENSION_PERMISSION_ACCESS = "extension-permission-access" class WorkingDirectoryContextHostType(Enum): diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs index 277cce50a..813ccaf07 100644 --- a/rust/src/generated/api_types.rs +++ b/rust/src/generated/api_types.rs @@ -185,16 +185,11 @@ pub mod rpc_methods { pub const SESSIONFS_RM: &str = "sessionFs.rm"; /// `sessionFs.rename` pub const SESSIONFS_RENAME: &str = "sessionFs.rename"; + /// `sessionFs.sqlite` + pub const SESSIONFS_SQLITE: &str = "sessionFs.sqlite"; } -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct AccountGetQuotaRequest { - /// GitHub token for per-user quota lookup. When provided, resolves this token to determine the user's quota instead of using the global auth. - #[serde(skip_serializing_if = "Option::is_none")] - pub git_hub_token: Option, -} - +/// Schema for the `AccountQuotaSnapshot` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AccountQuotaSnapshot { @@ -217,6 +212,7 @@ pub struct AccountQuotaSnapshot { pub used_requests: i64, } +/// Quota usage snapshots for the resolved user, keyed by quota type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AccountGetQuotaResult { @@ -224,6 +220,7 @@ pub struct AccountGetQuotaResult { pub quota_snapshots: HashMap, } +/// Schema for the `AgentInfo` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AgentInfo { @@ -238,6 +235,7 @@ pub struct AgentInfo { pub path: Option, } +/// The currently selected custom agent, or null when using the default agent. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AgentGetCurrentResult { @@ -245,6 +243,7 @@ pub struct AgentGetCurrentResult { pub agent: AgentInfo, } +/// Custom agents available to the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AgentList { @@ -252,6 +251,7 @@ pub struct AgentList { pub agents: Vec, } +/// Custom agents available to the session after reloading definitions from disk. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AgentReloadResult { @@ -259,6 +259,7 @@ pub struct AgentReloadResult { pub agents: Vec, } +/// Name of the custom agent to select for subsequent turns. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AgentSelectRequest { @@ -266,6 +267,7 @@ pub struct AgentSelectRequest { pub name: String, } +/// The newly selected custom agent. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AgentSelectResult { @@ -290,6 +292,7 @@ pub struct SlashCommandInput { pub required: Option, } +/// Schema for the `SlashCommandInfo` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SlashCommandInfo { @@ -312,6 +315,7 @@ pub struct SlashCommandInfo { pub name: String, } +/// Slash commands available in the session, after applying any include/exclude filters. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CommandList { @@ -319,6 +323,7 @@ pub struct CommandList { pub commands: Vec, } +/// Pending command request ID and an optional error if the client handler failed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CommandsHandlePendingCommandRequest { @@ -329,6 +334,7 @@ pub struct CommandsHandlePendingCommandRequest { pub request_id: RequestId, } +/// Indicates whether the pending client-handled command was completed successfully. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CommandsHandlePendingCommandResult { @@ -336,6 +342,7 @@ pub struct CommandsHandlePendingCommandResult { pub success: bool, } +/// Slash command name and optional raw input string to invoke. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CommandsInvokeRequest { @@ -346,20 +353,7 @@ pub struct CommandsInvokeRequest { pub name: String, } -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct CommandsListRequest { - /// Include runtime built-in commands - #[serde(skip_serializing_if = "Option::is_none")] - pub include_builtins: Option, - /// Include commands registered by protocol clients, including SDK clients and extensions - #[serde(skip_serializing_if = "Option::is_none")] - pub include_client_commands: Option, - /// Include enabled user-invocable skills and commands - #[serde(skip_serializing_if = "Option::is_none")] - pub include_skills: Option, -} - +/// Queued command request ID and the result indicating whether the client handled it. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CommandsRespondToQueuedCommandRequest { @@ -369,6 +363,7 @@ pub struct CommandsRespondToQueuedCommandRequest { pub result: serde_json::Value, } +/// Indicates whether the queued-command response was accepted by the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CommandsRespondToQueuedCommandResult { @@ -376,6 +371,7 @@ pub struct CommandsRespondToQueuedCommandResult { pub success: bool, } +/// Optional connection token presented by the SDK client during the handshake. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ConnectRequest { @@ -384,6 +380,7 @@ pub struct ConnectRequest { pub token: Option, } +/// Handshake result reporting the server's protocol version and package version on success. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ConnectResult { @@ -395,6 +392,7 @@ pub struct ConnectResult { pub version: String, } +/// The currently selected model for the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CurrentModel { @@ -403,6 +401,7 @@ pub struct CurrentModel { pub model_id: Option, } +/// Schema for the `DiscoveredMcpServer` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct DiscoveredMcpServer { @@ -417,6 +416,7 @@ pub struct DiscoveredMcpServer { pub r#type: Option, } +/// Schema for the `EmbeddedBlobResourceContents` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct EmbeddedBlobResourceContents { @@ -429,6 +429,7 @@ pub struct EmbeddedBlobResourceContents { pub uri: String, } +/// Schema for the `EmbeddedTextResourceContents` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct EmbeddedTextResourceContents { @@ -441,6 +442,7 @@ pub struct EmbeddedTextResourceContents { pub uri: String, } +/// Schema for the `Extension` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Extension { @@ -457,6 +459,7 @@ pub struct Extension { pub status: ExtensionStatus, } +/// Extensions discovered for the session, with their current status. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ExtensionList { @@ -464,6 +467,7 @@ pub struct ExtensionList { pub extensions: Vec, } +/// Source-qualified extension identifier to disable for the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ExtensionsDisableRequest { @@ -471,6 +475,7 @@ pub struct ExtensionsDisableRequest { pub id: String, } +/// Source-qualified extension identifier to enable for the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ExtensionsEnableRequest { @@ -605,6 +610,7 @@ pub struct ExternalToolTextResultForLlmContentText { pub r#type: ExternalToolTextResultForLlmContentTextType, } +/// Optional user prompt to combine with the fleet orchestration instructions. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct FleetStartRequest { @@ -613,6 +619,7 @@ pub struct FleetStartRequest { pub prompt: Option, } +/// Indicates whether fleet mode was successfully activated. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct FleetStartResult { @@ -620,6 +627,7 @@ pub struct FleetStartResult { pub started: bool, } +/// Pending external tool call request ID, with the tool result or an error describing why it failed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct HandlePendingToolCallRequest { @@ -633,6 +641,7 @@ pub struct HandlePendingToolCallRequest { pub result: Option, } +/// Indicates whether the external tool call result was handled successfully. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct HandlePendingToolCallResult { @@ -661,6 +670,7 @@ pub struct HistoryCompactContextWindow { pub tool_definitions_tokens: Option, } +/// Compaction outcome with the number of tokens and messages removed and the resulting context window breakdown. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct HistoryCompactResult { @@ -675,6 +685,7 @@ pub struct HistoryCompactResult { pub tokens_removed: i64, } +/// Identifier of the event to truncate to; this event and all later events are removed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct HistoryTruncateRequest { @@ -682,6 +693,7 @@ pub struct HistoryTruncateRequest { pub event_id: String, } +/// Number of events that were removed by the truncation. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct HistoryTruncateResult { @@ -689,6 +701,7 @@ pub struct HistoryTruncateResult { pub events_removed: i64, } +/// Schema for the `InstructionsSources` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct InstructionsSources { @@ -712,6 +725,7 @@ pub struct InstructionsSources { pub r#type: InstructionsSourcesType, } +/// Instruction sources loaded for the session, in merge order. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct InstructionsGetSourcesResult { @@ -719,6 +733,7 @@ pub struct InstructionsGetSourcesResult { pub sources: Vec, } +/// Message text, optional severity level, persistence flag, and optional follow-up URL. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct LogRequest { @@ -735,6 +750,7 @@ pub struct LogRequest { pub url: Option, } +/// Identifier of the session event that was emitted for the log message. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct LogResult { @@ -742,6 +758,7 @@ pub struct LogResult { pub event_id: String, } +/// MCP server name and configuration to add to user configuration. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpConfigAddRequest { @@ -751,6 +768,7 @@ pub struct McpConfigAddRequest { pub name: String, } +/// MCP server names to disable for new sessions. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpConfigDisableRequest { @@ -758,6 +776,7 @@ pub struct McpConfigDisableRequest { pub names: Vec, } +/// MCP server names to enable for new sessions. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpConfigEnableRequest { @@ -765,6 +784,7 @@ pub struct McpConfigEnableRequest { pub names: Vec, } +/// User-configured MCP servers, keyed by server name. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpConfigList { @@ -772,6 +792,7 @@ pub struct McpConfigList { pub servers: HashMap, } +/// MCP server name to remove from user configuration. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpConfigRemoveRequest { @@ -779,6 +800,7 @@ pub struct McpConfigRemoveRequest { pub name: String, } +/// MCP server name and replacement configuration to write to user configuration. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpConfigUpdateRequest { @@ -788,6 +810,7 @@ pub struct McpConfigUpdateRequest { pub name: String, } +/// Name of the MCP server to disable for the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpDisableRequest { @@ -795,6 +818,7 @@ pub struct McpDisableRequest { pub server_name: String, } +/// Optional working directory used as context for MCP server discovery. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpDiscoverRequest { @@ -803,6 +827,7 @@ pub struct McpDiscoverRequest { pub working_directory: Option, } +/// MCP servers discovered from user, workspace, plugin, and built-in sources. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpDiscoverResult { @@ -810,6 +835,7 @@ pub struct McpDiscoverResult { pub servers: Vec, } +/// Name of the MCP server to enable for the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpEnableRequest { @@ -817,6 +843,7 @@ pub struct McpEnableRequest { pub server_name: String, } +/// Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, and the callback success-page copy. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpOauthLoginRequest { @@ -833,6 +860,7 @@ pub struct McpOauthLoginRequest { pub server_name: String, } +/// OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpOauthLoginResult { @@ -841,6 +869,7 @@ pub struct McpOauthLoginResult { pub authorization_url: Option, } +/// Schema for the `McpServer` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpServer { @@ -856,19 +885,26 @@ pub struct McpServer { pub status: McpServerStatus, } +/// Remote MCP server configuration accessed over HTTP or SSE. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpServerConfigHttp { + /// Content filtering mode to apply to all tools, or a map of tool name to content filtering mode. #[serde(skip_serializing_if = "Option::is_none")] pub filter_mapping: Option, + /// HTTP headers to include in requests to the remote MCP server. #[serde(default)] pub headers: HashMap, + /// Whether this server is a built-in fallback used when the user has not configured their own server. #[serde(skip_serializing_if = "Option::is_none")] pub is_default_server: Option, + /// OAuth client ID for a pre-registered remote MCP OAuth client. #[serde(skip_serializing_if = "Option::is_none")] pub oauth_client_id: Option, + /// OAuth grant type to use when authenticating to the remote MCP server. #[serde(skip_serializing_if = "Option::is_none")] pub oauth_grant_type: Option, + /// Whether the configured OAuth client is public and does not require a client secret. #[serde(skip_serializing_if = "Option::is_none")] pub oauth_public_client: Option, /// Timeout in milliseconds for tool calls to this server. @@ -880,20 +916,28 @@ pub struct McpServerConfigHttp { /// Remote transport type. Defaults to "http" when omitted. #[serde(skip_serializing_if = "Option::is_none")] pub r#type: Option, + /// URL of the remote MCP server endpoint. pub url: String, } +/// Local MCP server configuration launched as a child process. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpServerConfigLocal { + /// Command-line arguments passed to the local MCP server process. pub args: Vec, + /// Executable command used to start the local MCP server process. pub command: String, + /// Working directory for the local MCP server process. #[serde(skip_serializing_if = "Option::is_none")] pub cwd: Option, + /// Environment variables to pass to the local MCP server process. #[serde(default)] pub env: HashMap, + /// Content filtering mode to apply to all tools, or a map of tool name to content filtering mode. #[serde(skip_serializing_if = "Option::is_none")] pub filter_mapping: Option, + /// Whether this server is a built-in fallback used when the user has not configured their own server. #[serde(skip_serializing_if = "Option::is_none")] pub is_default_server: Option, /// Timeout in milliseconds for tool calls to this server. @@ -902,10 +946,12 @@ pub struct McpServerConfigLocal { /// Tools to include. Defaults to all tools if not specified. #[serde(default)] pub tools: Vec, + /// Local transport type. Defaults to "local". #[serde(skip_serializing_if = "Option::is_none")] pub r#type: Option, } +/// MCP servers configured for the session, with their connection status. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpServerList { @@ -1014,6 +1060,7 @@ pub struct ModelPolicy { pub terms: Option, } +/// Schema for the `Model` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Model { @@ -1043,6 +1090,7 @@ pub struct Model { pub supported_reasoning_efforts: Vec, } +/// Vision-specific limits #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ModelCapabilitiesOverrideLimitsVision { @@ -1070,10 +1118,13 @@ pub struct ModelCapabilitiesOverrideLimits { skip_serializing_if = "Option::is_none" )] pub max_context_window_tokens: Option, + /// Maximum number of output/completion tokens #[serde(rename = "max_output_tokens", skip_serializing_if = "Option::is_none")] pub max_output_tokens: Option, + /// Maximum number of prompt/input tokens #[serde(rename = "max_prompt_tokens", skip_serializing_if = "Option::is_none")] pub max_prompt_tokens: Option, + /// Vision-specific limits #[serde(skip_serializing_if = "Option::is_none")] pub vision: Option, } @@ -1082,8 +1133,10 @@ pub struct ModelCapabilitiesOverrideLimits { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ModelCapabilitiesOverrideSupports { + /// Whether this model supports reasoning effort configuration #[serde(skip_serializing_if = "Option::is_none")] pub reasoning_effort: Option, + /// Whether this model supports vision/image input #[serde(skip_serializing_if = "Option::is_none")] pub vision: Option, } @@ -1100,6 +1153,7 @@ pub struct ModelCapabilitiesOverride { pub supports: Option, } +/// List of Copilot models available to the resolved user, including capabilities and billing metadata. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ModelList { @@ -1107,14 +1161,7 @@ pub struct ModelList { pub models: Vec, } -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct ModelsListRequest { - /// 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. - #[serde(skip_serializing_if = "Option::is_none")] - pub git_hub_token: Option, -} - +/// Target model identifier and optional reasoning effort, summary, and capability overrides. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ModelSwitchToRequest { @@ -1123,11 +1170,15 @@ pub struct ModelSwitchToRequest { pub model_capabilities: Option, /// Model identifier to switch to pub model_id: String, - /// Reasoning effort level to use for the model + /// Reasoning effort level to use for the model. "none" disables reasoning. #[serde(skip_serializing_if = "Option::is_none")] pub reasoning_effort: Option, + /// Reasoning summary mode to request for supported model clients + #[serde(skip_serializing_if = "Option::is_none")] + pub reasoning_summary: Option, } +/// The model identifier active on the session after the switch. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ModelSwitchToResult { @@ -1136,6 +1187,7 @@ pub struct ModelSwitchToResult { pub model_id: Option, } +/// Agent interaction mode to apply to the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ModeSetRequest { @@ -1143,6 +1195,7 @@ pub struct ModeSetRequest { pub mode: SessionMode, } +/// The session's friendly name, or null when not yet set. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct NameGetResult { @@ -1150,6 +1203,7 @@ pub struct NameGetResult { pub name: Option, } +/// New friendly name to apply to the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct NameSetRequest { @@ -1157,6 +1211,7 @@ pub struct NameSetRequest { pub name: String, } +/// Schema for the `PermissionDecisionApproveOnce` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveOnce { @@ -1164,68 +1219,94 @@ pub struct PermissionDecisionApproveOnce { pub kind: PermissionDecisionApproveOnceKind, } +/// Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalCommands { + /// Command identifiers covered by this approval. pub command_identifiers: Vec, + /// Approval scoped to specific command identifiers. pub kind: PermissionDecisionApproveForSessionApprovalCommandsKind, } +/// Schema for the `PermissionDecisionApproveForSessionApprovalRead` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalRead { + /// Approval covering read-only filesystem operations. pub kind: PermissionDecisionApproveForSessionApprovalReadKind, } +/// Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalWrite { + /// Approval covering filesystem write operations. pub kind: PermissionDecisionApproveForSessionApprovalWriteKind, } +/// Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalMcp { + /// Approval covering an MCP tool. pub kind: PermissionDecisionApproveForSessionApprovalMcpKind, + /// MCP server name. pub server_name: String, + /// MCP tool name, or null to cover every tool on the server. pub tool_name: Option, } +/// Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalMcpSampling { + /// Approval covering MCP sampling requests for a server. pub kind: PermissionDecisionApproveForSessionApprovalMcpSamplingKind, + /// MCP server name. pub server_name: String, } +/// Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalMemory { + /// Approval covering writes to long-term memory. pub kind: PermissionDecisionApproveForSessionApprovalMemoryKind, } +/// Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalCustomTool { + /// Approval covering a custom tool. pub kind: PermissionDecisionApproveForSessionApprovalCustomToolKind, + /// Custom tool name. pub tool_name: String, } +/// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalExtensionManagement { + /// Approval covering extension lifecycle operations such as enable, disable, or reload. pub kind: PermissionDecisionApproveForSessionApprovalExtensionManagementKind, + /// Optional operation identifier; when omitted, the approval covers all extension management operations. #[serde(skip_serializing_if = "Option::is_none")] pub operation: Option, } +/// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess { + /// Extension name. pub extension_name: String, + /// Approval covering an extension's request to access a permission-gated capability. pub kind: PermissionDecisionApproveForSessionApprovalExtensionPermissionAccessKind, } +/// Schema for the `PermissionDecisionApproveForSession` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSession { @@ -1239,68 +1320,94 @@ pub struct PermissionDecisionApproveForSession { pub kind: PermissionDecisionApproveForSessionKind, } +/// Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalCommands { + /// Command identifiers covered by this approval. pub command_identifiers: Vec, + /// Approval scoped to specific command identifiers. pub kind: PermissionDecisionApproveForLocationApprovalCommandsKind, } +/// Schema for the `PermissionDecisionApproveForLocationApprovalRead` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalRead { + /// Approval covering read-only filesystem operations. pub kind: PermissionDecisionApproveForLocationApprovalReadKind, } +/// Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalWrite { + /// Approval covering filesystem write operations. pub kind: PermissionDecisionApproveForLocationApprovalWriteKind, } +/// Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalMcp { + /// Approval covering an MCP tool. pub kind: PermissionDecisionApproveForLocationApprovalMcpKind, + /// MCP server name. pub server_name: String, + /// MCP tool name, or null to cover every tool on the server. pub tool_name: Option, } +/// Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalMcpSampling { + /// Approval covering MCP sampling requests for a server. pub kind: PermissionDecisionApproveForLocationApprovalMcpSamplingKind, + /// MCP server name. pub server_name: String, } +/// Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalMemory { + /// Approval covering writes to long-term memory. pub kind: PermissionDecisionApproveForLocationApprovalMemoryKind, } +/// Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalCustomTool { + /// Approval covering a custom tool. pub kind: PermissionDecisionApproveForLocationApprovalCustomToolKind, + /// Custom tool name. pub tool_name: String, } +/// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalExtensionManagement { + /// Approval covering extension lifecycle operations such as enable, disable, or reload. pub kind: PermissionDecisionApproveForLocationApprovalExtensionManagementKind, + /// Optional operation identifier; when omitted, the approval covers all extension management operations. #[serde(skip_serializing_if = "Option::is_none")] pub operation: Option, } +/// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess { + /// Extension name. pub extension_name: String, + /// Approval covering an extension's request to access a permission-gated capability. pub kind: PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind, } +/// Schema for the `PermissionDecisionApproveForLocation` type. #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocation { @@ -1312,6 +1419,7 @@ pub struct PermissionDecisionApproveForLocation { pub location_key: String, } +/// Schema for the `PermissionDecisionApprovePermanently` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApprovePermanently { @@ -1321,6 +1429,7 @@ pub struct PermissionDecisionApprovePermanently { pub kind: PermissionDecisionApprovePermanentlyKind, } +/// Schema for the `PermissionDecisionReject` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionReject { @@ -1331,6 +1440,7 @@ pub struct PermissionDecisionReject { pub kind: PermissionDecisionRejectKind, } +/// Schema for the `PermissionDecisionUserNotAvailable` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionUserNotAvailable { @@ -1338,14 +1448,17 @@ pub struct PermissionDecisionUserNotAvailable { pub kind: PermissionDecisionUserNotAvailableKind, } +/// Pending permission request ID and the decision to apply (approve/reject and scope). #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionRequest { /// Request ID of the pending permission request pub request_id: RequestId, + /// Decision to apply to a pending permission request. pub result: PermissionDecision, } +/// Indicates whether the permission decision was applied; false when the request was already resolved. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionRequestResult { @@ -1353,10 +1466,12 @@ pub struct PermissionRequestResult { pub success: bool, } +/// No parameters; clears all session-scoped tool permission approvals. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionsResetSessionApprovalsRequest {} +/// Indicates whether the operation succeeded. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionsResetSessionApprovalsResult { @@ -1364,6 +1479,7 @@ pub struct PermissionsResetSessionApprovalsResult { pub success: bool, } +/// Whether to auto-approve all tool permission requests for the rest of the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionsSetApproveAllRequest { @@ -1371,6 +1487,7 @@ pub struct PermissionsSetApproveAllRequest { pub enabled: bool, } +/// Indicates whether the operation succeeded. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionsSetApproveAllResult { @@ -1378,6 +1495,7 @@ pub struct PermissionsSetApproveAllResult { pub success: bool, } +/// Optional message to echo back to the caller. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PingRequest { @@ -1386,6 +1504,7 @@ pub struct PingRequest { pub message: Option, } +/// Server liveness response, including the echoed message, current timestamp, and protocol version. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PingResult { @@ -1397,6 +1516,7 @@ pub struct PingResult { pub timestamp: i64, } +/// Existence, contents, and resolved path of the session plan file. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PlanReadResult { @@ -1408,6 +1528,7 @@ pub struct PlanReadResult { pub path: Option, } +/// Replacement contents to write to the session plan file. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PlanUpdateRequest { @@ -1415,6 +1536,7 @@ pub struct PlanUpdateRequest { pub content: String, } +/// Schema for the `Plugin` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Plugin { @@ -1429,6 +1551,7 @@ pub struct Plugin { pub version: Option, } +/// Plugins installed for the session, with their enabled state and version metadata. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PluginList { @@ -1436,6 +1559,7 @@ pub struct PluginList { pub plugins: Vec, } +/// Schema for the `QueuedCommandHandled` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct QueuedCommandHandled { @@ -1446,6 +1570,7 @@ pub struct QueuedCommandHandled { pub stop_processing_queue: Option, } +/// Schema for the `QueuedCommandNotHandled` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct QueuedCommandNotHandled { @@ -1453,24 +1578,27 @@ pub struct QueuedCommandNotHandled { pub handled: bool, } +/// Optional remote session mode ("off", "export", or "on"); defaults to enabling both export and remote steering. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct RemoteEnableRequest { - /// Per-session remote mode. "off" disables remote, "export" exports session events to Mission Control without enabling remote steering, "on" enables both export and remote steering. + /// Per-session remote mode. "off" disables remote, "export" exports session events to GitHub without enabling remote steering, "on" enables both export and remote steering. #[serde(skip_serializing_if = "Option::is_none")] pub mode: Option, } +/// GitHub URL for the session and a flag indicating whether remote steering is enabled. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct RemoteEnableResult { /// Whether remote steering is enabled pub remote_steerable: bool, - /// Mission Control frontend URL for this session + /// GitHub frontend URL for this session #[serde(skip_serializing_if = "Option::is_none")] pub url: Option, } +/// Schema for the `ServerSkill` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ServerSkill { @@ -1492,6 +1620,7 @@ pub struct ServerSkill { pub user_invocable: bool, } +/// Skills discovered across global and project sources. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ServerSkillList { @@ -1499,6 +1628,7 @@ pub struct ServerSkillList { pub skills: Vec, } +/// Authentication status and account metadata for the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionAuthStatus { @@ -1521,6 +1651,7 @@ pub struct SessionAuthStatus { pub status_message: Option, } +/// File path, content to append, and optional mode for the client-provided session filesystem. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsAppendFileRequest { @@ -1544,6 +1675,7 @@ pub struct SessionFsError { pub message: Option, } +/// Path to test for existence in the client-provided session filesystem. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsExistsRequest { @@ -1551,6 +1683,7 @@ pub struct SessionFsExistsRequest { pub path: String, } +/// Indicates whether the requested path exists in the client-provided session filesystem. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsExistsResult { @@ -1558,6 +1691,7 @@ pub struct SessionFsExistsResult { pub exists: bool, } +/// Directory path to create in the client-provided session filesystem, with options for recursive creation and POSIX mode. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsMkdirRequest { @@ -1571,6 +1705,7 @@ pub struct SessionFsMkdirRequest { pub recursive: Option, } +/// Directory path whose entries should be listed from the client-provided session filesystem. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsReaddirRequest { @@ -1578,6 +1713,7 @@ pub struct SessionFsReaddirRequest { pub path: String, } +/// Names of entries in the requested directory, or a filesystem error if the read failed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsReaddirResult { @@ -1588,6 +1724,7 @@ pub struct SessionFsReaddirResult { pub error: Option, } +/// Schema for the `SessionFsReaddirWithTypesEntry` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsReaddirWithTypesEntry { @@ -1597,6 +1734,7 @@ pub struct SessionFsReaddirWithTypesEntry { pub r#type: SessionFsReaddirWithTypesEntryType, } +/// Directory path whose entries (with type information) should be listed from the client-provided session filesystem. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsReaddirWithTypesRequest { @@ -1604,6 +1742,7 @@ pub struct SessionFsReaddirWithTypesRequest { pub path: String, } +/// Entries in the requested directory paired with file/directory type information, or a filesystem error if the read failed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsReaddirWithTypesResult { @@ -1614,6 +1753,7 @@ pub struct SessionFsReaddirWithTypesResult { pub error: Option, } +/// Path of the file to read from the client-provided session filesystem. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsReadFileRequest { @@ -1621,6 +1761,7 @@ pub struct SessionFsReadFileRequest { pub path: String, } +/// File content as a UTF-8 string, or a filesystem error if the read failed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsReadFileResult { @@ -1631,6 +1772,7 @@ pub struct SessionFsReadFileResult { pub error: Option, } +/// Source and destination paths for renaming or moving an entry in the client-provided session filesystem. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsRenameRequest { @@ -1640,6 +1782,7 @@ pub struct SessionFsRenameRequest { pub src: String, } +/// Path to remove from the client-provided session filesystem, with options for recursive removal and force. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsRmRequest { @@ -1653,6 +1796,7 @@ pub struct SessionFsRmRequest { pub recursive: Option, } +/// Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsSetProviderRequest { @@ -1664,6 +1808,7 @@ pub struct SessionFsSetProviderRequest { pub session_state_path: String, } +/// Indicates whether the calling client was registered as the session filesystem provider. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsSetProviderResult { @@ -1671,6 +1816,40 @@ pub struct SessionFsSetProviderResult { pub success: bool, } +/// Database name, SQL query, query type, and optional bind parameters for executing a SQLite query against a per-session database. +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsSqliteRequest { + /// Logical database name (e.g., 'session') + pub db_name: String, + /// Optional named bind parameters + #[serde(default)] + pub params: HashMap, + /// SQL query to execute + pub query: String, + /// How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected) + pub query_type: SessionFsSqliteQueryType, +} + +/// Query results including rows, columns, and rows affected, or a filesystem error if execution failed. +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsSqliteResult { + /// Column names from the result set + pub columns: Vec, + /// Describes a filesystem error. + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, + /// Last inserted row ID (for INSERT) + #[serde(skip_serializing_if = "Option::is_none")] + pub last_insert_rowid: Option, + /// For SELECT: array of row objects. For others: empty array. + pub rows: Vec>, + /// Number of rows affected (for INSERT/UPDATE/DELETE) + pub rows_affected: i64, +} + +/// Path whose metadata should be returned from the client-provided session filesystem. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsStatRequest { @@ -1678,6 +1857,7 @@ pub struct SessionFsStatRequest { pub path: String, } +/// Filesystem metadata for the requested path, or a filesystem error if the stat failed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsStatResult { @@ -1696,6 +1876,7 @@ pub struct SessionFsStatResult { pub size: i64, } +/// File path, content to write, and optional mode for the client-provided session filesystem. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsWriteFileRequest { @@ -1708,6 +1889,7 @@ pub struct SessionFsWriteFileRequest { pub path: String, } +/// Source session identifier to fork from, optional event-ID boundary, and optional friendly name for the new session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionsForkRequest { @@ -1721,6 +1903,7 @@ pub struct SessionsForkRequest { pub to_event_id: Option, } +/// Identifier and optional friendly name assigned to the newly forked session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionsForkResult { @@ -1731,6 +1914,7 @@ pub struct SessionsForkResult { pub session_id: SessionId, } +/// Shell command to run, with optional working directory and timeout in milliseconds. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ShellExecRequest { @@ -1744,6 +1928,7 @@ pub struct ShellExecRequest { pub timeout: Option, } +/// Identifier of the spawned process, used to correlate streamed output and exit notifications. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ShellExecResult { @@ -1751,6 +1936,7 @@ pub struct ShellExecResult { pub process_id: String, } +/// Identifier of a process previously returned by "shell.exec" and the signal to send. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ShellKillRequest { @@ -1761,6 +1947,7 @@ pub struct ShellKillRequest { pub signal: Option, } +/// Indicates whether the signal was delivered; false if the process was unknown or already exited. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ShellKillResult { @@ -1768,6 +1955,7 @@ pub struct ShellKillResult { pub killed: bool, } +/// Schema for the `Skill` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Skill { @@ -1786,6 +1974,7 @@ pub struct Skill { pub user_invocable: bool, } +/// Skills available to the session, with their enabled state. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SkillList { @@ -1793,6 +1982,7 @@ pub struct SkillList { pub skills: Vec, } +/// Skill names to mark as disabled in global configuration, replacing any previous list. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SkillsConfigSetDisabledSkillsRequest { @@ -1800,6 +1990,7 @@ pub struct SkillsConfigSetDisabledSkillsRequest { pub disabled_skills: Vec, } +/// Name of the skill to disable for the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SkillsDisableRequest { @@ -1807,6 +1998,7 @@ pub struct SkillsDisableRequest { pub name: String, } +/// Optional project paths and additional skill directories to include in discovery. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SkillsDiscoverRequest { @@ -1818,6 +2010,7 @@ pub struct SkillsDiscoverRequest { pub skill_directories: Vec, } +/// Name of the skill to enable for the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SkillsEnableRequest { @@ -1825,6 +2018,7 @@ pub struct SkillsEnableRequest { pub name: String, } +/// Diagnostics from reloading skill definitions, with warnings and errors as separate lists. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SkillsLoadDiagnostics { @@ -1834,6 +2028,7 @@ pub struct SkillsLoadDiagnostics { pub warnings: Vec, } +/// Schema for the `SlashCommandAgentPromptResult` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SlashCommandAgentPromptResult { @@ -1851,6 +2046,7 @@ pub struct SlashCommandAgentPromptResult { pub runtime_settings_changed: Option, } +/// Schema for the `SlashCommandCompletedResult` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SlashCommandCompletedResult { @@ -1864,6 +2060,7 @@ pub struct SlashCommandCompletedResult { pub runtime_settings_changed: Option, } +/// Schema for the `SlashCommandTextResult` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SlashCommandTextResult { @@ -1882,6 +2079,7 @@ pub struct SlashCommandTextResult { pub text: String, } +/// Schema for the `TaskAgentInfo` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TaskAgentInfo { @@ -1933,6 +2131,7 @@ pub struct TaskAgentInfo { pub r#type: TaskAgentInfoType, } +/// Background tasks currently tracked by the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TaskList { @@ -1940,6 +2139,7 @@ pub struct TaskList { pub tasks: Vec, } +/// Identifier of the background task to cancel. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TasksCancelRequest { @@ -1947,6 +2147,7 @@ pub struct TasksCancelRequest { pub id: String, } +/// Indicates whether the background task was successfully cancelled. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TasksCancelResult { @@ -1954,6 +2155,7 @@ pub struct TasksCancelResult { pub cancelled: bool, } +/// Schema for the `TaskShellInfo` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TaskShellInfo { @@ -1988,6 +2190,7 @@ pub struct TaskShellInfo { pub r#type: TaskShellInfoType, } +/// Identifier of the task to promote to background mode. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TasksPromoteToBackgroundRequest { @@ -1995,6 +2198,7 @@ pub struct TasksPromoteToBackgroundRequest { pub id: String, } +/// Indicates whether the task was successfully promoted to background mode. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TasksPromoteToBackgroundResult { @@ -2002,6 +2206,7 @@ pub struct TasksPromoteToBackgroundResult { pub promoted: bool, } +/// Identifier of the completed or cancelled task to remove from tracking. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TasksRemoveRequest { @@ -2009,6 +2214,7 @@ pub struct TasksRemoveRequest { pub id: String, } +/// Indicates whether the task was removed. False when the task does not exist or is still running/idle. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TasksRemoveResult { @@ -2016,6 +2222,7 @@ pub struct TasksRemoveResult { pub removed: bool, } +/// Identifier of the target agent task, message content, and optional sender agent ID. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TasksSendMessageRequest { @@ -2028,6 +2235,7 @@ pub struct TasksSendMessageRequest { pub message: String, } +/// Indicates whether the message was delivered, with an error message when delivery failed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TasksSendMessageResult { @@ -2038,6 +2246,7 @@ pub struct TasksSendMessageResult { pub sent: bool, } +/// Agent type, prompt, name, and optional description and model override for the new task. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TasksStartAgentRequest { @@ -2055,6 +2264,7 @@ pub struct TasksStartAgentRequest { pub prompt: String, } +/// Identifier assigned to the newly started background agent task. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TasksStartAgentResult { @@ -2062,6 +2272,7 @@ pub struct TasksStartAgentResult { pub agent_id: String, } +/// Schema for the `Tool` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Tool { @@ -2080,6 +2291,7 @@ pub struct Tool { pub parameters: HashMap, } +/// Built-in tools available for the requested model, with their parameters and instructions. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolList { @@ -2087,6 +2299,7 @@ pub struct ToolList { pub tools: Vec, } +/// Optional model identifier whose tool overrides should be applied to the listing. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolsListRequest { @@ -2095,57 +2308,81 @@ pub struct ToolsListRequest { pub model: Option, } +/// Schema for the `UIElicitationArrayAnyOfFieldItemsAnyOf` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationArrayAnyOfFieldItemsAnyOf { + /// Value submitted when this option is selected. pub r#const: String, + /// Display label for this option. pub title: String, } +/// Schema applied to each item in the array. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationArrayAnyOfFieldItems { + /// Selectable options, each with a value and a display label. pub any_of: Vec, } +/// Multi-select string field where each option pairs a value with a display label. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationArrayAnyOfField { + /// Default values selected when the form is first shown. #[serde(default)] pub default: Vec, + /// Help text describing the field. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, + /// Schema applied to each item in the array. pub items: UIElicitationArrayAnyOfFieldItems, + /// Maximum number of items the user may select. #[serde(skip_serializing_if = "Option::is_none")] pub max_items: Option, + /// Minimum number of items the user must select. #[serde(skip_serializing_if = "Option::is_none")] pub min_items: Option, + /// Human-readable label for the field. #[serde(skip_serializing_if = "Option::is_none")] pub title: Option, + /// Type discriminator. Always "array". pub r#type: UIElicitationArrayAnyOfFieldType, } +/// Schema applied to each item in the array. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationArrayEnumFieldItems { + /// Allowed string values for each selected item. pub r#enum: Vec, + /// Type discriminator. Always "string". pub r#type: UIElicitationArrayEnumFieldItemsType, } +/// Multi-select string field whose allowed values are defined inline. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationArrayEnumField { + /// Default values selected when the form is first shown. #[serde(default)] pub default: Vec, + /// Help text describing the field. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, + /// Schema applied to each item in the array. pub items: UIElicitationArrayEnumFieldItems, + /// Maximum number of items the user may select. #[serde(skip_serializing_if = "Option::is_none")] pub max_items: Option, + /// Minimum number of items the user must select. #[serde(skip_serializing_if = "Option::is_none")] pub min_items: Option, + /// Human-readable label for the field. #[serde(skip_serializing_if = "Option::is_none")] pub title: Option, + /// Type discriminator. Always "array". pub r#type: UIElicitationArrayEnumFieldType, } @@ -2162,6 +2399,7 @@ pub struct UIElicitationSchema { pub r#type: UIElicitationSchemaType, } +/// Prompt message and JSON schema describing the form fields to elicit from the user. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationRequest { @@ -2182,6 +2420,7 @@ pub struct UIElicitationResponse { pub content: HashMap, } +/// Indicates whether the elicitation response was accepted; false if it was already resolved by another client. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationResult { @@ -2189,87 +2428,124 @@ pub struct UIElicitationResult { pub success: bool, } +/// Boolean field rendered as a yes/no toggle. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationSchemaPropertyBoolean { + /// Default value selected when the form is first shown. #[serde(skip_serializing_if = "Option::is_none")] pub default: Option, + /// Help text describing the field. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, + /// Human-readable label for the field. #[serde(skip_serializing_if = "Option::is_none")] pub title: Option, + /// Type discriminator. Always "boolean". pub r#type: UIElicitationSchemaPropertyBooleanType, } +/// Numeric field accepting either a number or an integer. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationSchemaPropertyNumber { + /// Default value populated in the input when the form is first shown. #[serde(skip_serializing_if = "Option::is_none")] pub default: Option, + /// Help text describing the field. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, + /// Maximum allowed value (inclusive). #[serde(skip_serializing_if = "Option::is_none")] pub maximum: Option, + /// Minimum allowed value (inclusive). #[serde(skip_serializing_if = "Option::is_none")] pub minimum: Option, + /// Human-readable label for the field. #[serde(skip_serializing_if = "Option::is_none")] pub title: Option, + /// Numeric type accepted by the field. pub r#type: UIElicitationSchemaPropertyNumberType, } +/// Free-text string field with optional length and format constraints. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationSchemaPropertyString { + /// Default value populated in the input when the form is first shown. #[serde(skip_serializing_if = "Option::is_none")] pub default: Option, + /// Help text describing the field. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, + /// Optional format hint that constrains the accepted input. #[serde(skip_serializing_if = "Option::is_none")] pub format: Option, + /// Maximum number of characters allowed. #[serde(skip_serializing_if = "Option::is_none")] pub max_length: Option, + /// Minimum number of characters required. #[serde(skip_serializing_if = "Option::is_none")] pub min_length: Option, + /// Human-readable label for the field. #[serde(skip_serializing_if = "Option::is_none")] pub title: Option, + /// Type discriminator. Always "string". pub r#type: UIElicitationSchemaPropertyStringType, } +/// Single-select string field whose allowed values are defined inline. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationStringEnumField { + /// Default value selected when the form is first shown. #[serde(skip_serializing_if = "Option::is_none")] pub default: Option, + /// Help text describing the field. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, + /// Allowed string values. pub r#enum: Vec, + /// Optional display labels for each enum value, in the same order as `enum`. #[serde(default)] pub enum_names: Vec, + /// Human-readable label for the field. #[serde(skip_serializing_if = "Option::is_none")] pub title: Option, + /// Type discriminator. Always "string". pub r#type: UIElicitationStringEnumFieldType, } +/// Schema for the `UIElicitationStringOneOfFieldOneOf` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationStringOneOfFieldOneOf { + /// Value submitted when this option is selected. pub r#const: String, + /// Display label for this option. pub title: String, } +/// Single-select string field where each option pairs a value with a display label. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationStringOneOfField { + /// Default value selected when the form is first shown. #[serde(skip_serializing_if = "Option::is_none")] pub default: Option, + /// Help text describing the field. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, + /// Selectable options, each with a value and a display label. pub one_of: Vec, + /// Human-readable label for the field. #[serde(skip_serializing_if = "Option::is_none")] pub title: Option, + /// Type discriminator. Always "string". pub r#type: UIElicitationStringOneOfFieldType, } +/// Pending elicitation request ID and the user's response (accept/decline/cancel + form values). #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIHandlePendingElicitationRequest { @@ -2301,6 +2577,7 @@ pub struct UsageMetricsModelMetricRequests { pub count: i64, } +/// Schema for the `UsageMetricsModelMetricTokenDetail` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UsageMetricsModelMetricTokenDetail { @@ -2325,6 +2602,7 @@ pub struct UsageMetricsModelMetricUsage { pub reasoning_tokens: Option, } +/// Schema for the `UsageMetricsModelMetric` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UsageMetricsModelMetric { @@ -2340,6 +2618,7 @@ pub struct UsageMetricsModelMetric { pub usage: UsageMetricsModelMetricUsage, } +/// Schema for the `UsageMetricsTokenDetail` type. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UsageMetricsTokenDetail { @@ -2347,6 +2626,7 @@ pub struct UsageMetricsTokenDetail { pub token_count: i64, } +/// Accumulated session usage metrics, including premium request cost, token counts, model breakdown, and code-change totals. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UsageGetMetricsResult { @@ -2377,6 +2657,7 @@ pub struct UsageGetMetricsResult { pub total_user_requests: i64, } +/// Relative path and UTF-8 content for the workspace file to create or overwrite. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorkspacesCreateFileRequest { @@ -2425,6 +2706,7 @@ pub struct WorkspacesGetWorkspaceResultWorkspace { pub user_named: Option, } +/// Current workspace metadata for the session, or null when not available. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorkspacesGetWorkspaceResult { @@ -2432,6 +2714,7 @@ pub struct WorkspacesGetWorkspaceResult { pub workspace: Option, } +/// Relative paths of files stored in the session workspace files directory. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorkspacesListFilesResult { @@ -2439,6 +2722,7 @@ pub struct WorkspacesListFilesResult { pub files: Vec, } +/// Relative path of the workspace file to read. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorkspacesReadFileRequest { @@ -2446,6 +2730,7 @@ pub struct WorkspacesReadFileRequest { pub path: String, } +/// Contents of the requested workspace file as a UTF-8 string. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorkspacesReadFileResult { @@ -2453,6 +2738,7 @@ pub struct WorkspacesReadFileResult { pub content: String, } +/// List of Copilot models available to the resolved user, including capabilities and billing metadata. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ModelsListResult { @@ -2460,6 +2746,7 @@ pub struct ModelsListResult { pub models: Vec, } +/// Built-in tools available for the requested model, with their parameters and instructions. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolsListResult { @@ -2467,6 +2754,7 @@ pub struct ToolsListResult { pub tools: Vec, } +/// User-configured MCP servers, keyed by server name. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpConfigListResult { @@ -2474,6 +2762,7 @@ pub struct McpConfigListResult { pub servers: HashMap, } +/// Skills discovered across global and project sources. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SkillsDiscoverResult { @@ -2481,6 +2770,7 @@ pub struct SkillsDiscoverResult { pub skills: Vec, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSuspendParams { @@ -2488,6 +2778,7 @@ pub struct SessionSuspendParams { pub session_id: SessionId, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionAuthGetStatusParams { @@ -2495,6 +2786,7 @@ pub struct SessionAuthGetStatusParams { pub session_id: SessionId, } +/// Authentication status and account metadata for the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionAuthGetStatusResult { @@ -2517,6 +2809,7 @@ pub struct SessionAuthGetStatusResult { pub status_message: Option, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionModelGetCurrentParams { @@ -2524,6 +2817,7 @@ pub struct SessionModelGetCurrentParams { pub session_id: SessionId, } +/// The currently selected model for the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionModelGetCurrentResult { @@ -2532,6 +2826,7 @@ pub struct SessionModelGetCurrentResult { pub model_id: Option, } +/// The model identifier active on the session after the switch. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionModelSwitchToResult { @@ -2540,6 +2835,7 @@ pub struct SessionModelSwitchToResult { pub model_id: Option, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionModeGetParams { @@ -2547,6 +2843,7 @@ pub struct SessionModeGetParams { pub session_id: SessionId, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionNameGetParams { @@ -2554,6 +2851,7 @@ pub struct SessionNameGetParams { pub session_id: SessionId, } +/// The session's friendly name, or null when not yet set. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionNameGetResult { @@ -2561,6 +2859,7 @@ pub struct SessionNameGetResult { pub name: Option, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionPlanReadParams { @@ -2568,6 +2867,7 @@ pub struct SessionPlanReadParams { pub session_id: SessionId, } +/// Existence, contents, and resolved path of the session plan file. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionPlanReadResult { @@ -2579,6 +2879,7 @@ pub struct SessionPlanReadResult { pub path: Option, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionPlanDeleteParams { @@ -2586,6 +2887,7 @@ pub struct SessionPlanDeleteParams { pub session_id: SessionId, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionWorkspacesGetWorkspaceParams { @@ -2632,6 +2934,7 @@ pub struct SessionWorkspacesGetWorkspaceResultWorkspace { pub user_named: Option, } +/// Current workspace metadata for the session, or null when not available. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionWorkspacesGetWorkspaceResult { @@ -2639,6 +2942,7 @@ pub struct SessionWorkspacesGetWorkspaceResult { pub workspace: Option, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionWorkspacesListFilesParams { @@ -2646,6 +2950,7 @@ pub struct SessionWorkspacesListFilesParams { pub session_id: SessionId, } +/// Relative paths of files stored in the session workspace files directory. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionWorkspacesListFilesResult { @@ -2653,6 +2958,7 @@ pub struct SessionWorkspacesListFilesResult { pub files: Vec, } +/// Contents of the requested workspace file as a UTF-8 string. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionWorkspacesReadFileResult { @@ -2660,6 +2966,7 @@ pub struct SessionWorkspacesReadFileResult { pub content: String, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionInstructionsGetSourcesParams { @@ -2667,6 +2974,7 @@ pub struct SessionInstructionsGetSourcesParams { pub session_id: SessionId, } +/// Instruction sources loaded for the session, in merge order. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionInstructionsGetSourcesResult { @@ -2674,6 +2982,7 @@ pub struct SessionInstructionsGetSourcesResult { pub sources: Vec, } +/// Indicates whether fleet mode was successfully activated. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFleetStartResult { @@ -2681,6 +2990,7 @@ pub struct SessionFleetStartResult { pub started: bool, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionAgentListParams { @@ -2688,6 +2998,7 @@ pub struct SessionAgentListParams { pub session_id: SessionId, } +/// Custom agents available to the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionAgentListResult { @@ -2695,6 +3006,7 @@ pub struct SessionAgentListResult { pub agents: Vec, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionAgentGetCurrentParams { @@ -2702,6 +3014,7 @@ pub struct SessionAgentGetCurrentParams { pub session_id: SessionId, } +/// The currently selected custom agent, or null when using the default agent. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionAgentGetCurrentResult { @@ -2709,6 +3022,7 @@ pub struct SessionAgentGetCurrentResult { pub agent: AgentInfo, } +/// The newly selected custom agent. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionAgentSelectResult { @@ -2716,6 +3030,7 @@ pub struct SessionAgentSelectResult { pub agent: AgentInfo, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionAgentDeselectParams { @@ -2723,6 +3038,7 @@ pub struct SessionAgentDeselectParams { pub session_id: SessionId, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionAgentReloadParams { @@ -2730,6 +3046,7 @@ pub struct SessionAgentReloadParams { pub session_id: SessionId, } +/// Custom agents available to the session after reloading definitions from disk. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionAgentReloadResult { @@ -2737,6 +3054,7 @@ pub struct SessionAgentReloadResult { pub agents: Vec, } +/// Identifier assigned to the newly started background agent task. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionTasksStartAgentResult { @@ -2744,6 +3062,7 @@ pub struct SessionTasksStartAgentResult { pub agent_id: String, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionTasksListParams { @@ -2751,6 +3070,7 @@ pub struct SessionTasksListParams { pub session_id: SessionId, } +/// Background tasks currently tracked by the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionTasksListResult { @@ -2758,6 +3078,7 @@ pub struct SessionTasksListResult { pub tasks: Vec, } +/// Indicates whether the task was successfully promoted to background mode. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionTasksPromoteToBackgroundResult { @@ -2765,6 +3086,7 @@ pub struct SessionTasksPromoteToBackgroundResult { pub promoted: bool, } +/// Indicates whether the background task was successfully cancelled. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionTasksCancelResult { @@ -2772,6 +3094,7 @@ pub struct SessionTasksCancelResult { pub cancelled: bool, } +/// Indicates whether the task was removed. False when the task does not exist or is still running/idle. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionTasksRemoveResult { @@ -2779,6 +3102,7 @@ pub struct SessionTasksRemoveResult { pub removed: bool, } +/// Indicates whether the message was delivered, with an error message when delivery failed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionTasksSendMessageResult { @@ -2789,6 +3113,7 @@ pub struct SessionTasksSendMessageResult { pub sent: bool, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSkillsListParams { @@ -2796,6 +3121,7 @@ pub struct SessionSkillsListParams { pub session_id: SessionId, } +/// Skills available to the session, with their enabled state. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSkillsListResult { @@ -2803,6 +3129,7 @@ pub struct SessionSkillsListResult { pub skills: Vec, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSkillsReloadParams { @@ -2810,6 +3137,7 @@ pub struct SessionSkillsReloadParams { pub session_id: SessionId, } +/// Diagnostics from reloading skill definitions, with warnings and errors as separate lists. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSkillsReloadResult { @@ -2819,6 +3147,7 @@ pub struct SessionSkillsReloadResult { pub warnings: Vec, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionMcpListParams { @@ -2826,6 +3155,7 @@ pub struct SessionMcpListParams { pub session_id: SessionId, } +/// MCP servers configured for the session, with their connection status. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionMcpListResult { @@ -2833,6 +3163,7 @@ pub struct SessionMcpListResult { pub servers: Vec, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionMcpReloadParams { @@ -2840,6 +3171,7 @@ pub struct SessionMcpReloadParams { pub session_id: SessionId, } +/// OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionMcpOauthLoginResult { @@ -2848,6 +3180,7 @@ pub struct SessionMcpOauthLoginResult { pub authorization_url: Option, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionPluginsListParams { @@ -2855,6 +3188,7 @@ pub struct SessionPluginsListParams { pub session_id: SessionId, } +/// Plugins installed for the session, with their enabled state and version metadata. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionPluginsListResult { @@ -2862,6 +3196,7 @@ pub struct SessionPluginsListResult { pub plugins: Vec, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionExtensionsListParams { @@ -2869,6 +3204,7 @@ pub struct SessionExtensionsListParams { pub session_id: SessionId, } +/// Extensions discovered for the session, with their current status. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionExtensionsListResult { @@ -2876,6 +3212,7 @@ pub struct SessionExtensionsListResult { pub extensions: Vec, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionExtensionsReloadParams { @@ -2883,6 +3220,7 @@ pub struct SessionExtensionsReloadParams { pub session_id: SessionId, } +/// Indicates whether the external tool call result was handled successfully. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionToolsHandlePendingToolCallResult { @@ -2890,6 +3228,7 @@ pub struct SessionToolsHandlePendingToolCallResult { pub success: bool, } +/// Slash commands available in the session, after applying any include/exclude filters. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionCommandsListResult { @@ -2897,6 +3236,7 @@ pub struct SessionCommandsListResult { pub commands: Vec, } +/// Indicates whether the pending client-handled command was completed successfully. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionCommandsHandlePendingCommandResult { @@ -2904,6 +3244,7 @@ pub struct SessionCommandsHandlePendingCommandResult { pub success: bool, } +/// Indicates whether the queued-command response was accepted by the session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionCommandsRespondToQueuedCommandResult { @@ -2922,6 +3263,7 @@ pub struct SessionUiElicitationResult { pub content: HashMap, } +/// Indicates whether the elicitation response was accepted; false if it was already resolved by another client. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionUiHandlePendingElicitationResult { @@ -2929,6 +3271,7 @@ pub struct SessionUiHandlePendingElicitationResult { pub success: bool, } +/// Indicates whether the permission decision was applied; false when the request was already resolved. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionPermissionsHandlePendingPermissionRequestResult { @@ -2936,6 +3279,7 @@ pub struct SessionPermissionsHandlePendingPermissionRequestResult { pub success: bool, } +/// Indicates whether the operation succeeded. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionPermissionsSetApproveAllResult { @@ -2943,6 +3287,7 @@ pub struct SessionPermissionsSetApproveAllResult { pub success: bool, } +/// Indicates whether the operation succeeded. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionPermissionsResetSessionApprovalsResult { @@ -2950,6 +3295,7 @@ pub struct SessionPermissionsResetSessionApprovalsResult { pub success: bool, } +/// Identifier of the session event that was emitted for the log message. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionLogResult { @@ -2957,6 +3303,7 @@ pub struct SessionLogResult { pub event_id: String, } +/// Identifier of the spawned process, used to correlate streamed output and exit notifications. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionShellExecResult { @@ -2964,6 +3311,7 @@ pub struct SessionShellExecResult { pub process_id: String, } +/// Indicates whether the signal was delivered; false if the process was unknown or already exited. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionShellKillResult { @@ -2971,6 +3319,7 @@ pub struct SessionShellKillResult { pub killed: bool, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionHistoryCompactParams { @@ -2978,6 +3327,7 @@ pub struct SessionHistoryCompactParams { pub session_id: SessionId, } +/// Compaction outcome with the number of tokens and messages removed and the resulting context window breakdown. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionHistoryCompactResult { @@ -2992,6 +3342,7 @@ pub struct SessionHistoryCompactResult { pub tokens_removed: i64, } +/// Number of events that were removed by the truncation. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionHistoryTruncateResult { @@ -2999,6 +3350,7 @@ pub struct SessionHistoryTruncateResult { pub events_removed: i64, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionUsageGetMetricsParams { @@ -3006,6 +3358,7 @@ pub struct SessionUsageGetMetricsParams { pub session_id: SessionId, } +/// Accumulated session usage metrics, including premium request cost, token counts, model breakdown, and code-change totals. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionUsageGetMetricsResult { @@ -3036,16 +3389,18 @@ pub struct SessionUsageGetMetricsResult { pub total_user_requests: i64, } +/// GitHub URL for the session and a flag indicating whether remote steering is enabled. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionRemoteEnableResult { /// Whether remote steering is enabled pub remote_steerable: bool, - /// Mission Control frontend URL for this session + /// GitHub frontend URL for this session #[serde(skip_serializing_if = "Option::is_none")] pub url: Option, } +/// Identifies the target session. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionRemoteDisableParams { @@ -3227,6 +3582,7 @@ pub enum ExternalToolTextResultForLlmContentTextType { Text, } +/// Allowed values for the `FilterMappingString` enumeration. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum FilterMappingString { #[serde(rename = "none")] @@ -3241,6 +3597,7 @@ pub enum FilterMappingString { Unknown, } +/// Allowed values for the `FilterMappingValue` enumeration. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum FilterMappingValue { #[serde(rename = "none")] @@ -3344,6 +3701,7 @@ pub enum McpServerStatus { Unknown, } +/// OAuth grant type to use when authenticating to the remote MCP server. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum McpServerConfigHttpOauthGrantType { #[serde(rename = "authorization_code")] @@ -3369,6 +3727,7 @@ pub enum McpServerConfigHttpType { Unknown, } +/// Local transport type. Defaults to "local". #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum McpServerConfigLocalType { #[serde(rename = "local")] @@ -3413,6 +3772,21 @@ pub enum ModelPickerPriceCategory { Unknown, } +/// Reasoning summary mode to request for supported model clients +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum ReasoningSummary { + #[serde(rename = "none")] + None, + #[serde(rename = "concise")] + Concise, + #[serde(rename = "detailed")] + Detailed, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// The agent mode. Valid values: "interactive", "plan", "autopilot". #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionMode { @@ -3436,6 +3810,7 @@ pub enum PermissionDecisionApproveOnceKind { ApproveOnce, } +/// Approval scoped to specific command identifiers. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForSessionApprovalCommandsKind { #[serde(rename = "commands")] @@ -3443,6 +3818,7 @@ pub enum PermissionDecisionApproveForSessionApprovalCommandsKind { Commands, } +/// Approval covering read-only filesystem operations. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForSessionApprovalReadKind { #[serde(rename = "read")] @@ -3450,6 +3826,7 @@ pub enum PermissionDecisionApproveForSessionApprovalReadKind { Read, } +/// Approval covering filesystem write operations. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForSessionApprovalWriteKind { #[serde(rename = "write")] @@ -3457,6 +3834,7 @@ pub enum PermissionDecisionApproveForSessionApprovalWriteKind { Write, } +/// Approval covering an MCP tool. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForSessionApprovalMcpKind { #[serde(rename = "mcp")] @@ -3464,6 +3842,7 @@ pub enum PermissionDecisionApproveForSessionApprovalMcpKind { Mcp, } +/// Approval covering MCP sampling requests for a server. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForSessionApprovalMcpSamplingKind { #[serde(rename = "mcp-sampling")] @@ -3471,6 +3850,7 @@ pub enum PermissionDecisionApproveForSessionApprovalMcpSamplingKind { McpSampling, } +/// Approval covering writes to long-term memory. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForSessionApprovalMemoryKind { #[serde(rename = "memory")] @@ -3478,6 +3858,7 @@ pub enum PermissionDecisionApproveForSessionApprovalMemoryKind { Memory, } +/// Approval covering a custom tool. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForSessionApprovalCustomToolKind { #[serde(rename = "custom-tool")] @@ -3485,6 +3866,7 @@ pub enum PermissionDecisionApproveForSessionApprovalCustomToolKind { CustomTool, } +/// Approval covering extension lifecycle operations such as enable, disable, or reload. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForSessionApprovalExtensionManagementKind { #[serde(rename = "extension-management")] @@ -3492,6 +3874,7 @@ pub enum PermissionDecisionApproveForSessionApprovalExtensionManagementKind { ExtensionManagement, } +/// Approval covering an extension's request to access a permission-gated capability. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForSessionApprovalExtensionPermissionAccessKind { #[serde(rename = "extension-permission-access")] @@ -3522,6 +3905,7 @@ pub enum PermissionDecisionApproveForSessionKind { ApproveForSession, } +/// Approval scoped to specific command identifiers. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForLocationApprovalCommandsKind { #[serde(rename = "commands")] @@ -3529,6 +3913,7 @@ pub enum PermissionDecisionApproveForLocationApprovalCommandsKind { Commands, } +/// Approval covering read-only filesystem operations. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForLocationApprovalReadKind { #[serde(rename = "read")] @@ -3536,6 +3921,7 @@ pub enum PermissionDecisionApproveForLocationApprovalReadKind { Read, } +/// Approval covering filesystem write operations. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForLocationApprovalWriteKind { #[serde(rename = "write")] @@ -3543,6 +3929,7 @@ pub enum PermissionDecisionApproveForLocationApprovalWriteKind { Write, } +/// Approval covering an MCP tool. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForLocationApprovalMcpKind { #[serde(rename = "mcp")] @@ -3550,6 +3937,7 @@ pub enum PermissionDecisionApproveForLocationApprovalMcpKind { Mcp, } +/// Approval covering MCP sampling requests for a server. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForLocationApprovalMcpSamplingKind { #[serde(rename = "mcp-sampling")] @@ -3557,6 +3945,7 @@ pub enum PermissionDecisionApproveForLocationApprovalMcpSamplingKind { McpSampling, } +/// Approval covering writes to long-term memory. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForLocationApprovalMemoryKind { #[serde(rename = "memory")] @@ -3564,6 +3953,7 @@ pub enum PermissionDecisionApproveForLocationApprovalMemoryKind { Memory, } +/// Approval covering a custom tool. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForLocationApprovalCustomToolKind { #[serde(rename = "custom-tool")] @@ -3571,6 +3961,7 @@ pub enum PermissionDecisionApproveForLocationApprovalCustomToolKind { CustomTool, } +/// Approval covering extension lifecycle operations such as enable, disable, or reload. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForLocationApprovalExtensionManagementKind { #[serde(rename = "extension-management")] @@ -3578,6 +3969,7 @@ pub enum PermissionDecisionApproveForLocationApprovalExtensionManagementKind { ExtensionManagement, } +/// Approval covering an extension's request to access a permission-gated capability. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind { #[serde(rename = "extension-permission-access")] @@ -3634,6 +4026,7 @@ pub enum PermissionDecisionUserNotAvailableKind { UserNotAvailable, } +/// Decision to apply to a pending permission request. #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum PermissionDecision { @@ -3645,7 +4038,7 @@ pub enum PermissionDecision { UserNotAvailable(PermissionDecisionUserNotAvailable), } -/// Per-session remote mode. "off" disables remote, "export" exports session events to Mission Control without enabling remote steering, "on" enables both export and remote steering. +/// Per-session remote mode. "off" disables remote, "export" exports session events to GitHub without enabling remote steering, "on" enables both export and remote steering. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum RemoteSessionMode { #[serde(rename = "off")] @@ -3697,6 +4090,21 @@ pub enum SessionFsSetProviderConventions { Unknown, } +/// How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected) +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionFsSqliteQueryType { + #[serde(rename = "exec")] + Exec, + #[serde(rename = "query")] + Query, + #[serde(rename = "run")] + Run, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Signal to send (default: SIGTERM) #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ShellKillSignal { @@ -3748,6 +4156,7 @@ pub enum SlashCommandTextResultKind { Text, } +/// Result of invoking the slash command (text output, prompt to send to the agent, or completion). #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum SlashCommandInvocationResult { @@ -3849,6 +4258,7 @@ pub enum TaskShellInfoType { Shell, } +/// Type discriminator. Always "array". #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIElicitationArrayAnyOfFieldType { #[serde(rename = "array")] @@ -3856,6 +4266,7 @@ pub enum UIElicitationArrayAnyOfFieldType { Array, } +/// Type discriminator. Always "string". #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIElicitationArrayEnumFieldItemsType { #[serde(rename = "string")] @@ -3863,6 +4274,7 @@ pub enum UIElicitationArrayEnumFieldItemsType { String, } +/// Type discriminator. Always "array". #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIElicitationArrayEnumFieldType { #[serde(rename = "array")] @@ -3893,6 +4305,7 @@ pub enum UIElicitationResponseAction { Unknown, } +/// Type discriminator. Always "boolean". #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIElicitationSchemaPropertyBooleanType { #[serde(rename = "boolean")] @@ -3900,6 +4313,7 @@ pub enum UIElicitationSchemaPropertyBooleanType { Boolean, } +/// Numeric type accepted by the field. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIElicitationSchemaPropertyNumberType { #[serde(rename = "number")] @@ -3912,6 +4326,7 @@ pub enum UIElicitationSchemaPropertyNumberType { Unknown, } +/// Optional format hint that constrains the accepted input. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIElicitationSchemaPropertyStringFormat { #[serde(rename = "email")] @@ -3928,6 +4343,7 @@ pub enum UIElicitationSchemaPropertyStringFormat { Unknown, } +/// Type discriminator. Always "string". #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIElicitationSchemaPropertyStringType { #[serde(rename = "string")] @@ -3935,6 +4351,7 @@ pub enum UIElicitationSchemaPropertyStringType { String, } +/// Type discriminator. Always "string". #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIElicitationStringEnumFieldType { #[serde(rename = "string")] @@ -3942,6 +4359,7 @@ pub enum UIElicitationStringEnumFieldType { String, } +/// Type discriminator. Always "string". #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIElicitationStringOneOfFieldType { #[serde(rename = "string")] diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs index 700aebe44..b07736676 100644 --- a/rust/src/generated/rpc.rs +++ b/rust/src/generated/rpc.rs @@ -97,17 +97,7 @@ pub struct ClientRpcAccount<'a> { impl<'a> ClientRpcAccount<'a> { /// Wire method: `account.getQuota`. - pub async fn get_quota(&self) -> Result { - let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::ACCOUNT_GETQUOTA, Some(wire_params)) - .await?; - Ok(serde_json::from_value(_value)?) - } - - /// Wire method: `account.getQuota`. - pub async fn get_quota_with_params( + pub async fn get_quota( &self, params: AccountGetQuotaRequest, ) -> Result { @@ -221,17 +211,7 @@ pub struct ClientRpcModels<'a> { impl<'a> ClientRpcModels<'a> { /// Wire method: `models.list`. - pub async fn list(&self) -> Result { - let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::MODELS_LIST, Some(wire_params)) - .await?; - Ok(serde_json::from_value(_value)?) - } - - /// Wire method: `models.list`. - pub async fn list_with_params(&self, params: ModelsListRequest) -> Result { + pub async fn list(&self, params: ModelsListRequest) -> Result { let wire_params = serde_json::to_value(params)?; let _value = self .client diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs index 7c434f96d..eca1437ea 100644 --- a/rust/src/generated/session_events.rs +++ b/rust/src/generated/session_events.rs @@ -411,9 +411,6 @@ pub struct SessionStartData { pub context: Option, /// Version string of the Copilot application pub copilot_version: String, - /// When set, identifies a parent session whose context this session continues — e.g., a detached headless rem-agent run launched on the parent's interactive shutdown. Telemetry from this session is reported under the parent's session_id. - #[serde(skip_serializing_if = "Option::is_none")] - pub detached_from_spawning_parent_session_id: Option, /// Identifier of the software producing the events (e.g., "copilot-agent") pub producer: String, /// Reasoning effort level used for model calls, if applicable (e.g. "low", "medium", "high", "xhigh") @@ -517,7 +514,7 @@ pub struct SessionTitleChangedData { pub title: String, } -/// Scheduled prompt registered via /every or /after +/// Scheduled prompt registered via /every #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionScheduleCreatedData { @@ -527,9 +524,6 @@ pub struct SessionScheduleCreatedData { pub interval_ms: i64, /// Prompt text that gets enqueued on every tick pub prompt: String, - /// Whether the schedule re-arms after each tick (`/every`) or fires once (`/after`) - #[serde(skip_serializing_if = "Option::is_none")] - pub recurring: Option, } /// Scheduled prompt cancelled from the schedule manager dialog @@ -992,9 +986,6 @@ pub struct UserMessageData { /// CAPI interaction ID for correlating this user message with its turn #[serde(skip_serializing_if = "Option::is_none")] pub interaction_id: Option, - /// True when this user message was auto-injected by autopilot's continuation loop rather than typed by the user; used to distinguish autopilot-driven turns in telemetry. - #[serde(skip_serializing_if = "Option::is_none")] - pub is_autopilot_continuation: Option, /// Path-backed native document attachments that stayed on the tagged_files path flow because native upload would exceed the request size limit #[serde(default)] pub native_document_path_fallback_paths: Vec, @@ -1096,12 +1087,6 @@ pub struct AssistantMessageToolRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AssistantMessageData { - /// Raw Anthropic content array with advisor blocks (server_tool_use, advisor_tool_result) for verbatim round-tripping - #[serde(default)] - pub anthropic_advisor_blocks: Vec, - /// Anthropic advisor model ID used for this response, for timeline display on replay - #[serde(skip_serializing_if = "Option::is_none")] - pub anthropic_advisor_model: Option, /// The assistant's text response content pub content: String, /// Encrypted reasoning content from OpenAI models. Session-bound and stripped on resume. @@ -1112,9 +1097,6 @@ pub struct AssistantMessageData { pub interaction_id: Option, /// Unique identifier for this assistant message pub message_id: String, - /// Model that produced this assistant message, if known - #[serde(skip_serializing_if = "Option::is_none")] - pub model: Option, /// Actual output token count from the API response (completion_tokens), used for accurate token accounting #[serde(skip_serializing_if = "Option::is_none")] pub output_tokens: Option, @@ -1228,9 +1210,6 @@ pub struct AssistantUsageData { /// Completion ID from the model provider (e.g., chatcmpl-abc123) #[serde(skip_serializing_if = "Option::is_none")] pub api_call_id: Option, - /// API endpoint used for this model call, matching CAPI supported_endpoints vocabulary - #[serde(skip_serializing_if = "Option::is_none")] - pub api_endpoint: Option, /// Number of tokens read from prompt cache #[serde(skip_serializing_if = "Option::is_none")] pub cache_read_tokens: Option, @@ -1314,8 +1293,8 @@ pub struct ModelCallFailureData { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AbortData { - /// Finite reason code describing why the current turn was aborted - pub reason: AbortReason, + /// Reason the current turn was aborted (e.g., "user initiated") + pub reason: String, } /// User-initiated tool invocation request with tool name and arguments @@ -1471,9 +1450,6 @@ pub struct SubagentStartedData { pub agent_display_name: String, /// Internal name of the sub-agent pub agent_name: String, - /// Model the sub-agent will run with, when known at start. Surfaced in the timeline for auto-selected sub-agents (e.g. rubber-duck). - #[serde(skip_serializing_if = "Option::is_none")] - pub model: Option, /// Tool call ID of the parent tool invocation that spawned this sub-agent pub tool_call_id: String, } @@ -1808,37 +1784,6 @@ pub struct PermissionRequestHook { pub tool_name: String, } -/// Extension management permission request -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct PermissionRequestExtensionManagement { - /// Name of the extension being managed - #[serde(skip_serializing_if = "Option::is_none")] - pub extension_name: Option, - /// Permission kind discriminator - pub kind: PermissionRequestExtensionManagementKind, - /// The extension management operation (scaffold, reload) - pub operation: String, - /// Tool call ID that triggered this permission request - #[serde(skip_serializing_if = "Option::is_none")] - pub tool_call_id: Option, -} - -/// Extension permission access request -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct PermissionRequestExtensionPermissionAccess { - /// Capabilities the extension is requesting - pub capabilities: Vec, - /// Name of the extension requesting permission access - pub extension_name: String, - /// Permission kind discriminator - pub kind: PermissionRequestExtensionPermissionAccessKind, - /// Tool call ID that triggered this permission request - #[serde(skip_serializing_if = "Option::is_none")] - pub tool_call_id: Option, -} - /// Shell command permission prompt #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -2013,37 +1958,6 @@ pub struct PermissionPromptRequestHook { pub tool_name: String, } -/// Extension management permission prompt -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct PermissionPromptRequestExtensionManagement { - /// Name of the extension being managed - #[serde(skip_serializing_if = "Option::is_none")] - pub extension_name: Option, - /// Prompt kind discriminator - pub kind: PermissionPromptRequestExtensionManagementKind, - /// The extension management operation (scaffold, reload) - pub operation: String, - /// Tool call ID that triggered this permission request - #[serde(skip_serializing_if = "Option::is_none")] - pub tool_call_id: Option, -} - -/// Extension permission access prompt -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct PermissionPromptRequestExtensionPermissionAccess { - /// Capabilities the extension is requesting - pub capabilities: Vec, - /// Name of the extension requesting permission access - pub extension_name: String, - /// Prompt kind discriminator - pub kind: PermissionPromptRequestExtensionPermissionAccessKind, - /// Tool call ID that triggered this permission request - #[serde(skip_serializing_if = "Option::is_none")] - pub tool_call_id: Option, -} - /// Permission request notification requiring client approval with request details #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -2117,25 +2031,6 @@ pub struct UserToolSessionApprovalCustomTool { pub tool_name: String, } -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct UserToolSessionApprovalExtensionManagement { - /// Extension management approval kind - pub kind: UserToolSessionApprovalExtensionManagementKind, - /// Optional operation identifier - #[serde(skip_serializing_if = "Option::is_none")] - pub operation: Option, -} - -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct UserToolSessionApprovalExtensionPermissionAccess { - /// Extension name - pub extension_name: String, - /// Extension permission access approval kind - pub kind: UserToolSessionApprovalExtensionPermissionAccessKind, -} - #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionApprovedForSession { @@ -2756,23 +2651,6 @@ pub enum AssistantMessageToolRequestType { Unknown, } -/// API endpoint used for this model call, matching CAPI supported_endpoints vocabulary -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum AssistantUsageApiEndpoint { - #[serde(rename = "/chat/completions")] - ChatCompletions, - #[serde(rename = "/v1/messages")] - V1Messages, - #[serde(rename = "/responses")] - Responses, - #[serde(rename = "ws:/responses")] - WsResponses, - /// Unknown variant for forward compatibility. - #[default] - #[serde(other)] - Unknown, -} - /// Where the failed model call originated #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ModelCallFailureSource { @@ -2788,21 +2666,6 @@ pub enum ModelCallFailureSource { Unknown, } -/// Finite reason code describing why the current turn was aborted -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum AbortReason { - #[serde(rename = "user_initiated")] - UserInitiated, - #[serde(rename = "remote_command")] - RemoteCommand, - #[serde(rename = "user_abort")] - UserAbort, - /// Unknown variant for forward compatibility. - #[default] - #[serde(other)] - Unknown, -} - /// Message role: "system" for system prompts, "developer" for developer-injected instructions #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SystemMessageRole { @@ -2906,22 +2769,6 @@ pub enum PermissionRequestHookKind { Hook, } -/// Permission kind discriminator -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum PermissionRequestExtensionManagementKind { - #[serde(rename = "extension-management")] - #[default] - ExtensionManagement, -} - -/// Permission kind discriminator -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum PermissionRequestExtensionPermissionAccessKind { - #[serde(rename = "extension-permission-access")] - #[default] - ExtensionPermissionAccess, -} - /// Details of the permission being requested #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -2934,8 +2781,6 @@ pub enum PermissionRequest { Memory(PermissionRequestMemory), CustomTool(PermissionRequestCustomTool), Hook(PermissionRequestHook), - ExtensionManagement(PermissionRequestExtensionManagement), - ExtensionPermissionAccess(PermissionRequestExtensionPermissionAccess), } /// Prompt kind discriminator @@ -3051,22 +2896,6 @@ pub enum PermissionPromptRequestHookKind { Hook, } -/// Prompt kind discriminator -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum PermissionPromptRequestExtensionManagementKind { - #[serde(rename = "extension-management")] - #[default] - ExtensionManagement, -} - -/// Prompt kind discriminator -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum PermissionPromptRequestExtensionPermissionAccessKind { - #[serde(rename = "extension-permission-access")] - #[default] - ExtensionPermissionAccess, -} - /// Derived user-facing permission prompt details for UI consumers #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -3080,8 +2909,6 @@ pub enum PermissionPromptRequest { CustomTool(PermissionPromptRequestCustomTool), Path(PermissionPromptRequestPath), Hook(PermissionPromptRequestHook), - ExtensionManagement(PermissionPromptRequestExtensionManagement), - ExtensionPermissionAccess(PermissionPromptRequestExtensionPermissionAccess), } /// The permission request was approved @@ -3140,22 +2967,6 @@ pub enum UserToolSessionApprovalCustomToolKind { CustomTool, } -/// Extension management approval kind -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum UserToolSessionApprovalExtensionManagementKind { - #[serde(rename = "extension-management")] - #[default] - ExtensionManagement, -} - -/// Extension permission access approval kind -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum UserToolSessionApprovalExtensionPermissionAccessKind { - #[serde(rename = "extension-permission-access")] - #[default] - ExtensionPermissionAccess, -} - /// The approval to add as a session-scoped rule #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -3166,8 +2977,6 @@ pub enum UserToolSessionApproval { Mcp(UserToolSessionApprovalMcp), Memory(UserToolSessionApprovalMemory), CustomTool(UserToolSessionApprovalCustomTool), - ExtensionManagement(UserToolSessionApprovalExtensionManagement), - ExtensionPermissionAccess(UserToolSessionApprovalExtensionPermissionAccess), } /// Approved and remembered for the rest of the session diff --git a/test/snapshots/session_fs_sqlite/should_allow_subagents_to_use_sql_tool_via_inherited_sessionfs.yaml b/test/snapshots/session_fs_sqlite/should_allow_subagents_to_use_sql_tool_via_inherited_sessionfs.yaml new file mode 100644 index 000000000..edeeecec7 --- /dev/null +++ b/test/snapshots/session_fs_sqlite/should_allow_subagents_to_use_sql_tool_via_inherited_sessionfs.yaml @@ -0,0 +1,98 @@ +models: + - claude-sonnet-4.5 +conversations: + - messages: + - role: system + content: ${system} + - role: user + content: "Use the task tool to ask a task agent to do the following: Use the sql tool to run this query: INSERT INTO + todos (id, title, status) VALUES ('subagent-test', 'Created by subagent', 'done')" + - role: assistant + content: I'll delegate this SQL insert task to a task agent. + - role: assistant + tool_calls: + - id: toolcall_0 + type: function + function: + name: report_intent + arguments: '{"intent":"Delegating SQL task"}' + - role: assistant + tool_calls: + - id: toolcall_1 + type: function + function: + name: task + arguments: "{\"name\":\"sql-insert-test\",\"agent_type\":\"task\",\"description\":\"Running SQL + insert\",\"prompt\":\"Use the sql tool to run this exact query:\\n\\nINSERT INTO todos (id, title, + status) VALUES ('subagent-test', 'Created by subagent', 'done')\\n\\nMake sure to provide a description + for the SQL operation (e.g., \\\"Insert test todo\\\").\",\"mode\":\"sync\"}" + - messages: + - role: system + content: ${system} + - role: user + content: |- + Use the sql tool to run this exact query: + + INSERT INTO todos (id, title, status) VALUES ('subagent-test', 'Created by subagent', 'done') + + Make sure to provide a description for the SQL operation (e.g., "Insert test todo"). + - role: assistant + tool_calls: + - id: toolcall_0 + type: function + function: + name: sql + arguments: "{\"description\":\"Insert test todo\",\"query\":\"INSERT INTO todos (id, title, status) VALUES + ('subagent-test', 'Created by subagent', 'done')\",\"database\":\"session\"}" + - role: tool + tool_call_id: toolcall_0 + content: "1 row(s) inserted. Last inserted row ID: 1." + - role: assistant + content: >- + ✅ Successfully inserted the test todo into the database. The query executed exactly as requested, inserting a + todo with: + + - ID: `subagent-test` + + - Title: `Created by subagent` + + - Status: `done` + - messages: + - role: system + content: ${system} + - role: user + content: "Use the task tool to ask a task agent to do the following: Use the sql tool to run this query: INSERT INTO + todos (id, title, status) VALUES ('subagent-test', 'Created by subagent', 'done')" + - role: assistant + content: I'll delegate this SQL insert task to a task agent. + tool_calls: + - id: toolcall_0 + type: function + function: + name: report_intent + arguments: '{"intent":"Delegating SQL task"}' + - id: toolcall_1 + type: function + function: + name: task + arguments: "{\"name\":\"sql-insert-test\",\"agent_type\":\"task\",\"description\":\"Running SQL + insert\",\"prompt\":\"Use the sql tool to run this exact query:\\n\\nINSERT INTO todos (id, title, + status) VALUES ('subagent-test', 'Created by subagent', 'done')\\n\\nMake sure to provide a description + for the SQL operation (e.g., \\\"Insert test todo\\\").\",\"mode\":\"sync\"}" + - role: tool + tool_call_id: toolcall_0 + content: Intent logged + - role: tool + tool_call_id: toolcall_1 + content: >- + ✅ Successfully inserted the test todo into the database. The query executed exactly as requested, inserting a + todo with: + + - ID: `subagent-test` + + - Title: `Created by subagent` + + - Status: `done` + - role: assistant + content: Perfect! The task agent successfully ran the SQL insert query. The todo record with ID `subagent-test`, title + `Created by subagent`, and status `done` has been inserted into the todos table. diff --git a/test/snapshots/session_fs_sqlite/should_route_sql_queries_through_the_sessionfs_sqlite_handler.yaml b/test/snapshots/session_fs_sqlite/should_route_sql_queries_through_the_sessionfs_sqlite_handler.yaml new file mode 100644 index 000000000..d292454ad --- /dev/null +++ b/test/snapshots/session_fs_sqlite/should_route_sql_queries_through_the_sessionfs_sqlite_handler.yaml @@ -0,0 +1,96 @@ +models: + - claude-sonnet-4.5 +conversations: + - messages: + - role: system + content: ${system} + - role: user + content: Use the sql tool to create a table called "items" with columns id (TEXT PRIMARY KEY) and name (TEXT). Then + insert a row with id "a1" and name "Widget". Then select all rows from items and tell me what you find. + - role: assistant + content: I'll create the table, insert the row, and then query it for you. + - role: assistant + tool_calls: + - id: toolcall_0 + type: function + function: + name: report_intent + arguments: '{"intent":"Creating and populating database table"}' + - role: assistant + tool_calls: + - id: toolcall_1 + type: function + function: + name: sql + arguments: '{"description":"Create items table","query":"CREATE TABLE items (id TEXT PRIMARY KEY, name TEXT)"}' + - role: assistant + tool_calls: + - id: toolcall_2 + type: function + function: + name: sql + arguments: "{\"description\":\"Insert Widget row\",\"query\":\"INSERT INTO items (id, name) VALUES ('a1', 'Widget')\"}" + - role: assistant + tool_calls: + - id: toolcall_3 + type: function + function: + name: sql + arguments: '{"description":"Select all from items","query":"SELECT * FROM items"}' + - messages: + - role: system + content: ${system} + - role: user + content: Use the sql tool to create a table called "items" with columns id (TEXT PRIMARY KEY) and name (TEXT). Then + insert a row with id "a1" and name "Widget". Then select all rows from items and tell me what you find. + - role: assistant + content: I'll create the table, insert the row, and then query it for you. + tool_calls: + - id: toolcall_0 + type: function + function: + name: report_intent + arguments: '{"intent":"Creating and populating database table"}' + - id: toolcall_1 + type: function + function: + name: sql + arguments: '{"description":"Create items table","query":"CREATE TABLE items (id TEXT PRIMARY KEY, name TEXT)"}' + - id: toolcall_2 + type: function + function: + name: sql + arguments: "{\"description\":\"Insert Widget row\",\"query\":\"INSERT INTO items (id, name) VALUES ('a1', 'Widget')\"}" + - id: toolcall_3 + type: function + function: + name: sql + arguments: '{"description":"Select all from items","query":"SELECT * FROM items"}' + - role: tool + tool_call_id: toolcall_0 + content: Intent logged + - role: tool + tool_call_id: toolcall_1 + content: Schema operation completed successfully. + - role: tool + tool_call_id: toolcall_2 + content: "1 row(s) inserted. Last inserted row ID: 1." + - role: tool + tool_call_id: toolcall_3 + content: |- + 1 row(s) returned: + + | id | name | + | --- | --- | + | a1 | Widget | + - role: assistant + content: >- + Perfect! I found one row in the items table: + + - **id:** a1 + + - **name:** Widget + + + The table was created successfully, the row was inserted, and the query confirms the data is there as + expected.