From 79db0b5dd4b50f53ecda3d4a2ddffbbb3d4f68e9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 7 Jun 2026 16:41:35 +0000 Subject: [PATCH 1/5] Update @github/copilot to 1.0.60 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code --- dotnet/src/Generated/Rpc.cs | 5274 +++++++++++---- dotnet/src/Generated/SessionEvents.cs | 52 +- go/rpc/zrpc.go | 2941 ++++++++- go/rpc/zrpc_encoding.go | 492 +- go/rpc/zsession_encoding.go | 6 + go/rpc/zsession_events.go | 24 +- go/zsession_events.go | 2 + java/pom.xml | 2 +- java/scripts/codegen/package-lock.json | 72 +- java/scripts/codegen/package.json | 2 +- .../generated/AssistantMessageEvent.java | 2 + .../copilot/generated/HookEndError.java | 4 +- .../generated/SessionCanvasClosedEvent.java | 45 + .../copilot/generated/SessionEvent.java | 2 + .../copilot/generated/SessionIdleEvent.java | 2 +- .../generated/SubagentFailedEvent.java | 2 +- .../generated/SubagentStartedEvent.java | 2 +- .../generated/rpc/InstalledPluginInfo.java | 33 + .../rpc/LocalSessionMetadataValue.java | 45 + .../generated/rpc/MarketplaceInfo.java | 31 + .../generated/rpc/MarketplacePluginInfo.java | 29 + .../rpc/MarketplaceRefreshEntry.java | 31 + .../generated/rpc/McpAllowedServer.java | 29 + .../generated/rpc/McpFilteredServer.java | 33 + .../copilot/generated/rpc/McpHostState.java | 41 + .../generated/rpc/McpServerFailureInfo.java | 29 + .../generated/rpc/McpServerNeedsAuthInfo.java | 27 + .../copilot/generated/rpc/McpTools.java | 29 + .../rpc/ModelCapabilitiesOverride.java | 2 +- ...pdateAdditionalContentExclusionPolicy.java | 30 + ...eAdditionalContentExclusionPolicyRule.java | 31 + ...ionalContentExclusionPolicyRuleSource.java | 27 + ...AdditionalContentExclusionPolicyScope.java | 35 + .../rpc/OptionsUpdateContextTier.java | 35 + .../rpc/OptionsUpdateReasoningSummary.java | 37 + .../generated/rpc/PlanSqlTodosRow.java | 33 + .../generated/rpc/PluginUpdateAllEntry.java | 39 + .../generated/rpc/PluginsDisableParams.java | 29 + .../generated/rpc/PluginsEnableParams.java | 29 + .../generated/rpc/PluginsInstallParams.java | 30 + .../generated/rpc/PluginsInstallResult.java | 34 + .../generated/rpc/PluginsListResult.java | 29 + .../rpc/PluginsMarketplacesAddParams.java | 28 + .../rpc/PluginsMarketplacesAddResult.java | 28 + .../rpc/PluginsMarketplacesBrowseParams.java | 28 + .../rpc/PluginsMarketplacesBrowseResult.java | 29 + .../rpc/PluginsMarketplacesListResult.java | 29 + .../rpc/PluginsMarketplacesRefreshResult.java | 29 + .../rpc/PluginsMarketplacesRemoveParams.java | 30 + .../rpc/PluginsMarketplacesRemoveResult.java | 31 + .../generated/rpc/PluginsUninstallParams.java | 28 + .../generated/rpc/PluginsUpdateAllResult.java | 29 + .../generated/rpc/PluginsUpdateParams.java | 28 + .../generated/rpc/PluginsUpdateResult.java | 32 + .../copilot/generated/rpc/ProviderConfig.java | 50 + .../generated/rpc/ProviderConfigAzure.java | 27 + .../generated/rpc/ProviderConfigType.java | 37 + .../generated/rpc/ProviderConfigWireApi.java | 35 + .../generated/rpc/RemoteControlConfig.java | 37 + .../RemoteControlConfigExistingMcSession.java | 29 + .../rpc/RemoteSessionMetadataRepository.java | 31 + .../rpc/RemoteSessionMetadataTaskType.java | 35 + .../rpc/RemoteSessionMetadataValue.java | 54 + .../copilot/generated/rpc/SandboxConfig.java | 34 + .../rpc/SandboxConfigUserPolicy.java | 31 + .../SandboxConfigUserPolicyExperimental.java | 27 + ...xConfigUserPolicyExperimentalSeatbelt.java | 27 + .../SandboxConfigUserPolicyFilesystem.java | 34 + .../rpc/SandboxConfigUserPolicyNetwork.java | 34 + .../generated/rpc/ServerPluginsApi.java | 102 + .../rpc/ServerPluginsMarketplacesApi.java | 78 + .../copilot/generated/rpc/ServerRpc.java | 3 + .../generated/rpc/ServerSessionsApi.java | 102 +- .../generated/rpc/SessionCapability.java | 53 + .../copilot/generated/rpc/SessionContext.java | 2 +- .../copilot/generated/rpc/SessionMcpApi.java | 135 + .../rpc/SessionMcpConfigureGitHubParams.java | 30 + .../rpc/SessionMcpConfigureGitHubResult.java | 28 + .../rpc/SessionMcpIsServerRunningParams.java | 30 + .../rpc/SessionMcpIsServerRunningResult.java | 28 + .../generated/rpc/SessionMcpListResult.java | 6 +- .../rpc/SessionMcpListToolsParams.java | 30 + .../rpc/SessionMcpListToolsResult.java | 29 + .../generated/rpc/SessionMcpOauthApi.java | 15 + .../rpc/SessionMcpOauthRespondParams.java | 32 + ...essionMcpRegisterExternalClientParams.java | 36 + .../rpc/SessionMcpReloadWithConfigParams.java | 30 + .../rpc/SessionMcpReloadWithConfigResult.java | 31 + .../rpc/SessionMcpRestartServerParams.java | 32 + .../rpc/SessionMcpStartServerParams.java | 32 + .../rpc/SessionMcpStopServerParams.java | 30 + ...sionMcpUnregisterExternalClientParams.java | 30 + .../rpc/SessionMetadataActivityParams.java | 28 + .../rpc/SessionMetadataActivityResult.java | 30 + .../generated/rpc/SessionMetadataApi.java | 10 + .../rpc/SessionMetadataContextInfoResult.java | 2 +- .../rpc/SessionMetadataSnapshotResult.java | 2 + .../rpc/SessionOptionsUpdateParams.java | 22 +- .../copilot/generated/rpc/SessionPlanApi.java | 10 + .../rpc/SessionPlanReadSqlTodosParams.java | 28 + .../rpc/SessionPlanReadSqlTodosResult.java | 29 + .../generated/rpc/SessionPluginsApi.java | 10 + .../rpc/SessionPluginsReloadParams.java | 28 + .../generated/rpc/SessionSendParams.java | 4 +- .../generated/rpc/SessionShellApi.java | 30 + ...SessionShellCancelUserRequestedParams.java | 30 + ...SessionShellCancelUserRequestedResult.java | 28 + ...essionShellExecuteUserRequestedParams.java | 32 + ...essionShellExecuteUserRequestedResult.java | 36 + .../generated/rpc/SessionTelemetryApi.java | 10 + ...SessionTelemetryGetEngagementIdParams.java | 28 + ...SessionTelemetryGetEngagementIdResult.java | 28 + .../copilot/generated/rpc/SessionUiApi.java | 15 + .../rpc/SessionUiEphemeralQueryParams.java | 34 + .../rpc/SessionUiEphemeralQueryResult.java | 28 + ...sionsConfigureSessionExtensionsParams.java | 30 + .../rpc/SessionsEnrichMetadataParams.java | 2 +- .../rpc/SessionsEnrichMetadataResult.java | 2 +- .../rpc/SessionsGetBoardEntryCountParams.java | 28 + .../rpc/SessionsGetBoardEntryCountResult.java | 28 + .../SessionsGetRemoteControlStatusResult.java | 28 + .../generated/rpc/SessionsListResult.java | 6 +- .../generated/rpc/SessionsOpenProgress.java | 31 + .../rpc/SessionsOpenProgressStatus.java | 35 + .../rpc/SessionsOpenProgressStep.java | 43 + .../generated/rpc/SessionsOpenResult.java | 41 + .../generated/rpc/SessionsOpenStatus.java | 41 + .../rpc/SessionsPollSpawnedSessionsEvent.java | 27 + .../SessionsPollSpawnedSessionsResult.java | 31 + ...egisterExtensionToolsOnSessionOptions.java | 27 + ...RegisterExtensionToolsOnSessionParams.java | 32 + ...RegisterExtensionToolsOnSessionResult.java | 28 + ...essionsSetRemoteControlSteeringParams.java | 28 + ...essionsSetRemoteControlSteeringResult.java | 28 + .../rpc/SessionsStartRemoteControlParams.java | 30 + .../rpc/SessionsStartRemoteControlResult.java | 28 + .../rpc/SessionsStopRemoteControlResult.java | 30 + .../SessionsTransferRemoteControlParams.java | 30 + .../SessionsTransferRemoteControlResult.java | 30 + nodejs/package-lock.json | 72 +- nodejs/package.json | 2 +- nodejs/samples/package-lock.json | 2 +- nodejs/src/generated/rpc.ts | 4372 ++++++++++--- nodejs/src/generated/session-events.ts | 64 +- python/copilot/generated/rpc.py | 5745 ++++++++++++++--- python/copilot/generated/session_events.py | 44 +- rust/src/generated/api_types.rs | 4711 +++++++++++--- rust/src/generated/rpc.rs | 1930 +++++- rust/src/generated/session_events.rs | 28 +- test/harness/package-lock.json | 78 +- test/harness/package.json | 2 +- 151 files changed, 25598 insertions(+), 4116 deletions(-) create mode 100644 java/src/generated/java/com/github/copilot/generated/SessionCanvasClosedEvent.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/InstalledPluginInfo.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/LocalSessionMetadataValue.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/MarketplaceInfo.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/MarketplacePluginInfo.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/MarketplaceRefreshEntry.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/McpAllowedServer.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/McpFilteredServer.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/McpHostState.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/McpServerFailureInfo.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/McpServerNeedsAuthInfo.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/McpTools.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicy.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRule.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRuleSource.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyScope.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateContextTier.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateReasoningSummary.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PlanSqlTodosRow.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginUpdateAllEntry.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsDisableParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsEnableParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsInstallParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsInstallResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsListResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesAddParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesAddResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesBrowseParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesBrowseResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesListResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesRefreshResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesRemoveParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesRemoveResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsUninstallParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsUpdateAllResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsUpdateParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/PluginsUpdateResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfig.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfigAzure.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfigType.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfigWireApi.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/RemoteControlConfig.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/RemoteControlConfigExistingMcSession.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataRepository.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataTaskType.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataValue.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicy.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyExperimental.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyExperimentalSeatbelt.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyFilesystem.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyNetwork.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsApi.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsMarketplacesApi.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionCapability.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpConfigureGitHubParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpConfigureGitHubResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpIsServerRunningParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpIsServerRunningResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpListToolsParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpListToolsResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthRespondParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpRegisterExternalClientParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadWithConfigParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadWithConfigResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpRestartServerParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpStartServerParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpStopServerParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpUnregisterExternalClientParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataActivityParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataActivityResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionPluginsReloadParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionShellCancelUserRequestedParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionShellCancelUserRequestedResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionShellExecuteUserRequestedParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionShellExecuteUserRequestedResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionTelemetryGetEngagementIdParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionTelemetryGetEngagementIdResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionUiEphemeralQueryParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionUiEphemeralQueryResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsConfigureSessionExtensionsParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsGetBoardEntryCountParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsGetBoardEntryCountResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsGetRemoteControlStatusResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgress.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgressStatus.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgressStep.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenStatus.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsPollSpawnedSessionsEvent.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsPollSpawnedSessionsResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsRegisterExtensionToolsOnSessionOptions.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsRegisterExtensionToolsOnSessionParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsRegisterExtensionToolsOnSessionResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsSetRemoteControlSteeringParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsSetRemoteControlSteeringResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsStartRemoteControlParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsStartRemoteControlResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsStopRemoteControlResult.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsTransferRemoteControlParams.java create mode 100644 java/src/generated/java/com/github/copilot/generated/rpc/SessionsTransferRemoteControlResult.java diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs index 72deafb8f..b95ab82f1 100644 --- a/dotnet/src/Generated/Rpc.cs +++ b/dotnet/src/Generated/Rpc.cs @@ -466,6 +466,301 @@ internal sealed class McpConfigDisableRequest public IList Names { get => field ??= []; set; } } +/// Information about an installed plugin tracked in global state. +[Experimental(Diagnostics.Experimental)] +public sealed class InstalledPluginInfo +{ + /// Whether the plugin is currently enabled for new sessions. + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } + + /// Marketplace the plugin came from. Empty string ("") for direct repo / URL / local installs. + [JsonPropertyName("marketplace")] + public string Marketplace { get; set; } = string.Empty; + + /// Plugin name. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// Installed version (when reported by the plugin manifest). + [JsonPropertyName("version")] + public string? Version { get; set; } +} + +/// Plugins installed in user/global state. +[Experimental(Diagnostics.Experimental)] +public sealed class PluginListResult +{ + /// Installed plugins. + [JsonPropertyName("plugins")] + public IList Plugins { get => field ??= []; set; } +} + +/// Result of installing a plugin. +[Experimental(Diagnostics.Experimental)] +public sealed class PluginInstallResult +{ + /// Set when the install path is deprecated (e.g. direct repo / URL / local installs). Callers should surface this to end users. + [JsonPropertyName("deprecationWarning")] + public string? DeprecationWarning { get; set; } + + /// The newly installed plugin's metadata. + [JsonPropertyName("plugin")] + public InstalledPluginInfo Plugin { get => field ??= new(); set; } + + /// Optional post-install message provided by the plugin (e.g. setup instructions). + [JsonPropertyName("postInstallMessage")] + public string? PostInstallMessage { get; set; } + + /// Number of skills discovered and installed from the plugin. + [JsonPropertyName("skillsInstalled")] + public long SkillsInstalled { get; set; } +} + +/// Plugin source and optional working directory for relative-path resolution. +[Experimental(Diagnostics.Experimental)] +internal sealed class PluginsInstallRequest +{ + /// Plugin install spec. Accepts the same forms as the CLI: "plugin@marketplace" (marketplace install), "owner/repo" or "owner/repo:subpath" (GitHub direct), an http/https/ssh URL, or a local path. Direct (non-marketplace) installs are deprecated and will produce a deprecationWarning in the result. + [JsonPropertyName("source")] + public string Source { get; set; } = string.Empty; + + /// Working directory used to resolve relative local paths in `source`. Defaults to the server's current working directory. + [JsonPropertyName("workingDirectory")] + public string? WorkingDirectory { get; set; } +} + +/// Name (or spec) of the plugin to uninstall. +[Experimental(Diagnostics.Experimental)] +internal sealed class PluginsUninstallRequest +{ + /// Plugin name or "plugin@marketplace" spec to uninstall. When ambiguous, prefer the fully-qualified spec. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; +} + +/// Result of updating a single plugin. +[Experimental(Diagnostics.Experimental)] +public sealed class PluginUpdateResult +{ + /// Version after the update, when reported by the plugin manifest. + [JsonPropertyName("newVersion")] + public string? NewVersion { get; set; } + + /// Version that was previously installed, when available. + [JsonPropertyName("previousVersion")] + public string? PreviousVersion { get; set; } + + /// Number of skills discovered and installed after the update. + [JsonPropertyName("skillsInstalled")] + public long SkillsInstalled { get; set; } +} + +/// Name (or spec) of the plugin to update. +[Experimental(Diagnostics.Experimental)] +internal sealed class PluginsUpdateRequest +{ + /// Plugin name or "plugin@marketplace" spec to update. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; +} + +/// Schema for the `PluginUpdateAllEntry` type. +[Experimental(Diagnostics.Experimental)] +public sealed class PluginUpdateAllEntry +{ + /// Error message (failure only). + [JsonPropertyName("error")] + public string? Error { get; set; } + + /// Marketplace the plugin came from. Empty string ("") for direct installs. + [JsonPropertyName("marketplace")] + public string Marketplace { get; set; } = string.Empty; + + /// Plugin name that was updated. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// Version after the update, when available. + [JsonPropertyName("newVersion")] + public string? NewVersion { get; set; } + + /// Previously installed version, when available. + [JsonPropertyName("previousVersion")] + public string? PreviousVersion { get; set; } + + /// Number of skills installed after the update (success only). + [JsonPropertyName("skillsInstalled")] + public long? SkillsInstalled { get; set; } + + /// Whether the update succeeded for this plugin. + [JsonPropertyName("success")] + public bool Success { get; set; } +} + +/// Result of updating all installed plugins. +[Experimental(Diagnostics.Experimental)] +public sealed class PluginUpdateAllResult +{ + /// Per-plugin update results in deterministic order. + [JsonPropertyName("results")] + public IList Results { get => field ??= []; set; } +} + +/// Plugin names (or specs) to enable. +[Experimental(Diagnostics.Experimental)] +internal sealed class PluginsEnableRequest +{ + /// Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API. + [JsonPropertyName("names")] + public IList Names { get => field ??= []; set; } +} + +/// Plugin names (or specs) to disable. +[Experimental(Diagnostics.Experimental)] +internal sealed class PluginsDisableRequest +{ + /// Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins. + [JsonPropertyName("names")] + public IList Names { get => field ??= []; set; } +} + +/// Registered marketplace summary. +[Experimental(Diagnostics.Experimental)] +public sealed class MarketplaceInfo +{ + /// True when this is a default marketplace shipped with the runtime. Defaults are not removable. + [JsonPropertyName("isDefault")] + public bool? IsDefault { get; set; } + + /// Marketplace name (matches the @marketplace suffix in plugin specs). + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// Human-readable description of where the marketplace data is fetched from (e.g. "GitHub: owner/repo"). + [JsonPropertyName("source")] + public string Source { get; set; } = string.Empty; +} + +/// All registered marketplaces, including built-in defaults. +[Experimental(Diagnostics.Experimental)] +public sealed class MarketplaceListResult +{ + /// Registered marketplaces. + [JsonPropertyName("marketplaces")] + public IList Marketplaces { get => field ??= []; set; } +} + +/// Result of registering a new marketplace. +[Experimental(Diagnostics.Experimental)] +public sealed class MarketplaceAddResult +{ + /// Final name of the marketplace as resolved from its manifest. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; +} + +/// Marketplace source to register. +[Experimental(Diagnostics.Experimental)] +internal sealed class PluginsMarketplacesAddRequest +{ + /// Marketplace source. Accepts the same forms as the CLI: "owner/repo" or "owner/repo#ref" (GitHub), an http/https/ssh URL (optionally with #ref), a git scp-style URL (user@host:path), or a local path. The marketplace's own name (from its manifest) is used as the registration key. + [JsonPropertyName("source")] + public string Source { get; set; } = string.Empty; +} + +/// Outcome of the remove attempt, including dependent-plugin info when applicable. +[Experimental(Diagnostics.Experimental)] +public sealed class MarketplaceRemoveResult +{ + /// Names of installed plugins that prevented removal. Populated only when `removed=false`. + [JsonPropertyName("dependentPlugins")] + public IList? DependentPlugins { get; set; } + + /// True when the marketplace was actually removed. False when removal was skipped because the marketplace has dependent plugins and `force` was not set. + [JsonPropertyName("removed")] + public bool Removed { get; set; } +} + +/// Name of the marketplace to remove and an optional force flag. +[Experimental(Diagnostics.Experimental)] +internal sealed class PluginsMarketplacesRemoveRequest +{ + /// When true, also uninstall every plugin sourced from this marketplace. When false (default), removal is a no-op if any plugin from this marketplace is installed and the dependent plugin names are returned in the result. + [JsonPropertyName("force")] + public bool? Force { get; set; } + + /// Marketplace name to remove. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; +} + +/// Plugin entry advertised by a marketplace. +[Experimental(Diagnostics.Experimental)] +public sealed class MarketplacePluginInfo +{ + /// Short description from the marketplace catalog, when present. + [JsonPropertyName("description")] + public string? Description { get; set; } + + /// Plugin name as listed in the marketplace catalog. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; +} + +/// Plugins advertised by the marketplace. +[Experimental(Diagnostics.Experimental)] +public sealed class MarketplaceBrowseResult +{ + /// Plugins advertised by the marketplace. + [JsonPropertyName("plugins")] + public IList Plugins { get => field ??= []; set; } +} + +/// Name of the marketplace whose plugin catalog to fetch. +[Experimental(Diagnostics.Experimental)] +internal sealed class PluginsMarketplacesBrowseRequest +{ + /// Marketplace name to browse. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; +} + +/// Schema for the `MarketplaceRefreshEntry` type. +[Experimental(Diagnostics.Experimental)] +public sealed class MarketplaceRefreshEntry +{ + /// Error message (failure only). + [JsonPropertyName("error")] + public string? Error { get; set; } + + /// Marketplace name that was refreshed. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// Whether the refresh succeeded. + [JsonPropertyName("success")] + public bool Success { get; set; } +} + +/// Result of refreshing one or more marketplace catalogs. +[Experimental(Diagnostics.Experimental)] +public sealed class MarketplaceRefreshResult +{ + /// Per-marketplace refresh results in deterministic order. + [JsonPropertyName("results")] + public IList Results { get => field ??= []; set; } +} + +/// RPC data type for PluginsMarketplacesRefresh operations. +[Experimental(Diagnostics.Experimental)] +internal sealed class PluginsMarketplacesRefreshRequest +{ + /// Marketplace name to refresh. When omitted, every registered marketplace is refreshed. + [JsonPropertyName("name")] + public string? Name { get; set; } +} + /// Schema for the `ServerSkill` type. public sealed class ServerSkill { @@ -562,39 +857,34 @@ internal sealed class SessionFsSetProviderRequest public string SessionStatePath { get; set; } = string.Empty; } -/// Identifier and optional friendly name assigned to the newly forked session. +/// Pre-resolved working-directory context for session startup. [Experimental(Diagnostics.Experimental)] -public sealed class SessionsForkResult +public sealed class SessionContext { - /// Friendly name assigned to the forked session, if any. - [JsonPropertyName("name")] - public string? Name { get; set; } + /// Active git branch. + [JsonPropertyName("branch")] + public string? Branch { get; set; } - /// The new forked session's ID. - [JsonPropertyName("sessionId")] - public string SessionId { get; set; } = string.Empty; -} + /// Most recent working directory for this session. + [JsonPropertyName("cwd")] + public string Cwd { get; set; } = string.Empty; -/// 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 -{ - /// Optional friendly name to assign to the forked session. - [JsonPropertyName("name")] - public string? Name { get; set; } + /// Git repository root, if the cwd was inside a git repo. + [JsonPropertyName("gitRoot")] + public string? GitRoot { get; set; } - /// Source session ID to fork from. - [JsonPropertyName("sessionId")] - public string SessionId { get; set; } = string.Empty; + /// Repository host type. + [JsonPropertyName("hostType")] + public SessionContextHostType? HostType { get; set; } - /// Optional event ID boundary. When provided, the fork includes only events before this ID (exclusive). When omitted, all events are included. - [JsonPropertyName("toEventId")] - public string? ToEventId { get; set; } + /// Repository slug in `owner/name` form, when known. + [JsonPropertyName("repository")] + public string? Repository { get; set; } } -/// Repository associated with the connected remote session. +/// GitHub repository the remote session belongs to. [Experimental(Diagnostics.Experimental)] -public sealed class ConnectedRemoteSessionMetadataRepository +public sealed class RemoteSessionMetadataRepository { /// Branch associated with the remote session. [JsonPropertyName("branch")] @@ -604,24 +894,28 @@ public sealed class ConnectedRemoteSessionMetadataRepository [JsonPropertyName("name")] public string Name { get; set; } = string.Empty; - /// Repository owner or organization login. + /// Repository owner. [JsonPropertyName("owner")] public string Owner { get; set; } = string.Empty; } -/// Metadata for a connected remote session. +/// Remote session metadata for the session to hand off (typically obtained from `sessions.list` with `source: "remote"`). [Experimental(Diagnostics.Experimental)] -public sealed class ConnectedRemoteSessionMetadata +public sealed class RemoteSessionMetadataValue { - /// Neutral SDK discriminator for the connected remote session kind. - [JsonPropertyName("kind")] - public ConnectedRemoteSessionMetadataKind Kind { get; set; } + /// Most recent working directory context. + [JsonPropertyName("context")] + public SessionContext? Context { get; set; } - /// Last session update time as an ISO 8601 string. + /// Always true for remote sessions. + [JsonPropertyName("isRemote")] + public bool IsRemote { get; set; } + + /// Last-modified time as an ISO 8601 timestamp. [JsonPropertyName("modifiedTime")] - public DateTimeOffset ModifiedTime { get; set; } + public string ModifiedTime { get; set; } = string.Empty; - /// Optional friendly session name. + /// Optional human-friendly name set via /rename. [JsonPropertyName("name")] public string? Name { get; set; } @@ -629,134 +923,306 @@ public sealed class ConnectedRemoteSessionMetadata [JsonPropertyName("pullRequestNumber")] public long? PullRequestNumber { get; set; } - /// Repository associated with the connected remote session. + /// Backing remote session IDs (most recent first). + [JsonPropertyName("remoteSessionIds")] + public IList RemoteSessionIds { get => field ??= []; set; } + + /// GitHub repository the remote session belongs to. [JsonPropertyName("repository")] - public ConnectedRemoteSessionMetadataRepository Repository { get => field ??= new(); set; } + public RemoteSessionMetadataRepository Repository { get => field ??= new(); set; } - /// Original remote resource identifier. + /// Original remote resource identifier (task ID or PR node ID). [JsonPropertyName("resourceId")] public string? ResourceId { get; set; } - /// SDK session ID for the connected remote session. + /// Stable session identifier. [JsonPropertyName("sessionId")] public string SessionId { get; set; } = string.Empty; - /// Remote session staleness deadline as an ISO 8601 string. + /// Deadline (ISO 8601) at which a CLI remote session becomes stale without further heartbeats. [JsonPropertyName("staleAt")] - public DateTimeOffset? StaleAt { get; set; } + public string? StaleAt { get; set; } - /// Session start time as an ISO 8601 string. + /// Session creation time as an ISO 8601 timestamp. [JsonPropertyName("startTime")] - public DateTimeOffset StartTime { get; set; } + public string StartTime { get; set; } = string.Empty; - /// Remote session state returned by the backing service. + /// Server-side task state returned by GitHub. [JsonPropertyName("state")] public string? State { get; set; } - /// Optional session summary. + /// Short summary of the session, when one has been derived. [JsonPropertyName("summary")] public string? Summary { get; set; } + + /// Whether the remote task originated from CCA or CLI `--remote`. + [JsonPropertyName("taskType")] + public RemoteSessionMetadataTaskType? TaskType { get; set; } } -/// Remote session connection result. +/// Schema for the `SessionsOpenProgress` type. [Experimental(Diagnostics.Experimental)] -public sealed class RemoteSessionConnectionResult +public sealed class SessionsOpenProgress { - /// Metadata for a connected remote session. - [JsonPropertyName("metadata")] - public ConnectedRemoteSessionMetadata Metadata { get => field ??= new(); set; } + /// Optional step message. + [JsonPropertyName("message")] + public string? Message { get; set; } - /// SDK session ID for the connected remote session. - [JsonPropertyName("sessionId")] - public string SessionId { get; set; } = string.Empty; + /// Step status. + [JsonPropertyName("status")] + public SessionsOpenProgressStatus Status { get; set; } + + /// Handoff step. + [JsonPropertyName("step")] + public SessionsOpenProgressStep Step { get; set; } } -/// Remote session connection parameters. +/// Result of opening a session. [Experimental(Diagnostics.Experimental)] -internal sealed class ConnectRemoteSessionParams +public sealed class SessionOpenResult { - /// Session ID to connect to. + /// Remote session metadata, present when status is `connected`. + [JsonPropertyName("metadata")] + public RemoteSessionMetadataValue? Metadata { get; set; } + + /// Handoff progress steps, present when status is `handed_off`. + [JsonPropertyName("progress")] + public IList? Progress { get; set; } + + /// Remote session ID, present when status is `connected`. + [JsonPropertyName("remoteSessionId")] + public string? RemoteSessionId { get; set; } + + /// In-process SessionClientApi handle for the opened session, returned to CLI callers as a transitional shortcut. Marked internal so the public SDK surface does not expose it; SDK consumers should construct per-session clients from `sessionId` instead. + [JsonInclude] + [JsonPropertyName("sessionApi")] + internal JsonElement? SessionApi { get; set; } + + /// Opened session ID. Omitted when status is `not_found`. + [JsonPropertyName("sessionId")] + public string? SessionId { get; set; } + + /// Startup prompts queued by user-level hook configs at session creation. Only populated when status is `created`; resumed sessions return an empty array. + [JsonPropertyName("startupPrompts")] + public IList? StartupPrompts { get; set; } + + /// Outcome of the open request. + [JsonPropertyName("status")] + public SessionsOpenStatus Status { get; set; } +} + +/// Identifier and optional friendly name assigned to the newly forked session. +[Experimental(Diagnostics.Experimental)] +public sealed class SessionsForkResult +{ + /// Friendly name assigned to the forked session, if any. + [JsonPropertyName("name")] + public string? Name { get; set; } + + /// The new forked session's ID. [JsonPropertyName("sessionId")] public string SessionId { get; set; } = string.Empty; } -/// Schema for the `SessionContext` type. +/// Source session identifier to fork from, optional event-ID boundary, and optional friendly name for the new session. [Experimental(Diagnostics.Experimental)] -public sealed class SessionContext +internal sealed class SessionsForkRequest { - /// Active git branch. + /// Optional friendly name to assign to the forked session. + [JsonPropertyName("name")] + public string? Name { get; set; } + + /// Source session ID to fork from. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; + + /// Optional event ID boundary. When provided, the fork includes only events before this ID (exclusive). When omitted, all events are included. + [JsonPropertyName("toEventId")] + public string? ToEventId { get; set; } +} + +/// Repository associated with the connected remote session. +[Experimental(Diagnostics.Experimental)] +public sealed class ConnectedRemoteSessionMetadataRepository +{ + /// Branch associated with the remote session. [JsonPropertyName("branch")] - public string? Branch { get; set; } + public string Branch { get; set; } = string.Empty; - /// Most recent working directory for this session. - [JsonPropertyName("cwd")] - public string Cwd { get; set; } = string.Empty; + /// Repository name. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; - /// Git repository root, if the cwd was inside a git repo. - [JsonPropertyName("gitRoot")] - public string? GitRoot { get; set; } + /// Repository owner or organization login. + [JsonPropertyName("owner")] + public string Owner { get; set; } = string.Empty; +} - /// Repository host type. - [JsonPropertyName("hostType")] - public SessionContextHostType? HostType { get; set; } +/// Metadata for a connected remote session. +[Experimental(Diagnostics.Experimental)] +public sealed class ConnectedRemoteSessionMetadata +{ + /// Neutral SDK discriminator for the connected remote session kind. + [JsonPropertyName("kind")] + public ConnectedRemoteSessionMetadataKind Kind { get; set; } - /// Repository slug in `owner/name` form, when known. + /// Last session update time as an ISO 8601 string. + [JsonPropertyName("modifiedTime")] + public DateTimeOffset ModifiedTime { get; set; } + + /// Optional friendly session name. + [JsonPropertyName("name")] + public string? Name { get; set; } + + /// Pull request number associated with the session. + [JsonPropertyName("pullRequestNumber")] + public long? PullRequestNumber { get; set; } + + /// Repository associated with the connected remote session. [JsonPropertyName("repository")] - public string? Repository { get; set; } + public ConnectedRemoteSessionMetadataRepository Repository { get => field ??= new(); set; } + + /// Original remote resource identifier. + [JsonPropertyName("resourceId")] + public string? ResourceId { get; set; } + + /// SDK session ID for the connected remote session. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; + + /// Remote session staleness deadline as an ISO 8601 string. + [JsonPropertyName("staleAt")] + public DateTimeOffset? StaleAt { get; set; } + + /// Session start time as an ISO 8601 string. + [JsonPropertyName("startTime")] + public DateTimeOffset StartTime { get; set; } + + /// Remote session state returned by the backing service. + [JsonPropertyName("state")] + public string? State { get; set; } + + /// Optional session summary. + [JsonPropertyName("summary")] + public string? Summary { get; set; } +} + +/// Remote session connection result. +[Experimental(Diagnostics.Experimental)] +public sealed class RemoteSessionConnectionResult +{ + /// Metadata for a connected remote session. + [JsonPropertyName("metadata")] + public ConnectedRemoteSessionMetadata Metadata { get => field ??= new(); set; } + + /// SDK session ID for the connected remote session. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Remote session connection parameters. +[Experimental(Diagnostics.Experimental)] +internal sealed class ConnectRemoteSessionParams +{ + /// Session ID to connect to. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; } -/// Schema for the `SessionMetadata` type. +/// Local or remote session metadata entry. Narrow on `isRemote` to access source-specific fields. +/// Data type discriminated by isRemote. [Experimental(Diagnostics.Experimental)] -public sealed class SessionMetadata +public partial class SessionListEntry { + /// The boolean discriminator. + [JsonPropertyName("isRemote")] + public bool IsRemote { get; set; } + /// Runtime client name that created/last resumed this session. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("clientName")] public string? ClientName { get; set; } - /// Schema for the `SessionContext` type. + /// Pre-resolved working-directory context for session startup. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("context")] public SessionContext? Context { get; set; } /// True for detached maintenance sessions that should be hidden from normal resume lists. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("isDetached")] public bool? IsDetached { get; set; } - /// True for remote (GitHub) sessions; false for local. - [JsonPropertyName("isRemote")] - public bool IsRemote { get; set; } - /// GitHub task ID, when this local session is bound to one. Only present for local sessions exported to remote control. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("mcTaskId")] public string? McTaskId { get; set; } /// Last-modified time of the session's persisted state, as ISO 8601. [JsonPropertyName("modifiedTime")] - public string ModifiedTime { get; set; } = string.Empty; + public required string ModifiedTime { get; set; } /// Optional human-friendly name set via /rename. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("name")] public string? Name { get; set; } + /// Pull request number associated with the session. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("pullRequestNumber")] + public long? PullRequestNumber { get; set; } + + /// Backing remote session IDs (most recent first). + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("remoteSessionIds")] + public IList? RemoteSessionIds { get; set; } + + /// GitHub repository the remote session belongs to. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("repository")] + public RemoteSessionMetadataRepository? Repository { get; set; } + + /// Original remote resource identifier (task ID or PR node ID). + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("resourceId")] + public string? ResourceId { get; set; } + /// Stable session identifier. [JsonPropertyName("sessionId")] - public string SessionId { get; set; } = string.Empty; + public required string SessionId { get; set; } + + /// Deadline (ISO 8601) at which a CLI remote session becomes stale without further heartbeats. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("staleAt")] + public string? StaleAt { get; set; } /// Session creation time as an ISO 8601 timestamp. [JsonPropertyName("startTime")] - public string StartTime { get; set; } = string.Empty; + public required string StartTime { get; set; } + + /// Server-side task state returned by GitHub. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("state")] + public string? State { get; set; } /// Short summary of the session, when one has been derived. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("summary")] public string? Summary { get; set; } + + /// Whether the remote task originated from CCA or CLI `--remote`. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("taskType")] + public RemoteSessionMetadataTaskType? TaskType { get; set; } } -/// Persisted sessions matching the filter, ordered most-recently-modified first. +/// Sessions matching the filter, ordered most-recently-modified first. [Experimental(Diagnostics.Experimental)] public sealed class SessionList { - /// Sessions ordered most-recently-modified first. + /// Sessions ordered most-recently-modified first. Discriminated by `isRemote`. [JsonPropertyName("sessions")] - public IList Sessions { get => field ??= []; set; } + public IList Sessions { get => field ??= []; set; } } /// Optional filter applied to the returned sessions. @@ -780,7 +1246,7 @@ public sealed class SessionListFilter public string? Repository { get; set; } } -/// Optional metadata-load limit and filters applied to the returned sessions. +/// Optional source filter, metadata-load limit, and context filter applied to the returned sessions. [Experimental(Diagnostics.Experimental)] internal sealed class SessionsListRequest { @@ -792,9 +1258,17 @@ internal sealed class SessionsListRequest [JsonPropertyName("includeDetached")] public bool? IncludeDetached { get; set; } - /// When provided, only the first N sessions (sorted by modification time, newest first) load full metadata; remaining sessions return basic info only. Use 0 to return only basic info for every session. + /// When provided, only the first N local sessions (sorted by modification time, newest first) load full metadata; remaining sessions return basic info only. Use 0 to return only basic info for every local session. Has no effect on remote entries (which always carry their full shape). [JsonPropertyName("metadataLimit")] public long? MetadataLimit { get; set; } + + /// Which session sources to include. Defaults to `local` for backward compatibility. + [JsonPropertyName("source")] + public SessionSource? Source { get; set; } + + /// Only meaningful when `source` includes remote. When true, propagates errors from the remote service instead of silently returning an empty remote list. Defaults to false. + [JsonPropertyName("throwOnError")] + public bool? ThrowOnError { get; set; } } /// ID of the local session bound to the given GitHub task, or omitted when none. @@ -853,7 +1327,7 @@ internal sealed class SessionsGetLastForContextRequest /// Absolute path to the session's events.jsonl file on disk. [Experimental(Diagnostics.Experimental)] -public sealed class SessionsGetEventFilePathResult +internal sealed class SessionsGetEventFilePathResult { /// Absolute path to the session's events.jsonl file. [JsonPropertyName("filePath")] @@ -898,7 +1372,7 @@ internal sealed class SessionsCheckInUseRequest /// The session's persisted remote-steerable flag, or omitted when no value has been persisted. [Experimental(Diagnostics.Experimental)] -public sealed class SessionsGetPersistedRemoteSteerableResult +internal sealed class SessionsGetPersistedRemoteSteerableResult { /// The session's persisted remote-steerable flag if recorded; omitted when no value has been persisted. [JsonPropertyName("remoteSteerable")] @@ -1023,13 +1497,58 @@ internal sealed class SessionsReleaseLockRequest public string SessionId { get; set; } = string.Empty; } +/// Schema for the `LocalSessionMetadataValue` type. +[Experimental(Diagnostics.Experimental)] +public sealed class LocalSessionMetadataValue +{ + /// Runtime client name that created/last resumed this session. + [JsonPropertyName("clientName")] + public string? ClientName { get; set; } + + /// Pre-resolved working-directory context for session startup. + [JsonPropertyName("context")] + public SessionContext? Context { get; set; } + + /// True for detached maintenance sessions that should be hidden from normal resume lists. + [JsonPropertyName("isDetached")] + public bool? IsDetached { get; set; } + + /// Always false for local sessions. + [JsonPropertyName("isRemote")] + public bool IsRemote { get; set; } + + /// GitHub task ID, when this local session is bound to one. Only present for local sessions exported to remote control. + [JsonPropertyName("mcTaskId")] + public string? McTaskId { get; set; } + + /// Last-modified time of the session's persisted state, as ISO 8601. + [JsonPropertyName("modifiedTime")] + public string ModifiedTime { get; set; } = string.Empty; + + /// Optional human-friendly name set via /rename. + [JsonPropertyName("name")] + public string? Name { get; set; } + + /// Stable session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; + + /// Session creation time as an ISO 8601 timestamp. + [JsonPropertyName("startTime")] + public string StartTime { get; set; } = string.Empty; + + /// Short summary of the session, when one has been derived. + [JsonPropertyName("summary")] + public string? Summary { get; set; } +} + /// The enriched metadata records, with summary and context fields backfilled where available. Sessions confirmed empty and unnamed are omitted. [Experimental(Diagnostics.Experimental)] public sealed class SessionEnrichMetadataResult { /// Enriched records, with summary and context backfilled. Sessions confirmed empty and unnamed may be omitted. [JsonPropertyName("sessions")] - public IList Sessions { get => field ??= []; set; } + public IList Sessions { get => field ??= []; set; } } /// Session metadata records to enrich with summary and context information. @@ -1038,7 +1557,7 @@ internal sealed class SessionsEnrichMetadataRequest { /// Session metadata records to enrich. Records that already have summary and context are returned unchanged. [JsonPropertyName("sessions")] - public IList Sessions { get => field ??= []; set; } + public IList Sessions { get => field ??= []; set; } } /// Reload all hooks (user, plugin, optionally repo) and apply them to the active session. Call after installing or removing plugins so their hooks take effect immediately. No-op when no active session matches the given sessionId. @@ -1130,38 +1649,359 @@ internal sealed class SessionsSetAdditionalPluginsRequest public IList Plugins { get => field ??= []; set; } } -/// Outcome of an agentRegistry.spawn call. -/// Polymorphic base type discriminated by kind. +/// Dynamic-context board entry count, when available. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionsGetBoardEntryCountResult +{ + /// Board entry count, when available. + [JsonPropertyName("count")] + public long? Count { get; set; } +} + +/// Session ID whose board entry count should be returned. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionsGetBoardEntryCountRequest +{ + /// Session ID whose board entry count should be returned. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// State of the runtime-managed remote-control singleton. +/// Polymorphic base type discriminated by state. [Experimental(Diagnostics.Experimental)] [JsonPolymorphic( - TypeDiscriminatorPropertyName = "kind", + TypeDiscriminatorPropertyName = "state", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] -[JsonDerivedType(typeof(AgentRegistrySpawnResultSpawned), "spawned")] -[JsonDerivedType(typeof(AgentRegistrySpawnResultSpawnError), "spawn-error")] -[JsonDerivedType(typeof(AgentRegistrySpawnResultRegistryTimeout), "registry-timeout")] -[JsonDerivedType(typeof(AgentRegistrySpawnResultValidationError), "validation-error")] -public partial class AgentRegistrySpawnResult +[JsonDerivedType(typeof(RemoteControlStatusOff), "off")] +[JsonDerivedType(typeof(RemoteControlStatusConnecting), "connecting")] +[JsonDerivedType(typeof(RemoteControlStatusActive), "active")] +[JsonDerivedType(typeof(RemoteControlStatusError), "error")] +public partial class RemoteControlStatus { /// The type discriminator. - [JsonPropertyName("kind")] - public virtual string Kind { get; set; } = string.Empty; + [JsonPropertyName("state")] + public virtual string State { get; set; } = string.Empty; } -/// Full registry entry for the spawned child. Lets the controller call `handleLiveTargetSelected(entry)` directly without re-reading the registry (avoids a TOCTOU window). +/// Remote control is not connected. +/// The off variant of . [Experimental(Diagnostics.Experimental)] -public sealed class AgentRegistryLiveTargetEntry +public partial class RemoteControlStatusOff : RemoteControlStatus { - /// Kind of attention required when status === "attention". Meaningful only when status === "attention". - [JsonPropertyName("attentionKind")] - public AgentRegistryLiveTargetEntryAttentionKind? AttentionKind { get; set; } - - /// Git branch of the session (when known). - [JsonPropertyName("branch")] - public string? Branch { get; set; } + /// + [JsonIgnore] + public override string State => "off"; +} - /// Copilot CLI version that wrote the entry. - [JsonPropertyName("copilotVersion")] +/// Remote control is in the middle of initial setup. +/// The connecting variant of . +[Experimental(Diagnostics.Experimental)] +public partial class RemoteControlStatusConnecting : RemoteControlStatus +{ + /// + [JsonIgnore] + public override string State => "connecting"; + + /// Session id the connection is attaching to. + [JsonPropertyName("attachedSessionId")] + public required string AttachedSessionId { get; set; } +} + +/// Remote control is connected to a local session. +/// The active variant of . +[Experimental(Diagnostics.Experimental)] +public partial class RemoteControlStatusActive : RemoteControlStatus +{ + /// + [JsonIgnore] + public override string State => "active"; + + /// Session id remote control is pointed at. + [JsonPropertyName("attachedSessionId")] + public required string AttachedSessionId { get; set; } + + /// MC frontend URL for this session, when known. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("frontendUrl")] + public string? FrontendUrl { get; set; } + + /// Whether the MC session may steer this session. + [JsonPropertyName("isSteerable")] + public required bool IsSteerable { get; set; } + + /// In-process prompt-manager handle (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, the same bidirectional prompt-routing handshake is expressed via dedicated remote-control RPCs (register/resolve) rather than a shared in-process object. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonInclude] + [JsonPropertyName("promptManager")] + internal JsonElement? PromptManager { get; set; } +} + +/// The last setup attempt failed. The singleton is otherwise off. +/// The error variant of . +[Experimental(Diagnostics.Experimental)] +public partial class RemoteControlStatusError : RemoteControlStatus +{ + /// + [JsonIgnore] + public override string State => "error"; + + /// Session id the failing setup attempt targeted, when known. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("attachedSessionId")] + public string? AttachedSessionId { get; set; } + + /// Human-readable error message from the last setup attempt. + [JsonPropertyName("error")] + public required string Error { get; set; } +} + +/// Wrapper for the singleton's current status. +[Experimental(Diagnostics.Experimental)] +public sealed class RemoteControlStatusResult +{ + /// State of the runtime-managed remote-control singleton. + [JsonPropertyName("status")] + public RemoteControlStatus Status { get => field ??= new(); set; } +} + +/// Reattach to an existing MC session without creating a new one. +[Experimental(Diagnostics.Experimental)] +public sealed class RemoteControlConfigExistingMcSession +{ + /// Existing MC session ID to reattach to. + [JsonPropertyName("mcSessionId")] + public string McSessionId { get; set; } = string.Empty; + + /// Existing MC task ID for the reattached session. + [JsonPropertyName("mcTaskId")] + public string McTaskId { get; set; } = string.Empty; +} + +/// Configuration for the runtime-managed remote-control singleton. +[Experimental(Diagnostics.Experimental)] +public sealed class RemoteControlConfig +{ + /// Reattach to an existing MC session without creating a new one. + [JsonPropertyName("existingMcSession")] + public RemoteControlConfigExistingMcSession? ExistingMcSession { get; set; } + + /// Whether the user explicitly requested remote (vs. implicit session-sync). Controls warning surfacing for missing-repo cases. + [JsonPropertyName("explicit")] + public bool Explicit { get; set; } + + /// Whether remote export should be enabled. + [JsonPropertyName("remote")] + public bool Remote { get; set; } + + /// When true, suppresses timeline messages on successful setup. + [JsonPropertyName("silent")] + public bool Silent { get; set; } + + /// Whether the MC session may steer the local session (write mode). + [JsonPropertyName("steerable")] + public bool Steerable { get; set; } + + /// Existing Mission Control task ID to attach the exported session to. + [JsonPropertyName("taskId")] + public string? TaskId { get; set; } +} + +/// Parameters for attaching the remote-control singleton to a session. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionsStartRemoteControlRequest +{ + /// Configuration for the runtime-managed remote-control singleton. + [JsonPropertyName("config")] + public RemoteControlConfig Config { get => field ??= new(); set; } + + /// Local session id to attach remote control to. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Outcome of a transferRemoteControl call. +[Experimental(Diagnostics.Experimental)] +public sealed class RemoteControlTransferResult +{ + /// State of the runtime-managed remote-control singleton. + [JsonPropertyName("status")] + public RemoteControlStatus Status { get => field ??= new(); set; } + + /// Whether the rebinding actually happened. + [JsonPropertyName("transferred")] + public bool Transferred { get; set; } +} + +/// Parameters for atomically rebinding the remote-control singleton. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionsTransferRemoteControlRequest +{ + /// When provided, the transfer is rejected unless the singleton currently points at this session id (compare-and-swap semantics to avoid clobbering newer state). + [JsonPropertyName("expectedFromSessionId")] + public string? ExpectedFromSessionId { get; set; } + + /// Local session id to point remote control at. + [JsonPropertyName("toSessionId")] + public string ToSessionId { get; set; } = string.Empty; +} + +/// Patch for the singleton's steering state. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionsSetRemoteControlSteeringRequest +{ + /// Target steering state. Today only `true` is actionable on the underlying exporter; `false` is reserved for future use. + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } +} + +/// Outcome of a stopRemoteControl call. +[Experimental(Diagnostics.Experimental)] +public sealed class RemoteControlStopResult +{ + /// State of the runtime-managed remote-control singleton. + [JsonPropertyName("status")] + public RemoteControlStatus Status { get => field ??= new(); set; } + + /// Whether the singleton was actually torn down by this call. + [JsonPropertyName("stopped")] + public bool Stopped { get; set; } +} + +/// RPC data type for SessionsStopRemoteControl operations. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionsStopRemoteControlRequest +{ + /// When provided, the stop is rejected unless the singleton currently points at this session id (compare-and-swap semantics). + [JsonPropertyName("expectedSessionId")] + public string? ExpectedSessionId { get; set; } + + /// When true, the singleton is unconditionally torn down regardless of `expectedSessionId`. Use during shutdown or explicit `/remote off`. + [JsonPropertyName("force")] + public bool? Force { get; set; } +} + +/// Schema for the `SessionsPollSpawnedSessionsEvent` type. +[Experimental(Diagnostics.Experimental)] +public sealed class SessionsPollSpawnedSessionsEvent +{ + /// Session id of the newly-spawned session. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Batch of spawn events plus a cursor for follow-up polls. +[Experimental(Diagnostics.Experimental)] +internal sealed class PollSpawnedSessionsResult +{ + /// Opaque cursor to pass back to receive only events after this batch. + [JsonPropertyName("cursor")] + public string Cursor { get; set; } = string.Empty; + + /// Spawn events emitted since the supplied cursor. + [JsonPropertyName("events")] + public IList Events { get => field ??= []; set; } +} + +/// RPC data type for SessionsPollSpawnedSessions operations. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionsPollSpawnedSessionsRequest +{ + /// Opaque cursor returned by a previous poll. Omit on the first call to receive any spawn events buffered since the runtime started. + [JsonPropertyName("cursor")] + public string? Cursor { get; set; } + + /// Milliseconds to wait for new spawn events when the cursor is at the tail. 0 (default) returns immediately even if no events are buffered. Capped at 60000ms. + [JsonConverter(typeof(MillisecondsTimeSpanConverter))] + [JsonPropertyName("waitMs")] + public TimeSpan? Wait { get; set; } +} + +/// Handle for releasing the extension tool registration. +[Experimental(Diagnostics.Experimental)] +internal sealed class RegisterExtensionToolsResult +{ + /// In-process unsubscribe function (CLI-only optimization). Marked internal: replaced by an explicit `extensions.unregister` RPC in the SDK migration. + [JsonInclude] + [JsonPropertyName("unsubscribe")] + internal JsonElement Unsubscribe { get; set; } +} + +/// Optional registration options. +[Experimental(Diagnostics.Experimental)] +public sealed class SessionsRegisterExtensionToolsOnSessionOptions +{ + /// In-process `() => boolean` gating callback (CLI-only optimization). Marked internal: replaced by runtime-side enable/disable RPCs in the SDK migration. + [JsonInclude] + [JsonPropertyName("enabled")] + internal JsonElement? Enabled { get; set; } +} + +/// Params to attach an extension loader's tools to a session. +[Experimental(Diagnostics.Experimental)] +internal sealed class RegisterExtensionToolsParams +{ + /// In-process ExtensionLoader handle (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, extension discovery/launch moves entirely into the runtime — the CLI passes pure config (search paths, disabled ids) via SessionOptions instead. + [JsonInclude] + [JsonPropertyName("loader")] + internal JsonElement Loader { get; set; } + + /// Optional registration options. + [JsonPropertyName("options")] + public SessionsRegisterExtensionToolsOnSessionOptions? Options { get; set; } + + /// Session to register extension tools on. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Params to attach or detach an in-process ExtensionController delegate. +[Experimental(Diagnostics.Experimental)] +internal sealed class ConfigureSessionExtensionsParams +{ + /// In-process ExtensionController delegate (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. The post-SDK extension surface exposes list/enable/disable/reload via dedicated RPCs served by the runtime. + [JsonInclude] + [JsonPropertyName("controller")] + internal JsonElement? Controller { get; set; } + + /// Session to attach the extension controller delegate to. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Outcome of an agentRegistry.spawn call. +/// Polymorphic base type discriminated by kind. +[Experimental(Diagnostics.Experimental)] +[JsonPolymorphic( + TypeDiscriminatorPropertyName = "kind", + UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] +[JsonDerivedType(typeof(AgentRegistrySpawnResultSpawned), "spawned")] +[JsonDerivedType(typeof(AgentRegistrySpawnResultSpawnError), "spawn-error")] +[JsonDerivedType(typeof(AgentRegistrySpawnResultRegistryTimeout), "registry-timeout")] +[JsonDerivedType(typeof(AgentRegistrySpawnResultValidationError), "validation-error")] +public partial class AgentRegistrySpawnResult +{ + /// The type discriminator. + [JsonPropertyName("kind")] + public virtual string Kind { get; set; } = string.Empty; +} + + +/// Full registry entry for the spawned child. Lets the controller call `handleLiveTargetSelected(entry)` directly without re-reading the registry (avoids a TOCTOU window). +[Experimental(Diagnostics.Experimental)] +public sealed class AgentRegistryLiveTargetEntry +{ + /// Kind of attention required when status === "attention". Meaningful only when status === "attention". + [JsonPropertyName("attentionKind")] + public AgentRegistryLiveTargetEntryAttentionKind? AttentionKind { get; set; } + + /// Git branch of the session (when known). + [JsonPropertyName("branch")] + public string? Branch { get; set; } + + /// Copilot CLI version that wrote the entry. + [JsonPropertyName("copilotVersion")] public string CopilotVersion { get; set; } = string.Empty; /// Working directory of the session (when known). @@ -1428,10 +2268,11 @@ internal sealed class SendRequest [JsonPropertyName("sessionId")] public string SessionId { get; set; } = string.Empty; - /// Optional provenance tag copied to the resulting user.message event. Supported values are `system`, `command-*`, and `schedule-*`. + /// Optional provenance tag copied to the resulting user.message event. Must match one of three forms: the literal `system`, `command-<command-id>` for messages originating from a command (e.g. slash command, Mission Control command), or `schedule-<numeric-id>` for messages originating from a scheduled job. + [RegularExpression("^(system|command-.*|schedule-\\d+)$")] [JsonInclude] [JsonPropertyName("source")] - internal JsonElement? Source { get; set; } + internal string? Source { get; set; } /// W3C Trace Context traceparent header for distributed tracing of this agent turn. [JsonPropertyName("traceparent")] @@ -1582,7 +2423,7 @@ public sealed class SessionSetCredentialsResult public bool Success { get; set; } } -/// The new auth credentials to install on the session. When omitted or `undefined`, the call is a no-op and the session's existing credentials are preserved. The runtime stores the value verbatim and uses it for outbound model/API requests; it does NOT re-validate or re-fetch the associated Copilot user response. Several variants carry secret material; treat this method's params as containing secrets at rest and in transit. +/// Initial authentication info for the session. /// Polymorphic base type discriminated by type. [Experimental(Diagnostics.Experimental)] [JsonPolymorphic( @@ -2379,7 +3220,7 @@ public sealed class ModelCapabilitiesOverrideSupports public bool? Vision { get; set; } } -/// Override individual model capabilities resolved by the runtime. +/// Initial model capability overrides. [Experimental(Diagnostics.Experimental)] public sealed class ModelCapabilitiesOverride { @@ -2604,6 +3445,45 @@ internal sealed class SessionPlanDeleteRequest public string SessionId { get; set; } = string.Empty; } +/// Schema for the `PlanSqlTodosRow` type. +[Experimental(Diagnostics.Experimental)] +public sealed class PlanSqlTodosRow +{ + /// Todo description. + [JsonPropertyName("description")] + public string? Description { get; set; } + + /// Todo identifier. + [JsonPropertyName("id")] + public string? Id { get; set; } + + /// Todo status. + [JsonPropertyName("status")] + public string? Status { get; set; } + + /// Todo title. + [JsonPropertyName("title")] + public string? Title { get; set; } +} + +/// Todo rows read from the session SQL database. Empty when no session database is available. +[Experimental(Diagnostics.Experimental)] +public sealed class PlanReadSqlTodosResult +{ + /// Rows from the session SQL todos table, ordered by creation time and id. + [JsonPropertyName("rows")] + public IList Rows { get => field ??= []; set; } +} + +/// Identifies the target session. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionPlanReadSqlTodosRequest +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// RPC data type for WorkspacesGetWorkspaceResultWorkspace operations. public sealed class WorkspacesGetWorkspaceResultWorkspace { @@ -3252,7 +4132,7 @@ public partial class TaskInfoAgent : TaskInfo [JsonPropertyName("model")] public string? Model { get; set; } - /// Prompt passed to the agent. + /// Most recent prompt delivered to the agent. Updated whenever the agent receives a follow-up message. [JsonPropertyName("prompt")] public required string Prompt { get; set; } @@ -3753,6 +4633,61 @@ internal sealed class SessionSkillsEnsureLoadedRequest public string SessionId { get; set; } = string.Empty; } +/// Recorded MCP server connection failure. +[Experimental(Diagnostics.Experimental)] +public sealed class McpServerFailureInfo +{ + /// Failure message produced when the MCP server connection failed. + [JsonPropertyName("message")] + public string Message { get; set; } = string.Empty; + + /// epoch-ms timestamp at which the failure was recorded. + [JsonPropertyName("timestamp")] + public long Timestamp { get; set; } +} + +/// Recorded MCP server pending-auth state. +[Experimental(Diagnostics.Experimental)] +public sealed class McpServerNeedsAuthInfo +{ + /// epoch-ms timestamp at which the server signalled it needs authentication. + [JsonPropertyName("timestamp")] + public long Timestamp { get; set; } +} + +/// Host-level state, omitted when no MCP host is initialized. +[Experimental(Diagnostics.Experimental)] +public sealed class McpHostState +{ + /// Names of currently-connected MCP clients. + [JsonPropertyName("clients")] + public IList Clients { get => field ??= []; set; } + + /// Configured servers that are explicitly disabled. + [JsonPropertyName("disabledServers")] + public IList DisabledServers { get => field ??= []; set; } + + /// Map of server name to recorded connection failure. + [JsonPropertyName("failedServers")] + public IDictionary FailedServers { get => field ??= new Dictionary(); set; } + + /// Configured servers filtered out by enterprise allowlist policy. + [JsonPropertyName("filteredServers")] + public IList FilteredServers { get => field ??= []; set; } + + /// Whether third-party MCP servers are policy-enabled for this session. + [JsonPropertyName("mcp3pEnabled")] + public bool Mcp3pEnabled { get; set; } + + /// Map of server name to recorded pending-auth state. + [JsonPropertyName("needsAuthServers")] + public IDictionary NeedsAuthServers { get => field ??= new Dictionary(); set; } + + /// Names of servers with in-flight connection attempts. + [JsonPropertyName("pendingConnections")] + public IList PendingConnections { get => field ??= []; set; } +} + /// Schema for the `McpServer` type. [Experimental(Diagnostics.Experimental)] public sealed class McpServer @@ -3777,10 +4712,14 @@ public sealed class McpServer public McpServerStatus Status { get; set; } } -/// MCP servers configured for the session, with their connection status. +/// MCP servers configured for the session, with their connection status and host-level state. [Experimental(Diagnostics.Experimental)] public sealed class McpServerList { + /// Host-level state, omitted when no MCP host is initialized. + [JsonPropertyName("host")] + public McpHostState? Host { get; set; } + /// Configured MCP servers. [JsonPropertyName("servers")] public IList Servers { get => field ??= []; set; } @@ -3795,6 +4734,44 @@ internal sealed class SessionMcpListRequest public string SessionId { get; set; } = string.Empty; } +/// Schema for the `McpTools` type. +[Experimental(Diagnostics.Experimental)] +public sealed class McpTools +{ + /// Tool description, when provided. + [JsonPropertyName("description")] + public string? Description { get; set; } + + /// Tool name. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; +} + +/// Tools exposed by the connected MCP server. Throws when the server is not connected. +[Experimental(Diagnostics.Experimental)] +public sealed class McpListToolsResult +{ + /// Tools exposed by the server. + [JsonPropertyName("tools")] + public IList Tools { get => field ??= []; set; } +} + +/// Server name whose tool list should be returned. +[Experimental(Diagnostics.Experimental)] +internal sealed class McpListToolsRequest +{ + /// Name of the connected MCP server whose tools to list. + [RegularExpression("^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$")] + [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")] + [MinLength(1)] + [JsonPropertyName("serverName")] + public string ServerName { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// Name of the MCP server to enable for the session. [Experimental(Diagnostics.Experimental)] internal sealed class McpEnableRequest @@ -3836,11 +4813,72 @@ internal sealed class SessionMcpReloadRequest public string SessionId { get; set; } = string.Empty; } -/// MCP CreateMessageResult payload (with optional 'tools' extension), present when action='success'. Treated as opaque at the schema layer; consumers should construct/consume it per the MCP CreateMessageResult shape. +/// Schema for the `McpAllowedServer` type. [Experimental(Diagnostics.Experimental)] -public sealed class McpExecuteSamplingResult +public sealed class McpAllowedServer { -} + /// Allowed server name. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// PII-free note explaining why the server was allowed. + [JsonPropertyName("redactedNote")] + public string? RedactedNote { get; set; } +} + +/// Schema for the `McpFilteredServer` type. +[Experimental(Diagnostics.Experimental)] +public sealed class McpFilteredServer +{ + /// Enterprise login associated with an allowlist policy. + [JsonPropertyName("enterpriseName")] + public string? EnterpriseName { get; set; } + + /// Filtered server name. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// Human-readable filter reason. + [JsonPropertyName("reason")] + public string Reason { get; set; } = string.Empty; + + /// PII-free filter reason. + [JsonPropertyName("redactedReason")] + public string? RedactedReason { get; set; } +} + +/// MCP server startup filtering result. +[Experimental(Diagnostics.Experimental)] +public sealed class McpStartServersResult +{ + /// Non-default servers allowed by policy. + [JsonPropertyName("allowedServers")] + public IList? AllowedServers { get; set; } + + /// Servers filtered out before startup. + [JsonPropertyName("filteredServers")] + public IList FilteredServers { get => field ??= []; set; } +} + +/// Opaque MCP reload configuration. +[Experimental(Diagnostics.Experimental)] +internal sealed class McpReloadWithConfigRequest +{ + /// Opaque runtime MCP reload configuration. Marked internal: an in-process runtime shape (reloadMcpServers throws over the wire). + [JsonInclude] + [JsonPropertyName("config")] + internal JsonElement Config { get; set; } + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// MCP CreateMessageResult payload (with optional 'tools' extension), present when action='success'. Treated as opaque at the schema layer; consumers should construct/consume it per the MCP CreateMessageResult shape. +[Experimental(Diagnostics.Experimental)] +public sealed class McpExecuteSamplingResult +{ +} /// Outcome of an MCP sampling execution: success result, failure error, or cancellation. [Experimental(Diagnostics.Experimental)] @@ -3952,6 +4990,165 @@ internal sealed class SessionMcpRemoveGitHubRequest public string SessionId { get; set; } = string.Empty; } +/// Result of configuring GitHub MCP. +[Experimental(Diagnostics.Experimental)] +public sealed class McpConfigureGitHubResult +{ + /// Whether GitHub MCP configuration changed. + [JsonPropertyName("changed")] + public bool Changed { get; set; } +} + +/// Opaque auth info used to configure GitHub MCP. +[Experimental(Diagnostics.Experimental)] +internal sealed class McpConfigureGitHubRequest +{ + /// Opaque runtime auth info for GitHub MCP configuration. Marked internal: an in-process runtime shape (configureGitHubMcp is a no-op over the wire). + [JsonInclude] + [JsonPropertyName("authInfo")] + internal JsonElement AuthInfo { get; set; } + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Server name and opaque configuration for an individual MCP server start. +[Experimental(Diagnostics.Experimental)] +internal sealed class McpStartServerRequest +{ + /// Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime shape supplied only by in-process CLI callers. + [JsonInclude] + [JsonPropertyName("config")] + internal JsonElement Config { get; set; } + + /// Name of the MCP server to start. + [JsonPropertyName("serverName")] + public string ServerName { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Server name and opaque configuration for an individual MCP server restart. +[Experimental(Diagnostics.Experimental)] +internal sealed class McpRestartServerRequest +{ + /// Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime shape supplied only by in-process CLI callers. + [JsonInclude] + [JsonPropertyName("config")] + internal JsonElement Config { get; set; } + + /// Name of the MCP server to restart. + [JsonPropertyName("serverName")] + public string ServerName { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Server name for an individual MCP server stop. +[Experimental(Diagnostics.Experimental)] +internal sealed class McpStopServerRequest +{ + /// Name of the MCP server to stop. + [JsonPropertyName("serverName")] + public string ServerName { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Registration parameters for an external MCP client. +[Experimental(Diagnostics.Experimental)] +internal sealed class McpRegisterExternalClientRequest +{ + /// In-process MCP Client instance. Marked internal: cannot be serialized across the JSON-RPC boundary. + [JsonInclude] + [JsonPropertyName("client")] + internal JsonElement Client { get; set; } + + /// In-process server config (MCPServerConfig) paired with the in-process client/transport. Marked internal alongside its companions. + [JsonInclude] + [JsonPropertyName("config")] + internal JsonElement Config { get; set; } + + /// Logical server name for the external client. + [JsonPropertyName("serverName")] + public string ServerName { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; + + /// In-process MCP Transport instance. Marked internal: cannot be serialized across the JSON-RPC boundary. + [JsonInclude] + [JsonPropertyName("transport")] + internal JsonElement Transport { get; set; } +} + +/// Server name identifying the external client to remove. +[Experimental(Diagnostics.Experimental)] +internal sealed class McpUnregisterExternalClientRequest +{ + /// Server name of the external client to unregister. + [JsonPropertyName("serverName")] + public string ServerName { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Whether the named MCP server is running. +[Experimental(Diagnostics.Experimental)] +public sealed class McpIsServerRunningResult +{ + /// True if the server has an active client and transport. + [JsonPropertyName("running")] + public bool Running { get; set; } +} + +/// Server name to check running status for. +[Experimental(Diagnostics.Experimental)] +internal sealed class McpIsServerRunningRequest +{ + /// Name of the MCP server to check. + [JsonPropertyName("serverName")] + public string ServerName { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Empty result after recording the MCP OAuth response. +[Experimental(Diagnostics.Experimental)] +public sealed class McpOauthRespondResult +{ +} + +/// MCP OAuth request id and optional provider response. +[Experimental(Diagnostics.Experimental)] +internal sealed class McpOauthRespondRequest +{ + /// In-process OAuthClientProvider instance, or omitted to deny. Marked internal: cannot be serialized across the JSON-RPC boundary. + [JsonInclude] + [JsonPropertyName("provider")] + internal JsonElement? Provider { get; set; } + + /// OAuth request identifier from mcp.oauth_required. + [JsonPropertyName("requestId")] + public string RequestId { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server. [Experimental(Diagnostics.Experimental)] public sealed class McpOauthLoginResult @@ -4311,6 +5508,52 @@ internal sealed class SessionPluginsListRequest public string SessionId { get; set; } = string.Empty; } +/// Optional flags controlling which side effects the reload performs. +[Experimental(Diagnostics.Experimental)] +public sealed class PluginsReloadRequest +{ + /// When true, skip repo-level hooks during the hook reload. Use before folder trust is confirmed; load them post-trust via `sessions.loadDeferredRepoHooks`. + [JsonPropertyName("deferRepoHooks")] + public bool? DeferRepoHooks { get; set; } + + /// Re-run custom-agent discovery after refreshing plugins. Defaults to true. + [JsonPropertyName("reloadCustomAgents")] + public bool? ReloadCustomAgents { get; set; } + + /// Re-load user, plugin, and (subject to `deferRepoHooks`) repo hooks. Defaults to true. Has no effect when the host has not registered a hook reloader (e.g. remote sessions). + [JsonPropertyName("reloadHooks")] + public bool? ReloadHooks { get; set; } + + /// Reload MCP server connections after refreshing plugins. Defaults to true. + [JsonPropertyName("reloadMcp")] + public bool? ReloadMcp { get; set; } +} + +/// Optional flags controlling which side effects the reload performs. +[Experimental(Diagnostics.Experimental)] +internal sealed class PluginsReloadRequestWithSession +{ + /// When true, skip repo-level hooks during the hook reload. Use before folder trust is confirmed; load them post-trust via `sessions.loadDeferredRepoHooks`. + [JsonPropertyName("deferRepoHooks")] + public bool? DeferRepoHooks { get; set; } + + /// Re-run custom-agent discovery after refreshing plugins. Defaults to true. + [JsonPropertyName("reloadCustomAgents")] + public bool? ReloadCustomAgents { get; set; } + + /// Re-load user, plugin, and (subject to `deferRepoHooks`) repo hooks. Defaults to true. Has no effect when the host has not registered a hook reloader (e.g. remote sessions). + [JsonPropertyName("reloadHooks")] + public bool? ReloadHooks { get; set; } + + /// Reload MCP server connections after refreshing plugins. Defaults to true. + [JsonPropertyName("reloadMcp")] + public bool? ReloadMcp { get; set; } + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// Indicates whether the session options patch was applied successfully. [Experimental(Diagnostics.Experimental)] public sealed class SessionUpdateOptionsResult @@ -4320,6 +5563,57 @@ public sealed class SessionUpdateOptionsResult public bool Success { get; set; } } +/// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. +[Experimental(Diagnostics.Experimental)] +public sealed class OptionsUpdateAdditionalContentExclusionPolicyRuleSource +{ + /// Gets or sets the name value. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// Gets or sets the type value. + [JsonPropertyName("type")] + public string Type { get; set; } = string.Empty; +} + +/// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRule` type. +[Experimental(Diagnostics.Experimental)] +public sealed class OptionsUpdateAdditionalContentExclusionPolicyRule +{ + /// Gets or sets the ifAnyMatch value. + [JsonPropertyName("ifAnyMatch")] + public IList? IfAnyMatch { get; set; } + + /// Gets or sets the ifNoneMatch value. + [JsonPropertyName("ifNoneMatch")] + public IList? IfNoneMatch { get; set; } + + /// Gets or sets the paths value. + [JsonPropertyName("paths")] + public IList Paths { get => field ??= []; set; } + + /// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. + [JsonPropertyName("source")] + public OptionsUpdateAdditionalContentExclusionPolicyRuleSource Source { get => field ??= new(); set; } +} + +/// Schema for the `OptionsUpdateAdditionalContentExclusionPolicy` type. +[Experimental(Diagnostics.Experimental)] +public sealed class OptionsUpdateAdditionalContentExclusionPolicy +{ + /// Gets or sets the last_updated_at value. + [JsonPropertyName("last_updated_at")] + public JsonElement LastUpdatedAt { get; set; } + + /// Gets or sets the rules value. + [JsonPropertyName("rules")] + public IList Rules { get => field ??= []; set; } + + /// Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. + [JsonPropertyName("scope")] + public OptionsUpdateAdditionalContentExclusionPolicyScope Scope { get; set; } +} + /// Schema for the `SessionInstalledPlugin` type. [Experimental(Diagnostics.Experimental)] public sealed class SessionInstalledPlugin @@ -4353,65 +5647,229 @@ public sealed class SessionInstalledPlugin public string? Version { get; set; } } -/// Patch of mutable session options to apply to the running session. +/// Azure-specific provider options. [Experimental(Diagnostics.Experimental)] -internal sealed class SessionUpdateOptionsParams +public sealed class ProviderConfigAzure { - /// Additional content-exclusion policies to merge into the session's policy set. Opaque shape; see `ContentExclusionApiResponse` in the runtime. - [Experimental(Diagnostics.Experimental)] - [JsonPropertyName("additionalContentExclusionPolicies")] - public IList? AdditionalContentExclusionPolicies { get; set; } + /// API version. When set, uses the versioned deployment route. When omitted, uses the GA versionless v1 route. + [JsonPropertyName("apiVersion")] + public string? ApiVersion { get; set; } +} - /// Runtime context discriminator (e.g., `cli`, `actions`). - [JsonPropertyName("agentContext")] - public string? AgentContext { get; set; } +/// Custom model-provider configuration (BYOK). +[Experimental(Diagnostics.Experimental)] +public sealed class ProviderConfig +{ + /// API key. Optional for local providers like Ollama. + [JsonPropertyName("apiKey")] + public string? ApiKey { get; set; } - /// Whether to disable the `ask_user` tool (encourages autonomous behavior). - [JsonPropertyName("askUserDisabled")] - public bool? AskUserDisabled { get; set; } + /// Azure-specific provider options. + [JsonPropertyName("azure")] + public ProviderConfigAzure? Azure { get; set; } - /// Allowlist of tool names available to this session. - [JsonPropertyName("availableTools")] - public IList? AvailableTools { get; set; } + /// API endpoint URL. + [JsonPropertyName("baseUrl")] + public string BaseUrl { get; set; } = string.Empty; - /// Identifier of the client driving the session. - [JsonPropertyName("clientName")] - public string? ClientName { get; set; } + /// Bearer token for authentication. Sets the Authorization header directly. Takes precedence over apiKey when both are set. + [JsonPropertyName("bearerToken")] + public string? BearerToken { get; set; } - /// Whether to include the `Co-authored-by` trailer in commit messages. - [JsonPropertyName("coauthorEnabled")] - public bool? CoauthorEnabled { get; set; } + /// Custom HTTP headers to include in all outbound requests to the provider. + [JsonPropertyName("headers")] + public IDictionary? Headers { get; set; } - /// Whether to allow auto-mode continuation across turns. - [JsonPropertyName("continueOnAutoMode")] - public bool? ContinueOnAutoMode { get; set; } + /// Maximum context window tokens for the model. + [JsonPropertyName("maxContextWindowTokens")] + public double? MaxContextWindowTokens { get; set; } - /// Override URL for the Copilot API endpoint. - [JsonPropertyName("copilotUrl")] - public string? CopilotUrl { get; set; } + /// Maximum output tokens for the model. + [JsonPropertyName("maxOutputTokens")] + public double? MaxOutputTokens { get; set; } - /// Whether to default custom agents to local-only execution. - [JsonPropertyName("customAgentsLocalOnly")] - public bool? CustomAgentsLocalOnly { get; set; } + /// Maximum prompt/input tokens for the model. + [JsonPropertyName("maxPromptTokens")] + public double? MaxPromptTokens { get; set; } - /// Instruction source IDs to exclude from the system prompt. - [JsonPropertyName("disabledInstructionSources")] - public IList? DisabledInstructionSources { get; set; } + /// Well-known model ID used for capability lookup. When set, agent behavior config and token limits are inferred from this model. + [JsonPropertyName("modelId")] + public string? ModelId { get; set; } - /// Skill IDs that should be excluded from this session. - [JsonPropertyName("disabledSkills")] - public IList? DisabledSkills { get; set; } + /// Provider type. Defaults to "openai" for generic OpenAI-compatible APIs. + [JsonPropertyName("type")] + public ProviderConfigType? Type { get; set; } - /// Whether to enable loading of `.github/hooks/` filesystem hooks. Separate from the SDK callback hook mechanism. - [JsonPropertyName("enableFileHooks")] - public bool? EnableFileHooks { get; set; } + /// Wire API format (openai/azure only). Defaults to "completions". + [JsonPropertyName("wireApi")] + public ProviderConfigWireApi? WireApi { get; set; } - /// Whether to enable host git operations (context resolution, child repo scanning, git info in system prompt). - [JsonPropertyName("enableHostGitOperations")] - public bool? EnableHostGitOperations { get; set; } + /// The model identifier sent to the provider API for inference (the "wire" model), as opposed to modelId which is the well-known base. + [JsonPropertyName("wireModel")] + public string? WireModel { get; set; } +} - /// Whether to discover custom instructions on demand after successful file views (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md surfacing). Combined with `skipCustomInstructions` and the runtime-side `ON_DEMAND_INSTRUCTIONS` feature flag. - [JsonPropertyName("enableOnDemandInstructionDiscovery")] +/// macOS seatbelt experimental options. +[Experimental(Diagnostics.Experimental)] +public sealed class SandboxConfigUserPolicyExperimentalSeatbelt +{ + /// Whether the macOS seatbelt profile may access the keychain. + [JsonPropertyName("keychainAccess")] + public bool? KeychainAccess { get; set; } +} + +/// Platform-specific experimental policy fields. +[Experimental(Diagnostics.Experimental)] +public sealed class SandboxConfigUserPolicyExperimental +{ + /// macOS seatbelt experimental options. + [JsonPropertyName("seatbelt")] + public SandboxConfigUserPolicyExperimentalSeatbelt? Seatbelt { get; set; } +} + +/// Filesystem rules to merge into the base policy. +[Experimental(Diagnostics.Experimental)] +public sealed class SandboxConfigUserPolicyFilesystem +{ + /// Whether to clear the policy when the session exits. + [JsonPropertyName("clearPolicyOnExit")] + public bool? ClearPolicyOnExit { get; set; } + + /// Paths explicitly denied. + [JsonPropertyName("deniedPaths")] + public IList? DeniedPaths { get; set; } + + /// Paths granted read-only access. + [JsonPropertyName("readonlyPaths")] + public IList? ReadonlyPaths { get; set; } + + /// Paths granted read/write access. + [JsonPropertyName("readwritePaths")] + public IList? ReadwritePaths { get; set; } +} + +/// Network rules to merge into the base policy. +[Experimental(Diagnostics.Experimental)] +public sealed class SandboxConfigUserPolicyNetwork +{ + /// Hosts allowed in addition to the base policy. + [JsonPropertyName("allowedHosts")] + public IList? AllowedHosts { get; set; } + + /// Whether traffic to local/loopback addresses is allowed. + [JsonPropertyName("allowLocalNetwork")] + public bool? AllowLocalNetwork { get; set; } + + /// Whether outbound network traffic is allowed at all. + [JsonPropertyName("allowOutbound")] + public bool? AllowOutbound { get; set; } + + /// Hosts explicitly blocked. + [JsonPropertyName("blockedHosts")] + public IList? BlockedHosts { get; set; } +} + +/// User-managed sandbox policy fragment merged into the auto-discovered base policy. +[Experimental(Diagnostics.Experimental)] +public sealed class SandboxConfigUserPolicy +{ + /// Platform-specific experimental policy fields. + [JsonPropertyName("experimental")] + public SandboxConfigUserPolicyExperimental? Experimental { get; set; } + + /// Filesystem rules to merge into the base policy. + [JsonPropertyName("filesystem")] + public SandboxConfigUserPolicyFilesystem? Filesystem { get; set; } + + /// Network rules to merge into the base policy. + [JsonPropertyName("network")] + public SandboxConfigUserPolicyNetwork? Network { get; set; } +} + +/// Resolved sandbox configuration. +[Experimental(Diagnostics.Experimental)] +public sealed class SandboxConfig +{ + /// Whether to auto-add the current working directory to readwritePaths. Default: true. + [JsonPropertyName("addCurrentWorkingDirectory")] + public bool? AddCurrentWorkingDirectory { get; set; } + + /// Raw `ContainerConfig` (per `@microsoft/mxc-sdk`) passed directly to `spawnSandboxFromConfig`, bypassing policy merging. + [JsonPropertyName("config")] + public JsonElement? Config { get; set; } + + /// Whether sandboxing is enabled for the session. + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } + + /// User-managed sandbox policy fragment merged into the auto-discovered base policy. + [JsonPropertyName("userPolicy")] + public SandboxConfigUserPolicy? UserPolicy { get; set; } +} + +/// Patch of mutable session options to apply to the running session. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionUpdateOptionsParams +{ + /// Additional content-exclusion policies to merge into the session's policy set. + [Experimental(Diagnostics.Experimental)] + [JsonPropertyName("additionalContentExclusionPolicies")] + public IList? AdditionalContentExclusionPolicies { get; set; } + + /// Runtime context discriminator (e.g., `cli`, `actions`). + [JsonPropertyName("agentContext")] + public string? AgentContext { get; set; } + + /// Whether to disable the `ask_user` tool (encourages autonomous behavior). + [JsonPropertyName("askUserDisabled")] + public bool? AskUserDisabled { get; set; } + + /// Allowlist of tool names available to this session. + [JsonPropertyName("availableTools")] + public IList? AvailableTools { get; set; } + + /// Identifier of the client driving the session. + [JsonPropertyName("clientName")] + public string? ClientName { get; set; } + + /// Whether to include the `Co-authored-by` trailer in commit messages. + [JsonPropertyName("coauthorEnabled")] + public bool? CoauthorEnabled { get; set; } + + /// Context tier for models with tiered pricing. The session uses this to derive effective `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits honor the selected tier. + [JsonPropertyName("contextTier")] + public OptionsUpdateContextTier? ContextTier { get; set; } + + /// Whether to allow auto-mode continuation across turns. + [JsonPropertyName("continueOnAutoMode")] + public bool? ContinueOnAutoMode { get; set; } + + /// Override URL for the Copilot API endpoint. + [JsonPropertyName("copilotUrl")] + public string? CopilotUrl { get; set; } + + /// Whether to default custom agents to local-only execution. + [JsonPropertyName("customAgentsLocalOnly")] + public bool? CustomAgentsLocalOnly { get; set; } + + /// Instruction source IDs to exclude from the system prompt. + [JsonPropertyName("disabledInstructionSources")] + public IList? DisabledInstructionSources { get; set; } + + /// Skill IDs that should be excluded from this session. + [JsonPropertyName("disabledSkills")] + public IList? DisabledSkills { get; set; } + + /// Whether to enable loading of `.github/hooks/` filesystem hooks. Separate from the SDK callback hook mechanism. + [JsonPropertyName("enableFileHooks")] + public bool? EnableFileHooks { get; set; } + + /// Whether to enable host git operations (context resolution, child repo scanning, git info in system prompt). + [JsonPropertyName("enableHostGitOperations")] + public bool? EnableHostGitOperations { get; set; } + + /// Whether to discover custom instructions on demand after successful file views (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md surfacing). Combined with `skipCustomInstructions` and the runtime-side `ON_DEMAND_INSTRUCTIONS` feature flag. + [JsonPropertyName("enableOnDemandInstructionDiscovery")] public bool? EnableOnDemandInstructionDiscovery { get; set; } /// Whether to surface reasoning-summary events from the model. @@ -4478,27 +5936,37 @@ internal sealed class SessionUpdateOptionsParams [JsonPropertyName("model")] public string? Model { get; set; } + /// Per-property model capability overrides for the selected model. + [JsonPropertyName("modelCapabilitiesOverrides")] + public ModelCapabilitiesOverride? ModelCapabilitiesOverrides { get; set; } + /// Organization-level custom instructions to inject into the system prompt. [JsonPropertyName("organizationCustomInstructions")] public string? OrganizationCustomInstructions { get; set; } - /// Custom model-provider configuration (BYOK). Opaque shape; see `ProviderConfig` in the runtime. - [Experimental(Diagnostics.Experimental)] + /// Custom model-provider configuration (BYOK). [JsonPropertyName("provider")] - public JsonElement? Provider { get; set; } + public ProviderConfig? Provider { get; set; } /// Reasoning effort for the selected model (model-defined enum). [JsonPropertyName("reasoningEffort")] public string? ReasoningEffort { get; set; } + /// Reasoning summary mode for supported model clients. + [JsonPropertyName("reasoningSummary")] + public OptionsUpdateReasoningSummary? ReasoningSummary { get; set; } + /// Whether the session is running in an interactive UI. [JsonPropertyName("runningInInteractiveMode")] public bool? RunningInInteractiveMode { get; set; } - /// Sandbox configuration shape; opaque to SDK consumers. See `SandboxConfig` in the runtime. - [Experimental(Diagnostics.Experimental)] + /// Resolved sandbox configuration. [JsonPropertyName("sandboxConfig")] - public JsonElement? SandboxConfig { get; set; } + public SandboxConfig? SandboxConfig { get; set; } + + /// Replaces the session's capability set with the given list. Use to enable or disable capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the field to leave the existing capability set unchanged. + [JsonPropertyName("sessionCapabilities")] + public IList? SessionCapabilities { get; set; } /// Target session identifier. [JsonPropertyName("sessionId")] @@ -5338,6 +6806,24 @@ internal sealed class CommandsRespondToQueuedCommandRequest public string SessionId { get; set; } = string.Empty; } +/// Telemetry engagement ID for the session, when available. +[Experimental(Diagnostics.Experimental)] +public sealed class SessionTelemetryEngagement +{ + /// Current telemetry engagement ID, when available. + [JsonPropertyName("engagementId")] + public string? EngagementId { get; set; } +} + +/// Identifies the target session. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionTelemetryGetEngagementIdRequest +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// Feature override key/value pairs to attach to subsequent telemetry events from this session. [Experimental(Diagnostics.Experimental)] internal sealed class TelemetrySetFeatureOverridesRequest @@ -5351,6 +6837,38 @@ internal sealed class TelemetrySetFeatureOverridesRequest public string SessionId { get; set; } = string.Empty; } +/// Transient answer generated from current conversation context. +[Experimental(Diagnostics.Experimental)] +public sealed class UIEphemeralQueryResult +{ + /// Full assistant response text. + [JsonPropertyName("answer")] + public string Answer { get; set; } = string.Empty; +} + +/// Transient question to answer without adding it to conversation history. +[Experimental(Diagnostics.Experimental)] +internal sealed class UIEphemeralQueryRequest +{ + /// In-process `AbortSignal` forwarded to the model client to cancel an in-flight request. Marked internal: excluded from the public SDK surface. Replaced by an explicit cancellation token + cancel RPC in the SDK migration. + [JsonInclude] + [JsonPropertyName("abortSignal")] + internal JsonElement? AbortSignal { get; set; } + + /// In-process streaming callback `(text) => void` invoked with each token as the model emits it. Marked internal: excluded from the public SDK surface. In a process-separated SDK this is replaced by a streaming RPC that yields chunks and a final answer. + [JsonInclude] + [JsonPropertyName("onChunk")] + internal JsonElement? OnChunk { get; set; } + + /// Question to answer from the current conversation context. + [JsonPropertyName("question")] + public string Question { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// The elicitation response (accept with form values, decline, or cancel). [Experimental(Diagnostics.Experimental)] public sealed class UIElicitationResponse @@ -6977,6 +8495,10 @@ public sealed class SessionMetadataSnapshotWorkspace /// ISO 8601 timestamp when the workspace was last updated. [JsonPropertyName("updated_at")] public DateTimeOffset? UpdatedAt { get; set; } + + /// Whether the display name was explicitly set by the user. + [JsonPropertyName("user_named")] + public bool? UserNamed { get; set; } } /// Point-in-time snapshot of slow-changing session identifier and state fields. @@ -7067,6 +8589,28 @@ internal sealed class SessionMetadataIsProcessingRequest public string SessionId { get; set; } = string.Empty; } +/// Current activity flags for the session. +[Experimental(Diagnostics.Experimental)] +public sealed class SessionActivity +{ + /// Whether an in-flight operation can currently be aborted. + [JsonPropertyName("abortable")] + public bool Abortable { get; set; } + + /// Whether the session currently has active work, including running turns or tasks. + [JsonPropertyName("hasActiveWork")] + public bool HasActiveWork { get; set; } +} + +/// Identifies the target session. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionMetadataActivityRequest +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// Token-usage breakdown for the session's current context window. public sealed class MetadataContextInfoResultContextInfo { @@ -7082,7 +8626,7 @@ public sealed class MetadataContextInfoResultContextInfo [JsonPropertyName("conversationTokens")] public long ConversationTokens { get; set; } - /// Total context limit for /context display: promptTokenLimit + outputTokenLimit (the model's full max_output_tokens reserved on top of the prompt budget). + /// Prompt token limit plus the model's full output token limit. [JsonPropertyName("limit")] public long Limit { get; set; } @@ -7306,6 +8850,70 @@ internal sealed class ShellKillRequest public ShellKillSignal? Signal { get; set; } } +/// Result of a user-requested shell command. +[Experimental(Diagnostics.Experimental)] +public sealed class UserRequestedShellCommandResult +{ + /// Error output when the execution failed. + [JsonPropertyName("error")] + public string? Error { get; set; } + + /// Process exit code, when available. + [JsonPropertyName("exitCode")] + public long? ExitCode { get; set; } + + /// Captured command output. + [JsonPropertyName("output")] + public string Output { get; set; } = string.Empty; + + /// Whether the command completed successfully. + [JsonPropertyName("success")] + public bool Success { get; set; } + + /// Tool call id emitted for the shell execution. + [JsonPropertyName("toolCallId")] + public string ToolCallId { get; set; } = string.Empty; +} + +/// User-requested shell command and cancellation handle. +[Experimental(Diagnostics.Experimental)] +internal sealed class ShellExecuteUserRequestedRequest +{ + /// Shell command to execute. + [JsonPropertyName("command")] + public string Command { get; set; } = string.Empty; + + /// Caller-provided cancellation handle for this execution. + [JsonPropertyName("requestId")] + public string RequestId { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Cancellation result for a user-requested shell command. +[Experimental(Diagnostics.Experimental)] +public sealed class CancelUserRequestedShellCommandResult +{ + /// Whether an in-flight execution was found and signalled to cancel. + [JsonPropertyName("cancelled")] + public bool Cancelled { get; set; } +} + +/// User-requested shell execution cancellation handle. +[Experimental(Diagnostics.Experimental)] +internal sealed class ShellCancelUserRequestedRequest +{ + /// Request ID previously passed to executeUserRequested. + [JsonPropertyName("requestId")] + public string RequestId { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// Post-compaction context window usage breakdown. [Experimental(Diagnostics.Experimental)] public sealed class HistoryCompactContextWindow @@ -8381,45 +9989,773 @@ public sealed class CanvasProviderInvokeActionRequest public string SessionId { get; set; } = string.Empty; } -/// Model capability category for grouping in the model picker. +/// Model capability category for grouping in the model picker. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct ModelPickerCategory : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public ModelPickerCategory(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Lightweight model category optimized for faster, lower-cost interactions. + public static ModelPickerCategory Lightweight { get; } = new("lightweight"); + + /// Versatile model category suitable for a broad range of tasks. + public static ModelPickerCategory Versatile { get; } = new("versatile"); + + /// Powerful model category optimized for complex tasks. + public static ModelPickerCategory Powerful { get; } = new("powerful"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(ModelPickerCategory left, ModelPickerCategory right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(ModelPickerCategory left, ModelPickerCategory right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is ModelPickerCategory other && Equals(other); + + /// + public bool Equals(ModelPickerCategory 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 ModelPickerCategory Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, ModelPickerCategory value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelPickerCategory)); + } + } +} + + +/// Relative cost tier for token-based billing users. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct ModelPickerPriceCategory : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public ModelPickerPriceCategory(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Lowest relative token cost tier. + public static ModelPickerPriceCategory Low { get; } = new("low"); + + /// Medium relative token cost tier. + public static ModelPickerPriceCategory Medium { get; } = new("medium"); + + /// High relative token cost tier. + public static ModelPickerPriceCategory High { get; } = new("high"); + + /// Highest relative token cost tier. + public static ModelPickerPriceCategory VeryHigh { get; } = new("very_high"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(ModelPickerPriceCategory left, ModelPickerPriceCategory right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(ModelPickerPriceCategory left, ModelPickerPriceCategory right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is ModelPickerPriceCategory other && Equals(other); + + /// + public bool Equals(ModelPickerPriceCategory 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 ModelPickerPriceCategory Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, ModelPickerPriceCategory value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelPickerPriceCategory)); + } + } +} + + +/// Current policy state for this model. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct ModelPolicyState : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public ModelPolicyState(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The model is enabled by policy. + public static ModelPolicyState Enabled { get; } = new("enabled"); + + /// The model is disabled by policy. + public static ModelPolicyState Disabled { get; } = new("disabled"); + + /// No explicit policy is configured for the model. + public static ModelPolicyState Unconfigured { get; } = new("unconfigured"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(ModelPolicyState left, ModelPolicyState right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(ModelPolicyState left, ModelPolicyState right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is ModelPolicyState other && Equals(other); + + /// + public bool Equals(ModelPolicyState 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 ModelPolicyState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, ModelPolicyState value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelPolicyState)); + } + } +} + + +/// Server transport type: stdio, http, sse (deprecated), or memory. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct DiscoveredMcpServerType : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public DiscoveredMcpServerType(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Server communicates over stdio with a local child process. + public static DiscoveredMcpServerType Stdio { get; } = new("stdio"); + + /// Server communicates over streamable HTTP. + public static DiscoveredMcpServerType Http { get; } = new("http"); + + /// Server communicates over Server-Sent Events (deprecated). + public static DiscoveredMcpServerType Sse { get; } = new("sse"); + + /// Server is backed by an in-memory runtime implementation. + public static DiscoveredMcpServerType Memory { get; } = new("memory"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(DiscoveredMcpServerType left, DiscoveredMcpServerType right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(DiscoveredMcpServerType left, DiscoveredMcpServerType right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is DiscoveredMcpServerType other && Equals(other); + + /// + public bool Equals(DiscoveredMcpServerType 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 DiscoveredMcpServerType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, DiscoveredMcpServerType value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DiscoveredMcpServerType)); + } + } +} + + +/// Path conventions used by this filesystem. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct SessionFsSetProviderConventions : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public SessionFsSetProviderConventions(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Paths use Windows path conventions. + public static SessionFsSetProviderConventions Windows { get; } = new("windows"); + + /// Paths use POSIX path conventions. + public static SessionFsSetProviderConventions Posix { get; } = new("posix"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SessionFsSetProviderConventions left, SessionFsSetProviderConventions right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SessionFsSetProviderConventions left, SessionFsSetProviderConventions right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is SessionFsSetProviderConventions other && Equals(other); + + /// + public bool Equals(SessionFsSetProviderConventions 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 SessionFsSetProviderConventions Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, SessionFsSetProviderConventions value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionFsSetProviderConventions)); + } + } +} + + +/// Repository host type. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct SessionContextHostType : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public SessionContextHostType(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Session repository is hosted on GitHub. + public static SessionContextHostType GitHub { get; } = new("github"); + + /// Session repository is hosted on Azure DevOps. + public static SessionContextHostType Ado { get; } = new("ado"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SessionContextHostType left, SessionContextHostType right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SessionContextHostType left, SessionContextHostType right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is SessionContextHostType other && Equals(other); + + /// + public bool Equals(SessionContextHostType 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 SessionContextHostType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, SessionContextHostType value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionContextHostType)); + } + } +} + + +/// Whether the remote task originated from CCA or CLI `--remote`. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct RemoteSessionMetadataTaskType : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public RemoteSessionMetadataTaskType(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// GitHub Copilot coding agent task. + public static RemoteSessionMetadataTaskType Cca { get; } = new("cca"); + + /// CLI remote task. + public static RemoteSessionMetadataTaskType Cli { get; } = new("cli"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(RemoteSessionMetadataTaskType left, RemoteSessionMetadataTaskType right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(RemoteSessionMetadataTaskType left, RemoteSessionMetadataTaskType right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is RemoteSessionMetadataTaskType other && Equals(other); + + /// + public bool Equals(RemoteSessionMetadataTaskType 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 RemoteSessionMetadataTaskType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, RemoteSessionMetadataTaskType value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(RemoteSessionMetadataTaskType)); + } + } +} + + +/// Step status. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct SessionsOpenProgressStatus : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public SessionsOpenProgressStatus(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The step has started and has not yet finished. + public static SessionsOpenProgressStatus InProgress { get; } = new("in-progress"); + + /// The step has completed successfully. + public static SessionsOpenProgressStatus Complete { get; } = new("complete"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SessionsOpenProgressStatus left, SessionsOpenProgressStatus right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SessionsOpenProgressStatus left, SessionsOpenProgressStatus right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is SessionsOpenProgressStatus other && Equals(other); + + /// + public bool Equals(SessionsOpenProgressStatus 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 SessionsOpenProgressStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, SessionsOpenProgressStatus value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionsOpenProgressStatus)); + } + } +} + + +/// Handoff step. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct SessionsOpenProgressStep : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public SessionsOpenProgressStep(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Loading the source session's events from the remote service. + public static SessionsOpenProgressStep LoadSession { get; } = new("load-session"); + + /// Validating that the local repository matches the remote session's repository. + public static SessionsOpenProgressStep ValidateRepo { get; } = new("validate-repo"); + + /// Checking the local working tree for uncommitted changes that would block the handoff. + public static SessionsOpenProgressStep CheckChanges { get; } = new("check-changes"); + + /// Checking out the branch associated with the remote session in the local working tree. + public static SessionsOpenProgressStep CheckoutBranch { get; } = new("checkout-branch"); + + /// Creating the new local session and seeding it with the source session's events. + public static SessionsOpenProgressStep CreateSession { get; } = new("create-session"); + + /// Persisting the newly-created local session to disk. + public static SessionsOpenProgressStep SaveSession { get; } = new("save-session"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SessionsOpenProgressStep left, SessionsOpenProgressStep right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SessionsOpenProgressStep left, SessionsOpenProgressStep right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is SessionsOpenProgressStep other && Equals(other); + + /// + public bool Equals(SessionsOpenProgressStep 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 SessionsOpenProgressStep Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, SessionsOpenProgressStep value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionsOpenProgressStep)); + } + } +} + + +/// Outcome of the open request. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct SessionsOpenStatus : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public SessionsOpenStatus(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// A new session was created. + public static SessionsOpenStatus Created { get; } = new("created"); + + /// An existing session was loaded or reattached. + public static SessionsOpenStatus Resumed { get; } = new("resumed"); + + /// No matching persisted session was found. + public static SessionsOpenStatus NotFound { get; } = new("not_found"); + + /// Connected to an existing remote session. + public static SessionsOpenStatus Connected { get; } = new("connected"); + + /// Remote session was handed off to a new local session. + public static SessionsOpenStatus HandedOff { get; } = new("handed_off"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SessionsOpenStatus left, SessionsOpenStatus right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SessionsOpenStatus left, SessionsOpenStatus right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is SessionsOpenStatus other && Equals(other); + + /// + public bool Equals(SessionsOpenStatus 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 SessionsOpenStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, SessionsOpenStatus value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionsOpenStatus)); + } + } +} + + +/// Neutral SDK discriminator for the connected remote session kind. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct ConnectedRemoteSessionMetadataKind : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public ConnectedRemoteSessionMetadataKind(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Remote CLI session. + public static ConnectedRemoteSessionMetadataKind RemoteSession { get; } = new("remote-session"); + + /// GitHub Copilot coding agent session. + public static ConnectedRemoteSessionMetadataKind CodingAgent { get; } = new("coding-agent"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(ConnectedRemoteSessionMetadataKind left, ConnectedRemoteSessionMetadataKind right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(ConnectedRemoteSessionMetadataKind left, ConnectedRemoteSessionMetadataKind right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is ConnectedRemoteSessionMetadataKind other && Equals(other); + + /// + public bool Equals(ConnectedRemoteSessionMetadataKind 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 ConnectedRemoteSessionMetadataKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, ConnectedRemoteSessionMetadataKind value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ConnectedRemoteSessionMetadataKind)); + } + } +} + + +/// Which session sources to include. Defaults to `local` for backward compatibility. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct ModelPickerCategory : IEquatable +public readonly struct SessionSource : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public ModelPickerCategory(string value) + public SessionSource(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Lightweight model category optimized for faster, lower-cost interactions. - public static ModelPickerCategory Lightweight { get; } = new("lightweight"); + /// Return only local sessions. + public static SessionSource Local { get; } = new("local"); - /// Versatile model category suitable for a broad range of tasks. - public static ModelPickerCategory Versatile { get; } = new("versatile"); + /// Return only remote sessions. + public static SessionSource Remote { get; } = new("remote"); - /// Powerful model category optimized for complex tasks. - public static ModelPickerCategory Powerful { get; } = new("powerful"); + /// Return both local and remote sessions. + public static SessionSource All { get; } = new("all"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(ModelPickerCategory left, ModelPickerCategory right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SessionSource left, SessionSource right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(ModelPickerCategory left, ModelPickerCategory right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SessionSource left, SessionSource right) => !(left == right); /// - public override bool Equals(object? obj) => obj is ModelPickerCategory other && Equals(other); + public override bool Equals(object? obj) => obj is SessionSource other && Equals(other); /// - public bool Equals(ModelPickerCategory other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(SessionSource other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -8427,67 +10763,71 @@ public ModelPickerCategory(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override ModelPickerCategory Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override SessionSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, ModelPickerCategory value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, SessionSource value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelPickerCategory)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionSource)); } } } -/// Relative cost tier for token-based billing users. +/// Kind of attention required when status === "attention". Meaningful only when status === "attention". +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct ModelPickerPriceCategory : IEquatable +public readonly struct AgentRegistryLiveTargetEntryAttentionKind : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public ModelPickerPriceCategory(string value) + public AgentRegistryLiveTargetEntryAttentionKind(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Lowest relative token cost tier. - public static ModelPickerPriceCategory Low { get; } = new("low"); + /// Session is blocked on an unrecoverable error. + public static AgentRegistryLiveTargetEntryAttentionKind Error { get; } = new("error"); - /// Medium relative token cost tier. - public static ModelPickerPriceCategory Medium { get; } = new("medium"); + /// Session is waiting for a tool-permission decision. + public static AgentRegistryLiveTargetEntryAttentionKind Permission { get; } = new("permission"); - /// High relative token cost tier. - public static ModelPickerPriceCategory High { get; } = new("high"); + /// Session is waiting for the user to approve or reject a plan. + public static AgentRegistryLiveTargetEntryAttentionKind ExitPlan { get; } = new("exit_plan"); - /// Highest relative token cost tier. - public static ModelPickerPriceCategory VeryHigh { get; } = new("very_high"); + /// Session is waiting on an elicitation prompt. + public static AgentRegistryLiveTargetEntryAttentionKind Elicitation { get; } = new("elicitation"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(ModelPickerPriceCategory left, ModelPickerPriceCategory right) => left.Equals(right); + /// Session is waiting for free-form user input. + public static AgentRegistryLiveTargetEntryAttentionKind UserInput { get; } = new("user_input"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(ModelPickerPriceCategory left, ModelPickerPriceCategory right) => !(left == right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AgentRegistryLiveTargetEntryAttentionKind left, AgentRegistryLiveTargetEntryAttentionKind right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AgentRegistryLiveTargetEntryAttentionKind left, AgentRegistryLiveTargetEntryAttentionKind right) => !(left == right); /// - public override bool Equals(object? obj) => obj is ModelPickerPriceCategory other && Equals(other); + public override bool Equals(object? obj) => obj is AgentRegistryLiveTargetEntryAttentionKind other && Equals(other); /// - public bool Equals(ModelPickerPriceCategory other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(AgentRegistryLiveTargetEntryAttentionKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -8495,64 +10835,62 @@ public ModelPickerPriceCategory(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override ModelPickerPriceCategory Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override AgentRegistryLiveTargetEntryAttentionKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, ModelPickerPriceCategory value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, AgentRegistryLiveTargetEntryAttentionKind value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelPickerPriceCategory)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistryLiveTargetEntryAttentionKind)); } } } -/// Current policy state for this model. +/// Process kind tag for the registry entry. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct ModelPolicyState : IEquatable +public readonly struct AgentRegistryLiveTargetEntryKind : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public ModelPolicyState(string value) + public AgentRegistryLiveTargetEntryKind(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// The model is enabled by policy. - public static ModelPolicyState Enabled { get; } = new("enabled"); - - /// The model is disabled by policy. - public static ModelPolicyState Disabled { get; } = new("disabled"); + /// Interactive Copilot CLI exposing a UI server (legacy/normal CLI process). + public static AgentRegistryLiveTargetEntryKind UiServer { get; } = new("ui-server"); - /// No explicit policy is configured for the model. - public static ModelPolicyState Unconfigured { get; } = new("unconfigured"); + /// Headless `--server --managed-server` child spawned by a controller. + public static AgentRegistryLiveTargetEntryKind ManagedServer { get; } = new("managed-server"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(ModelPolicyState left, ModelPolicyState right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AgentRegistryLiveTargetEntryKind left, AgentRegistryLiveTargetEntryKind right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(ModelPolicyState left, ModelPolicyState right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AgentRegistryLiveTargetEntryKind left, AgentRegistryLiveTargetEntryKind right) => !(left == right); /// - public override bool Equals(object? obj) => obj is ModelPolicyState other && Equals(other); + public override bool Equals(object? obj) => obj is AgentRegistryLiveTargetEntryKind other && Equals(other); /// - public bool Equals(ModelPolicyState other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(AgentRegistryLiveTargetEntryKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -8560,67 +10898,62 @@ public ModelPolicyState(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override ModelPolicyState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override AgentRegistryLiveTargetEntryKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, ModelPolicyState value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, AgentRegistryLiveTargetEntryKind value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelPolicyState)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistryLiveTargetEntryKind)); } } } -/// Server transport type: stdio, http, sse (deprecated), or memory. +/// How the most recent turn ended (clean vs aborted). Lets the renderer distinguish done from done_cancelled. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct DiscoveredMcpServerType : IEquatable +public readonly struct AgentRegistryLiveTargetEntryLastTerminalEvent : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public DiscoveredMcpServerType(string value) + public AgentRegistryLiveTargetEntryLastTerminalEvent(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Server communicates over stdio with a local child process. - public static DiscoveredMcpServerType Stdio { get; } = new("stdio"); - - /// Server communicates over streamable HTTP. - public static DiscoveredMcpServerType Http { get; } = new("http"); - - /// Server communicates over Server-Sent Events (deprecated). - public static DiscoveredMcpServerType Sse { get; } = new("sse"); + /// Last turn ended cleanly (model returned a final assistant message). + public static AgentRegistryLiveTargetEntryLastTerminalEvent TurnEnd { get; } = new("turn_end"); - /// Server is backed by an in-memory runtime implementation. - public static DiscoveredMcpServerType Memory { get; } = new("memory"); + /// Last turn was aborted (e.g. user interrupted). + public static AgentRegistryLiveTargetEntryLastTerminalEvent Abort { get; } = new("abort"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(DiscoveredMcpServerType left, DiscoveredMcpServerType right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AgentRegistryLiveTargetEntryLastTerminalEvent left, AgentRegistryLiveTargetEntryLastTerminalEvent right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(DiscoveredMcpServerType left, DiscoveredMcpServerType right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AgentRegistryLiveTargetEntryLastTerminalEvent left, AgentRegistryLiveTargetEntryLastTerminalEvent right) => !(left == right); /// - public override bool Equals(object? obj) => obj is DiscoveredMcpServerType other && Equals(other); + public override bool Equals(object? obj) => obj is AgentRegistryLiveTargetEntryLastTerminalEvent other && Equals(other); /// - public bool Equals(DiscoveredMcpServerType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(AgentRegistryLiveTargetEntryLastTerminalEvent other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -8628,61 +10961,68 @@ public DiscoveredMcpServerType(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override DiscoveredMcpServerType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override AgentRegistryLiveTargetEntryLastTerminalEvent Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, DiscoveredMcpServerType value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, AgentRegistryLiveTargetEntryLastTerminalEvent value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DiscoveredMcpServerType)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistryLiveTargetEntryLastTerminalEvent)); } } } -/// Path conventions used by this filesystem. +/// Coarse lifecycle status of the foreground session. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct SessionFsSetProviderConventions : IEquatable +public readonly struct AgentRegistryLiveTargetEntryStatus : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public SessionFsSetProviderConventions(string value) + public AgentRegistryLiveTargetEntryStatus(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Paths use Windows path conventions. - public static SessionFsSetProviderConventions Windows { get; } = new("windows"); + /// Session is actively processing a turn. + public static AgentRegistryLiveTargetEntryStatus Working { get; } = new("working"); - /// Paths use POSIX path conventions. - public static SessionFsSetProviderConventions Posix { get; } = new("posix"); + /// Session is idle, waiting for input. + public static AgentRegistryLiveTargetEntryStatus Waiting { get; } = new("waiting"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(SessionFsSetProviderConventions left, SessionFsSetProviderConventions right) => left.Equals(right); + /// Last turn completed successfully. + public static AgentRegistryLiveTargetEntryStatus Done { get; } = new("done"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(SessionFsSetProviderConventions left, SessionFsSetProviderConventions right) => !(left == right); + /// Session needs user attention (see attentionKind for the specific reason). + public static AgentRegistryLiveTargetEntryStatus Attention { get; } = new("attention"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AgentRegistryLiveTargetEntryStatus left, AgentRegistryLiveTargetEntryStatus right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AgentRegistryLiveTargetEntryStatus left, AgentRegistryLiveTargetEntryStatus right) => !(left == right); /// - public override bool Equals(object? obj) => obj is SessionFsSetProviderConventions other && Equals(other); + public override bool Equals(object? obj) => obj is AgentRegistryLiveTargetEntryStatus other && Equals(other); /// - public bool Equals(SessionFsSetProviderConventions other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(AgentRegistryLiveTargetEntryStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -8690,62 +11030,65 @@ public SessionFsSetProviderConventions(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override SessionFsSetProviderConventions Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override AgentRegistryLiveTargetEntryStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, SessionFsSetProviderConventions value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, AgentRegistryLiveTargetEntryStatus value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionFsSetProviderConventions)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistryLiveTargetEntryStatus)); } } } -/// Neutral SDK discriminator for the connected remote session kind. +/// Categorized reason for log-open failure. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct ConnectedRemoteSessionMetadataKind : IEquatable +public readonly struct AgentRegistryLogCaptureOpenErrorReason : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public ConnectedRemoteSessionMetadataKind(string value) + public AgentRegistryLogCaptureOpenErrorReason(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Remote CLI session. - public static ConnectedRemoteSessionMetadataKind RemoteSession { get; } = new("remote-session"); + /// Filesystem permission denied opening the log file. + public static AgentRegistryLogCaptureOpenErrorReason Permission { get; } = new("permission"); - /// GitHub Copilot coding agent session. - public static ConnectedRemoteSessionMetadataKind CodingAgent { get; } = new("coding-agent"); + /// No space left on device. + public static AgentRegistryLogCaptureOpenErrorReason DiskFull { get; } = new("disk_full"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(ConnectedRemoteSessionMetadataKind left, ConnectedRemoteSessionMetadataKind right) => left.Equals(right); + /// Other / uncategorized open failure. + public static AgentRegistryLogCaptureOpenErrorReason Other { get; } = new("other"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(ConnectedRemoteSessionMetadataKind left, ConnectedRemoteSessionMetadataKind right) => !(left == right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AgentRegistryLogCaptureOpenErrorReason left, AgentRegistryLogCaptureOpenErrorReason right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AgentRegistryLogCaptureOpenErrorReason left, AgentRegistryLogCaptureOpenErrorReason right) => !(left == right); /// - public override bool Equals(object? obj) => obj is ConnectedRemoteSessionMetadataKind other && Equals(other); + public override bool Equals(object? obj) => obj is AgentRegistryLogCaptureOpenErrorReason other && Equals(other); /// - public bool Equals(ConnectedRemoteSessionMetadataKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(AgentRegistryLogCaptureOpenErrorReason other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -8753,62 +11096,71 @@ public ConnectedRemoteSessionMetadataKind(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override ConnectedRemoteSessionMetadataKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override AgentRegistryLogCaptureOpenErrorReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, ConnectedRemoteSessionMetadataKind value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, AgentRegistryLogCaptureOpenErrorReason value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ConnectedRemoteSessionMetadataKind)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistryLogCaptureOpenErrorReason)); } } } -/// Repository host type. +/// Which parameter field was invalid. Omitted when the rejection is not field-specific. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct SessionContextHostType : IEquatable +public readonly struct AgentRegistrySpawnValidationErrorField : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public SessionContextHostType(string value) + public AgentRegistrySpawnValidationErrorField(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Session repository is hosted on GitHub. - public static SessionContextHostType GitHub { get; } = new("github"); + /// The cwd parameter. + public static AgentRegistrySpawnValidationErrorField Cwd { get; } = new("cwd"); - /// Session repository is hosted on Azure DevOps. - public static SessionContextHostType Ado { get; } = new("ado"); + /// The session name parameter. + public static AgentRegistrySpawnValidationErrorField Name { get; } = new("name"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(SessionContextHostType left, SessionContextHostType right) => left.Equals(right); + /// The agentName parameter. + public static AgentRegistrySpawnValidationErrorField AgentName { get; } = new("agentName"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(SessionContextHostType left, SessionContextHostType right) => !(left == right); + /// The model parameter. + public static AgentRegistrySpawnValidationErrorField Model { get; } = new("model"); + + /// The permissionMode parameter. + public static AgentRegistrySpawnValidationErrorField PermissionMode { get; } = new("permissionMode"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AgentRegistrySpawnValidationErrorField left, AgentRegistrySpawnValidationErrorField right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AgentRegistrySpawnValidationErrorField left, AgentRegistrySpawnValidationErrorField right) => !(left == right); /// - public override bool Equals(object? obj) => obj is SessionContextHostType other && Equals(other); + public override bool Equals(object? obj) => obj is AgentRegistrySpawnValidationErrorField other && Equals(other); /// - public bool Equals(SessionContextHostType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(AgentRegistrySpawnValidationErrorField other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -8816,71 +11168,74 @@ public SessionContextHostType(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override SessionContextHostType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override AgentRegistrySpawnValidationErrorField Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, SessionContextHostType value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, AgentRegistrySpawnValidationErrorField value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionContextHostType)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistrySpawnValidationErrorField)); } } } -/// Kind of attention required when status === "attention". Meaningful only when status === "attention". +/// Categorized reason for the rejection. Low-cardinality enum so telemetry can aggregate by reason without leaking raw paths or agent/model names. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct AgentRegistryLiveTargetEntryAttentionKind : IEquatable +public readonly struct AgentRegistrySpawnValidationErrorReason : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public AgentRegistryLiveTargetEntryAttentionKind(string value) + public AgentRegistrySpawnValidationErrorReason(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Session is blocked on an unrecoverable error. - public static AgentRegistryLiveTargetEntryAttentionKind Error { get; } = new("error"); + /// Provided cwd does not exist on disk. + public static AgentRegistrySpawnValidationErrorReason CwdNotFound { get; } = new("cwd-not-found"); - /// Session is waiting for a tool-permission decision. - public static AgentRegistryLiveTargetEntryAttentionKind Permission { get; } = new("permission"); + /// Provided cwd exists but is not a directory. + public static AgentRegistrySpawnValidationErrorReason CwdNotDirectory { get; } = new("cwd-not-directory"); - /// Session is waiting for the user to approve or reject a plan. - public static AgentRegistryLiveTargetEntryAttentionKind ExitPlan { get; } = new("exit_plan"); + /// Session name failed validateSessionName. + public static AgentRegistrySpawnValidationErrorReason InvalidName { get; } = new("invalid-name"); - /// Session is waiting on an elicitation prompt. - public static AgentRegistryLiveTargetEntryAttentionKind Elicitation { get; } = new("elicitation"); + /// Requested agent name was not found in builtin or custom agents. + public static AgentRegistrySpawnValidationErrorReason UnknownAgent { get; } = new("unknown-agent"); - /// Session is waiting for free-form user input. - public static AgentRegistryLiveTargetEntryAttentionKind UserInput { get; } = new("user_input"); + /// Requested model is not available to this session. + public static AgentRegistrySpawnValidationErrorReason UnknownModel { get; } = new("unknown-model"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(AgentRegistryLiveTargetEntryAttentionKind left, AgentRegistryLiveTargetEntryAttentionKind right) => left.Equals(right); + /// Caller asked for permissionMode='yolo' but the controller is not currently in allow-all mode. + public static AgentRegistrySpawnValidationErrorReason YoloNotAllowed { get; } = new("yolo-not-allowed"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(AgentRegistryLiveTargetEntryAttentionKind left, AgentRegistryLiveTargetEntryAttentionKind right) => !(left == right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AgentRegistrySpawnValidationErrorReason left, AgentRegistrySpawnValidationErrorReason right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AgentRegistrySpawnValidationErrorReason left, AgentRegistrySpawnValidationErrorReason right) => !(left == right); /// - public override bool Equals(object? obj) => obj is AgentRegistryLiveTargetEntryAttentionKind other && Equals(other); + public override bool Equals(object? obj) => obj is AgentRegistrySpawnValidationErrorReason other && Equals(other); /// - public bool Equals(AgentRegistryLiveTargetEntryAttentionKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(AgentRegistrySpawnValidationErrorReason other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -8888,62 +11243,62 @@ public AgentRegistryLiveTargetEntryAttentionKind(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override AgentRegistryLiveTargetEntryAttentionKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override AgentRegistrySpawnValidationErrorReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, AgentRegistryLiveTargetEntryAttentionKind value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, AgentRegistrySpawnValidationErrorReason value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistryLiveTargetEntryAttentionKind)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistrySpawnValidationErrorReason)); } } } -/// Process kind tag for the registry entry. +/// Permission posture for the new session. 'yolo' requires the controller-local session to currently be in allow-all mode. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct AgentRegistryLiveTargetEntryKind : IEquatable +public readonly struct AgentRegistrySpawnPermissionMode : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public AgentRegistryLiveTargetEntryKind(string value) + public AgentRegistrySpawnPermissionMode(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Interactive Copilot CLI exposing a UI server (legacy/normal CLI process). - public static AgentRegistryLiveTargetEntryKind UiServer { get; } = new("ui-server"); + /// Standard permission posture (prompts for each request). + public static AgentRegistrySpawnPermissionMode Default { get; } = new("default"); - /// Headless `--server --managed-server` child spawned by a controller. - public static AgentRegistryLiveTargetEntryKind ManagedServer { get; } = new("managed-server"); + /// Full allow-all (requires the controller-local session to currently be in allow-all mode). + public static AgentRegistrySpawnPermissionMode Yolo { get; } = new("yolo"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(AgentRegistryLiveTargetEntryKind left, AgentRegistryLiveTargetEntryKind right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AgentRegistrySpawnPermissionMode left, AgentRegistrySpawnPermissionMode right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(AgentRegistryLiveTargetEntryKind left, AgentRegistryLiveTargetEntryKind right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AgentRegistrySpawnPermissionMode left, AgentRegistrySpawnPermissionMode right) => !(left == right); /// - public override bool Equals(object? obj) => obj is AgentRegistryLiveTargetEntryKind other && Equals(other); + public override bool Equals(object? obj) => obj is AgentRegistrySpawnPermissionMode other && Equals(other); /// - public bool Equals(AgentRegistryLiveTargetEntryKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(AgentRegistrySpawnPermissionMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -8951,62 +11306,68 @@ public AgentRegistryLiveTargetEntryKind(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override AgentRegistryLiveTargetEntryKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override AgentRegistrySpawnPermissionMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, AgentRegistryLiveTargetEntryKind value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, AgentRegistrySpawnPermissionMode value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistryLiveTargetEntryKind)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistrySpawnPermissionMode)); } } } -/// How the most recent turn ended (clean vs aborted). Lets the renderer distinguish done from done_cancelled. +/// The UI mode the agent was in when this message was sent. Defaults to the session's current mode. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct AgentRegistryLiveTargetEntryLastTerminalEvent : IEquatable +public readonly struct SendAgentMode : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public AgentRegistryLiveTargetEntryLastTerminalEvent(string value) + public SendAgentMode(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Last turn ended cleanly (model returned a final assistant message). - public static AgentRegistryLiveTargetEntryLastTerminalEvent TurnEnd { get; } = new("turn_end"); + /// The agent is responding interactively to the user. + public static SendAgentMode Interactive { get; } = new("interactive"); - /// Last turn was aborted (e.g. user interrupted). - public static AgentRegistryLiveTargetEntryLastTerminalEvent Abort { get; } = new("abort"); + /// The agent is preparing a plan before making changes. + public static SendAgentMode Plan { get; } = new("plan"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(AgentRegistryLiveTargetEntryLastTerminalEvent left, AgentRegistryLiveTargetEntryLastTerminalEvent right) => left.Equals(right); + /// The agent is working autonomously toward task completion. + public static SendAgentMode Autopilot { get; } = new("autopilot"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(AgentRegistryLiveTargetEntryLastTerminalEvent left, AgentRegistryLiveTargetEntryLastTerminalEvent right) => !(left == right); + /// The agent is in shell-focused UI mode. + public static SendAgentMode Shell { get; } = new("shell"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SendAgentMode left, SendAgentMode right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SendAgentMode left, SendAgentMode right) => !(left == right); /// - public override bool Equals(object? obj) => obj is AgentRegistryLiveTargetEntryLastTerminalEvent other && Equals(other); + public override bool Equals(object? obj) => obj is SendAgentMode other && Equals(other); /// - public bool Equals(AgentRegistryLiveTargetEntryLastTerminalEvent other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(SendAgentMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9014,68 +11375,62 @@ public AgentRegistryLiveTargetEntryLastTerminalEvent(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override AgentRegistryLiveTargetEntryLastTerminalEvent Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override SendAgentMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, AgentRegistryLiveTargetEntryLastTerminalEvent value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, SendAgentMode value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistryLiveTargetEntryLastTerminalEvent)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SendAgentMode)); } } } -/// Coarse lifecycle status of the foreground session. +/// How to deliver the message. `enqueue` (default) appends to the message queue. `immediate` interjects during an in-progress turn. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct AgentRegistryLiveTargetEntryStatus : IEquatable +public readonly struct SendMode : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public AgentRegistryLiveTargetEntryStatus(string value) + public SendMode(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Session is actively processing a turn. - public static AgentRegistryLiveTargetEntryStatus Working { get; } = new("working"); - - /// Session is idle, waiting for input. - public static AgentRegistryLiveTargetEntryStatus Waiting { get; } = new("waiting"); - - /// Last turn completed successfully. - public static AgentRegistryLiveTargetEntryStatus Done { get; } = new("done"); + /// Append the message to the normal session queue. + public static SendMode Enqueue { get; } = new("enqueue"); - /// Session needs user attention (see attentionKind for the specific reason). - public static AgentRegistryLiveTargetEntryStatus Attention { get; } = new("attention"); + /// Interject the message during the in-progress turn. + public static SendMode Immediate { get; } = new("immediate"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(AgentRegistryLiveTargetEntryStatus left, AgentRegistryLiveTargetEntryStatus right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SendMode left, SendMode right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(AgentRegistryLiveTargetEntryStatus left, AgentRegistryLiveTargetEntryStatus right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SendMode left, SendMode right) => !(left == right); /// - public override bool Equals(object? obj) => obj is AgentRegistryLiveTargetEntryStatus other && Equals(other); + public override bool Equals(object? obj) => obj is SendMode other && Equals(other); /// - public bool Equals(AgentRegistryLiveTargetEntryStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(SendMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9083,65 +11438,65 @@ public AgentRegistryLiveTargetEntryStatus(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override AgentRegistryLiveTargetEntryStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override SendMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, AgentRegistryLiveTargetEntryStatus value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, SendMode value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistryLiveTargetEntryStatus)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SendMode)); } } } -/// Categorized reason for log-open failure. +/// Log severity level. Determines how the message is displayed in the timeline. Defaults to "info". [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct AgentRegistryLogCaptureOpenErrorReason : IEquatable +public readonly struct SessionLogLevel : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public AgentRegistryLogCaptureOpenErrorReason(string value) + public SessionLogLevel(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Filesystem permission denied opening the log file. - public static AgentRegistryLogCaptureOpenErrorReason Permission { get; } = new("permission"); + /// Informational message. + public static SessionLogLevel Info { get; } = new("info"); - /// No space left on device. - public static AgentRegistryLogCaptureOpenErrorReason DiskFull { get; } = new("disk_full"); + /// Warning message that may require attention. + public static SessionLogLevel Warning { get; } = new("warning"); - /// Other / uncategorized open failure. - public static AgentRegistryLogCaptureOpenErrorReason Other { get; } = new("other"); + /// Error message describing a failure. + public static SessionLogLevel Error { get; } = new("error"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(AgentRegistryLogCaptureOpenErrorReason left, AgentRegistryLogCaptureOpenErrorReason right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SessionLogLevel left, SessionLogLevel right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(AgentRegistryLogCaptureOpenErrorReason left, AgentRegistryLogCaptureOpenErrorReason right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SessionLogLevel left, SessionLogLevel right) => !(left == right); /// - public override bool Equals(object? obj) => obj is AgentRegistryLogCaptureOpenErrorReason other && Equals(other); + public override bool Equals(object? obj) => obj is SessionLogLevel other && Equals(other); /// - public bool Equals(AgentRegistryLogCaptureOpenErrorReason other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(SessionLogLevel other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9149,71 +11504,77 @@ public AgentRegistryLogCaptureOpenErrorReason(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override AgentRegistryLogCaptureOpenErrorReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override SessionLogLevel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, AgentRegistryLogCaptureOpenErrorReason value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, SessionLogLevel value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistryLogCaptureOpenErrorReason)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionLogLevel)); } } } -/// Which parameter field was invalid. Omitted when the rejection is not field-specific. +/// Authentication type. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct AgentRegistrySpawnValidationErrorField : IEquatable +public readonly struct AuthInfoType : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public AgentRegistrySpawnValidationErrorField(string value) + public AuthInfoType(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// The cwd parameter. - public static AgentRegistrySpawnValidationErrorField Cwd { get; } = new("cwd"); + /// Authentication provided by a GitHub App HMAC credential. + public static AuthInfoType Hmac { get; } = new("hmac"); - /// The session name parameter. - public static AgentRegistrySpawnValidationErrorField Name { get; } = new("name"); + /// Authentication resolved from environment-provided credentials. + public static AuthInfoType Env { get; } = new("env"); - /// The agentName parameter. - public static AgentRegistrySpawnValidationErrorField AgentName { get; } = new("agentName"); + /// Authentication from an interactive user sign-in. + public static AuthInfoType User { get; } = new("user"); - /// The model parameter. - public static AgentRegistrySpawnValidationErrorField Model { get; } = new("model"); + /// Authentication delegated to the GitHub CLI. + public static AuthInfoType GhCli { get; } = new("gh-cli"); - /// The permissionMode parameter. - public static AgentRegistrySpawnValidationErrorField PermissionMode { get; } = new("permissionMode"); + /// Authentication from an API key credential. + public static AuthInfoType ApiKey { get; } = new("api-key"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(AgentRegistrySpawnValidationErrorField left, AgentRegistrySpawnValidationErrorField right) => left.Equals(right); + /// Authentication from a GitHub token. + public static AuthInfoType Token { get; } = new("token"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(AgentRegistrySpawnValidationErrorField left, AgentRegistrySpawnValidationErrorField right) => !(left == right); + /// Authentication from a Copilot API token. + public static AuthInfoType CopilotApiToken { get; } = new("copilot-api-token"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AuthInfoType left, AuthInfoType right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AuthInfoType left, AuthInfoType right) => !(left == right); /// - public override bool Equals(object? obj) => obj is AgentRegistrySpawnValidationErrorField other && Equals(other); + public override bool Equals(object? obj) => obj is AuthInfoType other && Equals(other); /// - public bool Equals(AgentRegistrySpawnValidationErrorField other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(AuthInfoType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9221,74 +11582,62 @@ public AgentRegistrySpawnValidationErrorField(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override AgentRegistrySpawnValidationErrorField Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override AuthInfoType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, AgentRegistrySpawnValidationErrorField value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, AuthInfoType value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistrySpawnValidationErrorField)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AuthInfoType)); } } } -/// Categorized reason for the rejection. Low-cardinality enum so telemetry can aggregate by reason without leaking raw paths or agent/model names. +/// Runtime-controlled routing state for an open canvas instance. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct AgentRegistrySpawnValidationErrorReason : IEquatable +public readonly struct CanvasInstanceAvailability : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public AgentRegistrySpawnValidationErrorReason(string value) + public CanvasInstanceAvailability(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Provided cwd does not exist on disk. - public static AgentRegistrySpawnValidationErrorReason CwdNotFound { get; } = new("cwd-not-found"); - - /// Provided cwd exists but is not a directory. - public static AgentRegistrySpawnValidationErrorReason CwdNotDirectory { get; } = new("cwd-not-directory"); - - /// Session name failed validateSessionName. - public static AgentRegistrySpawnValidationErrorReason InvalidName { get; } = new("invalid-name"); - - /// Requested agent name was not found in builtin or custom agents. - public static AgentRegistrySpawnValidationErrorReason UnknownAgent { get; } = new("unknown-agent"); - - /// Requested model is not available to this session. - public static AgentRegistrySpawnValidationErrorReason UnknownModel { get; } = new("unknown-model"); + /// The owning provider is currently connected and routing calls will be dispatched normally. + public static CanvasInstanceAvailability Ready { get; } = new("ready"); - /// Caller asked for permissionMode='yolo' but the controller is not currently in allow-all mode. - public static AgentRegistrySpawnValidationErrorReason YoloNotAllowed { get; } = new("yolo-not-allowed"); + /// The owning provider is not currently connected. Routing calls fail with canvas_provider_unavailable until the agent re-issues open_canvas (which rehydrates via a fresh canvas.open) or the provider reconnects. + public static CanvasInstanceAvailability Stale { get; } = new("stale"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(AgentRegistrySpawnValidationErrorReason left, AgentRegistrySpawnValidationErrorReason right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(CanvasInstanceAvailability left, CanvasInstanceAvailability right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(AgentRegistrySpawnValidationErrorReason left, AgentRegistrySpawnValidationErrorReason right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(CanvasInstanceAvailability left, CanvasInstanceAvailability right) => !(left == right); /// - public override bool Equals(object? obj) => obj is AgentRegistrySpawnValidationErrorReason other && Equals(other); + public override bool Equals(object? obj) => obj is CanvasInstanceAvailability other && Equals(other); /// - public bool Equals(AgentRegistrySpawnValidationErrorReason other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(CanvasInstanceAvailability other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9296,62 +11645,62 @@ public AgentRegistrySpawnValidationErrorReason(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override AgentRegistrySpawnValidationErrorReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override CanvasInstanceAvailability Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, AgentRegistrySpawnValidationErrorReason value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, CanvasInstanceAvailability value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistrySpawnValidationErrorReason)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(CanvasInstanceAvailability)); } } } -/// Permission posture for the new session. 'yolo' requires the controller-local session to currently be in allow-all mode. +/// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct AgentRegistrySpawnPermissionMode : IEquatable +public readonly struct WorkspacesWorkspaceDetailsHostType : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public AgentRegistrySpawnPermissionMode(string value) + public WorkspacesWorkspaceDetailsHostType(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Standard permission posture (prompts for each request). - public static AgentRegistrySpawnPermissionMode Default { get; } = new("default"); + /// Workspace repository is hosted on GitHub. + public static WorkspacesWorkspaceDetailsHostType GitHub { get; } = new("github"); - /// Full allow-all (requires the controller-local session to currently be in allow-all mode). - public static AgentRegistrySpawnPermissionMode Yolo { get; } = new("yolo"); + /// Workspace repository is hosted on Azure DevOps. + public static WorkspacesWorkspaceDetailsHostType Ado { get; } = new("ado"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(AgentRegistrySpawnPermissionMode left, AgentRegistrySpawnPermissionMode right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(WorkspacesWorkspaceDetailsHostType left, WorkspacesWorkspaceDetailsHostType right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(AgentRegistrySpawnPermissionMode left, AgentRegistrySpawnPermissionMode right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(WorkspacesWorkspaceDetailsHostType left, WorkspacesWorkspaceDetailsHostType right) => !(left == right); /// - public override bool Equals(object? obj) => obj is AgentRegistrySpawnPermissionMode other && Equals(other); + public override bool Equals(object? obj) => obj is WorkspacesWorkspaceDetailsHostType other && Equals(other); /// - public bool Equals(AgentRegistrySpawnPermissionMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(WorkspacesWorkspaceDetailsHostType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9359,68 +11708,68 @@ public AgentRegistrySpawnPermissionMode(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override AgentRegistrySpawnPermissionMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override WorkspacesWorkspaceDetailsHostType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, AgentRegistrySpawnPermissionMode value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, WorkspacesWorkspaceDetailsHostType value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentRegistrySpawnPermissionMode)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkspacesWorkspaceDetailsHostType)); } } } -/// The UI mode the agent was in when this message was sent. Defaults to the session's current mode. +/// Type of change represented by this file diff. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct SendAgentMode : IEquatable +public readonly struct WorkspaceDiffFileChangeType : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public SendAgentMode(string value) + public WorkspaceDiffFileChangeType(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// The agent is responding interactively to the user. - public static SendAgentMode Interactive { get; } = new("interactive"); + /// The file was added. + public static WorkspaceDiffFileChangeType Added { get; } = new("added"); - /// The agent is preparing a plan before making changes. - public static SendAgentMode Plan { get; } = new("plan"); + /// The file was modified. + public static WorkspaceDiffFileChangeType Modified { get; } = new("modified"); - /// The agent is working autonomously toward task completion. - public static SendAgentMode Autopilot { get; } = new("autopilot"); + /// The file was deleted. + public static WorkspaceDiffFileChangeType Deleted { get; } = new("deleted"); - /// The agent is in shell-focused UI mode. - public static SendAgentMode Shell { get; } = new("shell"); + /// The file was renamed. + public static WorkspaceDiffFileChangeType Renamed { get; } = new("renamed"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(SendAgentMode left, SendAgentMode right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(WorkspaceDiffFileChangeType left, WorkspaceDiffFileChangeType right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(SendAgentMode left, SendAgentMode right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(WorkspaceDiffFileChangeType left, WorkspaceDiffFileChangeType right) => !(left == right); /// - public override bool Equals(object? obj) => obj is SendAgentMode other && Equals(other); + public override bool Equals(object? obj) => obj is WorkspaceDiffFileChangeType other && Equals(other); /// - public bool Equals(SendAgentMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(WorkspaceDiffFileChangeType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9428,62 +11777,62 @@ public SendAgentMode(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override SendAgentMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override WorkspaceDiffFileChangeType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, SendAgentMode value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, WorkspaceDiffFileChangeType value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SendAgentMode)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkspaceDiffFileChangeType)); } } } -/// How to deliver the message. `enqueue` (default) appends to the message queue. `immediate` interjects during an in-progress turn. +/// Diff mode requested by the client. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct SendMode : IEquatable +public readonly struct WorkspaceDiffMode : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public SendMode(string value) + public WorkspaceDiffMode(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Append the message to the normal session queue. - public static SendMode Enqueue { get; } = new("enqueue"); + /// Return staged, unstaged, and untracked working tree changes. + public static WorkspaceDiffMode Unstaged { get; } = new("unstaged"); - /// Interject the message during the in-progress turn. - public static SendMode Immediate { get; } = new("immediate"); + /// Return changes compared with the default branch. + public static WorkspaceDiffMode Branch { get; } = new("branch"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(SendMode left, SendMode right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(WorkspaceDiffMode left, WorkspaceDiffMode right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(SendMode left, SendMode right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(WorkspaceDiffMode left, WorkspaceDiffMode right) => !(left == right); /// - public override bool Equals(object? obj) => obj is SendMode other && Equals(other); + public override bool Equals(object? obj) => obj is WorkspaceDiffMode other && Equals(other); /// - public bool Equals(SendMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(WorkspaceDiffMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9491,65 +11840,68 @@ public SendMode(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override SendMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override WorkspaceDiffMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, SendMode value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, WorkspaceDiffMode value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SendMode)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkspaceDiffMode)); } } } -/// Log severity level. Determines how the message is displayed in the timeline. Defaults to "info". +/// Where this source lives — used for UI grouping. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct SessionLogLevel : IEquatable +public readonly struct InstructionsSourcesLocation : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public SessionLogLevel(string value) + public InstructionsSourcesLocation(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Informational message. - public static SessionLogLevel Info { get; } = new("info"); + /// Instructions live in user-level configuration. + public static InstructionsSourcesLocation User { get; } = new("user"); - /// Warning message that may require attention. - public static SessionLogLevel Warning { get; } = new("warning"); + /// Instructions live in repository-level configuration. + public static InstructionsSourcesLocation Repository { get; } = new("repository"); - /// Error message describing a failure. - public static SessionLogLevel Error { get; } = new("error"); + /// Instructions live under the current working directory. + public static InstructionsSourcesLocation WorkingDirectory { get; } = new("working-directory"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(SessionLogLevel left, SessionLogLevel right) => left.Equals(right); + /// Instructions live in plugin-provided configuration. + public static InstructionsSourcesLocation Plugin { get; } = new("plugin"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(SessionLogLevel left, SessionLogLevel right) => !(left == right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(InstructionsSourcesLocation left, InstructionsSourcesLocation right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(InstructionsSourcesLocation left, InstructionsSourcesLocation right) => !(left == right); /// - public override bool Equals(object? obj) => obj is SessionLogLevel other && Equals(other); + public override bool Equals(object? obj) => obj is InstructionsSourcesLocation other && Equals(other); /// - public bool Equals(SessionLogLevel other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(InstructionsSourcesLocation other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9557,77 +11909,77 @@ public SessionLogLevel(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override SessionLogLevel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override InstructionsSourcesLocation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, SessionLogLevel value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, InstructionsSourcesLocation value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionLogLevel)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(InstructionsSourcesLocation)); } } } -/// Authentication type. +/// Category of instruction source — used for merge logic. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct AuthInfoType : IEquatable +public readonly struct InstructionsSourcesType : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public AuthInfoType(string value) + public InstructionsSourcesType(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Authentication provided by a GitHub App HMAC credential. - public static AuthInfoType Hmac { get; } = new("hmac"); + /// Instructions loaded from the user's home configuration. + public static InstructionsSourcesType Home { get; } = new("home"); - /// Authentication resolved from environment-provided credentials. - public static AuthInfoType Env { get; } = new("env"); + /// Instructions loaded from repository-scoped files. + public static InstructionsSourcesType Repo { get; } = new("repo"); - /// Authentication from an interactive user sign-in. - public static AuthInfoType User { get; } = new("user"); + /// Instructions loaded from model-specific files. + public static InstructionsSourcesType Model { get; } = new("model"); - /// Authentication delegated to the GitHub CLI. - public static AuthInfoType GhCli { get; } = new("gh-cli"); + /// Instructions loaded from VS Code instruction files. + public static InstructionsSourcesType Vscode { get; } = new("vscode"); - /// Authentication from an API key credential. - public static AuthInfoType ApiKey { get; } = new("api-key"); + /// Instructions discovered from nested agent files. + public static InstructionsSourcesType NestedAgents { get; } = new("nested-agents"); - /// Authentication from a GitHub token. - public static AuthInfoType Token { get; } = new("token"); + /// Instructions inherited from child instruction files. + public static InstructionsSourcesType ChildInstructions { get; } = new("child-instructions"); - /// Authentication from a Copilot API token. - public static AuthInfoType CopilotApiToken { get; } = new("copilot-api-token"); + /// Instructions supplied by an installed plugin. + public static InstructionsSourcesType Plugin { get; } = new("plugin"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(AuthInfoType left, AuthInfoType right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(InstructionsSourcesType left, InstructionsSourcesType right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(AuthInfoType left, AuthInfoType right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(InstructionsSourcesType left, InstructionsSourcesType right) => !(left == right); /// - public override bool Equals(object? obj) => obj is AuthInfoType other && Equals(other); + public override bool Equals(object? obj) => obj is InstructionsSourcesType other && Equals(other); /// - public bool Equals(AuthInfoType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(InstructionsSourcesType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9635,62 +11987,74 @@ public AuthInfoType(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override AuthInfoType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override InstructionsSourcesType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, AuthInfoType value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, InstructionsSourcesType value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AuthInfoType)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(InstructionsSourcesType)); } } } -/// Runtime-controlled routing state for an open canvas instance. +/// Where the agent definition was loaded from. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct CanvasInstanceAvailability : IEquatable +public readonly struct AgentInfoSource : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public CanvasInstanceAvailability(string value) + public AgentInfoSource(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// The owning provider is currently connected and routing calls will be dispatched normally. - public static CanvasInstanceAvailability Ready { get; } = new("ready"); + /// Agent loaded from the user's personal agent configuration. + public static AgentInfoSource User { get; } = new("user"); - /// The owning provider is not currently connected. Routing calls fail with canvas_provider_unavailable until the agent re-issues open_canvas (which rehydrates via a fresh canvas.open) or the provider reconnects. - public static CanvasInstanceAvailability Stale { get; } = new("stale"); + /// Agent loaded from the current project's repository configuration. + public static AgentInfoSource Project { get; } = new("project"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(CanvasInstanceAvailability left, CanvasInstanceAvailability right) => left.Equals(right); + /// Agent inherited from a parent project or workspace. + public static AgentInfoSource Inherited { get; } = new("inherited"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(CanvasInstanceAvailability left, CanvasInstanceAvailability right) => !(left == right); + /// Agent provided by a remote runtime or service. + public static AgentInfoSource Remote { get; } = new("remote"); + + /// Agent contributed by an installed plugin. + public static AgentInfoSource Plugin { get; } = new("plugin"); + + /// Agent built into the Copilot runtime. + public static AgentInfoSource Builtin { get; } = new("builtin"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AgentInfoSource left, AgentInfoSource right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AgentInfoSource left, AgentInfoSource right) => !(left == right); /// - public override bool Equals(object? obj) => obj is CanvasInstanceAvailability other && Equals(other); + public override bool Equals(object? obj) => obj is AgentInfoSource other && Equals(other); /// - public bool Equals(CanvasInstanceAvailability other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(AgentInfoSource other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9698,62 +12062,62 @@ public CanvasInstanceAvailability(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override CanvasInstanceAvailability Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override AgentInfoSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, CanvasInstanceAvailability value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, AgentInfoSource value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(CanvasInstanceAvailability)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentInfoSource)); } } } -/// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. +/// Whether task execution is synchronously awaited or managed in the background. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct WorkspacesWorkspaceDetailsHostType : IEquatable +public readonly struct TaskExecutionMode : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public WorkspacesWorkspaceDetailsHostType(string value) + public TaskExecutionMode(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Workspace repository is hosted on GitHub. - public static WorkspacesWorkspaceDetailsHostType GitHub { get; } = new("github"); + /// The task was started with synchronous waiting. + public static TaskExecutionMode Sync { get; } = new("sync"); - /// Workspace repository is hosted on Azure DevOps. - public static WorkspacesWorkspaceDetailsHostType Ado { get; } = new("ado"); + /// The task is managed in the background. + public static TaskExecutionMode Background { get; } = new("background"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(WorkspacesWorkspaceDetailsHostType left, WorkspacesWorkspaceDetailsHostType right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(TaskExecutionMode left, TaskExecutionMode right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(WorkspacesWorkspaceDetailsHostType left, WorkspacesWorkspaceDetailsHostType right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(TaskExecutionMode left, TaskExecutionMode right) => !(left == right); /// - public override bool Equals(object? obj) => obj is WorkspacesWorkspaceDetailsHostType other && Equals(other); + public override bool Equals(object? obj) => obj is TaskExecutionMode other && Equals(other); /// - public bool Equals(WorkspacesWorkspaceDetailsHostType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(TaskExecutionMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9761,68 +12125,71 @@ public WorkspacesWorkspaceDetailsHostType(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override WorkspacesWorkspaceDetailsHostType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override TaskExecutionMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, WorkspacesWorkspaceDetailsHostType value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, TaskExecutionMode value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkspacesWorkspaceDetailsHostType)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(TaskExecutionMode)); } } } -/// Type of change represented by this file diff. +/// Current lifecycle status of the task. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct WorkspaceDiffFileChangeType : IEquatable +public readonly struct TaskStatus : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public WorkspaceDiffFileChangeType(string value) + public TaskStatus(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// The file was added. - public static WorkspaceDiffFileChangeType Added { get; } = new("added"); + /// The task is actively executing. + public static TaskStatus Running { get; } = new("running"); - /// The file was modified. - public static WorkspaceDiffFileChangeType Modified { get; } = new("modified"); + /// The task is waiting for additional input. + public static TaskStatus Idle { get; } = new("idle"); - /// The file was deleted. - public static WorkspaceDiffFileChangeType Deleted { get; } = new("deleted"); + /// The task finished successfully. + public static TaskStatus Completed { get; } = new("completed"); - /// The file was renamed. - public static WorkspaceDiffFileChangeType Renamed { get; } = new("renamed"); + /// The task finished with an error. + public static TaskStatus Failed { get; } = new("failed"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(WorkspaceDiffFileChangeType left, WorkspaceDiffFileChangeType right) => left.Equals(right); + /// The task was cancelled before completion. + public static TaskStatus Cancelled { get; } = new("cancelled"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(WorkspaceDiffFileChangeType left, WorkspaceDiffFileChangeType right) => !(left == right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(TaskStatus left, TaskStatus right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(TaskStatus left, TaskStatus right) => !(left == right); /// - public override bool Equals(object? obj) => obj is WorkspaceDiffFileChangeType other && Equals(other); + public override bool Equals(object? obj) => obj is TaskStatus other && Equals(other); /// - public bool Equals(WorkspaceDiffFileChangeType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(TaskStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9830,62 +12197,62 @@ public WorkspaceDiffFileChangeType(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override WorkspaceDiffFileChangeType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override TaskStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, WorkspaceDiffFileChangeType value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, TaskStatus value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkspaceDiffFileChangeType)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(TaskStatus)); } } } -/// Diff mode requested by the client. +/// Whether the shell runs inside a managed PTY session or as an independent background process. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct WorkspaceDiffMode : IEquatable +public readonly struct TaskShellInfoAttachmentMode : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public WorkspaceDiffMode(string value) + public TaskShellInfoAttachmentMode(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Return staged, unstaged, and untracked working tree changes. - public static WorkspaceDiffMode Unstaged { get; } = new("unstaged"); + /// The shell runs in a managed PTY session. + public static TaskShellInfoAttachmentMode Attached { get; } = new("attached"); - /// Return changes compared with the default branch. - public static WorkspaceDiffMode Branch { get; } = new("branch"); + /// The shell runs as an independent background process. + public static TaskShellInfoAttachmentMode Detached { get; } = new("detached"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(WorkspaceDiffMode left, WorkspaceDiffMode right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(TaskShellInfoAttachmentMode left, TaskShellInfoAttachmentMode right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(WorkspaceDiffMode left, WorkspaceDiffMode right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(TaskShellInfoAttachmentMode left, TaskShellInfoAttachmentMode right) => !(left == right); /// - public override bool Equals(object? obj) => obj is WorkspaceDiffMode other && Equals(other); + public override bool Equals(object? obj) => obj is TaskShellInfoAttachmentMode other && Equals(other); /// - public bool Equals(WorkspaceDiffMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(TaskShellInfoAttachmentMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9893,68 +12260,65 @@ public WorkspaceDiffMode(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override WorkspaceDiffMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override TaskShellInfoAttachmentMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, WorkspaceDiffMode value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, TaskShellInfoAttachmentMode value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkspaceDiffMode)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(TaskShellInfoAttachmentMode)); } } } -/// Where this source lives — used for UI grouping. +/// Outcome of the sampling inference. 'success' produced a response; 'failure' encountered an error (including agent-side rejection by content filter or criteria); 'cancelled' the caller cancelled this execution via cancelSamplingExecution. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct InstructionsSourcesLocation : IEquatable +public readonly struct McpSamplingExecutionAction : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public InstructionsSourcesLocation(string value) + public McpSamplingExecutionAction(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Instructions live in user-level configuration. - public static InstructionsSourcesLocation User { get; } = new("user"); - - /// Instructions live in repository-level configuration. - public static InstructionsSourcesLocation Repository { get; } = new("repository"); + /// The sampling inference completed and produced a result. + public static McpSamplingExecutionAction Success { get; } = new("success"); - /// Instructions live under the current working directory. - public static InstructionsSourcesLocation WorkingDirectory { get; } = new("working-directory"); + /// The sampling inference failed or was rejected. + public static McpSamplingExecutionAction Failure { get; } = new("failure"); - /// Instructions live in plugin-provided configuration. - public static InstructionsSourcesLocation Plugin { get; } = new("plugin"); + /// The sampling inference was cancelled before completion. + public static McpSamplingExecutionAction Cancelled { get; } = new("cancelled"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(InstructionsSourcesLocation left, InstructionsSourcesLocation right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(McpSamplingExecutionAction left, McpSamplingExecutionAction right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(InstructionsSourcesLocation left, InstructionsSourcesLocation right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(McpSamplingExecutionAction left, McpSamplingExecutionAction right) => !(left == right); /// - public override bool Equals(object? obj) => obj is InstructionsSourcesLocation other && Equals(other); + public override bool Equals(object? obj) => obj is McpSamplingExecutionAction other && Equals(other); /// - public bool Equals(InstructionsSourcesLocation other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(McpSamplingExecutionAction other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -9962,77 +12326,62 @@ public InstructionsSourcesLocation(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override InstructionsSourcesLocation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override McpSamplingExecutionAction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, InstructionsSourcesLocation value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, McpSamplingExecutionAction value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(InstructionsSourcesLocation)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpSamplingExecutionAction)); } } } -/// Category of instruction source — used for merge logic. +/// How environment-variable values supplied to MCP servers are resolved. "direct" passes literal string values; "indirect" treats values as references (e.g. names of environment variables on the host) that the runtime resolves before launch. Defaults to the runtime's startup mode; clients that intentionally launch MCP servers with literal values (e.g. CLI prompt mode and ACP) set this to "direct". [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct InstructionsSourcesType : IEquatable +public readonly struct McpSetEnvValueModeDetails : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public InstructionsSourcesType(string value) + public McpSetEnvValueModeDetails(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Instructions loaded from the user's home configuration. - public static InstructionsSourcesType Home { get; } = new("home"); - - /// Instructions loaded from repository-scoped files. - public static InstructionsSourcesType Repo { get; } = new("repo"); - - /// Instructions loaded from model-specific files. - public static InstructionsSourcesType Model { get; } = new("model"); - - /// Instructions loaded from VS Code instruction files. - public static InstructionsSourcesType Vscode { get; } = new("vscode"); - - /// Instructions discovered from nested agent files. - public static InstructionsSourcesType NestedAgents { get; } = new("nested-agents"); - - /// Instructions inherited from child instruction files. - public static InstructionsSourcesType ChildInstructions { get; } = new("child-instructions"); + /// Treat MCP server environment values as literal strings. + public static McpSetEnvValueModeDetails Direct { get; } = new("direct"); - /// Instructions supplied by an installed plugin. - public static InstructionsSourcesType Plugin { get; } = new("plugin"); + /// Treat MCP server environment values as host-side references to resolve before launch. + public static McpSetEnvValueModeDetails Indirect { get; } = new("indirect"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(InstructionsSourcesType left, InstructionsSourcesType right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(McpSetEnvValueModeDetails left, McpSetEnvValueModeDetails right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(InstructionsSourcesType left, InstructionsSourcesType right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(McpSetEnvValueModeDetails left, McpSetEnvValueModeDetails right) => !(left == right); /// - public override bool Equals(object? obj) => obj is InstructionsSourcesType other && Equals(other); + public override bool Equals(object? obj) => obj is McpSetEnvValueModeDetails other && Equals(other); /// - public bool Equals(InstructionsSourcesType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(McpSetEnvValueModeDetails other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10040,74 +12389,65 @@ public InstructionsSourcesType(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override InstructionsSourcesType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override McpSetEnvValueModeDetails Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, InstructionsSourcesType value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, McpSetEnvValueModeDetails value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(InstructionsSourcesType)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpSetEnvValueModeDetails)); } } } -/// Where the agent definition was loaded from. +/// Allowed values for the `McpAppsSetHostContextDetailsAvailableDisplayMode` enumeration. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct AgentInfoSource : IEquatable +public readonly struct McpAppsSetHostContextDetailsAvailableDisplayMode : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public AgentInfoSource(string value) + public McpAppsSetHostContextDetailsAvailableDisplayMode(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Agent loaded from the user's personal agent configuration. - public static AgentInfoSource User { get; } = new("user"); - - /// Agent loaded from the current project's repository configuration. - public static AgentInfoSource Project { get; } = new("project"); - - /// Agent inherited from a parent project or workspace. - public static AgentInfoSource Inherited { get; } = new("inherited"); - - /// Agent provided by a remote runtime or service. - public static AgentInfoSource Remote { get; } = new("remote"); + /// Rendered inline within the host conversation surface. + public static McpAppsSetHostContextDetailsAvailableDisplayMode Inline { get; } = new("inline"); - /// Agent contributed by an installed plugin. - public static AgentInfoSource Plugin { get; } = new("plugin"); + /// Rendered as a fullscreen overlay. + public static McpAppsSetHostContextDetailsAvailableDisplayMode Fullscreen { get; } = new("fullscreen"); - /// Agent built into the Copilot runtime. - public static AgentInfoSource Builtin { get; } = new("builtin"); + /// Rendered as a picture-in-picture floating panel. + public static McpAppsSetHostContextDetailsAvailableDisplayMode Pip { get; } = new("pip"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(AgentInfoSource left, AgentInfoSource right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(McpAppsSetHostContextDetailsAvailableDisplayMode left, McpAppsSetHostContextDetailsAvailableDisplayMode right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(AgentInfoSource left, AgentInfoSource right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(McpAppsSetHostContextDetailsAvailableDisplayMode left, McpAppsSetHostContextDetailsAvailableDisplayMode right) => !(left == right); /// - public override bool Equals(object? obj) => obj is AgentInfoSource other && Equals(other); + public override bool Equals(object? obj) => obj is McpAppsSetHostContextDetailsAvailableDisplayMode other && Equals(other); /// - public bool Equals(AgentInfoSource other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(McpAppsSetHostContextDetailsAvailableDisplayMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10115,62 +12455,65 @@ public AgentInfoSource(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override AgentInfoSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override McpAppsSetHostContextDetailsAvailableDisplayMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, AgentInfoSource value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, McpAppsSetHostContextDetailsAvailableDisplayMode value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentInfoSource)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsSetHostContextDetailsAvailableDisplayMode)); } } } -/// Whether task execution is synchronously awaited or managed in the background. +/// Current display mode (SEP-1865). [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct TaskExecutionMode : IEquatable +public readonly struct McpAppsSetHostContextDetailsDisplayMode : IEquatable { private readonly string? _value; - - /// Initializes a new instance of the struct. - /// The value to associate with this . + + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public TaskExecutionMode(string value) + public McpAppsSetHostContextDetailsDisplayMode(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// The task was started with synchronous waiting. - public static TaskExecutionMode Sync { get; } = new("sync"); + /// Rendered inline within the host conversation surface. + public static McpAppsSetHostContextDetailsDisplayMode Inline { get; } = new("inline"); - /// The task is managed in the background. - public static TaskExecutionMode Background { get; } = new("background"); + /// Rendered as a fullscreen overlay. + public static McpAppsSetHostContextDetailsDisplayMode Fullscreen { get; } = new("fullscreen"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(TaskExecutionMode left, TaskExecutionMode right) => left.Equals(right); + /// Rendered as a picture-in-picture floating panel. + public static McpAppsSetHostContextDetailsDisplayMode Pip { get; } = new("pip"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(TaskExecutionMode left, TaskExecutionMode right) => !(left == right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(McpAppsSetHostContextDetailsDisplayMode left, McpAppsSetHostContextDetailsDisplayMode right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(McpAppsSetHostContextDetailsDisplayMode left, McpAppsSetHostContextDetailsDisplayMode right) => !(left == right); /// - public override bool Equals(object? obj) => obj is TaskExecutionMode other && Equals(other); + public override bool Equals(object? obj) => obj is McpAppsSetHostContextDetailsDisplayMode other && Equals(other); /// - public bool Equals(TaskExecutionMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(McpAppsSetHostContextDetailsDisplayMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10178,71 +12521,65 @@ public TaskExecutionMode(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override TaskExecutionMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override McpAppsSetHostContextDetailsDisplayMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, TaskExecutionMode value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, McpAppsSetHostContextDetailsDisplayMode value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(TaskExecutionMode)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsSetHostContextDetailsDisplayMode)); } } } -/// Current lifecycle status of the task. +/// Platform type for responsive design. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct TaskStatus : IEquatable +public readonly struct McpAppsSetHostContextDetailsPlatform : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public TaskStatus(string value) + public McpAppsSetHostContextDetailsPlatform(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// The task is actively executing. - public static TaskStatus Running { get; } = new("running"); - - /// The task is waiting for additional input. - public static TaskStatus Idle { get; } = new("idle"); - - /// The task finished successfully. - public static TaskStatus Completed { get; } = new("completed"); + /// Host runs in a web browser. + public static McpAppsSetHostContextDetailsPlatform Web { get; } = new("web"); - /// The task finished with an error. - public static TaskStatus Failed { get; } = new("failed"); + /// Host runs as a desktop application. + public static McpAppsSetHostContextDetailsPlatform Desktop { get; } = new("desktop"); - /// The task was cancelled before completion. - public static TaskStatus Cancelled { get; } = new("cancelled"); + /// Host runs on a mobile device. + public static McpAppsSetHostContextDetailsPlatform Mobile { get; } = new("mobile"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(TaskStatus left, TaskStatus right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(McpAppsSetHostContextDetailsPlatform left, McpAppsSetHostContextDetailsPlatform right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(TaskStatus left, TaskStatus right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(McpAppsSetHostContextDetailsPlatform left, McpAppsSetHostContextDetailsPlatform right) => !(left == right); /// - public override bool Equals(object? obj) => obj is TaskStatus other && Equals(other); + public override bool Equals(object? obj) => obj is McpAppsSetHostContextDetailsPlatform other && Equals(other); /// - public bool Equals(TaskStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(McpAppsSetHostContextDetailsPlatform other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10250,62 +12587,62 @@ public TaskStatus(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override TaskStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override McpAppsSetHostContextDetailsPlatform Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, TaskStatus value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, McpAppsSetHostContextDetailsPlatform value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(TaskStatus)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsSetHostContextDetailsPlatform)); } } } -/// Whether the shell runs inside a managed PTY session or as an independent background process. +/// UI theme preference per SEP-1865. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct TaskShellInfoAttachmentMode : IEquatable +public readonly struct McpAppsSetHostContextDetailsTheme : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public TaskShellInfoAttachmentMode(string value) + public McpAppsSetHostContextDetailsTheme(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// The shell runs in a managed PTY session. - public static TaskShellInfoAttachmentMode Attached { get; } = new("attached"); + /// Light UI theme. + public static McpAppsSetHostContextDetailsTheme Light { get; } = new("light"); - /// The shell runs as an independent background process. - public static TaskShellInfoAttachmentMode Detached { get; } = new("detached"); + /// Dark UI theme. + public static McpAppsSetHostContextDetailsTheme Dark { get; } = new("dark"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(TaskShellInfoAttachmentMode left, TaskShellInfoAttachmentMode right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(McpAppsSetHostContextDetailsTheme left, McpAppsSetHostContextDetailsTheme right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(TaskShellInfoAttachmentMode left, TaskShellInfoAttachmentMode right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(McpAppsSetHostContextDetailsTheme left, McpAppsSetHostContextDetailsTheme right) => !(left == right); /// - public override bool Equals(object? obj) => obj is TaskShellInfoAttachmentMode other && Equals(other); + public override bool Equals(object? obj) => obj is McpAppsSetHostContextDetailsTheme other && Equals(other); /// - public bool Equals(TaskShellInfoAttachmentMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(McpAppsSetHostContextDetailsTheme other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10313,65 +12650,65 @@ public TaskShellInfoAttachmentMode(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override TaskShellInfoAttachmentMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override McpAppsSetHostContextDetailsTheme Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, TaskShellInfoAttachmentMode value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, McpAppsSetHostContextDetailsTheme value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(TaskShellInfoAttachmentMode)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsSetHostContextDetailsTheme)); } } } -/// Outcome of the sampling inference. 'success' produced a response; 'failure' encountered an error (including agent-side rejection by content filter or criteria); 'cancelled' the caller cancelled this execution via cancelSamplingExecution. +/// Allowed values for the `McpAppsHostContextDetailsAvailableDisplayMode` enumeration. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct McpSamplingExecutionAction : IEquatable +public readonly struct McpAppsHostContextDetailsAvailableDisplayMode : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public McpSamplingExecutionAction(string value) + public McpAppsHostContextDetailsAvailableDisplayMode(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// The sampling inference completed and produced a result. - public static McpSamplingExecutionAction Success { get; } = new("success"); + /// Rendered inline within the host conversation surface. + public static McpAppsHostContextDetailsAvailableDisplayMode Inline { get; } = new("inline"); - /// The sampling inference failed or was rejected. - public static McpSamplingExecutionAction Failure { get; } = new("failure"); + /// Rendered as a fullscreen overlay. + public static McpAppsHostContextDetailsAvailableDisplayMode Fullscreen { get; } = new("fullscreen"); - /// The sampling inference was cancelled before completion. - public static McpSamplingExecutionAction Cancelled { get; } = new("cancelled"); + /// Rendered as a picture-in-picture floating panel. + public static McpAppsHostContextDetailsAvailableDisplayMode Pip { get; } = new("pip"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(McpSamplingExecutionAction left, McpSamplingExecutionAction right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(McpAppsHostContextDetailsAvailableDisplayMode left, McpAppsHostContextDetailsAvailableDisplayMode right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(McpSamplingExecutionAction left, McpSamplingExecutionAction right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(McpAppsHostContextDetailsAvailableDisplayMode left, McpAppsHostContextDetailsAvailableDisplayMode right) => !(left == right); /// - public override bool Equals(object? obj) => obj is McpSamplingExecutionAction other && Equals(other); + public override bool Equals(object? obj) => obj is McpAppsHostContextDetailsAvailableDisplayMode other && Equals(other); /// - public bool Equals(McpSamplingExecutionAction other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(McpAppsHostContextDetailsAvailableDisplayMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10379,62 +12716,65 @@ public McpSamplingExecutionAction(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override McpSamplingExecutionAction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override McpAppsHostContextDetailsAvailableDisplayMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, McpSamplingExecutionAction value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, McpAppsHostContextDetailsAvailableDisplayMode value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpSamplingExecutionAction)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsHostContextDetailsAvailableDisplayMode)); } } } -/// How environment-variable values supplied to MCP servers are resolved. "direct" passes literal string values; "indirect" treats values as references (e.g. names of environment variables on the host) that the runtime resolves before launch. Defaults to the runtime's startup mode; clients that intentionally launch MCP servers with literal values (e.g. CLI prompt mode and ACP) set this to "direct". +/// Current display mode (SEP-1865). [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct McpSetEnvValueModeDetails : IEquatable +public readonly struct McpAppsHostContextDetailsDisplayMode : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public McpSetEnvValueModeDetails(string value) + public McpAppsHostContextDetailsDisplayMode(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Treat MCP server environment values as literal strings. - public static McpSetEnvValueModeDetails Direct { get; } = new("direct"); + /// Rendered inline within the host conversation surface. + public static McpAppsHostContextDetailsDisplayMode Inline { get; } = new("inline"); - /// Treat MCP server environment values as host-side references to resolve before launch. - public static McpSetEnvValueModeDetails Indirect { get; } = new("indirect"); + /// Rendered as a fullscreen overlay. + public static McpAppsHostContextDetailsDisplayMode Fullscreen { get; } = new("fullscreen"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(McpSetEnvValueModeDetails left, McpSetEnvValueModeDetails right) => left.Equals(right); + /// Rendered as a picture-in-picture floating panel. + public static McpAppsHostContextDetailsDisplayMode Pip { get; } = new("pip"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(McpSetEnvValueModeDetails left, McpSetEnvValueModeDetails right) => !(left == right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(McpAppsHostContextDetailsDisplayMode left, McpAppsHostContextDetailsDisplayMode right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(McpAppsHostContextDetailsDisplayMode left, McpAppsHostContextDetailsDisplayMode right) => !(left == right); /// - public override bool Equals(object? obj) => obj is McpSetEnvValueModeDetails other && Equals(other); + public override bool Equals(object? obj) => obj is McpAppsHostContextDetailsDisplayMode other && Equals(other); /// - public bool Equals(McpSetEnvValueModeDetails other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(McpAppsHostContextDetailsDisplayMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10442,65 +12782,65 @@ public McpSetEnvValueModeDetails(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override McpSetEnvValueModeDetails Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override McpAppsHostContextDetailsDisplayMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, McpSetEnvValueModeDetails value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, McpAppsHostContextDetailsDisplayMode value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpSetEnvValueModeDetails)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsHostContextDetailsDisplayMode)); } } } -/// Allowed values for the `McpAppsSetHostContextDetailsAvailableDisplayMode` enumeration. +/// Platform type for responsive design. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct McpAppsSetHostContextDetailsAvailableDisplayMode : IEquatable +public readonly struct McpAppsHostContextDetailsPlatform : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public McpAppsSetHostContextDetailsAvailableDisplayMode(string value) + public McpAppsHostContextDetailsPlatform(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Rendered inline within the host conversation surface. - public static McpAppsSetHostContextDetailsAvailableDisplayMode Inline { get; } = new("inline"); - - /// Rendered as a fullscreen overlay. - public static McpAppsSetHostContextDetailsAvailableDisplayMode Fullscreen { get; } = new("fullscreen"); + /// Host runs in a web browser. + public static McpAppsHostContextDetailsPlatform Web { get; } = new("web"); - /// Rendered as a picture-in-picture floating panel. - public static McpAppsSetHostContextDetailsAvailableDisplayMode Pip { get; } = new("pip"); + /// Host runs as a desktop application. + public static McpAppsHostContextDetailsPlatform Desktop { get; } = new("desktop"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(McpAppsSetHostContextDetailsAvailableDisplayMode left, McpAppsSetHostContextDetailsAvailableDisplayMode right) => left.Equals(right); + /// Host runs on a mobile device. + public static McpAppsHostContextDetailsPlatform Mobile { get; } = new("mobile"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(McpAppsSetHostContextDetailsAvailableDisplayMode left, McpAppsSetHostContextDetailsAvailableDisplayMode right) => !(left == right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(McpAppsHostContextDetailsPlatform left, McpAppsHostContextDetailsPlatform right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(McpAppsHostContextDetailsPlatform left, McpAppsHostContextDetailsPlatform right) => !(left == right); /// - public override bool Equals(object? obj) => obj is McpAppsSetHostContextDetailsAvailableDisplayMode other && Equals(other); + public override bool Equals(object? obj) => obj is McpAppsHostContextDetailsPlatform other && Equals(other); /// - public bool Equals(McpAppsSetHostContextDetailsAvailableDisplayMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(McpAppsHostContextDetailsPlatform other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10508,65 +12848,62 @@ public McpAppsSetHostContextDetailsAvailableDisplayMode(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override McpAppsSetHostContextDetailsAvailableDisplayMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override McpAppsHostContextDetailsPlatform Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, McpAppsSetHostContextDetailsAvailableDisplayMode value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, McpAppsHostContextDetailsPlatform value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsSetHostContextDetailsAvailableDisplayMode)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsHostContextDetailsPlatform)); } } } -/// Current display mode (SEP-1865). +/// UI theme preference per SEP-1865. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct McpAppsSetHostContextDetailsDisplayMode : IEquatable +public readonly struct McpAppsHostContextDetailsTheme : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public McpAppsSetHostContextDetailsDisplayMode(string value) + public McpAppsHostContextDetailsTheme(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Rendered inline within the host conversation surface. - public static McpAppsSetHostContextDetailsDisplayMode Inline { get; } = new("inline"); - - /// Rendered as a fullscreen overlay. - public static McpAppsSetHostContextDetailsDisplayMode Fullscreen { get; } = new("fullscreen"); + /// Light UI theme. + public static McpAppsHostContextDetailsTheme Light { get; } = new("light"); - /// Rendered as a picture-in-picture floating panel. - public static McpAppsSetHostContextDetailsDisplayMode Pip { get; } = new("pip"); + /// Dark UI theme. + public static McpAppsHostContextDetailsTheme Dark { get; } = new("dark"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(McpAppsSetHostContextDetailsDisplayMode left, McpAppsSetHostContextDetailsDisplayMode right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(McpAppsHostContextDetailsTheme left, McpAppsHostContextDetailsTheme right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(McpAppsSetHostContextDetailsDisplayMode left, McpAppsSetHostContextDetailsDisplayMode right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(McpAppsHostContextDetailsTheme left, McpAppsHostContextDetailsTheme right) => !(left == right); /// - public override bool Equals(object? obj) => obj is McpAppsSetHostContextDetailsDisplayMode other && Equals(other); + public override bool Equals(object? obj) => obj is McpAppsHostContextDetailsTheme other && Equals(other); /// - public bool Equals(McpAppsSetHostContextDetailsDisplayMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(McpAppsHostContextDetailsTheme other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10574,65 +12911,62 @@ public McpAppsSetHostContextDetailsDisplayMode(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override McpAppsSetHostContextDetailsDisplayMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override McpAppsHostContextDetailsTheme Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, McpAppsSetHostContextDetailsDisplayMode value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, McpAppsHostContextDetailsTheme value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsSetHostContextDetailsDisplayMode)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsHostContextDetailsTheme)); } } } -/// Platform type for responsive design. +/// Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct McpAppsSetHostContextDetailsPlatform : IEquatable +public readonly struct OptionsUpdateAdditionalContentExclusionPolicyScope : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public McpAppsSetHostContextDetailsPlatform(string value) + public OptionsUpdateAdditionalContentExclusionPolicyScope(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Host runs in a web browser. - public static McpAppsSetHostContextDetailsPlatform Web { get; } = new("web"); - - /// Host runs as a desktop application. - public static McpAppsSetHostContextDetailsPlatform Desktop { get; } = new("desktop"); + /// The content exclusion policy applies to the current repository. + public static OptionsUpdateAdditionalContentExclusionPolicyScope Repo { get; } = new("repo"); - /// Host runs on a mobile device. - public static McpAppsSetHostContextDetailsPlatform Mobile { get; } = new("mobile"); + /// The content exclusion policy applies across all repositories. + public static OptionsUpdateAdditionalContentExclusionPolicyScope All { get; } = new("all"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(McpAppsSetHostContextDetailsPlatform left, McpAppsSetHostContextDetailsPlatform right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(OptionsUpdateAdditionalContentExclusionPolicyScope left, OptionsUpdateAdditionalContentExclusionPolicyScope right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(McpAppsSetHostContextDetailsPlatform left, McpAppsSetHostContextDetailsPlatform right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(OptionsUpdateAdditionalContentExclusionPolicyScope left, OptionsUpdateAdditionalContentExclusionPolicyScope right) => !(left == right); /// - public override bool Equals(object? obj) => obj is McpAppsSetHostContextDetailsPlatform other && Equals(other); + public override bool Equals(object? obj) => obj is OptionsUpdateAdditionalContentExclusionPolicyScope other && Equals(other); /// - public bool Equals(McpAppsSetHostContextDetailsPlatform other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(OptionsUpdateAdditionalContentExclusionPolicyScope other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10640,62 +12974,62 @@ public McpAppsSetHostContextDetailsPlatform(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override McpAppsSetHostContextDetailsPlatform Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override OptionsUpdateAdditionalContentExclusionPolicyScope Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, McpAppsSetHostContextDetailsPlatform value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, OptionsUpdateAdditionalContentExclusionPolicyScope value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsSetHostContextDetailsPlatform)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(OptionsUpdateAdditionalContentExclusionPolicyScope)); } } } -/// UI theme preference per SEP-1865. +/// Context tier for models with tiered pricing. The session uses this to derive effective `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits honor the selected tier. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct McpAppsSetHostContextDetailsTheme : IEquatable +public readonly struct OptionsUpdateContextTier : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public McpAppsSetHostContextDetailsTheme(string value) + public OptionsUpdateContextTier(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Light UI theme. - public static McpAppsSetHostContextDetailsTheme Light { get; } = new("light"); + /// Use the model's default context tier and its standard token limits / pricing. + public static OptionsUpdateContextTier Default { get; } = new("default"); - /// Dark UI theme. - public static McpAppsSetHostContextDetailsTheme Dark { get; } = new("dark"); + /// Use the model's long-context tier (when available) so larger inputs are accepted and tier-specific pricing applies. + public static OptionsUpdateContextTier LongContext { get; } = new("long_context"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(McpAppsSetHostContextDetailsTheme left, McpAppsSetHostContextDetailsTheme right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(OptionsUpdateContextTier left, OptionsUpdateContextTier right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(McpAppsSetHostContextDetailsTheme left, McpAppsSetHostContextDetailsTheme right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(OptionsUpdateContextTier left, OptionsUpdateContextTier right) => !(left == right); /// - public override bool Equals(object? obj) => obj is McpAppsSetHostContextDetailsTheme other && Equals(other); + public override bool Equals(object? obj) => obj is OptionsUpdateContextTier other && Equals(other); /// - public bool Equals(McpAppsSetHostContextDetailsTheme other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(OptionsUpdateContextTier other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10703,65 +13037,62 @@ public McpAppsSetHostContextDetailsTheme(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override McpAppsSetHostContextDetailsTheme Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override OptionsUpdateContextTier Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, McpAppsSetHostContextDetailsTheme value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, OptionsUpdateContextTier value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsSetHostContextDetailsTheme)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(OptionsUpdateContextTier)); } } } -/// Allowed values for the `McpAppsHostContextDetailsAvailableDisplayMode` enumeration. +/// How env values are passed to MCP servers (`direct` inlines literal values; `indirect` resolves at launch). [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct McpAppsHostContextDetailsAvailableDisplayMode : IEquatable +public readonly struct OptionsUpdateEnvValueMode : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public McpAppsHostContextDetailsAvailableDisplayMode(string value) + public OptionsUpdateEnvValueMode(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Rendered inline within the host conversation surface. - public static McpAppsHostContextDetailsAvailableDisplayMode Inline { get; } = new("inline"); - - /// Rendered as a fullscreen overlay. - public static McpAppsHostContextDetailsAvailableDisplayMode Fullscreen { get; } = new("fullscreen"); + /// Pass MCP server environment values as literal strings. + public static OptionsUpdateEnvValueMode Direct { get; } = new("direct"); - /// Rendered as a picture-in-picture floating panel. - public static McpAppsHostContextDetailsAvailableDisplayMode Pip { get; } = new("pip"); + /// Resolve MCP server environment values from host-side references. + public static OptionsUpdateEnvValueMode Indirect { get; } = new("indirect"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(McpAppsHostContextDetailsAvailableDisplayMode left, McpAppsHostContextDetailsAvailableDisplayMode right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(OptionsUpdateEnvValueMode left, OptionsUpdateEnvValueMode right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(McpAppsHostContextDetailsAvailableDisplayMode left, McpAppsHostContextDetailsAvailableDisplayMode right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(OptionsUpdateEnvValueMode left, OptionsUpdateEnvValueMode right) => !(left == right); /// - public override bool Equals(object? obj) => obj is McpAppsHostContextDetailsAvailableDisplayMode other && Equals(other); + public override bool Equals(object? obj) => obj is OptionsUpdateEnvValueMode other && Equals(other); /// - public bool Equals(McpAppsHostContextDetailsAvailableDisplayMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(OptionsUpdateEnvValueMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10769,65 +13100,65 @@ public McpAppsHostContextDetailsAvailableDisplayMode(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override McpAppsHostContextDetailsAvailableDisplayMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override OptionsUpdateEnvValueMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, McpAppsHostContextDetailsAvailableDisplayMode value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, OptionsUpdateEnvValueMode value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsHostContextDetailsAvailableDisplayMode)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(OptionsUpdateEnvValueMode)); } } } -/// Current display mode (SEP-1865). +/// Provider type. Defaults to "openai" for generic OpenAI-compatible APIs. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct McpAppsHostContextDetailsDisplayMode : IEquatable +public readonly struct ProviderConfigType : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public McpAppsHostContextDetailsDisplayMode(string value) + public ProviderConfigType(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Rendered inline within the host conversation surface. - public static McpAppsHostContextDetailsDisplayMode Inline { get; } = new("inline"); + /// Generic OpenAI-compatible API. + public static ProviderConfigType Openai { get; } = new("openai"); - /// Rendered as a fullscreen overlay. - public static McpAppsHostContextDetailsDisplayMode Fullscreen { get; } = new("fullscreen"); + /// Azure OpenAI Service endpoint. + public static ProviderConfigType Azure { get; } = new("azure"); - /// Rendered as a picture-in-picture floating panel. - public static McpAppsHostContextDetailsDisplayMode Pip { get; } = new("pip"); + /// Anthropic API endpoint. + public static ProviderConfigType Anthropic { get; } = new("anthropic"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(McpAppsHostContextDetailsDisplayMode left, McpAppsHostContextDetailsDisplayMode right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(ProviderConfigType left, ProviderConfigType right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(McpAppsHostContextDetailsDisplayMode left, McpAppsHostContextDetailsDisplayMode right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(ProviderConfigType left, ProviderConfigType right) => !(left == right); /// - public override bool Equals(object? obj) => obj is McpAppsHostContextDetailsDisplayMode other && Equals(other); + public override bool Equals(object? obj) => obj is ProviderConfigType other && Equals(other); /// - public bool Equals(McpAppsHostContextDetailsDisplayMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(ProviderConfigType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10835,65 +13166,62 @@ public McpAppsHostContextDetailsDisplayMode(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override McpAppsHostContextDetailsDisplayMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override ProviderConfigType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, McpAppsHostContextDetailsDisplayMode value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, ProviderConfigType value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsHostContextDetailsDisplayMode)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ProviderConfigType)); } } } -/// Platform type for responsive design. +/// Wire API format (openai/azure only). Defaults to "completions". [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct McpAppsHostContextDetailsPlatform : IEquatable +public readonly struct ProviderConfigWireApi : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public McpAppsHostContextDetailsPlatform(string value) + public ProviderConfigWireApi(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Host runs in a web browser. - public static McpAppsHostContextDetailsPlatform Web { get; } = new("web"); - - /// Host runs as a desktop application. - public static McpAppsHostContextDetailsPlatform Desktop { get; } = new("desktop"); + /// OpenAI Chat Completions wire format. + public static ProviderConfigWireApi Completions { get; } = new("completions"); - /// Host runs on a mobile device. - public static McpAppsHostContextDetailsPlatform Mobile { get; } = new("mobile"); + /// OpenAI Responses API wire format. + public static ProviderConfigWireApi Responses { get; } = new("responses"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(McpAppsHostContextDetailsPlatform left, McpAppsHostContextDetailsPlatform right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(ProviderConfigWireApi left, ProviderConfigWireApi right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(McpAppsHostContextDetailsPlatform left, McpAppsHostContextDetailsPlatform right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(ProviderConfigWireApi left, ProviderConfigWireApi right) => !(left == right); /// - public override bool Equals(object? obj) => obj is McpAppsHostContextDetailsPlatform other && Equals(other); + public override bool Equals(object? obj) => obj is ProviderConfigWireApi other && Equals(other); /// - public bool Equals(McpAppsHostContextDetailsPlatform other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(ProviderConfigWireApi other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10901,62 +13229,65 @@ public McpAppsHostContextDetailsPlatform(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override McpAppsHostContextDetailsPlatform Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override ProviderConfigWireApi Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, McpAppsHostContextDetailsPlatform value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, ProviderConfigWireApi value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsHostContextDetailsPlatform)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ProviderConfigWireApi)); } } } -/// UI theme preference per SEP-1865. +/// Reasoning summary mode for supported model clients. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct McpAppsHostContextDetailsTheme : IEquatable +public readonly struct OptionsUpdateReasoningSummary : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public McpAppsHostContextDetailsTheme(string value) + public OptionsUpdateReasoningSummary(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Light UI theme. - public static McpAppsHostContextDetailsTheme Light { get; } = new("light"); + /// Do not request reasoning summaries from the model. + public static OptionsUpdateReasoningSummary None { get; } = new("none"); - /// Dark UI theme. - public static McpAppsHostContextDetailsTheme Dark { get; } = new("dark"); + /// Request a concise summary of model reasoning. + public static OptionsUpdateReasoningSummary Concise { get; } = new("concise"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(McpAppsHostContextDetailsTheme left, McpAppsHostContextDetailsTheme right) => left.Equals(right); + /// Request a detailed summary of model reasoning. + public static OptionsUpdateReasoningSummary Detailed { get; } = new("detailed"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(McpAppsHostContextDetailsTheme left, McpAppsHostContextDetailsTheme right) => !(left == right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(OptionsUpdateReasoningSummary left, OptionsUpdateReasoningSummary right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(OptionsUpdateReasoningSummary left, OptionsUpdateReasoningSummary right) => !(left == right); /// - public override bool Equals(object? obj) => obj is McpAppsHostContextDetailsTheme other && Equals(other); + public override bool Equals(object? obj) => obj is OptionsUpdateReasoningSummary other && Equals(other); /// - public bool Equals(McpAppsHostContextDetailsTheme other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(OptionsUpdateReasoningSummary other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -10964,62 +13295,89 @@ public McpAppsHostContextDetailsTheme(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override McpAppsHostContextDetailsTheme Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override OptionsUpdateReasoningSummary Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, McpAppsHostContextDetailsTheme value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, OptionsUpdateReasoningSummary value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpAppsHostContextDetailsTheme)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(OptionsUpdateReasoningSummary)); } } } -/// How env values are passed to MCP servers (`direct` inlines literal values; `indirect` resolves at launch). +/// Session capability enabled for this session. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct OptionsUpdateEnvValueMode : IEquatable +public readonly struct SessionCapability : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public OptionsUpdateEnvValueMode(string value) + public SessionCapability(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Pass MCP server environment values as literal strings. - public static OptionsUpdateEnvValueMode Direct { get; } = new("direct"); + /// TUI-specific prompt hints such as keyboard shortcuts. + public static SessionCapability TuiHints { get; } = new("tui-hints"); - /// Resolve MCP server environment values from host-side references. - public static OptionsUpdateEnvValueMode Indirect { get; } = new("indirect"); + /// Plan-mode handling and instructions. + public static SessionCapability PlanMode { get; } = new("plan-mode"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(OptionsUpdateEnvValueMode left, OptionsUpdateEnvValueMode right) => left.Equals(right); + /// Memory tool and memories prompt section. + public static SessionCapability Memory { get; } = new("memory"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(OptionsUpdateEnvValueMode left, OptionsUpdateEnvValueMode right) => !(left == right); + /// Copilot CLI documentation tool and prompt section. + public static SessionCapability CliDocumentation { get; } = new("cli-documentation"); + + /// Interactive ask_user tool support. + public static SessionCapability AskUser { get; } = new("ask-user"); + + /// Interactive CLI identity and behavior. + public static SessionCapability InteractiveMode { get; } = new("interactive-mode"); + + /// Automatic hidden system notifications. + public static SessionCapability SystemNotifications { get; } = new("system-notifications"); + + /// SDK elicitation support. + public static SessionCapability Elicitation { get; } = new("elicitation"); + + /// Cross-session history tools and session-store SQL prompt/tool metadata. + public static SessionCapability SessionStore { get; } = new("session-store"); + + /// MCP Apps UI passthrough. + public static SessionCapability McpApps { get; } = new("mcp-apps"); + + /// Host-provided canvas rendering support. + public static SessionCapability CanvasRenderer { get; } = new("canvas-renderer"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SessionCapability left, SessionCapability right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SessionCapability left, SessionCapability right) => !(left == right); /// - public override bool Equals(object? obj) => obj is OptionsUpdateEnvValueMode other && Equals(other); + public override bool Equals(object? obj) => obj is SessionCapability other && Equals(other); /// - public bool Equals(OptionsUpdateEnvValueMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(SessionCapability other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -11027,20 +13385,20 @@ public OptionsUpdateEnvValueMode(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override OptionsUpdateEnvValueMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override SessionCapability Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, OptionsUpdateEnvValueMode value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, SessionCapability value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(OptionsUpdateEnvValueMode)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionCapability)); } } } @@ -12749,7 +15107,7 @@ public async Task PingAsync(string? message = null, CancellationToke return await CopilotClient.InvokeRpcAsync(_rpc, "ping", [request], cancellationToken); } - /// Performs the SDK server connection handshake and validates the optional connection token. + /// Performs the SDK server connection handshake and validates the optional connection token. Marked internal because this is JSON-RPC transport plumbing invoked automatically by an SDK client's own `connect()` wrapper, not a user-facing method. Stays internal as long as the SDK client owns the handshake; would only become public if the SDK ever exposed the raw schema surface to consumers without a connection wrapper. /// Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN. /// The to monitor for cancellation requests. The default is . /// Handshake result reporting the server's protocol version and package version on success. @@ -12789,6 +15147,12 @@ internal async Task ConnectAsync(string? token = null, Cancellati Interlocked.CompareExchange(ref field, new(_rpc), null) ?? field; + /// Plugins APIs. + public ServerPluginsApi Plugins => + field ?? + Interlocked.CompareExchange(ref field, new(_rpc), null) ?? + field; + /// Skills APIs. public ServerSkillsApi Skills => field ?? @@ -13024,6 +15388,165 @@ public async Task ReloadAsync(CancellationToken cancellationToken = default) } } +/// Provides server-scoped Plugins APIs. +[Experimental(Diagnostics.Experimental)] +public sealed class ServerPluginsApi +{ + private readonly JsonRpc _rpc; + + internal ServerPluginsApi(JsonRpc rpc) + { + _rpc = rpc; + } + + /// Lists plugins installed in user/global state. + /// The to monitor for cancellation requests. The default is . + /// Plugins installed in user/global state. + public async Task ListAsync(CancellationToken cancellationToken = default) + { + return await CopilotClient.InvokeRpcAsync(_rpc, "plugins.list", [], cancellationToken); + } + + /// Installs a plugin from a marketplace, GitHub repo, URL, or local path. + /// Plugin install spec. Accepts the same forms as the CLI: "plugin@marketplace" (marketplace install), "owner/repo" or "owner/repo:subpath" (GitHub direct), an http/https/ssh URL, or a local path. Direct (non-marketplace) installs are deprecated and will produce a deprecationWarning in the result. + /// Working directory used to resolve relative local paths in `source`. Defaults to the server's current working directory. + /// The to monitor for cancellation requests. The default is . + /// Result of installing a plugin. + public async Task InstallAsync(string source, string? workingDirectory = null, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(source); + + var request = new PluginsInstallRequest { Source = source, WorkingDirectory = workingDirectory }; + return await CopilotClient.InvokeRpcAsync(_rpc, "plugins.install", [request], cancellationToken); + } + + /// Uninstalls an installed plugin. + /// Plugin name or "plugin@marketplace" spec to uninstall. When ambiguous, prefer the fully-qualified spec. + /// The to monitor for cancellation requests. The default is . + public async Task UninstallAsync(string name, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(name); + + var request = new PluginsUninstallRequest { Name = name }; + await CopilotClient.InvokeRpcAsync(_rpc, "plugins.uninstall", [request], cancellationToken); + } + + /// Updates an installed plugin to its latest published version. + /// Plugin name or "plugin@marketplace" spec to update. + /// The to monitor for cancellation requests. The default is . + /// Result of updating a single plugin. + public async Task UpdateAsync(string name, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(name); + + var request = new PluginsUpdateRequest { Name = name }; + return await CopilotClient.InvokeRpcAsync(_rpc, "plugins.update", [request], cancellationToken); + } + + /// Updates every installed plugin to its latest published version. + /// The to monitor for cancellation requests. The default is . + /// Result of updating all installed plugins. + public async Task UpdateAllAsync(CancellationToken cancellationToken = default) + { + return await CopilotClient.InvokeRpcAsync(_rpc, "plugins.updateAll", [], cancellationToken); + } + + /// Enables installed plugins for new sessions. + /// Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API. + /// The to monitor for cancellation requests. The default is . + public async Task EnableAsync(IList names, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(names); + + var request = new PluginsEnableRequest { Names = names }; + await CopilotClient.InvokeRpcAsync(_rpc, "plugins.enable", [request], cancellationToken); + } + + /// Disables installed plugins for new sessions. + /// Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins. + /// The to monitor for cancellation requests. The default is . + public async Task DisableAsync(IList names, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(names); + + var request = new PluginsDisableRequest { Names = names }; + await CopilotClient.InvokeRpcAsync(_rpc, "plugins.disable", [request], cancellationToken); + } + + /// Marketplaces APIs. + public ServerPluginsMarketplacesApi Marketplaces => + field ?? + Interlocked.CompareExchange(ref field, new(_rpc), null) ?? + field; +} + +/// Provides server-scoped PluginsMarketplaces APIs. +[Experimental(Diagnostics.Experimental)] +public sealed class ServerPluginsMarketplacesApi +{ + private readonly JsonRpc _rpc; + + internal ServerPluginsMarketplacesApi(JsonRpc rpc) + { + _rpc = rpc; + } + + /// Lists all registered marketplaces (defaults + user-added). + /// The to monitor for cancellation requests. The default is . + /// All registered marketplaces, including built-in defaults. + public async Task ListAsync(CancellationToken cancellationToken = default) + { + return await CopilotClient.InvokeRpcAsync(_rpc, "plugins.marketplaces.list", [], cancellationToken); + } + + /// Registers a new marketplace from a source (owner/repo, URL, or local path). + /// Marketplace source. Accepts the same forms as the CLI: "owner/repo" or "owner/repo#ref" (GitHub), an http/https/ssh URL (optionally with #ref), a git scp-style URL (user@host:path), or a local path. The marketplace's own name (from its manifest) is used as the registration key. + /// The to monitor for cancellation requests. The default is . + /// Result of registering a new marketplace. + public async Task AddAsync(string source, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(source); + + var request = new PluginsMarketplacesAddRequest { Source = source }; + return await CopilotClient.InvokeRpcAsync(_rpc, "plugins.marketplaces.add", [request], cancellationToken); + } + + /// Removes a previously-registered marketplace. When the marketplace has dependent plugins and `force` is not set, the marketplace is left intact and the result lists the dependents so the caller can decide whether to retry with `force=true`. + /// Marketplace name to remove. + /// When true, also uninstall every plugin sourced from this marketplace. When false (default), removal is a no-op if any plugin from this marketplace is installed and the dependent plugin names are returned in the result. + /// The to monitor for cancellation requests. The default is . + /// Outcome of the remove attempt, including dependent-plugin info when applicable. + public async Task RemoveAsync(string name, bool? force = null, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(name); + + var request = new PluginsMarketplacesRemoveRequest { Name = name, Force = force }; + return await CopilotClient.InvokeRpcAsync(_rpc, "plugins.marketplaces.remove", [request], cancellationToken); + } + + /// Lists plugins advertised by a registered marketplace. + /// Marketplace name to browse. + /// The to monitor for cancellation requests. The default is . + /// Plugins advertised by the marketplace. + public async Task BrowseAsync(string name, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(name); + + var request = new PluginsMarketplacesBrowseRequest { Name = name }; + return await CopilotClient.InvokeRpcAsync(_rpc, "plugins.marketplaces.browse", [request], cancellationToken); + } + + /// Re-fetches one or all registered marketplace catalogs. + /// Marketplace name to refresh. When omitted, every registered marketplace is refreshed. + /// The to monitor for cancellation requests. The default is . + /// Result of refreshing one or more marketplace catalogs. + public async Task RefreshAsync(string? name = null, CancellationToken cancellationToken = default) + { + var request = new PluginsMarketplacesRefreshRequest { Name = name }; + return await CopilotClient.InvokeRpcAsync(_rpc, "plugins.marketplaces.refresh", [request], cancellationToken); + } +} + /// Provides server-scoped Skills APIs. public sealed class ServerSkillsApi { @@ -13165,6 +15688,14 @@ internal ServerSessionsApi(JsonRpc rpc) _rpc = rpc; } + /// Creates or resumes a local session and returns the opened session ID. + /// The to monitor for cancellation requests. The default is . + /// Result of opening a session. + public async Task OpenAsync(CancellationToken cancellationToken = default) + { + return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.open", [], cancellationToken); + } + /// Creates a new session by forking persisted history from an existing session. /// Source session ID to fork from. /// Optional event ID boundary. When provided, the fork includes only events before this ID (exclusive). When omitted, all events are included. @@ -13191,15 +15722,17 @@ public async Task ConnectAsync(string sessionId, return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.connect", [request], cancellationToken); } - /// Lists persisted sessions, optionally filtered by working-directory context. - /// When provided, only the first N sessions (sorted by modification time, newest first) load full metadata; remaining sessions return basic info only. Use 0 to return only basic info for every session. + /// Lists sessions, optionally filtered by source and working-directory context. Returned entries are discriminated by `isRemote`: local entries carry only the lightweight `LocalSessionMetadataValue` shape; remote entries carry the full `RemoteSessionMetadataValue` shape (repository, PR number, taskType, etc.). + /// Which session sources to include. Defaults to `local` for backward compatibility. + /// When provided, only the first N local sessions (sorted by modification time, newest first) load full metadata; remaining sessions return basic info only. Use 0 to return only basic info for every local session. Has no effect on remote entries (which always carry their full shape). /// Optional filter applied to the returned sessions. /// When true, include detached maintenance sessions. Defaults to false for user-facing session lists. + /// Only meaningful when `source` includes remote. When true, propagates errors from the remote service instead of silently returning an empty remote list. Defaults to false. /// The to monitor for cancellation requests. The default is . - /// Persisted sessions matching the filter, ordered most-recently-modified first. - public async Task ListAsync(long? metadataLimit = null, SessionListFilter? filter = null, bool? includeDetached = null, CancellationToken cancellationToken = default) + /// Sessions matching the filter, ordered most-recently-modified first. + public async Task ListAsync(SessionSource? source = null, long? metadataLimit = null, SessionListFilter? filter = null, bool? includeDetached = null, bool? throwOnError = null, CancellationToken cancellationToken = default) { - var request = new SessionsListRequest { MetadataLimit = metadataLimit, Filter = filter, IncludeDetached = includeDetached }; + var request = new SessionsListRequest { Source = source, MetadataLimit = metadataLimit, Filter = filter, IncludeDetached = includeDetached, ThrowOnError = throwOnError }; return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.list", [request], cancellationToken); } @@ -13237,11 +15770,11 @@ public async Task GetLastForContextAsync(Sessio return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.getLastForContext", [request], cancellationToken); } - /// Computes the absolute path to a session's persisted events.jsonl file. + /// Computes the absolute path to a session's persisted events.jsonl file. Internal: filesystem paths are only meaningful in-process (CLI and runtime share a filesystem). Currently used by the CLI's contribution-graph feature to read historical events directly. Remote SDK consumers must not depend on this; a proper event-query API would replace it if the contribution graph ever needed to work over the wire. /// Session ID whose event-log file path to compute. /// The to monitor for cancellation requests. The default is . /// Absolute path to the session's events.jsonl file on disk. - public async Task GetEventFilePathAsync(string sessionId, CancellationToken cancellationToken = default) + internal async Task GetEventFilePathAsync(string sessionId, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(sessionId); @@ -13269,11 +15802,11 @@ public async Task CheckInUseAsync(IList sessio return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.checkInUse", [request], cancellationToken); } - /// Returns a session's persisted remote-steerable flag, if any has been recorded. + /// Returns a session's persisted remote-steerable flag, if any has been recorded. Internal: this is CLI-specific book-keeping used by `--continue` / `--resume` to inherit the prior session's remote-steerable preference. SDK consumers that want similar behavior should manage their own persistence around start/stop calls rather than relying on this runtime-side flag. /// Session ID to look up the persisted remote-steerable flag for. /// The to monitor for cancellation requests. The default is . /// The session's persisted remote-steerable flag, or omitted when no value has been persisted. - public async Task GetPersistedRemoteSteerableAsync(string sessionId, CancellationToken cancellationToken = default) + internal async Task GetPersistedRemoteSteerableAsync(string sessionId, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(sessionId); @@ -13346,7 +15879,7 @@ public async Task ReleaseLockAsync(string sessionId, /// Session metadata records to enrich. Records that already have summary and context are returned unchanged. /// The to monitor for cancellation requests. The default is . /// The enriched metadata records, with summary and context fields backfilled where available. Sessions confirmed empty and unnamed are omitted. - public async Task EnrichMetadataAsync(IList sessions, CancellationToken cancellationToken = default) + public async Task EnrichMetadataAsync(IList sessions, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(sessions); @@ -13390,6 +15923,112 @@ public async Task SetAdditionalPluginsAsync( var request = new SessionsSetAdditionalPluginsRequest { Plugins = plugins }; return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.setAdditionalPlugins", [request], cancellationToken); } + + /// Gets the dynamic-context board entry count associated with a session, when available. Internal: this exists solely so CLI telemetry events (`rem_spawn_gate`, `rem_consolidation_complete`) can pair START / END board counts around the detached rem-agent spawn. "Dynamic context board" is a runtime-internal concept that is not part of the public SDK contract; the long-term plan is to relocate the telemetry emission into the runtime so this method can be deleted entirely. + /// Session ID whose board entry count should be returned. + /// The to monitor for cancellation requests. The default is . + /// Dynamic-context board entry count, when available. + internal async Task GetBoardEntryCountAsync(string sessionId, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(sessionId); + + var request = new SessionsGetBoardEntryCountRequest { SessionId = sessionId }; + return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.getBoardEntryCount", [request], cancellationToken); + } + + /// Attaches the runtime-managed remote-control singleton to a session, awaiting initial setup. If remote control is already attached to a different session, the singleton is transferred (preserving the underlying Mission Control connection). Returns the final status. + /// Local session id to attach remote control to. + /// Configuration for the runtime-managed remote-control singleton. + /// The to monitor for cancellation requests. The default is . + /// Wrapper for the singleton's current status. + public async Task StartRemoteControlAsync(string sessionId, RemoteControlConfig config, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(sessionId); + ArgumentNullException.ThrowIfNull(config); + + var request = new SessionsStartRemoteControlRequest { SessionId = sessionId, Config = config }; + return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.startRemoteControl", [request], cancellationToken); + } + + /// Atomically rebinds the remote-control singleton to a different session, preserving the underlying Mission Control connection. When `expectedFromSessionId` is provided and does not match the singleton's current `attachedSessionId`, the transfer is rejected with `transferred: false` and the current status is returned unchanged. + /// Local session id to point remote control at. + /// When provided, the transfer is rejected unless the singleton currently points at this session id (compare-and-swap semantics to avoid clobbering newer state). + /// The to monitor for cancellation requests. The default is . + /// Outcome of a transferRemoteControl call. + public async Task TransferRemoteControlAsync(string toSessionId, string? expectedFromSessionId = null, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(toSessionId); + + var request = new SessionsTransferRemoteControlRequest { ToSessionId = toSessionId, ExpectedFromSessionId = expectedFromSessionId }; + return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.transferRemoteControl", [request], cancellationToken); + } + + /// Patches the steering state of the active remote-control singleton. When remote control is off, this is a no-op and the off status is returned. Today only `enabled: true` is actionable on the underlying exporter; passing `false` is reserved for future use. + /// Target steering state. Today only `true` is actionable on the underlying exporter; `false` is reserved for future use. + /// The to monitor for cancellation requests. The default is . + /// Wrapper for the singleton's current status. + public async Task SetRemoteControlSteeringAsync(bool enabled, CancellationToken cancellationToken = default) + { + var request = new SessionsSetRemoteControlSteeringRequest { Enabled = enabled }; + return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.setRemoteControlSteering", [request], cancellationToken); + } + + /// Stops the remote-control singleton. When `expectedSessionId` is provided and does not match the singleton's current `attachedSessionId`, the stop is rejected with `stopped: false` and the current status is returned unchanged (unless `force` is set, in which case the singleton is unconditionally torn down). + /// When provided, the stop is rejected unless the singleton currently points at this session id (compare-and-swap semantics). + /// When true, the singleton is unconditionally torn down regardless of `expectedSessionId`. Use during shutdown or explicit `/remote off`. + /// The to monitor for cancellation requests. The default is . + /// Outcome of a stopRemoteControl call. + public async Task StopRemoteControlAsync(string? expectedSessionId = null, bool? force = null, CancellationToken cancellationToken = default) + { + var request = new SessionsStopRemoteControlRequest { ExpectedSessionId = expectedSessionId, Force = force }; + return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.stopRemoteControl", [request], cancellationToken); + } + + /// Returns the current state of the remote-control singleton, including the attached session id and frontend URL when active. + /// The to monitor for cancellation requests. The default is . + /// Wrapper for the singleton's current status. + public async Task GetRemoteControlStatusAsync(CancellationToken cancellationToken = default) + { + return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.getRemoteControlStatus", [], cancellationToken); + } + + /// Cursor-based long-poll for sessions spawned by the runtime (e.g. in response to a Mission Control `start_session` command). The cursor is an opaque token; pass it back to receive only spawn events that occurred AFTER the cursor was issued. Omit the cursor on the first call to receive any events buffered since the runtime started. Internal: this is a CLI background-daemon plumbing primitive. SDK consumers that need to react to runtime-spawned sessions should subscribe to a higher-level event stream rather than driving a long-poll loop. + /// Opaque cursor returned by a previous poll. Omit on the first call to receive any spawn events buffered since the runtime started. + /// Milliseconds to wait for new spawn events when the cursor is at the tail. 0 (default) returns immediately even if no events are buffered. Capped at 60000ms. + /// The to monitor for cancellation requests. The default is . + /// Batch of spawn events plus a cursor for follow-up polls. + internal async Task PollSpawnedSessionsAsync(string? cursor = null, TimeSpan? waitMs = null, CancellationToken cancellationToken = default) + { + var request = new SessionsPollSpawnedSessionsRequest { Cursor = cursor, Wait = waitMs }; + return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.pollSpawnedSessions", [request], cancellationToken); + } + + /// Registers extension-provided tools on the given session, gated by an optional `enabled` callback. Returns an opaque unsubscribe function the caller must invoke to deregister the tools when the extension is torn down. Marked internal because `loader`, `enabled`, and the returned `unsubscribe` are in-process handles that cannot cross the JSON-RPC boundary. Disappears once extension discovery / launch / tool registration are owned by the runtime: SDK consumers will pass pure config (search paths, disabled ids) via `SessionOptions` and the runtime will resolve, launch, register, and tear down extensions itself. + /// Session to register extension tools on. + /// In-process ExtensionLoader handle (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, extension discovery/launch moves entirely into the runtime — the CLI passes pure config (search paths, disabled ids) via SessionOptions instead. + /// Optional registration options. + /// The to monitor for cancellation requests. The default is . + /// Handle for releasing the extension tool registration. + internal async Task RegisterExtensionToolsOnSessionAsync(string sessionId, object loader, SessionsRegisterExtensionToolsOnSessionOptions? options = null, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(sessionId); + ArgumentNullException.ThrowIfNull(loader); + + var request = new RegisterExtensionToolsParams { SessionId = sessionId, Loader = CopilotClient.ToJsonElementForWire(loader)!.Value, Options = options }; + return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.registerExtensionToolsOnSession", [request], cancellationToken); + } + + /// Attaches (or detaches) an in-process ExtensionController delegate for the given session, used by shared-API surfaces that need to query or modify the session's extension state. Pass `controller: undefined` to detach. Marked internal because the controller is an in-process object that cannot cross the JSON-RPC boundary. Disappears alongside `registerExtensionToolsOnSession`: once the runtime owns extension management, the public surface exposes list/enable/disable/reload as dedicated RPCs served by the runtime. + /// Session to attach the extension controller delegate to. + /// In-process ExtensionController delegate (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. The post-SDK extension surface exposes list/enable/disable/reload via dedicated RPCs served by the runtime. + /// The to monitor for cancellation requests. The default is . + internal async Task ConfigureSessionExtensionsAsync(string sessionId, object? controller = null, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(sessionId); + + var request = new ConfigureSessionExtensionsParams { SessionId = sessionId, Controller = CopilotClient.ToJsonElementForWire(controller) }; + await CopilotClient.InvokeRpcAsync(_rpc, "sessions.configureSessionExtensions", [request], cancellationToken); + } } /// Provides server-scoped AgentRegistry APIs. @@ -13632,7 +16271,7 @@ public async Task SuspendAsync(CancellationToken cancellationToken = default) /// If true, adds the message to the front of the queue instead of the end. /// If false, this message will not trigger a Premium Request Unit charge. User messages default to billable. /// If set, the request will fail if the named tool is not available when this message is among the user messages at the start of the current exchange. - /// Optional provenance tag copied to the resulting user.message event. Supported values are `system`, `command-*`, and `schedule-*`. + /// Optional provenance tag copied to the resulting user.message event. Must match one of three forms: the literal `system`, `command-<command-id>` for messages originating from a command (e.g. slash command, Mission Control command), or `schedule-<numeric-id>` for messages originating from a scheduled job. /// The UI mode the agent was in when this message was sent. Defaults to the session's current mode. /// Custom HTTP headers to include in outbound model requests for this turn. Merged with session-level provider headers; per-turn headers augment and overwrite session-level headers with the same key. /// W3C Trace Context traceparent header for distributed tracing of this agent turn. @@ -13641,12 +16280,12 @@ public async Task SuspendAsync(CancellationToken cancellationToken = default) /// The to monitor for cancellation requests. The default is . /// Result of sending a user message. [Experimental(Diagnostics.Experimental)] - public async Task SendAsync(string prompt, string? displayPrompt = null, IList? attachments = null, SendMode? mode = null, bool? prepend = null, bool? billable = null, string? requiredTool = null, object? source = null, SendAgentMode? agentMode = null, IDictionary? requestHeaders = null, string? traceparent = null, string? tracestate = null, bool? wait = null, CancellationToken cancellationToken = default) + public async Task SendAsync(string prompt, string? displayPrompt = null, IList? attachments = null, SendMode? mode = null, bool? prepend = null, bool? billable = null, string? requiredTool = null, string? source = null, SendAgentMode? agentMode = null, IDictionary? requestHeaders = null, string? traceparent = null, string? tracestate = null, bool? wait = null, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(prompt); _session.ThrowIfDisposed(); - var request = new SendRequest { SessionId = _session.SessionId, Prompt = prompt, DisplayPrompt = displayPrompt, Attachments = attachments, Mode = mode, Prepend = prepend, Billable = billable, RequiredTool = requiredTool, Source = CopilotClient.ToJsonElementForWire(source), AgentMode = agentMode, RequestHeaders = requestHeaders, Traceparent = traceparent, Tracestate = tracestate, Wait = wait }; + var request = new SendRequest { SessionId = _session.SessionId, Prompt = prompt, DisplayPrompt = displayPrompt, Attachments = attachments, Mode = mode, Prepend = prepend, Billable = billable, RequiredTool = requiredTool, Source = source, AgentMode = agentMode, RequestHeaders = requestHeaders, Traceparent = traceparent, Tracestate = tracestate, Wait = wait }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.send", [request], cancellationToken); } @@ -14018,6 +16657,17 @@ public async Task DeleteAsync(CancellationToken cancellationToken = default) var request = new SessionPlanDeleteRequest { SessionId = _session.SessionId }; await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plan.delete", [request], cancellationToken); } + + /// Reads todo rows from the session SQL database for plan rendering. + /// The to monitor for cancellation requests. The default is . + /// Todo rows read from the session SQL database. Empty when no session database is available. + public async Task ReadSqlTodosAsync(CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var request = new SessionPlanReadSqlTodosRequest { SessionId = _session.SessionId }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plan.readSqlTodos", [request], cancellationToken); + } } /// Provides session-scoped Workspaces APIs. @@ -14488,9 +17138,9 @@ internal McpApi(CopilotSession session) _session = session; } - /// Lists MCP servers configured for the session and their connection status. + /// Lists MCP servers configured for the session, their connection status, and host-level state. The host-level state (disabled/filtered servers, failed/needs-auth/pending connections, mcp3p policy, full config) is empty/zero when no MCP host has been initialized for the session. /// The to monitor for cancellation requests. The default is . - /// MCP servers configured for the session, with their connection status. + /// MCP servers configured for the session, with their connection status and host-level state. public async Task ListAsync(CancellationToken cancellationToken = default) { _session.ThrowIfDisposed(); @@ -14499,6 +17149,19 @@ public async Task ListAsync(CancellationToken cancellationToken = return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.list", [request], cancellationToken); } + /// Lists the tools exposed by a connected MCP server on this session's host. + /// Name of the connected MCP server whose tools to list. + /// The to monitor for cancellation requests. The default is . + /// Tools exposed by the connected MCP server. Throws when the server is not connected. + public async Task ListToolsAsync(string serverName, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(serverName); + _session.ThrowIfDisposed(); + + var request = new McpListToolsRequest { SessionId = _session.SessionId, ServerName = serverName }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.listTools", [request], cancellationToken); + } + /// Enables an MCP server for the session. /// Name of the MCP server to enable. /// The to monitor for cancellation requests. The default is . @@ -14533,6 +17196,19 @@ public async Task ReloadAsync(CancellationToken cancellationToken = default) await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.reload", [request], cancellationToken); } + /// Reloads MCP server connections for the session with an explicit host-provided configuration. + /// Opaque runtime MCP reload configuration. Marked internal: an in-process runtime shape (reloadMcpServers throws over the wire). + /// The to monitor for cancellation requests. The default is . + /// MCP server startup filtering result. + public async Task ReloadWithConfigAsync(object config, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(config); + _session.ThrowIfDisposed(); + + var request = new McpReloadWithConfigRequest { SessionId = _session.SessionId, Config = CopilotClient.ToJsonElementForWire(config)!.Value }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.reloadWithConfig", [request], cancellationToken); + } + /// Runs an MCP sampling inference on behalf of an MCP server. /// Caller-provided unique identifier for this sampling execution. Use this same ID with cancelSamplingExecution to cancel the in-flight call. Must be unique within the session for the lifetime of the call. /// Name of the MCP server that initiated the sampling request. @@ -14588,6 +17264,102 @@ public async Task RemoveGitHubAsync(CancellationToken can return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.removeGitHub", [request], cancellationToken); } + /// Configures the built-in GitHub MCP server for the session's current auth context. + /// Opaque runtime auth info for GitHub MCP configuration. Marked internal: an in-process runtime shape (configureGitHubMcp is a no-op over the wire). + /// The to monitor for cancellation requests. The default is . + /// Result of configuring GitHub MCP. + public async Task ConfigureGitHubAsync(object authInfo, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(authInfo); + _session.ThrowIfDisposed(); + + var request = new McpConfigureGitHubRequest { SessionId = _session.SessionId, AuthInfo = CopilotClient.ToJsonElementForWire(authInfo)!.Value }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.configureGitHub", [request], cancellationToken); + } + + /// Starts an individual MCP server on the session's host. + /// Name of the MCP server to start. + /// Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime shape supplied only by in-process CLI callers. + /// The to monitor for cancellation requests. The default is . + public async Task StartServerAsync(string serverName, object config, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(serverName); + ArgumentNullException.ThrowIfNull(config); + _session.ThrowIfDisposed(); + + var request = new McpStartServerRequest { SessionId = _session.SessionId, ServerName = serverName, Config = CopilotClient.ToJsonElementForWire(config)!.Value }; + await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.startServer", [request], cancellationToken); + } + + /// Restarts an individual MCP server on the session's host (stops then starts). + /// Name of the MCP server to restart. + /// Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime shape supplied only by in-process CLI callers. + /// The to monitor for cancellation requests. The default is . + public async Task RestartServerAsync(string serverName, object config, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(serverName); + ArgumentNullException.ThrowIfNull(config); + _session.ThrowIfDisposed(); + + var request = new McpRestartServerRequest { SessionId = _session.SessionId, ServerName = serverName, Config = CopilotClient.ToJsonElementForWire(config)!.Value }; + await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.restartServer", [request], cancellationToken); + } + + /// Stops an individual MCP server on the session's host. + /// Name of the MCP server to stop. + /// The to monitor for cancellation requests. The default is . + public async Task StopServerAsync(string serverName, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(serverName); + _session.ThrowIfDisposed(); + + var request = new McpStopServerRequest { SessionId = _session.SessionId, ServerName = serverName }; + await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.stopServer", [request], cancellationToken); + } + + /// Registers a pre-connected external MCP client (e.g. IDE) on the session's host. The caller retains lifecycle ownership of the client and transport. Marked internal because the `client` and `transport` arguments are in-process MCP SDK instances that cannot be serialized across the JSON-RPC boundary; once the CLI moves on top of the SDK, external clients will be expressed as transport configs the runtime can construct itself. + /// Logical server name for the external client. + /// In-process MCP Client instance. Marked internal: cannot be serialized across the JSON-RPC boundary. + /// In-process MCP Transport instance. Marked internal: cannot be serialized across the JSON-RPC boundary. + /// In-process server config (MCPServerConfig) paired with the in-process client/transport. Marked internal alongside its companions. + /// The to monitor for cancellation requests. The default is . + public async Task RegisterExternalClientAsync(string serverName, object client, object transport, object config, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(serverName); + ArgumentNullException.ThrowIfNull(client); + ArgumentNullException.ThrowIfNull(transport); + ArgumentNullException.ThrowIfNull(config); + _session.ThrowIfDisposed(); + + var request = new McpRegisterExternalClientRequest { SessionId = _session.SessionId, ServerName = serverName, Client = CopilotClient.ToJsonElementForWire(client)!.Value, Transport = CopilotClient.ToJsonElementForWire(transport)!.Value, Config = CopilotClient.ToJsonElementForWire(config)!.Value }; + await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.registerExternalClient", [request], cancellationToken); + } + + /// Unregisters a previously registered external MCP client by server name. Marked internal as the paired companion of `registerExternalClient`: only in-process callers that registered a client this way can meaningfully unregister it. Disappears alongside `registerExternalClient`: once external clients are described to the runtime as config rather than handed in as instances, lifecycle (including deregistration) is owned entirely by the runtime. + /// Server name of the external client to unregister. + /// The to monitor for cancellation requests. The default is . + public async Task UnregisterExternalClientAsync(string serverName, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(serverName); + _session.ThrowIfDisposed(); + + var request = new McpUnregisterExternalClientRequest { SessionId = _session.SessionId, ServerName = serverName }; + await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.unregisterExternalClient", [request], cancellationToken); + } + + /// Checks whether a named MCP server is currently running on the session's host. + /// Name of the MCP server to check. + /// The to monitor for cancellation requests. The default is . + /// Whether the named MCP server is running. + public async Task IsServerRunningAsync(string serverName, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(serverName); + _session.ThrowIfDisposed(); + + var request = new McpIsServerRunningRequest { SessionId = _session.SessionId, ServerName = serverName }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.isServerRunning", [request], cancellationToken); + } + /// Oauth APIs. public McpOauthApi Oauth => field ?? @@ -14612,6 +17384,20 @@ internal McpOauthApi(CopilotSession session) _session = session; } + /// Responds to a pending MCP OAuth provider request. Marked internal because the `provider` argument is an in-process OAuthClientProvider instance that cannot be carried over the wire; the public OAuth surface will route the response through a wire-clean handshake once the CLI moves on top of the SDK. + /// OAuth request identifier from mcp.oauth_required. + /// In-process OAuthClientProvider instance, or omitted to deny. Marked internal: cannot be serialized across the JSON-RPC boundary. + /// The to monitor for cancellation requests. The default is . + /// Empty result after recording the MCP OAuth response. + public async Task RespondAsync(string requestId, object? provider = null, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(requestId); + _session.ThrowIfDisposed(); + + var request = new McpOauthRespondRequest { SessionId = _session.SessionId, RequestId = requestId, Provider = CopilotClient.ToJsonElementForWire(provider) }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.oauth.respond", [request], cancellationToken); + } + /// Starts OAuth authentication for a remote MCP server. /// Name of the remote MCP server to authenticate. /// 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. @@ -14746,6 +17532,17 @@ public async Task ListAsync(CancellationToken cancellationToken = de var request = new SessionPluginsListRequest { SessionId = _session.SessionId }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.list", [request], cancellationToken); } + + /// Reloads the session's plugin set, refreshing MCP servers, custom agents, hooks, and skills cache so SDK-driven changes via `server.plugins.*` take effect immediately. + /// Optional flags controlling which side effects the reload performs. + /// The to monitor for cancellation requests. The default is . + public async Task ReloadAsync(PluginsReloadRequest? request = null, CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var rpcRequest = new PluginsReloadRequestWithSession { SessionId = _session.SessionId, ReloadMcp = request?.ReloadMcp, ReloadCustomAgents = request?.ReloadCustomAgents, ReloadHooks = request?.ReloadHooks, DeferRepoHooks = request?.DeferRepoHooks }; + await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.reload", [rpcRequest], cancellationToken); + } } /// Provides session-scoped Options APIs. @@ -14761,13 +17558,15 @@ internal OptionsApi(CopilotSession session) /// Patches the genuinely-mutable subset of session options. /// The model ID to use for assistant turns. + /// Per-property model capability overrides for the selected model. /// Reasoning effort for the selected model (model-defined enum). + /// Reasoning summary mode for supported model clients. /// Identifier of the client driving the session. /// Identifier sent to LSP-style integrations. /// Stable integration identifier used for analytics and rate-limit attribution. /// Map of feature-flag IDs to their boolean enabled state. /// Whether experimental capabilities are enabled. - /// Custom model-provider configuration (BYOK). Opaque shape; see `ProviderConfig` in the runtime. + /// Custom model-provider configuration (BYOK). /// Absolute working-directory path for shell tools. /// Allowlist of tool names available to this session. /// Denylist of tool names for this session. @@ -14775,7 +17574,7 @@ internal OptionsApi(CopilotSession session) /// Whether shell-script safety heuristics are enabled. /// Shell init profile (`None` or `NonInteractive`). /// Per-shell process flags (e.g., `pwsh` arguments). - /// Sandbox configuration shape; opaque to SDK consumers. See `SandboxConfig` in the runtime. + /// Resolved sandbox configuration. /// Whether interactive shell sessions are logged. /// How env values are passed to MCP servers (`direct` inlines literal values; `indirect` resolves at launch). /// Additional directories to search for skills. @@ -14796,21 +17595,23 @@ internal OptionsApi(CopilotSession session) /// Whether to surface reasoning-summary events from the model. /// Runtime context discriminator (e.g., `cli`, `actions`). /// Override directory for the session-events log. When unset, the runtime's default events log directory is used. - /// Additional content-exclusion policies to merge into the session's policy set. Opaque shape; see `ContentExclusionApiResponse` in the runtime. + /// Additional content-exclusion policies to merge into the session's policy set. /// Whether to expose the `manage_schedule` tool to the agent. The runtime always owns the per-session schedule registry; this flag only controls tool exposure (typically gated to staff users). + /// Replaces the session's capability set with the given list. Use to enable or disable capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the field to leave the existing capability set unchanged. /// Whether to skip embedding retrieval pipeline initialization and execution. /// Organization-level custom instructions to inject into the system prompt. /// Whether to enable loading of `.github/hooks/` filesystem hooks. Separate from the SDK callback hook mechanism. /// Whether to enable host git operations (context resolution, child repo scanning, git info in system prompt). /// Whether to enable cross-session store writes and reads. /// Whether to enable skill directory scanning and loading. Falls back to enableConfigDiscovery when unset. + /// Context tier for models with tiered pricing. The session uses this to derive effective `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits honor the selected tier. /// The to monitor for cancellation requests. The default is . /// Indicates whether the session options patch was applied successfully. - public async Task UpdateAsync(string? model = null, string? reasoningEffort = null, string? clientName = null, string? lspClientName = null, string? integrationId = null, IDictionary? featureFlags = null, bool? isExperimentalMode = null, object? provider = null, string? workingDirectory = null, IList? availableTools = null, IList? excludedTools = null, OptionsUpdateToolFilterPrecedence? toolFilterPrecedence = null, bool? enableScriptSafety = null, string? shellInitProfile = null, IList? shellProcessFlags = null, object? sandboxConfig = null, bool? logInteractiveShells = null, OptionsUpdateEnvValueMode? envValueMode = null, IList? skillDirectories = null, IList? disabledSkills = null, bool? enableOnDemandInstructionDiscovery = null, IList? installedPlugins = null, bool? customAgentsLocalOnly = null, bool? suppressCustomAgentPrompt = null, bool? skipCustomInstructions = null, IList? disabledInstructionSources = null, bool? coauthorEnabled = null, string? trajectoryFile = null, bool? enableStreaming = null, string? copilotUrl = null, bool? askUserDisabled = null, bool? continueOnAutoMode = null, bool? runningInInteractiveMode = null, bool? enableReasoningSummaries = null, string? agentContext = null, string? eventsLogDirectory = null, IList? additionalContentExclusionPolicies = null, bool? manageScheduleEnabled = null, bool? skipEmbeddingRetrieval = null, string? organizationCustomInstructions = null, bool? enableFileHooks = null, bool? enableHostGitOperations = null, bool? enableSessionStore = null, bool? enableSkills = null, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string? model = null, ModelCapabilitiesOverride? modelCapabilitiesOverrides = null, string? reasoningEffort = null, OptionsUpdateReasoningSummary? reasoningSummary = null, string? clientName = null, string? lspClientName = null, string? integrationId = null, IDictionary? featureFlags = null, bool? isExperimentalMode = null, ProviderConfig? provider = null, string? workingDirectory = null, IList? availableTools = null, IList? excludedTools = null, OptionsUpdateToolFilterPrecedence? toolFilterPrecedence = null, bool? enableScriptSafety = null, string? shellInitProfile = null, IList? shellProcessFlags = null, SandboxConfig? sandboxConfig = null, bool? logInteractiveShells = null, OptionsUpdateEnvValueMode? envValueMode = null, IList? skillDirectories = null, IList? disabledSkills = null, bool? enableOnDemandInstructionDiscovery = null, IList? installedPlugins = null, bool? customAgentsLocalOnly = null, bool? suppressCustomAgentPrompt = null, bool? skipCustomInstructions = null, IList? disabledInstructionSources = null, bool? coauthorEnabled = null, string? trajectoryFile = null, bool? enableStreaming = null, string? copilotUrl = null, bool? askUserDisabled = null, bool? continueOnAutoMode = null, bool? runningInInteractiveMode = null, bool? enableReasoningSummaries = null, string? agentContext = null, string? eventsLogDirectory = null, IList? additionalContentExclusionPolicies = null, bool? manageScheduleEnabled = null, IList? sessionCapabilities = null, bool? skipEmbeddingRetrieval = null, string? organizationCustomInstructions = null, bool? enableFileHooks = null, bool? enableHostGitOperations = null, bool? enableSessionStore = null, bool? enableSkills = null, OptionsUpdateContextTier? contextTier = null, CancellationToken cancellationToken = default) { _session.ThrowIfDisposed(); - var request = new SessionUpdateOptionsParams { SessionId = _session.SessionId, Model = model, ReasoningEffort = reasoningEffort, ClientName = clientName, LspClientName = lspClientName, IntegrationId = integrationId, FeatureFlags = featureFlags, IsExperimentalMode = isExperimentalMode, Provider = CopilotClient.ToJsonElementForWire(provider), WorkingDirectory = workingDirectory, AvailableTools = availableTools, ExcludedTools = excludedTools, ToolFilterPrecedence = toolFilterPrecedence, EnableScriptSafety = enableScriptSafety, ShellInitProfile = shellInitProfile, ShellProcessFlags = shellProcessFlags, SandboxConfig = CopilotClient.ToJsonElementForWire(sandboxConfig), LogInteractiveShells = logInteractiveShells, EnvValueMode = envValueMode, SkillDirectories = skillDirectories, DisabledSkills = disabledSkills, EnableOnDemandInstructionDiscovery = enableOnDemandInstructionDiscovery, InstalledPlugins = installedPlugins, CustomAgentsLocalOnly = customAgentsLocalOnly, SuppressCustomAgentPrompt = suppressCustomAgentPrompt, SkipCustomInstructions = skipCustomInstructions, DisabledInstructionSources = disabledInstructionSources, CoauthorEnabled = coauthorEnabled, TrajectoryFile = trajectoryFile, EnableStreaming = enableStreaming, CopilotUrl = copilotUrl, AskUserDisabled = askUserDisabled, ContinueOnAutoMode = continueOnAutoMode, RunningInInteractiveMode = runningInInteractiveMode, EnableReasoningSummaries = enableReasoningSummaries, AgentContext = agentContext, EventsLogDirectory = eventsLogDirectory, AdditionalContentExclusionPolicies = additionalContentExclusionPolicies?.Select(static v => CopilotClient.ToJsonElementForWire(v)!.Value).ToList(), ManageScheduleEnabled = manageScheduleEnabled, SkipEmbeddingRetrieval = skipEmbeddingRetrieval, OrganizationCustomInstructions = organizationCustomInstructions, EnableFileHooks = enableFileHooks, EnableHostGitOperations = enableHostGitOperations, EnableSessionStore = enableSessionStore, EnableSkills = enableSkills }; + var request = new SessionUpdateOptionsParams { SessionId = _session.SessionId, Model = model, ModelCapabilitiesOverrides = modelCapabilitiesOverrides, ReasoningEffort = reasoningEffort, ReasoningSummary = reasoningSummary, ClientName = clientName, LspClientName = lspClientName, IntegrationId = integrationId, FeatureFlags = featureFlags, IsExperimentalMode = isExperimentalMode, Provider = provider, WorkingDirectory = workingDirectory, AvailableTools = availableTools, ExcludedTools = excludedTools, ToolFilterPrecedence = toolFilterPrecedence, EnableScriptSafety = enableScriptSafety, ShellInitProfile = shellInitProfile, ShellProcessFlags = shellProcessFlags, SandboxConfig = sandboxConfig, LogInteractiveShells = logInteractiveShells, EnvValueMode = envValueMode, SkillDirectories = skillDirectories, DisabledSkills = disabledSkills, EnableOnDemandInstructionDiscovery = enableOnDemandInstructionDiscovery, InstalledPlugins = installedPlugins, CustomAgentsLocalOnly = customAgentsLocalOnly, SuppressCustomAgentPrompt = suppressCustomAgentPrompt, SkipCustomInstructions = skipCustomInstructions, DisabledInstructionSources = disabledInstructionSources, CoauthorEnabled = coauthorEnabled, TrajectoryFile = trajectoryFile, EnableStreaming = enableStreaming, CopilotUrl = copilotUrl, AskUserDisabled = askUserDisabled, ContinueOnAutoMode = continueOnAutoMode, RunningInInteractiveMode = runningInInteractiveMode, EnableReasoningSummaries = enableReasoningSummaries, AgentContext = agentContext, EventsLogDirectory = eventsLogDirectory, AdditionalContentExclusionPolicies = additionalContentExclusionPolicies, ManageScheduleEnabled = manageScheduleEnabled, SessionCapabilities = sessionCapabilities, SkipEmbeddingRetrieval = skipEmbeddingRetrieval, OrganizationCustomInstructions = organizationCustomInstructions, EnableFileHooks = enableFileHooks, EnableHostGitOperations = enableHostGitOperations, EnableSessionStore = enableSessionStore, EnableSkills = enableSkills, ContextTier = contextTier }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.options.update", [request], cancellationToken); } } @@ -15065,6 +17866,17 @@ internal TelemetryApi(CopilotSession session) _session = session; } + /// Gets the telemetry engagement ID currently associated with the session, when available. + /// The to monitor for cancellation requests. The default is . + /// Telemetry engagement ID for the session, when available. + public async Task GetEngagementIdAsync(CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var request = new SessionTelemetryGetEngagementIdRequest { SessionId = _session.SessionId }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.telemetry.getEngagementId", [request], cancellationToken); + } + /// Sets feature override key/value pairs to attach to subsequent telemetry events for the session. /// Override key/value pairs to attach to subsequent telemetry events from this session. Replaces any previously-set overrides. /// The to monitor for cancellation requests. The default is . @@ -15089,6 +17901,21 @@ internal UiApi(CopilotSession session) _session = session; } + /// Runs a transient no-tools model query against the current conversation context. + /// Question to answer from the current conversation context. + /// In-process streaming callback `(text) => void` invoked with each token as the model emits it. Marked internal: excluded from the public SDK surface. In a process-separated SDK this is replaced by a streaming RPC that yields chunks and a final answer. + /// In-process `AbortSignal` forwarded to the model client to cancel an in-flight request. Marked internal: excluded from the public SDK surface. Replaced by an explicit cancellation token + cancel RPC in the SDK migration. + /// The to monitor for cancellation requests. The default is . + /// Transient answer generated from current conversation context. + public async Task EphemeralQueryAsync(string question, object? onChunk = null, object? abortSignal = null, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(question); + _session.ThrowIfDisposed(); + + var request = new UIEphemeralQueryRequest { SessionId = _session.SessionId, Question = question, OnChunk = CopilotClient.ToJsonElementForWire(onChunk), AbortSignal = CopilotClient.ToJsonElementForWire(abortSignal) }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.ui.ephemeralQuery", [request], cancellationToken); + } + /// Requests structured input from a UI-capable client. /// Message describing what information is needed from the user. /// JSON Schema describing the form fields to present to the user. @@ -15592,6 +18419,17 @@ public async Task IsProcessingAsync(CancellationToke return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.metadata.isProcessing", [request], cancellationToken); } + /// Returns a snapshot of activity flags for the session. + /// The to monitor for cancellation requests. The default is . + /// Current activity flags for the session. + public async Task ActivityAsync(CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var request = new SessionMetadataActivityRequest { SessionId = _session.SessionId }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.metadata.activity", [request], cancellationToken); + } + /// Returns the token breakdown for the session's current context window for a given model. /// Maximum prompt tokens allowed by the target model. Pass 0 to use the runtime default. /// Maximum output tokens allowed by the target model. Pass 0 if unknown. @@ -15685,6 +18523,34 @@ public async Task KillAsync(string processId, ShellKillSignal? var request = new ShellKillRequest { SessionId = _session.SessionId, ProcessId = processId, Signal = signal }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.shell.kill", [request], cancellationToken); } + + /// Executes a user-requested shell command through the session runtime. + /// Caller-provided cancellation handle for this execution. + /// Shell command to execute. + /// The to monitor for cancellation requests. The default is . + /// Result of a user-requested shell command. + public async Task ExecuteUserRequestedAsync(string requestId, string command, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(requestId); + ArgumentNullException.ThrowIfNull(command); + _session.ThrowIfDisposed(); + + var request = new ShellExecuteUserRequestedRequest { SessionId = _session.SessionId, RequestId = requestId, Command = command }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.shell.executeUserRequested", [request], cancellationToken); + } + + /// Cancels a user-requested shell command by request ID. + /// Request ID previously passed to executeUserRequested. + /// The to monitor for cancellation requests. The default is . + /// Cancellation result for a user-requested shell command. + public async Task CancelUserRequestedAsync(string requestId, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(requestId); + _session.ThrowIfDisposed(); + + var request = new ShellCancelUserRequestedRequest { SessionId = _session.SessionId, RequestId = requestId }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.shell.cancelUserRequested", [request], cancellationToken); + } } /// Provides session-scoped History APIs. @@ -16441,6 +19307,7 @@ public static void RegisterClientSessionApiHandlers(JsonRpc rpc, FuncPayload indicating the session is idle with no background agents in flight. +/// Payload indicating the session is idle with no background agents or attached shell commands in flight. /// Represents the session.idle event. public sealed partial class SessionIdleEvent : SessionEvent { @@ -1272,6 +1273,19 @@ public sealed partial class SessionCanvasRegistryChangedEvent : SessionEvent public required SessionCanvasRegistryChangedData Data { get; set; } } +/// Schema for the `CanvasClosedData` type. +/// Represents the session.canvas.closed event. +public sealed partial class SessionCanvasClosedEvent : SessionEvent +{ + /// + [JsonIgnore] + public override string Type => "session.canvas.closed"; + + /// The session.canvas.closed event payload. + [JsonPropertyName("data")] + public required SessionCanvasClosedData Data { get; set; } +} + /// Schema for the `ExtensionsAttachmentsPushedData` type. /// Represents the session.extensions.attachments_pushed event. public sealed partial class SessionExtensionsAttachmentsPushedEvent : SessionEvent @@ -1474,7 +1488,7 @@ public sealed partial class SessionErrorData public string? Url { get; set; } } -/// Payload indicating the session is idle with no background agents in flight. +/// Payload indicating the session is idle with no background agents or attached shell commands in flight. public sealed partial class SessionIdleData { /// True when the preceding agentic loop was cancelled via abort signal. @@ -2153,6 +2167,11 @@ public sealed partial class AssistantMessageData [JsonPropertyName("anthropicAdvisorModel")] public string? AnthropicAdvisorModel { get; set; } + /// Provider's completion / response identifier; shared across all chunks of a single API call. Used to group multi-chunk assistant utterances. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("apiCallId")] + public string? ApiCallId { get; set; } + /// The assistant's text response content. [JsonPropertyName("content")] public required string Content { get; set; } @@ -2642,7 +2661,7 @@ public sealed 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). + /// Model the sub-agent will run with, when known at start. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("model")] public string? Model { get; set; } @@ -2710,7 +2729,7 @@ public sealed partial class SubagentFailedData [JsonPropertyName("error")] public required string Error { get; set; } - /// Model used by the sub-agent (if any model calls succeeded before failure). + /// Model selected for the sub-agent, when known. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("model")] public string? Model { get; set; } @@ -3372,6 +3391,24 @@ public sealed partial class SessionCanvasRegistryChangedData public required CanvasRegistryChangedCanvas[] Canvases { get; set; } } +/// Schema for the `CanvasClosedData` type. +public sealed partial class SessionCanvasClosedData +{ + /// Provider-local canvas identifier. + [JsonPropertyName("canvasId")] + public required string CanvasId { get; set; } + + /// Owning provider identifier. + [JsonPropertyName("extensionId")] + public required string ExtensionId { get; set; } + + /// Stable caller-supplied identifier of the canvas instance that was closed. + [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")] + [MinLength(1)] + [JsonPropertyName("instanceId")] + public required string InstanceId { get; set; } +} + /// Schema for the `ExtensionsAttachmentsPushedData` type. public sealed partial class SessionExtensionsAttachmentsPushedData { @@ -4520,6 +4557,11 @@ public sealed partial class HookEndError [JsonPropertyName("message")] public required string Message { get; set; } + /// Source label of the hook that errored (e.g. the plugin it was loaded from), when known. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("source")] + public string? Source { get; set; } + /// Error stack trace, when available. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("stack")] @@ -8348,6 +8390,8 @@ public override void Write(Utf8JsonWriter writer, CanvasOpenedAvailability value [JsonSerializable(typeof(SessionAutopilotObjectiveChangedEvent))] [JsonSerializable(typeof(SessionBackgroundTasksChangedData))] [JsonSerializable(typeof(SessionBackgroundTasksChangedEvent))] +[JsonSerializable(typeof(SessionCanvasClosedData))] +[JsonSerializable(typeof(SessionCanvasClosedEvent))] [JsonSerializable(typeof(SessionCanvasOpenedData))] [JsonSerializable(typeof(SessionCanvasOpenedEvent))] [JsonSerializable(typeof(SessionCanvasRegistryChangedData))] diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go index d6ae99b6c..8d9c99ba8 100644 --- a/go/rpc/zrpc.go +++ b/go/rpc/zrpc.go @@ -500,11 +500,7 @@ type AttachmentSelectionDetailsStart struct { Line int64 `json:"line"` } -// The new auth credentials to install on the session. When omitted or `undefined`, the call -// is a no-op and the session's existing credentials are preserved. The runtime stores the -// value verbatim and uses it for outbound model/API requests; it does NOT re-validate or -// re-fetch the associated Copilot user response. Several variants carry secret material; -// treat this method's params as containing secrets at rest and in transit. +// Initial authentication info for the session. // Experimental: AuthInfo is part of an experimental API and may change or be removed. type AuthInfo interface { authInfo() @@ -653,6 +649,14 @@ func (UserAuthInfo) Type() AuthInfoType { return AuthInfoTypeUser } +// Cancellation result for a user-requested shell command. +// Experimental: CancelUserRequestedShellCommandResult is part of an experimental API and +// may change or be removed. +type CancelUserRequestedShellCommandResult struct { + // Whether an in-flight execution was found and signalled to cancel + Cancelled bool `json:"cancelled"` +} + // Canvas action that the agent or host can invoke. To discover the input schema for a // particular action, call the list_canvas_capabilities tool. // Experimental: CanvasAction is part of an experimental API and may change or be removed. @@ -896,6 +900,22 @@ type CommandsRespondToQueuedCommandResult struct { Success bool `json:"success"` } +// Params to attach or detach an in-process ExtensionController delegate. +// Experimental: ConfigureSessionExtensionsParams is part of an experimental API and may +// change or be removed. +// Internal: ConfigureSessionExtensionsParams is an internal SDK API and is not part of the +// public surface. +type ConfigureSessionExtensionsParams struct { + // In-process ExtensionController delegate (CLI-only optimization). Marked internal: this + // field is excluded from the public SDK surface. The post-SDK extension surface exposes + // list/enable/disable/reload via dedicated RPCs served by the runtime. + // Internal: Controller is part of the SDK's internal API surface and is not intended for + // external use. + Controller any `json:"controller,omitempty"` + // Session to attach the extension controller delegate to. + SessionID string `json:"sessionId"` +} + // Metadata for a connected remote session. // Experimental: ConnectedRemoteSessionMetadata is part of an experimental API and may // change or be removed. @@ -1696,6 +1716,21 @@ type InstalledPlugin struct { Version *string `json:"version,omitempty"` } +// Information about an installed plugin tracked in global state. +// Experimental: InstalledPluginInfo is part of an experimental API and may change or be +// removed. +type InstalledPluginInfo struct { + // Whether the plugin is currently enabled for new sessions + Enabled bool `json:"enabled"` + // Marketplace the plugin came from. Empty string ("") for direct repo / URL / local + // installs. + Marketplace string `json:"marketplace"` + // Plugin name + Name string `json:"name"` + // Installed version (when reported by the plugin manifest) + Version *string `json:"version,omitempty"` +} + // Source for direct repo installs (when marketplace is empty) // Experimental: InstalledPluginSource is part of an experimental API and may change or be // removed. @@ -1770,6 +1805,33 @@ type InstructionsSources struct { Type InstructionsSourcesType `json:"type"` } +// Schema for the `LocalSessionMetadataValue` type. +// Experimental: LocalSessionMetadataValue is part of an experimental API and may change or +// be removed. +type LocalSessionMetadataValue struct { + // Runtime client name that created/last resumed this session + ClientName *string `json:"clientName,omitempty"` + // Pre-resolved working-directory context for session startup. + Context *SessionContext `json:"context,omitempty"` + // True for detached maintenance sessions that should be hidden from normal resume lists. + IsDetached *bool `json:"isDetached,omitempty"` + // Always false for local sessions. + IsRemote bool `json:"isRemote"` + // GitHub task ID, when this local session is bound to one. Only present for local sessions + // exported to remote control. + McTaskID *string `json:"mcTaskId,omitempty"` + // Last-modified time of the session's persisted state, as ISO 8601 + ModifiedTime string `json:"modifiedTime"` + // Optional human-friendly name set via /rename + Name *string `json:"name,omitempty"` + // Stable session identifier + SessionID string `json:"sessionId"` + // Session creation time as an ISO 8601 timestamp + StartTime string `json:"startTime"` + // Short summary of the session, when one has been derived + Summary *string `json:"summary,omitempty"` +} + // Message text, optional severity level, persistence flag, optional follow-up URL, and // optional tip. // Experimental: LogRequest is part of an experimental API and may change or be removed. @@ -1812,6 +1874,94 @@ type LspInitializeRequest struct { WorkingDirectory *string `json:"workingDirectory,omitempty"` } +// Result of registering a new marketplace. +// Experimental: MarketplaceAddResult is part of an experimental API and may change or be +// removed. +type MarketplaceAddResult struct { + // Final name of the marketplace as resolved from its manifest + Name string `json:"name"` +} + +// Plugins advertised by the marketplace. +// Experimental: MarketplaceBrowseResult is part of an experimental API and may change or be +// removed. +type MarketplaceBrowseResult struct { + // Plugins advertised by the marketplace + Plugins []MarketplacePluginInfo `json:"plugins"` +} + +// Registered marketplace summary. +// Experimental: MarketplaceInfo is part of an experimental API and may change or be removed. +type MarketplaceInfo struct { + // True when this is a default marketplace shipped with the runtime. Defaults are not + // removable. + IsDefault *bool `json:"isDefault,omitempty"` + // Marketplace name (matches the @marketplace suffix in plugin specs) + Name string `json:"name"` + // Human-readable description of where the marketplace data is fetched from (e.g. "GitHub: + // owner/repo"). + Source string `json:"source"` +} + +// All registered marketplaces, including built-in defaults. +// Experimental: MarketplaceListResult is part of an experimental API and may change or be +// removed. +type MarketplaceListResult struct { + // Registered marketplaces + Marketplaces []MarketplaceInfo `json:"marketplaces"` +} + +// Plugin entry advertised by a marketplace. +// Experimental: MarketplacePluginInfo is part of an experimental API and may change or be +// removed. +type MarketplacePluginInfo struct { + // Short description from the marketplace catalog, when present + Description *string `json:"description,omitempty"` + // Plugin name as listed in the marketplace catalog + Name string `json:"name"` +} + +// Schema for the `MarketplaceRefreshEntry` type. +// Experimental: MarketplaceRefreshEntry is part of an experimental API and may change or be +// removed. +type MarketplaceRefreshEntry struct { + // Error message (failure only) + Error *string `json:"error,omitempty"` + // Marketplace name that was refreshed + Name string `json:"name"` + // Whether the refresh succeeded + Success bool `json:"success"` +} + +// Result of refreshing one or more marketplace catalogs. +// Experimental: MarketplaceRefreshResult is part of an experimental API and may change or +// be removed. +type MarketplaceRefreshResult struct { + // Per-marketplace refresh results in deterministic order. + Results []MarketplaceRefreshEntry `json:"results"` +} + +// Outcome of the remove attempt, including dependent-plugin info when applicable. +// Experimental: MarketplaceRemoveResult is part of an experimental API and may change or be +// removed. +type MarketplaceRemoveResult struct { + // Names of installed plugins that prevented removal. Populated only when `removed=false`. + DependentPlugins []string `json:"dependentPlugins,omitzero"` + // True when the marketplace was actually removed. False when removal was skipped because + // the marketplace has dependent plugins and `force` was not set. + Removed bool `json:"removed"` +} + +// Schema for the `McpAllowedServer` type. +// Experimental: MCPAllowedServer is part of an experimental API and may change or be +// removed. +type MCPAllowedServer struct { + // Allowed server name + Name string `json:"name"` + // PII-free note explaining why the server was allowed + RedactedNote *string `json:"redactedNote,omitempty"` +} + // MCP server, tool name, and arguments to invoke from an MCP App view. // Experimental: MCPAppsCallToolRequest is part of an experimental API and may change or be // removed. @@ -2062,6 +2212,25 @@ type MCPConfigUpdateRequest struct { type MCPConfigUpdateResult struct { } +// Opaque auth info used to configure GitHub MCP. +// Experimental: MCPConfigureGitHubRequest is part of an experimental API and may change or +// be removed. +type MCPConfigureGitHubRequest struct { + // Opaque runtime auth info for GitHub MCP configuration. Marked internal: an in-process + // runtime shape (configureGitHubMcp is a no-op over the wire). + // Internal: AuthInfo is part of the SDK's internal API surface and is not intended for + // external use. + AuthInfo any `json:"authInfo"` +} + +// Result of configuring GitHub MCP. +// Experimental: MCPConfigureGitHubResult is part of an experimental API and may change or +// be removed. +type MCPConfigureGitHubResult struct { + // Whether GitHub MCP configuration changed. + Changed bool `json:"changed"` +} + // Name of the MCP server to disable for the session. // Experimental: MCPDisableRequest is part of an experimental API and may change or be // removed. @@ -2126,6 +2295,71 @@ type MCPExecuteSamplingRequest struct { type MCPExecuteSamplingResult struct { } +// Schema for the `McpFilteredServer` type. +// Experimental: MCPFilteredServer is part of an experimental API and may change or be +// removed. +type MCPFilteredServer struct { + // Enterprise login associated with an allowlist policy + EnterpriseName *string `json:"enterpriseName,omitempty"` + // Filtered server name + Name string `json:"name"` + // Human-readable filter reason + Reason string `json:"reason"` + // PII-free filter reason + RedactedReason *string `json:"redactedReason,omitempty"` +} + +// Host-level state, omitted when no MCP host is initialized. +// Experimental: MCPHostState is part of an experimental API and may change or be removed. +type MCPHostState struct { + // Names of currently-connected MCP clients. + Clients []string `json:"clients"` + // Configured servers that are explicitly disabled. + DisabledServers []string `json:"disabledServers"` + // Map of server name to recorded connection failure. + FailedServers map[string]MCPServerFailureInfo `json:"failedServers"` + // Configured servers filtered out by enterprise allowlist policy. + FilteredServers []string `json:"filteredServers"` + // Whether third-party MCP servers are policy-enabled for this session. + Mcp3pEnabled bool `json:"mcp3pEnabled"` + // Map of server name to recorded pending-auth state. + NeedsAuthServers map[string]MCPServerNeedsAuthInfo `json:"needsAuthServers"` + // Names of servers with in-flight connection attempts. + PendingConnections []string `json:"pendingConnections"` +} + +// Server name to check running status for. +// Experimental: MCPIsServerRunningRequest is part of an experimental API and may change or +// be removed. +type MCPIsServerRunningRequest struct { + // Name of the MCP server to check + ServerName string `json:"serverName"` +} + +// Whether the named MCP server is running. +// Experimental: MCPIsServerRunningResult is part of an experimental API and may change or +// be removed. +type MCPIsServerRunningResult struct { + // True if the server has an active client and transport. + Running bool `json:"running"` +} + +// Server name whose tool list should be returned. +// Experimental: MCPListToolsRequest is part of an experimental API and may change or be +// removed. +type MCPListToolsRequest struct { + // Name of the connected MCP server whose tools to list. + ServerName string `json:"serverName"` +} + +// Tools exposed by the connected MCP server. Throws when the server is not connected. +// Experimental: MCPListToolsResult is part of an experimental API and may change or be +// removed. +type MCPListToolsResult struct { + // Tools exposed by the server. + Tools []MCPTools `json:"tools"` +} + // 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 @@ -2162,6 +2396,59 @@ type MCPOauthLoginResult struct { AuthorizationURL *string `json:"authorizationUrl,omitempty"` } +// MCP OAuth request id and optional provider response. +// Experimental: MCPOauthRespondRequest is part of an experimental API and may change or be +// removed. +type MCPOauthRespondRequest struct { + // In-process OAuthClientProvider instance, or omitted to deny. Marked internal: cannot be + // serialized across the JSON-RPC boundary. + // Internal: Provider is part of the SDK's internal API surface and is not intended for + // external use. + Provider any `json:"provider,omitempty"` + // OAuth request identifier from mcp.oauth_required + RequestID string `json:"requestId"` +} + +// Empty result after recording the MCP OAuth response. +// Experimental: MCPOauthRespondResult is part of an experimental API and may change or be +// removed. +type MCPOauthRespondResult struct { +} + +// Registration parameters for an external MCP client. +// Experimental: MCPRegisterExternalClientRequest is part of an experimental API and may +// change or be removed. +type MCPRegisterExternalClientRequest struct { + // In-process MCP Client instance. Marked internal: cannot be serialized across the JSON-RPC + // boundary. + // Internal: Client is part of the SDK's internal API surface and is not intended for + // external use. + Client any `json:"client"` + // In-process server config (MCPServerConfig) paired with the in-process client/transport. + // Marked internal alongside its companions. + // Internal: Config is part of the SDK's internal API surface and is not intended for + // external use. + Config any `json:"config"` + // Logical server name for the external client + ServerName string `json:"serverName"` + // In-process MCP Transport instance. Marked internal: cannot be serialized across the + // JSON-RPC boundary. + // Internal: Transport is part of the SDK's internal API surface and is not intended for + // external use. + Transport any `json:"transport"` +} + +// Opaque MCP reload configuration. +// Experimental: MCPReloadWithConfigRequest is part of an experimental API and may change or +// be removed. +type MCPReloadWithConfigRequest struct { + // Opaque runtime MCP reload configuration. Marked internal: an in-process runtime shape + // (reloadMcpServers throws over the wire). + // Internal: Config is part of the SDK's internal API surface and is not intended for + // external use. + Config any `json:"config"` +} + // Indicates whether the auto-managed `github` MCP server was removed (false when nothing to // remove). // Experimental: MCPRemoveGitHubResult is part of an experimental API and may change or be @@ -2173,6 +2460,19 @@ type MCPRemoveGitHubResult struct { Removed bool `json:"removed"` } +// Server name and opaque configuration for an individual MCP server restart. +// Experimental: MCPRestartServerRequest is part of an experimental API and may change or be +// removed. +type MCPRestartServerRequest struct { + // Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime + // shape supplied only by in-process CLI callers. + // Internal: Config is part of the SDK's internal API surface and is not intended for + // external use. + Config any `json:"config"` + // Name of the MCP server to restart + ServerName string `json:"serverName"` +} + // Outcome of an MCP sampling execution: success result, failure error, or cancellation. // Experimental: MCPSamplingExecutionResult is part of an experimental API and may change or // be removed. @@ -2290,13 +2590,33 @@ type MCPServerConfigStdio struct { func (MCPServerConfigStdio) mcpServerConfig() {} -// MCP servers configured for the session, with their connection status. +// Recorded MCP server connection failure. +// Experimental: MCPServerFailureInfo is part of an experimental API and may change or be +// removed. +type MCPServerFailureInfo struct { + // Failure message produced when the MCP server connection failed. + Message string `json:"message"` + // epoch-ms timestamp at which the failure was recorded. + Timestamp int64 `json:"timestamp"` +} + +// MCP servers configured for the session, with their connection status and host-level state. // Experimental: MCPServerList is part of an experimental API and may change or be removed. type MCPServerList struct { + // Host-level state, omitted when no MCP host is initialized. + Host *MCPHostState `json:"host,omitempty"` // Configured MCP servers Servers []MCPServer `json:"servers"` } +// Recorded MCP server pending-auth state. +// Experimental: MCPServerNeedsAuthInfo is part of an experimental API and may change or be +// removed. +type MCPServerNeedsAuthInfo struct { + // epoch-ms timestamp at which the server signalled it needs authentication. + Timestamp int64 `json:"timestamp"` +} + // Mode controlling how MCP server env values are resolved (`direct` or `indirect`). // Experimental: MCPSetEnvValueModeParams is part of an experimental API and may change or // be removed. @@ -2317,6 +2637,54 @@ type MCPSetEnvValueModeResult struct { Mode MCPSetEnvValueModeDetails `json:"mode"` } +// Server name and opaque configuration for an individual MCP server start. +// Experimental: MCPStartServerRequest is part of an experimental API and may change or be +// removed. +type MCPStartServerRequest struct { + // Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime + // shape supplied only by in-process CLI callers. + // Internal: Config is part of the SDK's internal API surface and is not intended for + // external use. + Config any `json:"config"` + // Name of the MCP server to start + ServerName string `json:"serverName"` +} + +// MCP server startup filtering result. +// Experimental: MCPStartServersResult is part of an experimental API and may change or be +// removed. +type MCPStartServersResult struct { + // Non-default servers allowed by policy + AllowedServers []MCPAllowedServer `json:"allowedServers,omitzero"` + // Servers filtered out before startup + FilteredServers []MCPFilteredServer `json:"filteredServers"` +} + +// Server name for an individual MCP server stop. +// Experimental: MCPStopServerRequest is part of an experimental API and may change or be +// removed. +type MCPStopServerRequest struct { + // Name of the MCP server to stop + ServerName string `json:"serverName"` +} + +// Schema for the `McpTools` type. +// Experimental: MCPTools is part of an experimental API and may change or be removed. +type MCPTools struct { + // Tool description, when provided. + Description *string `json:"description,omitempty"` + // Tool name. + Name string `json:"name"` +} + +// Server name identifying the external client to remove. +// Experimental: MCPUnregisterExternalClientRequest is part of an experimental API and may +// change or be removed. +type MCPUnregisterExternalClientRequest struct { + // Server name of the external client to unregister + ServerName string `json:"serverName"` +} + // Model identifier and token limits used to compute the context-info breakdown. // Experimental: MetadataContextInfoRequest is part of an experimental API and may change or // be removed. @@ -2533,7 +2901,7 @@ type ModelCapabilitiesLimitsVision struct { SupportedMediaTypes []string `json:"supported_media_types"` } -// Override individual model capabilities resolved by the runtime +// Initial model capability overrides. // Experimental: ModelCapabilitiesOverride is part of an experimental API and may change or // be removed. type ModelCapabilitiesOverride struct { @@ -2727,6 +3095,35 @@ type OpenCanvasInstance struct { URL *string `json:"url,omitempty"` } +// Schema for the `OptionsUpdateAdditionalContentExclusionPolicy` type. +// Experimental: OptionsUpdateAdditionalContentExclusionPolicy is part of an experimental +// API and may change or be removed. +type OptionsUpdateAdditionalContentExclusionPolicy struct { + LastUpdatedAt any `json:"last_updated_at"` + Rules []OptionsUpdateAdditionalContentExclusionPolicyRule `json:"rules"` + // Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. + Scope OptionsUpdateAdditionalContentExclusionPolicyScope `json:"scope"` +} + +// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRule` type. +// Experimental: OptionsUpdateAdditionalContentExclusionPolicyRule is part of an +// experimental API and may change or be removed. +type OptionsUpdateAdditionalContentExclusionPolicyRule struct { + IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + IfNoneMatch []string `json:"ifNoneMatch,omitzero"` + Paths []string `json:"paths"` + // Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. + Source OptionsUpdateAdditionalContentExclusionPolicyRuleSource `json:"source"` +} + +// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. +// Experimental: OptionsUpdateAdditionalContentExclusionPolicyRuleSource is part of an +// experimental API and may change or be removed. +type OptionsUpdateAdditionalContentExclusionPolicyRuleSource struct { + Name string `json:"name"` + Type string `json:"type"` +} + // Schema for the `PendingPermissionRequest` type. // Experimental: PendingPermissionRequest is part of an experimental API and may change or // be removed. @@ -3842,6 +4239,27 @@ type PlanReadResult struct { Path *string `json:"path"` } +// Todo rows read from the session SQL database. Empty when no session database is available. +// Experimental: PlanReadSQLTodosResult is part of an experimental API and may change or be +// removed. +type PlanReadSQLTodosResult struct { + // Rows from the session SQL todos table, ordered by creation time and id. + Rows []PlanSQLTodosRow `json:"rows"` +} + +// Schema for the `PlanSqlTodosRow` type. +// Experimental: PlanSQLTodosRow is part of an experimental API and may change or be removed. +type PlanSQLTodosRow struct { + // Todo description. + Description *string `json:"description,omitempty"` + // Todo identifier. + ID *string `json:"id,omitempty"` + // Todo status. + Status *string `json:"status,omitempty"` + // Todo title. + Title *string `json:"title,omitempty"` +} + // Replacement contents to write to the session plan file. // Experimental: PlanUpdateRequest is part of an experimental API and may change or be // removed. @@ -3863,6 +4281,21 @@ type Plugin struct { Version *string `json:"version,omitempty"` } +// Result of installing a plugin. +// Experimental: PluginInstallResult is part of an experimental API and may change or be +// removed. +type PluginInstallResult struct { + // Set when the install path is deprecated (e.g. direct repo / URL / local installs). + // Callers should surface this to end users. + DeprecationWarning *string `json:"deprecationWarning,omitempty"` + // The newly installed plugin's metadata + Plugin InstalledPluginInfo `json:"plugin"` + // Optional post-install message provided by the plugin (e.g. setup instructions) + PostInstallMessage *string `json:"postInstallMessage,omitempty"` + // Number of skills discovered and installed from the plugin + SkillsInstalled int64 `json:"skillsInstalled"` +} + // 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 { @@ -3870,6 +4303,225 @@ type PluginList struct { Plugins []Plugin `json:"plugins"` } +// Plugins installed in user/global state. +// Experimental: PluginListResult is part of an experimental API and may change or be +// removed. +type PluginListResult struct { + // Installed plugins + Plugins []InstalledPluginInfo `json:"plugins"` +} + +// Plugin names (or specs) to disable. +// Experimental: PluginsDisableRequest is part of an experimental API and may change or be +// removed. +type PluginsDisableRequest struct { + // Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. + // Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. + // Plugin-owned MCP servers are stopped in active sessions immediately; other plugin + // contributions remain available until each session reloads plugins. + Names []string `json:"names"` +} + +// Experimental: PluginsDisableResult is part of an experimental API and may change or be +// removed. +type PluginsDisableResult struct { +} + +// Plugin names (or specs) to enable. +// Experimental: PluginsEnableRequest is part of an experimental API and may change or be +// removed. +type PluginsEnableRequest struct { + // Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. + // Non-marketplace direct installs are always enabled and cannot be toggled via this API. + Names []string `json:"names"` +} + +// Experimental: PluginsEnableResult is part of an experimental API and may change or be +// removed. +type PluginsEnableResult struct { +} + +// Plugin source and optional working directory for relative-path resolution. +// Experimental: PluginsInstallRequest is part of an experimental API and may change or be +// removed. +type PluginsInstallRequest struct { + // Plugin install spec. Accepts the same forms as the CLI: "plugin@marketplace" (marketplace + // install), "owner/repo" or "owner/repo:subpath" (GitHub direct), an http/https/ssh URL, or + // a local path. Direct (non-marketplace) installs are deprecated and will produce a + // deprecationWarning in the result. + Source string `json:"source"` + // Working directory used to resolve relative local paths in `source`. Defaults to the + // server's current working directory. + WorkingDirectory *string `json:"workingDirectory,omitempty"` +} + +// Marketplace source to register. +// Experimental: PluginsMarketplacesAddRequest is part of an experimental API and may change +// or be removed. +type PluginsMarketplacesAddRequest struct { + // Marketplace source. Accepts the same forms as the CLI: "owner/repo" or "owner/repo#ref" + // (GitHub), an http/https/ssh URL (optionally with #ref), a git scp-style URL + // (user@host:path), or a local path. The marketplace's own name (from its manifest) is used + // as the registration key. + Source string `json:"source"` +} + +// Name of the marketplace whose plugin catalog to fetch. +// Experimental: PluginsMarketplacesBrowseRequest is part of an experimental API and may +// change or be removed. +type PluginsMarketplacesBrowseRequest struct { + // Marketplace name to browse + Name string `json:"name"` +} + +// Experimental: PluginsMarketplacesRefreshRequest is part of an experimental API and may +// change or be removed. +type PluginsMarketplacesRefreshRequest struct { + // Marketplace name to refresh. When omitted, every registered marketplace is refreshed. + Name *string `json:"name,omitempty"` +} + +// Name of the marketplace to remove and an optional force flag. +// Experimental: PluginsMarketplacesRemoveRequest is part of an experimental API and may +// change or be removed. +type PluginsMarketplacesRemoveRequest struct { + // When true, also uninstall every plugin sourced from this marketplace. When false + // (default), removal is a no-op if any plugin from this marketplace is installed and the + // dependent plugin names are returned in the result. + Force *bool `json:"force,omitempty"` + // Marketplace name to remove + Name string `json:"name"` +} + +// Optional flags controlling which side effects the reload performs. +// Experimental: PluginsReloadRequest is part of an experimental API and may change or be +// removed. +type PluginsReloadRequest struct { + // When true, skip repo-level hooks during the hook reload. Use before folder trust is + // confirmed; load them post-trust via `sessions.loadDeferredRepoHooks`. + DeferRepoHooks *bool `json:"deferRepoHooks,omitempty"` + // Re-run custom-agent discovery after refreshing plugins. Defaults to true. + ReloadCustomAgents *bool `json:"reloadCustomAgents,omitempty"` + // Re-load user, plugin, and (subject to `deferRepoHooks`) repo hooks. Defaults to true. Has + // no effect when the host has not registered a hook reloader (e.g. remote sessions). + ReloadHooks *bool `json:"reloadHooks,omitempty"` + // Reload MCP server connections after refreshing plugins. Defaults to true. + ReloadMCP *bool `json:"reloadMcp,omitempty"` +} + +// Name (or spec) of the plugin to uninstall. +// Experimental: PluginsUninstallRequest is part of an experimental API and may change or be +// removed. +type PluginsUninstallRequest struct { + // Plugin name or "plugin@marketplace" spec to uninstall. When ambiguous, prefer the + // fully-qualified spec. + Name string `json:"name"` +} + +// Experimental: PluginsUninstallResult is part of an experimental API and may change or be +// removed. +type PluginsUninstallResult struct { +} + +// Name (or spec) of the plugin to update. +// Experimental: PluginsUpdateRequest is part of an experimental API and may change or be +// removed. +type PluginsUpdateRequest struct { + // Plugin name or "plugin@marketplace" spec to update. + Name string `json:"name"` +} + +// Schema for the `PluginUpdateAllEntry` type. +// Experimental: PluginUpdateAllEntry is part of an experimental API and may change or be +// removed. +type PluginUpdateAllEntry struct { + // Error message (failure only) + Error *string `json:"error,omitempty"` + // Marketplace the plugin came from. Empty string ("") for direct installs. + Marketplace string `json:"marketplace"` + // Plugin name that was updated + Name string `json:"name"` + // Version after the update, when available + NewVersion *string `json:"newVersion,omitempty"` + // Previously installed version, when available + PreviousVersion *string `json:"previousVersion,omitempty"` + // Number of skills installed after the update (success only) + SkillsInstalled *int64 `json:"skillsInstalled,omitempty"` + // Whether the update succeeded for this plugin + Success bool `json:"success"` +} + +// Result of updating all installed plugins. +// Experimental: PluginUpdateAllResult is part of an experimental API and may change or be +// removed. +type PluginUpdateAllResult struct { + // Per-plugin update results in deterministic order. + Results []PluginUpdateAllEntry `json:"results"` +} + +// Result of updating a single plugin. +// Experimental: PluginUpdateResult is part of an experimental API and may change or be +// removed. +type PluginUpdateResult struct { + // Version after the update, when reported by the plugin manifest + NewVersion *string `json:"newVersion,omitempty"` + // Version that was previously installed, when available + PreviousVersion *string `json:"previousVersion,omitempty"` + // Number of skills discovered and installed after the update + SkillsInstalled int64 `json:"skillsInstalled"` +} + +// Batch of spawn events plus a cursor for follow-up polls. +// Experimental: PollSpawnedSessionsResult is part of an experimental API and may change or +// be removed. +type PollSpawnedSessionsResult struct { + // Opaque cursor to pass back to receive only events after this batch. + Cursor string `json:"cursor"` + // Spawn events emitted since the supplied cursor. + Events []SessionsPollSpawnedSessionsEvent `json:"events"` +} + +// Custom model-provider configuration (BYOK). +// Experimental: ProviderConfig is part of an experimental API and may change or be removed. +type ProviderConfig struct { + // API key. Optional for local providers like Ollama. + APIKey *string `json:"apiKey,omitempty"` + // Azure-specific provider options. + Azure *ProviderConfigAzure `json:"azure,omitempty"` + // API endpoint URL. + BaseURL string `json:"baseUrl"` + // Bearer token for authentication. Sets the Authorization header directly. Takes precedence + // over apiKey when both are set. + BearerToken *string `json:"bearerToken,omitempty"` + // Custom HTTP headers to include in all outbound requests to the provider. + Headers map[string]string `json:"headers,omitzero"` + // Maximum context window tokens for the model. + MaxContextWindowTokens *float64 `json:"maxContextWindowTokens,omitempty"` + // Maximum output tokens for the model. + MaxOutputTokens *float64 `json:"maxOutputTokens,omitempty"` + // Maximum prompt/input tokens for the model. + MaxPromptTokens *float64 `json:"maxPromptTokens,omitempty"` + // Well-known model ID used for capability lookup. When set, agent behavior config and token + // limits are inferred from this model. + ModelID *string `json:"modelId,omitempty"` + // Provider type. Defaults to "openai" for generic OpenAI-compatible APIs. + Type *ProviderConfigType `json:"type,omitempty"` + // Wire API format (openai/azure only). Defaults to "completions". + WireAPI *ProviderConfigWireAPI `json:"wireApi,omitempty"` + // The model identifier sent to the provider API for inference (the "wire" model), as + // opposed to modelId which is the well-known base. + WireModel *string `json:"wireModel,omitempty"` +} + +// Azure-specific provider options. +// Experimental: ProviderConfigAzure is part of an experimental API and may change or be +// removed. +type ProviderConfigAzure struct { + // API version. When set, uses the versioned deployment route. When omitted, uses the GA + // versionless v1 route. + APIVersion *string `json:"apiVersion,omitempty"` +} + // Schema for the `PushAttachment` type. // Experimental: PushAttachment is part of an experimental API and may change or be removed. type PushAttachment interface { @@ -4125,17 +4777,187 @@ type RegisterEventInterestResult struct { Handle string `json:"handle"` } -// Opaque handle previously returned by `registerInterest` to release. -// Experimental: ReleaseEventInterestParams is part of an experimental API and may change or -// be removed. -type ReleaseEventInterestParams struct { - // Handle returned by a previous `registerInterest` call. Idempotent: releasing an unknown - // or already-released handle is a no-op (returns success). When the last outstanding handle +// Params to attach an extension loader's tools to a session. +// Experimental: RegisterExtensionToolsParams is part of an experimental API and may change +// or be removed. +// Internal: RegisterExtensionToolsParams is an internal SDK API and is not part of the +// public surface. +type RegisterExtensionToolsParams struct { + // In-process ExtensionLoader handle (CLI-only optimization). Marked internal: this field is + // excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, + // extension discovery/launch moves entirely into the runtime — the CLI passes pure config + // (search paths, disabled ids) via SessionOptions instead. + // Internal: Loader is part of the SDK's internal API surface and is not intended for + // external use. + Loader any `json:"loader"` + // Optional registration options. + Options *SessionsRegisterExtensionToolsOnSessionOptions `json:"options,omitempty"` + // Session to register extension tools on. + SessionID string `json:"sessionId"` +} + +// Handle for releasing the extension tool registration. +// Experimental: RegisterExtensionToolsResult is part of an experimental API and may change +// or be removed. +// Internal: RegisterExtensionToolsResult is an internal SDK API and is not part of the +// public surface. +type RegisterExtensionToolsResult struct { + // In-process unsubscribe function (CLI-only optimization). Marked internal: replaced by an + // explicit `extensions.unregister` RPC in the SDK migration. + // Internal: Unsubscribe is part of the SDK's internal API surface and is not intended for + // external use. + Unsubscribe any `json:"unsubscribe"` +} + +// Opaque handle previously returned by `registerInterest` to release. +// Experimental: ReleaseEventInterestParams is part of an experimental API and may change or +// be removed. +type ReleaseEventInterestParams struct { + // Handle returned by a previous `registerInterest` call. Idempotent: releasing an unknown + // or already-released handle is a no-op (returns success). When the last outstanding handle // for an event type is released, the runtime reverts to its 'no consumer' code path for // that event type. Handle string `json:"handle"` } +// Configuration for the runtime-managed remote-control singleton. +// Experimental: RemoteControlConfig is part of an experimental API and may change or be +// removed. +type RemoteControlConfig struct { + // Reattach to an existing MC session without creating a new one. + ExistingMcSession *RemoteControlConfigExistingMcSession `json:"existingMcSession,omitempty"` + // Whether the user explicitly requested remote (vs. implicit session-sync). Controls + // warning surfacing for missing-repo cases. + Explicit bool `json:"explicit"` + // Whether remote export should be enabled. + Remote bool `json:"remote"` + // When true, suppresses timeline messages on successful setup. + Silent bool `json:"silent"` + // Whether the MC session may steer the local session (write mode). + Steerable bool `json:"steerable"` + // Existing Mission Control task ID to attach the exported session to. + TaskID *string `json:"taskId,omitempty"` +} + +// Reattach to an existing MC session without creating a new one. +// Experimental: RemoteControlConfigExistingMcSession is part of an experimental API and may +// change or be removed. +type RemoteControlConfigExistingMcSession struct { + // Existing MC session ID to reattach to. + McSessionID string `json:"mcSessionId"` + // Existing MC task ID for the reattached session. + McTaskID string `json:"mcTaskId"` +} + +// State of the runtime-managed remote-control singleton. +// Experimental: RemoteControlStatus is part of an experimental API and may change or be +// removed. +type RemoteControlStatus interface { + remoteControlStatus() + State() RemoteControlStatusState +} + +type RawRemoteControlStatusData struct { + Discriminator RemoteControlStatusState + Raw json.RawMessage +} + +func (RawRemoteControlStatusData) remoteControlStatus() {} +func (r RawRemoteControlStatusData) State() RemoteControlStatusState { + return r.Discriminator +} + +// Remote control is connected to a local session. +// Experimental: RemoteControlStatusActive is part of an experimental API and may change or +// be removed. +type RemoteControlStatusActive struct { + // Session id remote control is pointed at. + AttachedSessionID string `json:"attachedSessionId"` + // MC frontend URL for this session, when known. + FrontendURL *string `json:"frontendUrl,omitempty"` + // Whether the MC session may steer this session. + IsSteerable bool `json:"isSteerable"` + // In-process prompt-manager handle (CLI-only optimization). Marked internal: this field is + // excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, + // the same bidirectional prompt-routing handshake is expressed via dedicated remote-control + // RPCs (register/resolve) rather than a shared in-process object. + // Internal: PromptManager is part of the SDK's internal API surface and is not intended for + // external use. + PromptManager any `json:"promptManager,omitempty"` +} + +func (RemoteControlStatusActive) remoteControlStatus() {} +func (RemoteControlStatusActive) State() RemoteControlStatusState { + return RemoteControlStatusStateActive +} + +// Remote control is in the middle of initial setup. +// Experimental: RemoteControlStatusConnecting is part of an experimental API and may change +// or be removed. +type RemoteControlStatusConnecting struct { + // Session id the connection is attaching to. + AttachedSessionID string `json:"attachedSessionId"` +} + +func (RemoteControlStatusConnecting) remoteControlStatus() {} +func (RemoteControlStatusConnecting) State() RemoteControlStatusState { + return RemoteControlStatusStateConnecting +} + +// The last setup attempt failed. The singleton is otherwise off. +// Experimental: RemoteControlStatusError is part of an experimental API and may change or +// be removed. +type RemoteControlStatusError struct { + // Session id the failing setup attempt targeted, when known. + AttachedSessionID *string `json:"attachedSessionId,omitempty"` + // Human-readable error message from the last setup attempt. + Error string `json:"error"` +} + +func (RemoteControlStatusError) remoteControlStatus() {} +func (RemoteControlStatusError) State() RemoteControlStatusState { + return RemoteControlStatusStateError +} + +// Remote control is not connected. +// Experimental: RemoteControlStatusOff is part of an experimental API and may change or be +// removed. +type RemoteControlStatusOff struct { +} + +func (RemoteControlStatusOff) remoteControlStatus() {} +func (RemoteControlStatusOff) State() RemoteControlStatusState { + return RemoteControlStatusStateOff +} + +// Wrapper for the singleton's current status. +// Experimental: RemoteControlStatusResult is part of an experimental API and may change or +// be removed. +type RemoteControlStatusResult struct { + // State of the runtime-managed remote-control singleton. + Status RemoteControlStatus `json:"status"` +} + +// Outcome of a stopRemoteControl call. +// Experimental: RemoteControlStopResult is part of an experimental API and may change or be +// removed. +type RemoteControlStopResult struct { + // State of the runtime-managed remote-control singleton. + Status RemoteControlStatus `json:"status"` + // Whether the singleton was actually torn down by this call. + Stopped bool `json:"stopped"` +} + +// Outcome of a transferRemoteControl call. +// Experimental: RemoteControlTransferResult is part of an experimental API and may change +// or be removed. +type RemoteControlTransferResult struct { + // State of the runtime-managed remote-control singleton. + Status RemoteControlStatus `json:"status"` + // Whether the rebinding actually happened. + Transferred bool `json:"transferred"` +} + // 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 @@ -4184,9 +5006,103 @@ type RemoteSessionConnectionResult struct { SessionID string `json:"sessionId"` } +// GitHub repository the remote session belongs to. +// Experimental: RemoteSessionMetadataRepository is part of an experimental API and may +// change or be removed. +type RemoteSessionMetadataRepository struct { + // Branch associated with the remote session. + Branch string `json:"branch"` + // Repository name. + Name string `json:"name"` + // Repository owner. + Owner string `json:"owner"` +} + +// Repository context for the remote session. +// Experimental: RemoteSessionRepository is part of an experimental API and may change or be +// removed. +type RemoteSessionRepository struct { + // Optional branch associated with the remote session. + Branch *string `json:"branch,omitempty"` + // Repository name. + Name string `json:"name"` + // Repository owner or organization login. + Owner string `json:"owner"` +} + type RuntimeShutdownResult struct { } +// Resolved sandbox configuration. +// Experimental: SandboxConfig is part of an experimental API and may change or be removed. +type SandboxConfig struct { + // Whether to auto-add the current working directory to readwritePaths. Default: true. + AddCurrentWorkingDirectory *bool `json:"addCurrentWorkingDirectory,omitempty"` + // Raw `ContainerConfig` (per `@microsoft/mxc-sdk`) passed directly to + // `spawnSandboxFromConfig`, bypassing policy merging. + Config map[string]any `json:"config,omitzero"` + // Whether sandboxing is enabled for the session. + Enabled bool `json:"enabled"` + // User-managed sandbox policy fragment merged into the auto-discovered base policy. + UserPolicy *SandboxConfigUserPolicy `json:"userPolicy,omitempty"` +} + +// User-managed sandbox policy fragment merged into the auto-discovered base policy. +// Experimental: SandboxConfigUserPolicy is part of an experimental API and may change or be +// removed. +type SandboxConfigUserPolicy struct { + // Platform-specific experimental policy fields. + Experimental *SandboxConfigUserPolicyExperimental `json:"experimental,omitempty"` + // Filesystem rules to merge into the base policy. + Filesystem *SandboxConfigUserPolicyFilesystem `json:"filesystem,omitempty"` + // Network rules to merge into the base policy. + Network *SandboxConfigUserPolicyNetwork `json:"network,omitempty"` +} + +// Platform-specific experimental policy fields. +// Experimental: SandboxConfigUserPolicyExperimental is part of an experimental API and may +// change or be removed. +type SandboxConfigUserPolicyExperimental struct { + // macOS seatbelt experimental options. + Seatbelt *SandboxConfigUserPolicyExperimentalSeatbelt `json:"seatbelt,omitempty"` +} + +// macOS seatbelt experimental options. +// Experimental: SandboxConfigUserPolicyExperimentalSeatbelt is part of an experimental API +// and may change or be removed. +type SandboxConfigUserPolicyExperimentalSeatbelt struct { + // Whether the macOS seatbelt profile may access the keychain. + KeychainAccess *bool `json:"keychainAccess,omitempty"` +} + +// Filesystem rules to merge into the base policy. +// Experimental: SandboxConfigUserPolicyFilesystem is part of an experimental API and may +// change or be removed. +type SandboxConfigUserPolicyFilesystem struct { + // Whether to clear the policy when the session exits. + ClearPolicyOnExit *bool `json:"clearPolicyOnExit,omitempty"` + // Paths explicitly denied. + DeniedPaths []string `json:"deniedPaths,omitzero"` + // Paths granted read-only access. + ReadonlyPaths []string `json:"readonlyPaths,omitzero"` + // Paths granted read/write access. + ReadwritePaths []string `json:"readwritePaths,omitzero"` +} + +// Network rules to merge into the base policy. +// Experimental: SandboxConfigUserPolicyNetwork is part of an experimental API and may +// change or be removed. +type SandboxConfigUserPolicyNetwork struct { + // Hosts allowed in addition to the base policy. + AllowedHosts []string `json:"allowedHosts,omitzero"` + // Whether traffic to local/loopback addresses is allowed. + AllowLocalNetwork *bool `json:"allowLocalNetwork,omitempty"` + // Whether outbound network traffic is allowed at all. + AllowOutbound *bool `json:"allowOutbound,omitempty"` + // Hosts explicitly blocked. + BlockedHosts []string `json:"blockedHosts,omitzero"` +} + // Schema for the `ScheduleEntry` type. // Experimental: ScheduleEntry is part of an experimental API and may change or be removed. type ScheduleEntry struct { @@ -4283,11 +5199,13 @@ type SendRequest struct { // If set, the request will fail if the named tool is not available when this message is // among the user messages at the start of the current exchange RequiredTool *string `json:"requiredTool,omitempty"` - // Optional provenance tag copied to the resulting user.message event. Supported values are - // `system`, `command-*`, and `schedule-*`. + // Optional provenance tag copied to the resulting user.message event. Must match one of + // three forms: the literal `system`, `command-` for messages originating from a + // command (e.g. slash command, Mission Control command), or `schedule-` for + // messages originating from a scheduled job. // Internal: Source is part of the SDK's internal API surface and is not intended for // external use. - Source any `json:"source,omitempty"` + Source *string `json:"source,omitempty"` // W3C Trace Context traceparent header for distributed tracing of this agent turn Traceparent *string `json:"traceparent,omitempty"` // W3C Trace Context tracestate header for distributed tracing @@ -4329,6 +5247,15 @@ type ServerSkillList struct { Skills []ServerSkill `json:"skills"` } +// Current activity flags for the session. +// Experimental: SessionActivity is part of an experimental API and may change or be removed. +type SessionActivity struct { + // Whether an in-flight operation can currently be aborted. + Abortable bool `json:"abortable"` + // Whether the session currently has active work, including running turns or tasks. + HasActiveWork bool `json:"hasActiveWork"` +} + // Experimental: SessionAgentDeselectResult is part of an experimental API and may change or // be removed. type SessionAgentDeselectResult struct { @@ -4367,7 +5294,7 @@ type SessionBulkDeleteResult struct { type SessionCanvasCloseResult struct { } -// Schema for the `SessionContext` type. +// Pre-resolved working-directory context for session startup. // Experimental: SessionContext is part of an experimental API and may change or be removed. type SessionContext struct { // Active git branch @@ -4393,8 +5320,7 @@ type SessionContextInfo struct { CompactionThreshold int64 `json:"compactionThreshold"` // Tokens consumed by user/assistant/tool messages ConversationTokens int64 `json:"conversationTokens"` - // Total context limit for /context display: promptTokenLimit + outputTokenLimit (the - // model's full max_output_tokens reserved on top of the prompt budget). + // Prompt token limit plus the model's full output token limit. Limit int64 `json:"limit"` // Tokens consumed by MCP tool definitions (subset of toolDefinitionsTokens, excludes // deferred tools) @@ -4418,7 +5344,7 @@ type SessionContextInfo struct { type SessionEnrichMetadataResult struct { // Enriched records, with summary and context backfilled. Sessions confirmed empty and // unnamed may be omitted. - Sessions []SessionMetadata `json:"sessions"` + Sessions []LocalSessionMetadataValue `json:"sessions"` } // Experimental: SessionExtensionsDisableResult is part of an experimental API and may @@ -4775,11 +5701,64 @@ type SessionInstalledPluginSourceURL struct { URL string `json:"url"` } -// Persisted sessions matching the filter, ordered most-recently-modified first. +// Sessions matching the filter, ordered most-recently-modified first. // Experimental: SessionList is part of an experimental API and may change or be removed. type SessionList struct { - // Sessions ordered most-recently-modified first - Sessions []SessionMetadata `json:"sessions"` + // Sessions ordered most-recently-modified first. Discriminated by `isRemote`. + Sessions []SessionListEntry `json:"sessions"` +} + +// Local or remote session metadata entry. Narrow on `isRemote` to access source-specific +// fields. +// Experimental: SessionListEntry is part of an experimental API and may change or be +// removed. +type SessionListEntry interface { + sessionListEntry() + IsRemote() bool +} + +func (LocalSessionMetadataValue) sessionListEntry() {} +func (LocalSessionMetadataValue) IsRemote() bool { + return false +} + +// Remote session metadata for the session to hand off (typically obtained from +// `sessions.list` with `source: "remote"`). +// Experimental: RemoteSessionMetadataValue is part of an experimental API and may change or +// be removed. +type RemoteSessionMetadataValue struct { + // Most recent working directory context. + Context *SessionContext `json:"context,omitempty"` + // Last-modified time as an ISO 8601 timestamp. + ModifiedTime string `json:"modifiedTime"` + // Optional human-friendly name set via /rename. + Name *string `json:"name,omitempty"` + // Pull request number associated with the session. + PullRequestNumber *int64 `json:"pullRequestNumber,omitempty"` + // Backing remote session IDs (most recent first). + RemoteSessionIDs []string `json:"remoteSessionIds"` + // GitHub repository the remote session belongs to. + Repository RemoteSessionMetadataRepository `json:"repository"` + // Original remote resource identifier (task ID or PR node ID). + ResourceID *string `json:"resourceId,omitempty"` + // Stable session identifier. + SessionID string `json:"sessionId"` + // Deadline (ISO 8601) at which a CLI remote session becomes stale without further + // heartbeats. + StaleAt *string `json:"staleAt,omitempty"` + // Session creation time as an ISO 8601 timestamp. + StartTime string `json:"startTime"` + // Server-side task state returned by GitHub. + State *string `json:"state,omitempty"` + // Short summary of the session, when one has been derived. + Summary *string `json:"summary,omitempty"` + // Whether the remote task originated from CCA or CLI `--remote`. + TaskType *RemoteSessionMetadataTaskType `json:"taskType,omitempty"` +} + +func (RemoteSessionMetadataValue) sessionListEntry() {} +func (RemoteSessionMetadataValue) IsRemote() bool { + return true } // Optional filter applied to the returned sessions @@ -4833,35 +5812,34 @@ type SessionMCPDisableResult struct { type SessionMCPEnableResult struct { } +// Experimental: SessionMCPRegisterExternalClientResult is part of an experimental API and +// may change or be removed. +type SessionMCPRegisterExternalClientResult struct { +} + // Experimental: SessionMCPReloadResult is part of an experimental API and may change or be // removed. type SessionMCPReloadResult struct { } -// Schema for the `SessionMetadata` type. -// Experimental: SessionMetadata is part of an experimental API and may change or be removed. -type SessionMetadata struct { - // Runtime client name that created/last resumed this session - ClientName *string `json:"clientName,omitempty"` - // Schema for the `SessionContext` type. - Context *SessionContext `json:"context,omitempty"` - // True for detached maintenance sessions that should be hidden from normal resume lists. - IsDetached *bool `json:"isDetached,omitempty"` - // True for remote (GitHub) sessions; false for local - IsRemote bool `json:"isRemote"` - // GitHub task ID, when this local session is bound to one. Only present for local sessions - // exported to remote control. - McTaskID *string `json:"mcTaskId,omitempty"` - // Last-modified time of the session's persisted state, as ISO 8601 - ModifiedTime string `json:"modifiedTime"` - // Optional human-friendly name set via /rename - Name *string `json:"name,omitempty"` - // Stable session identifier - SessionID string `json:"sessionId"` - // Session creation time as an ISO 8601 timestamp - StartTime string `json:"startTime"` - // Short summary of the session, when one has been derived - Summary *string `json:"summary,omitempty"` +// Experimental: SessionMCPRestartServerResult is part of an experimental API and may change +// or be removed. +type SessionMCPRestartServerResult struct { +} + +// Experimental: SessionMCPStartServerResult is part of an experimental API and may change +// or be removed. +type SessionMCPStartServerResult struct { +} + +// Experimental: SessionMCPStopServerResult is part of an experimental API and may change or +// be removed. +type SessionMCPStopServerResult struct { +} + +// Experimental: SessionMCPUnregisterExternalClientResult is part of an experimental API and +// may change or be removed. +type SessionMCPUnregisterExternalClientResult struct { } // Point-in-time snapshot of slow-changing session identifier and state fields @@ -4929,6 +5907,318 @@ type SessionModeSetResult struct { type SessionNameSetResult struct { } +// Session construction options. +// Experimental: SessionOpenOptions is part of an experimental API and may change or be +// removed. +type SessionOpenOptions struct { + // Additional content-exclusion policies to merge into the session policy set. + // Experimental: AdditionalContentExclusionPolicies is part of an experimental API and may + // change or be removed. + AdditionalContentExclusionPolicies []SessionOpenOptionsAdditionalContentExclusionPolicy `json:"additionalContentExclusionPolicies,omitzero"` + // Runtime context discriminator for agent filtering. + AgentContext *string `json:"agentContext,omitempty"` + // Whether ask_user is explicitly disabled. + AskUserDisabled *bool `json:"askUserDisabled,omitempty"` + // Initial authentication info for the session. + AuthInfo AuthInfo `json:"authInfo,omitempty"` + // Allowlist of available tool names. + AvailableTools []string `json:"availableTools,omitzero"` + // Structured client kind used for runtime behavior gates. + ClientKind *string `json:"clientKind,omitempty"` + // Identifier of the client driving the session. + ClientName *string `json:"clientName,omitempty"` + // Whether commit-message coauthor trailers are enabled. + CoauthorEnabled *bool `json:"coauthorEnabled,omitempty"` + // Override Copilot configuration directory. + ConfigDir *string `json:"configDir,omitempty"` + // Whether auto-mode continuation is enabled. + ContinueOnAutoMode *bool `json:"continueOnAutoMode,omitempty"` + // Override URL for the Copilot API endpoint. + CopilotURL *string `json:"copilotUrl,omitempty"` + // Whether custom agents default to local-only execution. + CustomAgentsLocalOnly *bool `json:"customAgentsLocalOnly,omitempty"` + // Parent engagement ID for detached child telemetry rollup. + DetachedFromSpawningParentEngagementID *string `json:"detachedFromSpawningParentEngagementId,omitempty"` + // Parent session ID for detached child telemetry rollup. + DetachedFromSpawningParentSessionID *string `json:"detachedFromSpawningParentSessionId,omitempty"` + // Instruction source IDs disabled for this session. + DisabledInstructionSources []string `json:"disabledInstructionSources,omitzero"` + // Skill IDs disabled for this session. + DisabledSkills []string `json:"disabledSkills,omitzero"` + // Whether on-demand custom instruction discovery is enabled. + EnableOnDemandInstructionDiscovery *bool `json:"enableOnDemandInstructionDiscovery,omitempty"` + // Whether shell-script safety heuristics are enabled. + EnableScriptSafety *bool `json:"enableScriptSafety,omitempty"` + // Whether model responses stream as delta events. + EnableStreaming *bool `json:"enableStreaming,omitempty"` + // How MCP server environment values are interpreted. + EnvValueMode *SessionOpenOptionsEnvValueMode `json:"envValueMode,omitempty"` + // Override directory for session event logs. + EventsLogDirectory *string `json:"eventsLogDirectory,omitempty"` + // Denylist of tool names. + ExcludedTools []string `json:"excludedTools,omitzero"` + // Feature-flag values resolved by the host. + FeatureFlags map[string]bool `json:"featureFlags,omitzero"` + // Installed plugins visible to the session. + InstalledPlugins []InstalledPlugin `json:"installedPlugins,omitzero"` + // Stable integration identifier for analytics. + IntegrationID *string `json:"integrationId,omitempty"` + // Whether experimental behavior is enabled. + IsExperimentalMode *bool `json:"isExperimentalMode,omitempty"` + // Whether interactive shell sessions are logged. + LogInteractiveShells *bool `json:"logInteractiveShells,omitempty"` + // Identifier sent to LSP-style integrations. + LspClientName *string `json:"lspClientName,omitempty"` + // Initial model identifier. + Model *string `json:"model,omitempty"` + // Initial model capability overrides. + ModelCapabilitiesOverrides *ModelCapabilitiesOverride `json:"modelCapabilitiesOverrides,omitempty"` + // Optional human-friendly session name. + Name *string `json:"name,omitempty"` + // Custom model-provider configuration (BYOK). + Provider *ProviderConfig `json:"provider,omitempty"` + // Initial reasoning effort level. + ReasoningEffort *string `json:"reasoningEffort,omitempty"` + // Initial reasoning summary mode for supported model clients. + ReasoningSummary *SessionOpenOptionsReasoningSummary `json:"reasoningSummary,omitempty"` + // Telemetry-only remote-defaulted flag. + RemoteDefaultedOn *bool `json:"remoteDefaultedOn,omitempty"` + // Telemetry-only remote exporting flag. + RemoteExporting *bool `json:"remoteExporting,omitempty"` + // Whether this session supports remote steering. + RemoteSteerable *bool `json:"remoteSteerable,omitempty"` + // Whether the host is an interactive UI. + RunningInInteractiveMode *bool `json:"runningInInteractiveMode,omitempty"` + // Resolved sandbox configuration. + SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` + // Capabilities enabled for this session. + SessionCapabilities []SessionCapability `json:"sessionCapabilities,omitzero"` + // Optional stable session identifier to use for a new session. + SessionID *string `json:"sessionId,omitempty"` + // Shell init profile. + ShellInitProfile *string `json:"shellInitProfile,omitempty"` + // Per-shell process flags. + ShellProcessFlags []string `json:"shellProcessFlags,omitzero"` + // Additional directories to search for skills. + SkillDirectories []string `json:"skillDirectories,omitzero"` + // Whether to skip custom instruction sources. + SkipCustomInstructions *bool `json:"skipCustomInstructions,omitempty"` + // Optional trajectory output file path. + TrajectoryFile *string `json:"trajectoryFile,omitempty"` + // Working directory to anchor the session. + WorkingDirectory *string `json:"workingDirectory,omitempty"` + // Pre-resolved working-directory context for session startup. + WorkingDirectoryContext *SessionContext `json:"workingDirectoryContext,omitempty"` +} + +// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicy` type. +// Experimental: SessionOpenOptionsAdditionalContentExclusionPolicy is part of an +// experimental API and may change or be removed. +type SessionOpenOptionsAdditionalContentExclusionPolicy struct { + LastUpdatedAt any `json:"last_updated_at"` + Rules []SessionOpenOptionsAdditionalContentExclusionPolicyRule `json:"rules"` + // Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` + // enumeration. + Scope SessionOpenOptionsAdditionalContentExclusionPolicyScope `json:"scope"` +} + +// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRule` type. +// Experimental: SessionOpenOptionsAdditionalContentExclusionPolicyRule is part of an +// experimental API and may change or be removed. +type SessionOpenOptionsAdditionalContentExclusionPolicyRule struct { + IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + IfNoneMatch []string `json:"ifNoneMatch,omitzero"` + Paths []string `json:"paths"` + // Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type. + Source SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource `json:"source"` +} + +// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type. +// Experimental: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource is part of an +// experimental API and may change or be removed. +type SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource struct { + Name string `json:"name"` + Type string `json:"type"` +} + +// Open a session by creating, resuming, attaching, connecting to a remote, or handing off. +// Experimental: SessionOpenParams is part of an experimental API and may change or be +// removed. +type SessionOpenParams interface { + sessionOpenParams() + Kind() SessionOpenParamsKind +} + +type RawSessionOpenParamsData struct { + Discriminator SessionOpenParamsKind + Raw json.RawMessage +} + +func (RawSessionOpenParamsData) sessionOpenParams() {} +func (r RawSessionOpenParamsData) Kind() SessionOpenParamsKind { + return r.Discriminator +} + +// Parameters for attaching to an already-active session by ID. +// Experimental: SessionsOpenAttach is part of an experimental API and may change or be +// removed. +type SessionsOpenAttach struct { + // Session ID to attach to. + SessionID string `json:"sessionId"` +} + +func (SessionsOpenAttach) sessionOpenParams() {} +func (SessionsOpenAttach) Kind() SessionOpenParamsKind { + return SessionOpenParamsKindAttach +} + +// Parameters for creating a new cloud session. +// Experimental: SessionsOpenCloud is part of an experimental API and may change or be +// removed. +type SessionsOpenCloud struct { + // In-process callback invoked when the cloud task is created (before connection). Marked + // internal because a function reference cannot cross the JSON-RPC boundary. Disappears in + // the SDK migration: the field is purely cosmetic (it flips a single CLI phase label from + // 'creating' to 'connecting') and the wire-clean version just drops the intermediate phase. + // Internal: OnTaskCreated is part of the SDK's internal API surface and is not intended for + // external use. + OnTaskCreated any `json:"onTaskCreated,omitempty"` + // Session options for cloud session creation. + Options *SessionOpenOptions `json:"options,omitempty"` + // Optional owner (user or organization login) to associate with the cloud session when no + // repository is provided. Ignored when `repository` is set (the repo's owner takes + // precedence). + Owner *string `json:"owner,omitempty"` + // Repository for the cloud session. + Repository *RemoteSessionRepository `json:"repository,omitempty"` +} + +func (SessionsOpenCloud) sessionOpenParams() {} +func (SessionsOpenCloud) Kind() SessionOpenParamsKind { + return SessionOpenParamsKindCloud +} + +// Parameters for creating a new local session. +// Experimental: SessionsOpenCreate is part of an experimental API and may change or be +// removed. +type SessionsOpenCreate struct { + // Whether to emit session.start during creation. Defaults to true. + EmitStart *bool `json:"emitStart,omitempty"` + // Session construction options. + Options *SessionOpenOptions `json:"options,omitempty"` +} + +func (SessionsOpenCreate) sessionOpenParams() {} +func (SessionsOpenCreate) Kind() SessionOpenParamsKind { + return SessionOpenParamsKindCreate +} + +// Parameters for fetching a remote session and handing it off to a new local session. +// Experimental: SessionsOpenHandoff is part of an experimental API and may change or be +// removed. +type SessionsOpenHandoff struct { + // Remote session metadata for the session to hand off (typically obtained from + // `sessions.list` with `source: "remote"`). + Metadata RemoteSessionMetadataValue `json:"metadata"` + // In-process progress callback `(update) => void` invoked for each handoff step. Marked + // internal because a function reference cannot cross the JSON-RPC boundary. The host-side + // `handoffSession` is already declared as `AsyncGenerator`; + // the schema layer flattens it because it does not yet support streaming methods. The + // wire-clean replacement is to expose the AsyncGenerator directly (or use vscode-jsonrpc + // `$/progress` notifications) once the schema/transport layer supports it. + // Internal: OnProgress is part of the SDK's internal API surface and is not intended for + // external use. + OnProgress any `json:"onProgress,omitempty"` + // Session construction options for the new local session. + Options *SessionOpenOptions `json:"options,omitempty"` + // Task type determines the handoff strategy (CCA fetches events; CLI prepares a transient + // session). + TaskType *SessionsOpenHandoffTaskType `json:"taskType,omitempty"` +} + +func (SessionsOpenHandoff) sessionOpenParams() {} +func (SessionsOpenHandoff) Kind() SessionOpenParamsKind { + return SessionOpenParamsKindHandoff +} + +// Parameters for connecting to a live remote session. +// Experimental: SessionsOpenRemote is part of an experimental API and may change or be +// removed. +type SessionsOpenRemote struct { + // Session options for the connection. + Options *SessionOpenOptions `json:"options,omitempty"` + // Remote session identifier to connect to. + RemoteSessionID string `json:"remoteSessionId"` + // Repository context for the remote session. + Repository *RemoteSessionRepository `json:"repository,omitempty"` +} + +func (SessionsOpenRemote) sessionOpenParams() {} +func (SessionsOpenRemote) Kind() SessionOpenParamsKind { + return SessionOpenParamsKindRemote +} + +// Parameters for resuming a specific local session. +// Experimental: SessionsOpenResume is part of an experimental API and may change or be +// removed. +type SessionsOpenResume struct { + // Session resume options. + Options *SessionOpenOptions `json:"options,omitempty"` + // Whether to emit session.resume after loading. Defaults to true. + Resume *bool `json:"resume,omitempty"` + // Session ID or unique prefix to resume. + SessionID string `json:"sessionId"` + // Suppress workspace.yaml metadata writeback when resuming from an incidental cwd. + SuppressResumeWorkspaceMetadataWriteback *bool `json:"suppressResumeWorkspaceMetadataWriteback,omitempty"` +} + +func (SessionsOpenResume) sessionOpenParams() {} +func (SessionsOpenResume) Kind() SessionOpenParamsKind { + return SessionOpenParamsKindResume +} + +// Parameters for resuming the most relevant local session. +// Experimental: SessionsOpenResumeLast is part of an experimental API and may change or be +// removed. +type SessionsOpenResumeLast struct { + // Working-directory context used to choose the most relevant session. + Context *SessionContext `json:"context,omitempty"` + // Session resume options. + Options *SessionOpenOptions `json:"options,omitempty"` + // Suppress workspace.yaml metadata writeback when resuming from an incidental cwd. + SuppressResumeWorkspaceMetadataWriteback *bool `json:"suppressResumeWorkspaceMetadataWriteback,omitempty"` +} + +func (SessionsOpenResumeLast) sessionOpenParams() {} +func (SessionsOpenResumeLast) Kind() SessionOpenParamsKind { + return SessionOpenParamsKindResumeLast +} + +// Result of opening a session. +// Experimental: SessionOpenResult is part of an experimental API and may change or be +// removed. +type SessionOpenResult struct { + // Remote session metadata, present when status is `connected`. + Metadata *RemoteSessionMetadataValue `json:"metadata,omitempty"` + // Handoff progress steps, present when status is `handed_off`. + Progress []SessionsOpenProgress `json:"progress,omitzero"` + // Remote session ID, present when status is `connected`. + RemoteSessionID *string `json:"remoteSessionId,omitempty"` + // In-process SessionClientApi handle for the opened session, returned to CLI callers as a + // transitional shortcut. Marked internal so the public SDK surface does not expose it; SDK + // consumers should construct per-session clients from `sessionId` instead. + // Internal: SessionAPI is part of the SDK's internal API surface and is not intended for + // external use. + SessionAPI any `json:"sessionApi,omitempty"` + // Opened session ID. Omitted when status is `not_found`. + SessionID *string `json:"sessionId,omitempty"` + // Startup prompts queued by user-level hook configs at session creation. Only populated + // when status is `created`; resumed sessions return an empty array. + StartupPrompts []string `json:"startupPrompts,omitzero"` + // Outcome of the open request. + Status SessionsOpenStatus `json:"status"` +} + // Experimental: SessionPlanDeleteResult is part of an experimental API and may change or be // removed. type SessionPlanDeleteResult struct { @@ -4939,6 +6229,11 @@ type SessionPlanDeleteResult struct { type SessionPlanUpdateResult struct { } +// Experimental: SessionPluginsReloadResult is part of an experimental API and may change or +// be removed. +type SessionPluginsReloadResult struct { +} + // Outcome of the prune operation: deleted IDs, dry-run candidates, skipped IDs, total bytes // freed, and the dry-run flag. // Experimental: SessionPruneResult is part of an experimental API and may change or be @@ -5007,13 +6302,18 @@ type SessionsCloseRequest struct { type SessionsCloseResult struct { } +// Experimental: SessionsConfigureSessionExtensionsResult is part of an experimental API and +// may change or be removed. +type SessionsConfigureSessionExtensionsResult struct { +} + // Session metadata records to enrich with summary and context information. // Experimental: SessionsEnrichMetadataRequest is part of an experimental API and may change // or be removed. type SessionsEnrichMetadataRequest struct { // Session metadata records to enrich. Records that already have summary and context are // returned unchanged. - Sessions []SessionMetadata `json:"sessions"` + Sessions []LocalSessionMetadataValue `json:"sessions"` } // New auth credentials to install on the session. Omit to leave credentials unchanged. @@ -5093,6 +6393,22 @@ type SessionsForkResult struct { SessionID string `json:"sessionId"` } +// Session ID whose board entry count should be returned. +// Experimental: SessionsGetBoardEntryCountRequest is part of an experimental API and may +// change or be removed. +type SessionsGetBoardEntryCountRequest struct { + // Session ID whose board entry count should be returned. + SessionID string `json:"sessionId"` +} + +// Dynamic-context board entry count, when available. +// Experimental: SessionsGetBoardEntryCountResult is part of an experimental API and may +// change or be removed. +type SessionsGetBoardEntryCountResult struct { + // Board entry count, when available. + Count *int64 `json:"count,omitempty"` +} + // Session ID whose event-log file path to compute. // Experimental: SessionsGetEventFilePathRequest is part of an experimental API and may // change or be removed. @@ -5171,7 +6487,8 @@ type SessionSkillsEnableResult struct { type SessionSkillsEnsureLoadedResult struct { } -// Optional metadata-load limit and filters applied to the returned sessions. +// Optional source filter, metadata-load limit, and context filter applied to the returned +// sessions. // Experimental: SessionsListRequest is part of an experimental API and may change or be // removed. type SessionsListRequest struct { @@ -5180,10 +6497,16 @@ type SessionsListRequest struct { // When true, include detached maintenance sessions. Defaults to false for user-facing // session lists. IncludeDetached *bool `json:"includeDetached,omitempty"` - // When provided, only the first N sessions (sorted by modification time, newest first) load - // full metadata; remaining sessions return basic info only. Use 0 to return only basic info - // for every session. + // When provided, only the first N local sessions (sorted by modification time, newest + // first) load full metadata; remaining sessions return basic info only. Use 0 to return + // only basic info for every local session. Has no effect on remote entries (which always + // carry their full shape). MetadataLimit *int64 `json:"metadataLimit,omitempty"` + // Which session sources to include. Defaults to `local` for backward compatibility. + Source *SessionSource `json:"source,omitempty"` + // Only meaningful when `source` includes remote. When true, propagates errors from the + // remote service instead of silently returning an empty remote list. Defaults to false. + ThrowOnError *bool `json:"throwOnError,omitempty"` } // Active session ID whose deferred repo-level hooks should be loaded. @@ -5194,6 +6517,37 @@ type SessionsLoadDeferredRepoHooksRequest struct { SessionID string `json:"sessionId"` } +// Schema for the `SessionsOpenProgress` type. +// Experimental: SessionsOpenProgress is part of an experimental API and may change or be +// removed. +type SessionsOpenProgress struct { + // Optional step message. + Message *string `json:"message,omitempty"` + // Step status. + Status SessionsOpenProgressStatus `json:"status"` + // Handoff step. + Step SessionsOpenProgressStep `json:"step"` +} + +// Schema for the `SessionsPollSpawnedSessionsEvent` type. +// Experimental: SessionsPollSpawnedSessionsEvent is part of an experimental API and may +// change or be removed. +type SessionsPollSpawnedSessionsEvent struct { + // Session id of the newly-spawned session. + SessionID string `json:"sessionId"` +} + +// Experimental: SessionsPollSpawnedSessionsRequest is part of an experimental API and may +// change or be removed. +type SessionsPollSpawnedSessionsRequest struct { + // Opaque cursor returned by a previous poll. Omit on the first call to receive any spawn + // events buffered since the runtime started. + Cursor *string `json:"cursor,omitempty"` + // Milliseconds to wait for new spawn events when the cursor is at the tail. 0 (default) + // returns immediately even if no events are buffered. Capped at 60000ms. + WaitMs *int32 `json:"waitMs,omitempty"` +} + // Age threshold and optional flags controlling which old sessions are pruned (or simulated // when dryRun is true). // Experimental: SessionsPruneOldRequest is part of an experimental API and may change or be @@ -5209,6 +6563,17 @@ type SessionsPruneOldRequest struct { OlderThanDays int64 `json:"olderThanDays"` } +// Optional registration options. +// Experimental: SessionsRegisterExtensionToolsOnSessionOptions is part of an experimental +// API and may change or be removed. +type SessionsRegisterExtensionToolsOnSessionOptions struct { + // In-process `() => boolean` gating callback (CLI-only optimization). Marked internal: + // replaced by runtime-side enable/disable RPCs in the SDK migration. + // Internal: Enabled is part of the SDK's internal API surface and is not intended for + // external use. + Enabled any `json:"enabled,omitempty"` +} + // Session ID whose in-use lock should be released. // Experimental: SessionsReleaseLockRequest is part of an experimental API and may change or // be removed. @@ -5275,11 +6640,60 @@ type SessionsSetAdditionalPluginsRequest struct { type SessionsSetAdditionalPluginsResult struct { } +// Patch for the singleton's steering state. +// Experimental: SessionsSetRemoteControlSteeringRequest is part of an experimental API and +// may change or be removed. +type SessionsSetRemoteControlSteeringRequest struct { + // Target steering state. Today only `true` is actionable on the underlying exporter; + // `false` is reserved for future use. + Enabled bool `json:"enabled"` +} + +// Parameters for attaching the remote-control singleton to a session. +// Experimental: SessionsStartRemoteControlRequest is part of an experimental API and may +// change or be removed. +type SessionsStartRemoteControlRequest struct { + // Configuration for the runtime-managed remote-control singleton. + Config RemoteControlConfig `json:"config"` + // Local session id to attach remote control to. + SessionID string `json:"sessionId"` +} + +// Experimental: SessionsStopRemoteControlRequest is part of an experimental API and may +// change or be removed. +type SessionsStopRemoteControlRequest struct { + // When provided, the stop is rejected unless the singleton currently points at this session + // id (compare-and-swap semantics). + ExpectedSessionID *string `json:"expectedSessionId,omitempty"` + // When true, the singleton is unconditionally torn down regardless of `expectedSessionId`. + // Use during shutdown or explicit `/remote off`. + Force *bool `json:"force,omitempty"` +} + +// Parameters for atomically rebinding the remote-control singleton. +// Experimental: SessionsTransferRemoteControlRequest is part of an experimental API and may +// change or be removed. +type SessionsTransferRemoteControlRequest struct { + // When provided, the transfer is rejected unless the singleton currently points at this + // session id (compare-and-swap semantics to avoid clobbering newer state). + ExpectedFromSessionID *string `json:"expectedFromSessionId,omitempty"` + // Local session id to point remote control at. + ToSessionID string `json:"toSessionId"` +} + // Experimental: SessionSuspendResult is part of an experimental API and may change or be // removed. type SessionSuspendResult struct { } +// Telemetry engagement ID for the session, when available. +// Experimental: SessionTelemetryEngagement is part of an experimental API and may change or +// be removed. +type SessionTelemetryEngagement struct { + // Current telemetry engagement ID, when available. + EngagementID *string `json:"engagementId,omitempty"` +} + // Experimental: SessionTelemetrySetFeatureOverridesResult is part of an experimental API // and may change or be removed. type SessionTelemetrySetFeatureOverridesResult struct { @@ -5289,11 +6703,10 @@ type SessionTelemetrySetFeatureOverridesResult struct { // Experimental: SessionUpdateOptionsParams is part of an experimental API and may change or // be removed. type SessionUpdateOptionsParams struct { - // Additional content-exclusion policies to merge into the session's policy set. Opaque - // shape; see `ContentExclusionApiResponse` in the runtime. + // Additional content-exclusion policies to merge into the session's policy set. // Experimental: AdditionalContentExclusionPolicies is part of an experimental API and may // change or be removed. - AdditionalContentExclusionPolicies []any `json:"additionalContentExclusionPolicies,omitzero"` + AdditionalContentExclusionPolicies []OptionsUpdateAdditionalContentExclusionPolicy `json:"additionalContentExclusionPolicies,omitzero"` // Runtime context discriminator (e.g., `cli`, `actions`). AgentContext *string `json:"agentContext,omitempty"` // Whether to disable the `ask_user` tool (encourages autonomous behavior). @@ -5304,6 +6717,10 @@ type SessionUpdateOptionsParams struct { ClientName *string `json:"clientName,omitempty"` // Whether to include the `Co-authored-by` trailer in commit messages. CoauthorEnabled *bool `json:"coauthorEnabled,omitempty"` + // Context tier for models with tiered pricing. The session uses this to derive effective + // `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits + // honor the selected tier. + ContextTier *OptionsUpdateContextTier `json:"contextTier,omitempty"` // Whether to allow auto-mode continuation across turns. ContinueOnAutoMode *bool `json:"continueOnAutoMode,omitempty"` // Override URL for the Copilot API endpoint. @@ -5362,19 +6779,24 @@ type SessionUpdateOptionsParams struct { ManageScheduleEnabled *bool `json:"manageScheduleEnabled,omitempty"` // The model ID to use for assistant turns. Model *string `json:"model,omitempty"` + // Per-property model capability overrides for the selected model. + ModelCapabilitiesOverrides *ModelCapabilitiesOverride `json:"modelCapabilitiesOverrides,omitempty"` // Organization-level custom instructions to inject into the system prompt. OrganizationCustomInstructions *string `json:"organizationCustomInstructions,omitempty"` - // Custom model-provider configuration (BYOK). Opaque shape; see `ProviderConfig` in the - // runtime. - // Experimental: Provider is part of an experimental API and may change or be removed. - Provider any `json:"provider,omitempty"` + // Custom model-provider configuration (BYOK). + Provider *ProviderConfig `json:"provider,omitempty"` // Reasoning effort for the selected model (model-defined enum). ReasoningEffort *string `json:"reasoningEffort,omitempty"` + // Reasoning summary mode for supported model clients. + ReasoningSummary *OptionsUpdateReasoningSummary `json:"reasoningSummary,omitempty"` // Whether the session is running in an interactive UI. RunningInInteractiveMode *bool `json:"runningInInteractiveMode,omitempty"` - // Sandbox configuration shape; opaque to SDK consumers. See `SandboxConfig` in the runtime. - // Experimental: SandboxConfig is part of an experimental API and may change or be removed. - SandboxConfig any `json:"sandboxConfig,omitempty"` + // Resolved sandbox configuration. + SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` + // Replaces the session's capability set with the given list. Use to enable or disable + // capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the + // field to leave the existing capability set unchanged. + SessionCapabilities []SessionCapability `json:"sessionCapabilities,omitzero"` // Shell init profile (`None` or `NonInteractive`). ShellInitProfile *string `json:"shellInitProfile,omitempty"` // Per-shell process flags (e.g., `pwsh` arguments). @@ -5435,6 +6857,14 @@ type SessionWorkingDirectoryContext struct { type SessionWorkspacesCreateFileResult struct { } +// User-requested shell execution cancellation handle. +// Experimental: ShellCancelUserRequestedRequest is part of an experimental API and may +// change or be removed. +type ShellCancelUserRequestedRequest struct { + // Request ID previously passed to executeUserRequested + RequestID string `json:"requestId"` +} + // Shell command to run, with optional working directory and timeout in milliseconds. // Experimental: ShellExecRequest is part of an experimental API and may change or be // removed. @@ -5455,6 +6885,16 @@ type ShellExecResult struct { ProcessID string `json:"processId"` } +// User-requested shell command and cancellation handle. +// Experimental: ShellExecuteUserRequestedRequest is part of an experimental API and may +// change or be removed. +type ShellExecuteUserRequestedRequest struct { + // Shell command to execute + Command string `json:"command"` + // Caller-provided cancellation handle for this execution + RequestID string `json:"requestId"` +} + // Identifier of a process previously returned by "shell.exec" and the signal to send. // Experimental: ShellKillRequest is part of an experimental API and may change or be // removed. @@ -5766,7 +7206,8 @@ type TaskAgentInfo struct { LatestResponse *string `json:"latestResponse,omitempty"` // Model used for the task when specified Model *string `json:"model,omitempty"` - // Prompt passed to the agent + // Most recent prompt delivered to the agent. Updated whenever the agent receives a + // follow-up message. Prompt string `json:"prompt"` // Result text from the task when available Result *string `json:"result,omitempty"` @@ -6360,6 +7801,34 @@ type UIElicitationStringOneOfFieldOneOf struct { Title string `json:"title"` } +// Transient question to answer without adding it to conversation history. +// Experimental: UIEphemeralQueryRequest is part of an experimental API and may change or be +// removed. +type UIEphemeralQueryRequest struct { + // In-process `AbortSignal` forwarded to the model client to cancel an in-flight request. + // Marked internal: excluded from the public SDK surface. Replaced by an explicit + // cancellation token + cancel RPC in the SDK migration. + // Internal: AbortSignal is part of the SDK's internal API surface and is not intended for + // external use. + AbortSignal any `json:"abortSignal,omitempty"` + // In-process streaming callback `(text) => void` invoked with each token as the model emits + // it. Marked internal: excluded from the public SDK surface. In a process-separated SDK + // this is replaced by a streaming RPC that yields chunks and a final answer. + // Internal: OnChunk is part of the SDK's internal API surface and is not intended for + // external use. + OnChunk any `json:"onChunk,omitempty"` + // Question to answer from the current conversation context. + Question string `json:"question"` +} + +// Transient answer generated from current conversation context. +// Experimental: UIEphemeralQueryResult is part of an experimental API and may change or be +// removed. +type UIEphemeralQueryResult struct { + // Full assistant response text. + Answer string `json:"answer"` +} + // Schema for the `UIExitPlanModeResponse` type. // Experimental: UIExitPlanModeResponse is part of an experimental API and may change or be // removed. @@ -6588,6 +8057,22 @@ type UsageMetricsTokenDetail struct { TokenCount int64 `json:"tokenCount"` } +// Result of a user-requested shell command. +// Experimental: UserRequestedShellCommandResult is part of an experimental API and may +// change or be removed. +type UserRequestedShellCommandResult struct { + // Error output when the execution failed + Error *string `json:"error,omitempty"` + // Process exit code, when available + ExitCode *int64 `json:"exitCode,omitempty"` + // Captured command output + Output string `json:"output"` + // Whether the command completed successfully + Success bool `json:"success"` + // Tool call id emitted for the shell execution + ToolCallID string `json:"toolCallId"` +} + type UserSettingsReloadResult struct { } @@ -6900,6 +8385,8 @@ type WorkspaceSummary struct { Repository *string `json:"repository,omitempty"` // ISO 8601 timestamp when the workspace was last updated UpdatedAt *time.Time `json:"updated_at,omitempty"` + // Whether the display name was explicitly set by the user + UserNamed *bool `json:"user_named,omitempty"` } // Finite reason code describing why the current turn was aborted @@ -7605,6 +9092,33 @@ const ( ModelPolicyStateUnconfigured ModelPolicyState = "unconfigured" ) +// Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. +// Experimental: OptionsUpdateAdditionalContentExclusionPolicyScope is part of an +// experimental API and may change or be removed. +type OptionsUpdateAdditionalContentExclusionPolicyScope string + +const ( + // The content exclusion policy applies across all repositories. + OptionsUpdateAdditionalContentExclusionPolicyScopeAll OptionsUpdateAdditionalContentExclusionPolicyScope = "all" + // The content exclusion policy applies to the current repository. + OptionsUpdateAdditionalContentExclusionPolicyScopeRepo OptionsUpdateAdditionalContentExclusionPolicyScope = "repo" +) + +// Context tier for models with tiered pricing. The session uses this to derive effective +// `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits +// honor the selected tier. +// Experimental: OptionsUpdateContextTier is part of an experimental API and may change or +// be removed. +type OptionsUpdateContextTier string + +const ( + // Use the model's default context tier and its standard token limits / pricing. + OptionsUpdateContextTierDefault OptionsUpdateContextTier = "default" + // Use the model's long-context tier (when available) so larger inputs are accepted and + // tier-specific pricing applies. + OptionsUpdateContextTierLongContext OptionsUpdateContextTier = "long_context" +) + // How env values are passed to MCP servers (`direct` inlines literal values; `indirect` // resolves at launch). // Experimental: OptionsUpdateEnvValueMode is part of an experimental API and may change or @@ -7618,6 +9132,20 @@ const ( OptionsUpdateEnvValueModeIndirect OptionsUpdateEnvValueMode = "indirect" ) +// Reasoning summary mode for supported model clients. +// Experimental: OptionsUpdateReasoningSummary is part of an experimental API and may change +// or be removed. +type OptionsUpdateReasoningSummary string + +const ( + // Request a concise summary of model reasoning. + OptionsUpdateReasoningSummaryConcise OptionsUpdateReasoningSummary = "concise" + // Request a detailed summary of model reasoning. + OptionsUpdateReasoningSummaryDetailed OptionsUpdateReasoningSummary = "detailed" + // Do not request reasoning summaries from the model. + OptionsUpdateReasoningSummaryNone OptionsUpdateReasoningSummary = "none" +) + // Controls how availableTools (allowlist) and excludedTools (denylist) combine when both // are set. // Experimental: OptionsUpdateToolFilterPrecedence is part of an experimental API and may @@ -7770,6 +9298,32 @@ const ( PermissionsSetApproveAllSourceSlashCommand PermissionsSetApproveAllSource = "slash_command" ) +// Provider type. Defaults to "openai" for generic OpenAI-compatible APIs. +// Experimental: ProviderConfigType is part of an experimental API and may change or be +// removed. +type ProviderConfigType string + +const ( + // Anthropic API endpoint. + ProviderConfigTypeAnthropic ProviderConfigType = "anthropic" + // Azure OpenAI Service endpoint. + ProviderConfigTypeAzure ProviderConfigType = "azure" + // Generic OpenAI-compatible API. + ProviderConfigTypeOpenai ProviderConfigType = "openai" +) + +// Wire API format (openai/azure only). Defaults to "completions". +// Experimental: ProviderConfigWireAPI is part of an experimental API and may change or be +// removed. +type ProviderConfigWireAPI string + +const ( + // OpenAI Chat Completions wire format. + ProviderConfigWireAPICompletions ProviderConfigWireAPI = "completions" + // OpenAI Responses API wire format. + ProviderConfigWireAPIResponses ProviderConfigWireAPI = "responses" +) + // Type of GitHub reference // Experimental: PushAttachmentGitHubReferenceType is part of an experimental API and may // change or be removed. @@ -7822,6 +9376,28 @@ const ( ReasoningSummaryNone ReasoningSummary = "none" ) +// State discriminator for RemoteControlStatus. +type RemoteControlStatusState string + +const ( + RemoteControlStatusStateActive RemoteControlStatusState = "active" + RemoteControlStatusStateConnecting RemoteControlStatusState = "connecting" + RemoteControlStatusStateError RemoteControlStatusState = "error" + RemoteControlStatusStateOff RemoteControlStatusState = "off" +) + +// Whether the remote task originated from CCA or CLI `--remote`. +// Experimental: RemoteSessionMetadataTaskType is part of an experimental API and may change +// or be removed. +type RemoteSessionMetadataTaskType string + +const ( + // GitHub Copilot coding agent task. + RemoteSessionMetadataTaskTypeCca RemoteSessionMetadataTaskType = "cca" + // CLI remote task. + RemoteSessionMetadataTaskTypeCLI RemoteSessionMetadataTaskType = "cli" +) + // Per-session remote mode. "off" disables remote, "export" exports session events to GitHub // without enabling remote steering, "on" enables both export and remote steering. // Experimental: RemoteSessionMode is part of an experimental API and may change or be @@ -7865,6 +9441,36 @@ const ( SendModeImmediate SendMode = "immediate" ) +// Session capability enabled for this session +// Experimental: SessionCapability is part of an experimental API and may change or be +// removed. +type SessionCapability string + +const ( + // Interactive ask_user tool support. + SessionCapabilityAskUser SessionCapability = "ask-user" + // Host-provided canvas rendering support. + SessionCapabilityCanvasRenderer SessionCapability = "canvas-renderer" + // Copilot CLI documentation tool and prompt section. + SessionCapabilityCLIDocumentation SessionCapability = "cli-documentation" + // SDK elicitation support. + SessionCapabilityElicitation SessionCapability = "elicitation" + // Interactive CLI identity and behavior. + SessionCapabilityInteractiveMode SessionCapability = "interactive-mode" + // MCP Apps UI passthrough. + SessionCapabilityMCPApps SessionCapability = "mcp-apps" + // Memory tool and memories prompt section. + SessionCapabilityMemory SessionCapability = "memory" + // Plan-mode handling and instructions. + SessionCapabilityPlanMode SessionCapability = "plan-mode" + // Cross-session history tools and session-store SQL prompt/tool metadata. + SessionCapabilitySessionStore SessionCapability = "session-store" + // Automatic hidden system notifications. + SessionCapabilitySystemNotifications SessionCapability = "system-notifications" + // TUI-specific prompt hints such as keyboard shortcuts. + SessionCapabilityTuiHints SessionCapability = "tui-hints" +) + // Repository host type // Experimental: SessionContextHostType is part of an experimental API and may change or be // removed. @@ -7974,6 +9580,134 @@ const ( SessionModePlan SessionMode = "plan" ) +// Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` +// enumeration. +// Experimental: SessionOpenOptionsAdditionalContentExclusionPolicyScope is part of an +// experimental API and may change or be removed. +type SessionOpenOptionsAdditionalContentExclusionPolicyScope string + +const ( + // The content exclusion policy applies across all repositories. + SessionOpenOptionsAdditionalContentExclusionPolicyScopeAll SessionOpenOptionsAdditionalContentExclusionPolicyScope = "all" + // The content exclusion policy applies to the current repository. + SessionOpenOptionsAdditionalContentExclusionPolicyScopeRepo SessionOpenOptionsAdditionalContentExclusionPolicyScope = "repo" +) + +// How MCP server environment values are interpreted. +// Experimental: SessionOpenOptionsEnvValueMode is part of an experimental API and may +// change or be removed. +type SessionOpenOptionsEnvValueMode string + +const ( + // Pass MCP server environment values as literal strings. + SessionOpenOptionsEnvValueModeDirect SessionOpenOptionsEnvValueMode = "direct" + // Resolve MCP server environment values from host-side references. + SessionOpenOptionsEnvValueModeIndirect SessionOpenOptionsEnvValueMode = "indirect" +) + +// Initial reasoning summary mode for supported model clients. +// Experimental: SessionOpenOptionsReasoningSummary is part of an experimental API and may +// change or be removed. +type SessionOpenOptionsReasoningSummary string + +const ( + // Request a concise summary of model reasoning. + SessionOpenOptionsReasoningSummaryConcise SessionOpenOptionsReasoningSummary = "concise" + // Request a detailed summary of model reasoning. + SessionOpenOptionsReasoningSummaryDetailed SessionOpenOptionsReasoningSummary = "detailed" + // Do not request reasoning summaries from the model. + SessionOpenOptionsReasoningSummaryNone SessionOpenOptionsReasoningSummary = "none" +) + +// Kind discriminator for SessionOpenParams. +type SessionOpenParamsKind string + +const ( + SessionOpenParamsKindAttach SessionOpenParamsKind = "attach" + SessionOpenParamsKindCloud SessionOpenParamsKind = "cloud" + SessionOpenParamsKindCreate SessionOpenParamsKind = "create" + SessionOpenParamsKindHandoff SessionOpenParamsKind = "handoff" + SessionOpenParamsKindRemote SessionOpenParamsKind = "remote" + SessionOpenParamsKindResume SessionOpenParamsKind = "resume" + SessionOpenParamsKindResumeLast SessionOpenParamsKind = "resumeLast" +) + +// Task type determines the handoff strategy (CCA fetches events; CLI prepares a transient +// session). +// Experimental: SessionsOpenHandoffTaskType is part of an experimental API and may change +// or be removed. +type SessionsOpenHandoffTaskType string + +const ( + // GitHub Copilot coding agent task. + SessionsOpenHandoffTaskTypeCca SessionsOpenHandoffTaskType = "cca" + // CLI remote task. + SessionsOpenHandoffTaskTypeCLI SessionsOpenHandoffTaskType = "cli" +) + +// Step status. +// Experimental: SessionsOpenProgressStatus is part of an experimental API and may change or +// be removed. +type SessionsOpenProgressStatus string + +const ( + // The step has completed successfully. + SessionsOpenProgressStatusComplete SessionsOpenProgressStatus = "complete" + // The step has started and has not yet finished. + SessionsOpenProgressStatusInProgress SessionsOpenProgressStatus = "in-progress" +) + +// Handoff step. +// Experimental: SessionsOpenProgressStep is part of an experimental API and may change or +// be removed. +type SessionsOpenProgressStep string + +const ( + // Checking the local working tree for uncommitted changes that would block the handoff. + SessionsOpenProgressStepCheckChanges SessionsOpenProgressStep = "check-changes" + // Checking out the branch associated with the remote session in the local working tree. + SessionsOpenProgressStepCheckoutBranch SessionsOpenProgressStep = "checkout-branch" + // Creating the new local session and seeding it with the source session's events. + SessionsOpenProgressStepCreateSession SessionsOpenProgressStep = "create-session" + // Loading the source session's events from the remote service. + SessionsOpenProgressStepLoadSession SessionsOpenProgressStep = "load-session" + // Persisting the newly-created local session to disk. + SessionsOpenProgressStepSaveSession SessionsOpenProgressStep = "save-session" + // Validating that the local repository matches the remote session's repository. + SessionsOpenProgressStepValidateRepo SessionsOpenProgressStep = "validate-repo" +) + +// Outcome of the open request. +// Experimental: SessionsOpenStatus is part of an experimental API and may change or be +// removed. +type SessionsOpenStatus string + +const ( + // Connected to an existing remote session. + SessionsOpenStatusConnected SessionsOpenStatus = "connected" + // A new session was created. + SessionsOpenStatusCreated SessionsOpenStatus = "created" + // Remote session was handed off to a new local session. + SessionsOpenStatusHandedOff SessionsOpenStatus = "handed_off" + // No matching persisted session was found. + SessionsOpenStatusNotFound SessionsOpenStatus = "not_found" + // An existing session was loaded or reattached. + SessionsOpenStatusResumed SessionsOpenStatus = "resumed" +) + +// Which session sources to include. Defaults to `local` for backward compatibility. +// Experimental: SessionSource is part of an experimental API and may change or be removed. +type SessionSource string + +const ( + // Return both local and remote sessions. + SessionSourceAll SessionSource = "all" + // Return only local sessions. + SessionSourceLocal SessionSource = "local" + // Return only remote sessions. + SessionSourceRemote SessionSource = "remote" +) + // Hosting platform type of the repository // Experimental: SessionWorkingDirectoryContextHostType is part of an experimental API and // may change or be removed. @@ -8508,6 +10242,236 @@ func (a *ServerModelsAPI) List(ctx context.Context, params *ModelsListRequest) ( return &result, nil } +// Experimental: ServerPluginsAPI contains experimental APIs that may change or be removed. +type ServerPluginsAPI serverAPI + +// Disables installed plugins for new sessions. +// +// RPC method: plugins.disable. +// +// Parameters: Plugin names (or specs) to disable. +func (a *ServerPluginsAPI) Disable(ctx context.Context, params *PluginsDisableRequest) (*PluginsDisableResult, error) { + raw, err := a.client.Request("plugins.disable", params) + if err != nil { + return nil, err + } + var result PluginsDisableResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Enables installed plugins for new sessions. +// +// RPC method: plugins.enable. +// +// Parameters: Plugin names (or specs) to enable. +func (a *ServerPluginsAPI) Enable(ctx context.Context, params *PluginsEnableRequest) (*PluginsEnableResult, error) { + raw, err := a.client.Request("plugins.enable", params) + if err != nil { + return nil, err + } + var result PluginsEnableResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Installs a plugin from a marketplace, GitHub repo, URL, or local path. +// +// RPC method: plugins.install. +// +// Parameters: Plugin source and optional working directory for relative-path resolution. +// +// Returns: Result of installing a plugin. +func (a *ServerPluginsAPI) Install(ctx context.Context, params *PluginsInstallRequest) (*PluginInstallResult, error) { + raw, err := a.client.Request("plugins.install", params) + if err != nil { + return nil, err + } + var result PluginInstallResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Lists plugins installed in user/global state. +// +// RPC method: plugins.list. +// +// Returns: Plugins installed in user/global state. +func (a *ServerPluginsAPI) List(ctx context.Context) (*PluginListResult, error) { + raw, err := a.client.Request("plugins.list", nil) + if err != nil { + return nil, err + } + var result PluginListResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Uninstalls an installed plugin. +// +// RPC method: plugins.uninstall. +// +// Parameters: Name (or spec) of the plugin to uninstall. +func (a *ServerPluginsAPI) Uninstall(ctx context.Context, params *PluginsUninstallRequest) (*PluginsUninstallResult, error) { + raw, err := a.client.Request("plugins.uninstall", params) + if err != nil { + return nil, err + } + var result PluginsUninstallResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Updates an installed plugin to its latest published version. +// +// RPC method: plugins.update. +// +// Parameters: Name (or spec) of the plugin to update. +// +// Returns: Result of updating a single plugin. +func (a *ServerPluginsAPI) Update(ctx context.Context, params *PluginsUpdateRequest) (*PluginUpdateResult, error) { + raw, err := a.client.Request("plugins.update", params) + if err != nil { + return nil, err + } + var result PluginUpdateResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// UpdateAll updates every installed plugin to its latest published version. +// +// RPC method: plugins.updateAll. +// +// Returns: Result of updating all installed plugins. +func (a *ServerPluginsAPI) UpdateAll(ctx context.Context) (*PluginUpdateAllResult, error) { + raw, err := a.client.Request("plugins.updateAll", nil) + if err != nil { + return nil, err + } + var result PluginUpdateAllResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Experimental: ServerPluginsMarketplacesAPI contains experimental APIs that may change or +// be removed. +type ServerPluginsMarketplacesAPI serverAPI + +// Add registers a new marketplace from a source (owner/repo, URL, or local path). +// +// RPC method: plugins.marketplaces.add. +// +// Parameters: Marketplace source to register. +// +// Returns: Result of registering a new marketplace. +func (a *ServerPluginsMarketplacesAPI) Add(ctx context.Context, params *PluginsMarketplacesAddRequest) (*MarketplaceAddResult, error) { + raw, err := a.client.Request("plugins.marketplaces.add", params) + if err != nil { + return nil, err + } + var result MarketplaceAddResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Browse lists plugins advertised by a registered marketplace. +// +// RPC method: plugins.marketplaces.browse. +// +// Parameters: Name of the marketplace whose plugin catalog to fetch. +// +// Returns: Plugins advertised by the marketplace. +func (a *ServerPluginsMarketplacesAPI) Browse(ctx context.Context, params *PluginsMarketplacesBrowseRequest) (*MarketplaceBrowseResult, error) { + raw, err := a.client.Request("plugins.marketplaces.browse", params) + if err != nil { + return nil, err + } + var result MarketplaceBrowseResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Lists all registered marketplaces (defaults + user-added). +// +// RPC method: plugins.marketplaces.list. +// +// Returns: All registered marketplaces, including built-in defaults. +func (a *ServerPluginsMarketplacesAPI) List(ctx context.Context) (*MarketplaceListResult, error) { + raw, err := a.client.Request("plugins.marketplaces.list", nil) + if err != nil { + return nil, err + } + var result MarketplaceListResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Refresh re-fetches one or all registered marketplace catalogs. +// +// RPC method: plugins.marketplaces.refresh. +// +// Parameters: Optional marketplace name; omit to refresh all. +// +// Returns: Result of refreshing one or more marketplace catalogs. +func (a *ServerPluginsMarketplacesAPI) Refresh(ctx context.Context, params *PluginsMarketplacesRefreshRequest) (*MarketplaceRefreshResult, error) { + raw, err := a.client.Request("plugins.marketplaces.refresh", params) + if err != nil { + return nil, err + } + var result MarketplaceRefreshResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Removes a previously-registered marketplace. When the marketplace has dependent plugins +// and `force` is not set, the marketplace is left intact and the result lists the +// dependents so the caller can decide whether to retry with `force=true`. +// +// RPC method: plugins.marketplaces.remove. +// +// Parameters: Name of the marketplace to remove and an optional force flag. +// +// Returns: Outcome of the remove attempt, including dependent-plugin info when applicable. +func (a *ServerPluginsMarketplacesAPI) Remove(ctx context.Context, params *PluginsMarketplacesRemoveRequest) (*MarketplaceRemoveResult, error) { + raw, err := a.client.Request("plugins.marketplaces.remove", params) + if err != nil { + return nil, err + } + var result MarketplaceRemoveResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Experimental: Marketplaces returns experimental APIs that may change or be removed. +func (s *ServerPluginsAPI) Marketplaces() *ServerPluginsMarketplacesAPI { + return (*ServerPluginsMarketplacesAPI)(s) +} + type ServerRuntimeAPI serverAPI // Shutdown gracefully shuts down an SDK-owned runtime. The response is sent only after @@ -8708,46 +10672,27 @@ func (a *ServerSessionsAPI) FindByTaskId(ctx context.Context, params *SessionsFi if err != nil { return nil, err } - var result SessionsFindByTaskIDResult - if err := json.Unmarshal(raw, &result); err != nil { - return nil, err - } - return &result, nil -} - -// Fork creates a new session by forking persisted history from an existing session. -// -// RPC method: sessions.fork. -// -// Parameters: Source session identifier to fork from, optional event-ID boundary, and -// optional friendly name for the new session. -// -// Returns: Identifier and optional friendly name assigned to the newly forked session. -func (a *ServerSessionsAPI) Fork(ctx context.Context, params *SessionsForkRequest) (*SessionsForkResult, error) { - raw, err := a.client.Request("sessions.fork", params) - if err != nil { - return nil, err - } - var result SessionsForkResult + var result SessionsFindByTaskIDResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } return &result, nil } -// GetEventFilePath computes the absolute path to a session's persisted events.jsonl file. +// Fork creates a new session by forking persisted history from an existing session. // -// RPC method: sessions.getEventFilePath. +// RPC method: sessions.fork. // -// Parameters: Session ID whose event-log file path to compute. +// Parameters: Source session identifier to fork from, optional event-ID boundary, and +// optional friendly name for the new session. // -// Returns: Absolute path to the session's events.jsonl file on disk. -func (a *ServerSessionsAPI) GetEventFilePath(ctx context.Context, params *SessionsGetEventFilePathRequest) (*SessionsGetEventFilePathResult, error) { - raw, err := a.client.Request("sessions.getEventFilePath", params) +// Returns: Identifier and optional friendly name assigned to the newly forked session. +func (a *ServerSessionsAPI) Fork(ctx context.Context, params *SessionsForkRequest) (*SessionsForkResult, error) { + raw, err := a.client.Request("sessions.fork", params) if err != nil { return nil, err } - var result SessionsGetEventFilePathResult + var result SessionsForkResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -8775,21 +10720,18 @@ func (a *ServerSessionsAPI) GetLastForContext(ctx context.Context, params *Sessi return &result, nil } -// GetPersistedRemoteSteerable returns a session's persisted remote-steerable flag, if any -// has been recorded. +// GetRemoteControlStatus returns the current state of the remote-control singleton, +// including the attached session id and frontend URL when active. // -// RPC method: sessions.getPersistedRemoteSteerable. -// -// Parameters: Session ID to look up the persisted remote-steerable flag for. +// RPC method: sessions.getRemoteControlStatus. // -// Returns: The session's persisted remote-steerable flag, or omitted when no value has been -// persisted. -func (a *ServerSessionsAPI) GetPersistedRemoteSteerable(ctx context.Context, params *SessionsGetPersistedRemoteSteerableRequest) (*SessionsGetPersistedRemoteSteerableResult, error) { - raw, err := a.client.Request("sessions.getPersistedRemoteSteerable", params) +// Returns: Wrapper for the singleton's current status. +func (a *ServerSessionsAPI) GetRemoteControlStatus(ctx context.Context) (*RemoteControlStatusResult, error) { + raw, err := a.client.Request("sessions.getRemoteControlStatus", nil) if err != nil { return nil, err } - var result SessionsGetPersistedRemoteSteerableResult + var result RemoteControlStatusResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -8813,13 +10755,17 @@ func (a *ServerSessionsAPI) GetSizes(ctx context.Context) (*SessionSizes, error) return &result, nil } -// Lists persisted sessions, optionally filtered by working-directory context. +// Lists sessions, optionally filtered by source and working-directory context. Returned +// entries are discriminated by `isRemote`: local entries carry only the lightweight +// `LocalSessionMetadataValue` shape; remote entries carry the full +// `RemoteSessionMetadataValue` shape (repository, PR number, taskType, etc.). // // RPC method: sessions.list. // -// Parameters: Optional metadata-load limit and filters applied to the returned sessions. +// Parameters: Optional source filter, metadata-load limit, and context filter applied to +// the returned sessions. // -// Returns: Persisted sessions matching the filter, ordered most-recently-modified first. +// Returns: Sessions matching the filter, ordered most-recently-modified first. func (a *ServerSessionsAPI) List(ctx context.Context, params *SessionsListRequest) (*SessionList, error) { raw, err := a.client.Request("sessions.list", params) if err != nil { @@ -8852,6 +10798,26 @@ func (a *ServerSessionsAPI) LoadDeferredRepoHooks(ctx context.Context, params *S return &result, nil } +// Open creates or resumes a local session and returns the opened session ID. +// +// RPC method: sessions.open. +// +// Parameters: Open a session by creating, resuming, attaching, connecting to a remote, or +// handing off. +// +// Returns: Result of opening a session. +func (a *ServerSessionsAPI) Open(ctx context.Context, params *SessionOpenParams) (*SessionOpenResult, error) { + raw, err := a.client.Request("sessions.open", params) + if err != nil { + return nil, err + } + var result SessionOpenResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // PruneOld deletes sessions older than the given threshold, with optional dry-run and // exclusion list. // @@ -8959,6 +10925,95 @@ func (a *ServerSessionsAPI) SetAdditionalPlugins(ctx context.Context, params *Se return &result, nil } +// SetRemoteControlSteering patches the steering state of the active remote-control +// singleton. When remote control is off, this is a no-op and the off status is returned. +// Today only `enabled: true` is actionable on the underlying exporter; passing `false` is +// reserved for future use. +// +// RPC method: sessions.setRemoteControlSteering. +// +// Parameters: Patch for the singleton's steering state. +// +// Returns: Wrapper for the singleton's current status. +func (a *ServerSessionsAPI) SetRemoteControlSteering(ctx context.Context, params *SessionsSetRemoteControlSteeringRequest) (*RemoteControlStatusResult, error) { + raw, err := a.client.Request("sessions.setRemoteControlSteering", params) + if err != nil { + return nil, err + } + var result RemoteControlStatusResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// StartRemoteControl attaches the runtime-managed remote-control singleton to a session, +// awaiting initial setup. If remote control is already attached to a different session, the +// singleton is transferred (preserving the underlying Mission Control connection). Returns +// the final status. +// +// RPC method: sessions.startRemoteControl. +// +// Parameters: Parameters for attaching the remote-control singleton to a session. +// +// Returns: Wrapper for the singleton's current status. +func (a *ServerSessionsAPI) StartRemoteControl(ctx context.Context, params *SessionsStartRemoteControlRequest) (*RemoteControlStatusResult, error) { + raw, err := a.client.Request("sessions.startRemoteControl", params) + if err != nil { + return nil, err + } + var result RemoteControlStatusResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// StopRemoteControl stops the remote-control singleton. When `expectedSessionId` is +// provided and does not match the singleton's current `attachedSessionId`, the stop is +// rejected with `stopped: false` and the current status is returned unchanged (unless +// `force` is set, in which case the singleton is unconditionally torn down). +// +// RPC method: sessions.stopRemoteControl. +// +// Parameters: Parameters for stopping the remote-control singleton. +// +// Returns: Outcome of a stopRemoteControl call. +func (a *ServerSessionsAPI) StopRemoteControl(ctx context.Context, params *SessionsStopRemoteControlRequest) (*RemoteControlStopResult, error) { + raw, err := a.client.Request("sessions.stopRemoteControl", params) + if err != nil { + return nil, err + } + var result RemoteControlStopResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// TransferRemoteControl atomically rebinds the remote-control singleton to a different +// session, preserving the underlying Mission Control connection. When +// `expectedFromSessionId` is provided and does not match the singleton's current +// `attachedSessionId`, the transfer is rejected with `transferred: false` and the current +// status is returned unchanged. +// +// RPC method: sessions.transferRemoteControl. +// +// Parameters: Parameters for atomically rebinding the remote-control singleton. +// +// Returns: Outcome of a transferRemoteControl call. +func (a *ServerSessionsAPI) TransferRemoteControl(ctx context.Context, params *SessionsTransferRemoteControlRequest) (*RemoteControlTransferResult, error) { + raw, err := a.client.Request("sessions.transferRemoteControl", params) + if err != nil { + return nil, err + } + var result RemoteControlTransferResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + type ServerSkillsAPI serverAPI // Discovers skills across global and project sources. @@ -9061,6 +11116,7 @@ type ServerRPC struct { AgentRegistry *ServerAgentRegistryAPI MCP *ServerMCPAPI Models *ServerModelsAPI + Plugins *ServerPluginsAPI Runtime *ServerRuntimeAPI Secrets *ServerSecretsAPI SessionFS *ServerSessionFSAPI @@ -9097,6 +11153,7 @@ func NewServerRPC(client *jsonrpc2.Client) *ServerRPC { r.AgentRegistry = (*ServerAgentRegistryAPI)(&r.common) r.MCP = (*ServerMCPAPI)(&r.common) r.Models = (*ServerModelsAPI)(&r.common) + r.Plugins = (*ServerPluginsAPI)(&r.common) r.Runtime = (*ServerRuntimeAPI)(&r.common) r.Secrets = (*ServerSecretsAPI)(&r.common) r.SessionFS = (*ServerSessionFSAPI)(&r.common) @@ -9111,15 +11168,181 @@ type internalServerAPI struct { client *jsonrpc2.Client } +// Experimental: InternalServerSessionsAPI contains experimental APIs that may change or be +// removed. +type InternalServerSessionsAPI internalServerAPI + +// ConfigureSessionExtensions attaches (or detaches) an in-process ExtensionController +// delegate for the given session, used by shared-API surfaces that need to query or modify +// the session's extension state. Pass `controller: undefined` to detach. Marked internal +// because the controller is an in-process object that cannot cross the JSON-RPC boundary. +// Disappears alongside `registerExtensionToolsOnSession`: once the runtime owns extension +// management, the public surface exposes list/enable/disable/reload as dedicated RPCs +// served by the runtime. +// +// RPC method: sessions.configureSessionExtensions. +// +// Parameters: Params to attach or detach an in-process ExtensionController delegate. +// Internal: ConfigureSessionExtensions is part of the SDK's internal handshake/plumbing; +// external callers should not use it. +func (a *InternalServerSessionsAPI) ConfigureSessionExtensions(ctx context.Context, params *ConfigureSessionExtensionsParams) (*SessionsConfigureSessionExtensionsResult, error) { + raw, err := a.client.Request("sessions.configureSessionExtensions", params) + if err != nil { + return nil, err + } + var result SessionsConfigureSessionExtensionsResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// GetBoardEntryCount gets the dynamic-context board entry count associated with a session, +// when available. Internal: this exists solely so CLI telemetry events (`rem_spawn_gate`, +// `rem_consolidation_complete`) can pair START / END board counts around the detached +// rem-agent spawn. "Dynamic context board" is a runtime-internal concept that is not part +// of the public SDK contract; the long-term plan is to relocate the telemetry emission into +// the runtime so this method can be deleted entirely. +// +// RPC method: sessions.getBoardEntryCount. +// +// Parameters: Session ID whose board entry count should be returned. +// +// Returns: Dynamic-context board entry count, when available. +// Internal: GetBoardEntryCount is part of the SDK's internal handshake/plumbing; external +// callers should not use it. +func (a *InternalServerSessionsAPI) GetBoardEntryCount(ctx context.Context, params *SessionsGetBoardEntryCountRequest) (*SessionsGetBoardEntryCountResult, error) { + raw, err := a.client.Request("sessions.getBoardEntryCount", params) + if err != nil { + return nil, err + } + var result SessionsGetBoardEntryCountResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// GetEventFilePath computes the absolute path to a session's persisted events.jsonl file. +// Internal: filesystem paths are only meaningful in-process (CLI and runtime share a +// filesystem). Currently used by the CLI's contribution-graph feature to read historical +// events directly. Remote SDK consumers must not depend on this; a proper event-query API +// would replace it if the contribution graph ever needed to work over the wire. +// +// RPC method: sessions.getEventFilePath. +// +// Parameters: Session ID whose event-log file path to compute. +// +// Returns: Absolute path to the session's events.jsonl file on disk. +// Internal: GetEventFilePath is part of the SDK's internal handshake/plumbing; external +// callers should not use it. +func (a *InternalServerSessionsAPI) GetEventFilePath(ctx context.Context, params *SessionsGetEventFilePathRequest) (*SessionsGetEventFilePathResult, error) { + raw, err := a.client.Request("sessions.getEventFilePath", params) + if err != nil { + return nil, err + } + var result SessionsGetEventFilePathResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// GetPersistedRemoteSteerable returns a session's persisted remote-steerable flag, if any +// has been recorded. Internal: this is CLI-specific book-keeping used by `--continue` / +// `--resume` to inherit the prior session's remote-steerable preference. SDK consumers that +// want similar behavior should manage their own persistence around start/stop calls rather +// than relying on this runtime-side flag. +// +// RPC method: sessions.getPersistedRemoteSteerable. +// +// Parameters: Session ID to look up the persisted remote-steerable flag for. +// +// Returns: The session's persisted remote-steerable flag, or omitted when no value has been +// persisted. +// Internal: GetPersistedRemoteSteerable is part of the SDK's internal handshake/plumbing; +// external callers should not use it. +func (a *InternalServerSessionsAPI) GetPersistedRemoteSteerable(ctx context.Context, params *SessionsGetPersistedRemoteSteerableRequest) (*SessionsGetPersistedRemoteSteerableResult, error) { + raw, err := a.client.Request("sessions.getPersistedRemoteSteerable", params) + if err != nil { + return nil, err + } + var result SessionsGetPersistedRemoteSteerableResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// PollSpawnedSessions cursor-based long-poll for sessions spawned by the runtime (e.g. in +// response to a Mission Control `start_session` command). The cursor is an opaque token; +// pass it back to receive only spawn events that occurred AFTER the cursor was issued. Omit +// the cursor on the first call to receive any events buffered since the runtime started. +// Internal: this is a CLI background-daemon plumbing primitive. SDK consumers that need to +// react to runtime-spawned sessions should subscribe to a higher-level event stream rather +// than driving a long-poll loop. +// +// RPC method: sessions.pollSpawnedSessions. +// +// Parameters: Cursor and optional long-poll wait for polling runtime-spawned sessions. +// +// Returns: Batch of spawn events plus a cursor for follow-up polls. +// Internal: PollSpawnedSessions is part of the SDK's internal handshake/plumbing; external +// callers should not use it. +func (a *InternalServerSessionsAPI) PollSpawnedSessions(ctx context.Context, params *SessionsPollSpawnedSessionsRequest) (*PollSpawnedSessionsResult, error) { + raw, err := a.client.Request("sessions.pollSpawnedSessions", params) + if err != nil { + return nil, err + } + var result PollSpawnedSessionsResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// RegisterExtensionToolsOnSession registers extension-provided tools on the given session, +// gated by an optional `enabled` callback. Returns an opaque unsubscribe function the +// caller must invoke to deregister the tools when the extension is torn down. Marked +// internal because `loader`, `enabled`, and the returned `unsubscribe` are in-process +// handles that cannot cross the JSON-RPC boundary. Disappears once extension discovery / +// launch / tool registration are owned by the runtime: SDK consumers will pass pure config +// (search paths, disabled ids) via `SessionOptions` and the runtime will resolve, launch, +// register, and tear down extensions itself. +// +// RPC method: sessions.registerExtensionToolsOnSession. +// +// Parameters: Params to attach an extension loader's tools to a session. +// +// Returns: Handle for releasing the extension tool registration. +// Internal: RegisterExtensionToolsOnSession is part of the SDK's internal +// handshake/plumbing; external callers should not use it. +func (a *InternalServerSessionsAPI) RegisterExtensionToolsOnSession(ctx context.Context, params *RegisterExtensionToolsParams) (*RegisterExtensionToolsResult, error) { + raw, err := a.client.Request("sessions.registerExtensionToolsOnSession", params) + if err != nil { + return nil, err + } + var result RegisterExtensionToolsResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // InternalServerRPC provides internal SDK server-scoped RPC methods (handshake helpers // etc.). Not part of the public API. type InternalServerRPC struct { // Reuse a single struct instead of allocating one for each service on the heap. common internalServerAPI + + Sessions *InternalServerSessionsAPI } // Connect performs the SDK server connection handshake and validates the optional -// connection token. +// connection token. Marked internal because this is JSON-RPC transport plumbing invoked +// automatically by an SDK client's own `connect()` wrapper, not a user-facing method. Stays +// internal as long as the SDK client owns the handshake; would only become public if the +// SDK ever exposed the raw schema surface to consumers without a connection wrapper. // // RPC method: connect. // @@ -9144,6 +11367,7 @@ func (a *InternalServerRPC) Connect(ctx context.Context, params *ConnectRequest) func NewInternalServerRPC(client *jsonrpc2.Client) *InternalServerRPC { r := &InternalServerRPC{} r.common = internalServerAPI{client: client} + r.Sessions = (*InternalServerSessionsAPI)(&r.common) return r } @@ -10010,99 +12234,204 @@ func (a *MCPAPI) CancelSamplingExecution(ctx context.Context, params *MCPCancelS if params != nil { req["requestId"] = params.RequestID } - raw, err := a.client.Request("session.mcp.cancelSamplingExecution", req) + raw, err := a.client.Request("session.mcp.cancelSamplingExecution", req) + if err != nil { + return nil, err + } + var result MCPCancelSamplingExecutionResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// ConfigureGitHub configures the built-in GitHub MCP server for the session's current auth +// context. +// +// RPC method: session.mcp.configureGitHub. +// +// Parameters: Opaque auth info used to configure GitHub MCP. +// +// Returns: Result of configuring GitHub MCP. +func (a *MCPAPI) ConfigureGitHub(ctx context.Context, params *MCPConfigureGitHubRequest) (*MCPConfigureGitHubResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["authInfo"] = params.AuthInfo + } + raw, err := a.client.Request("session.mcp.configureGitHub", req) + if err != nil { + return nil, err + } + var result MCPConfigureGitHubResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Disables an MCP server for the session. +// +// RPC method: session.mcp.disable. +// +// Parameters: Name of the MCP server to disable for the session. +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 + } + raw, err := a.client.Request("session.mcp.disable", req) + if err != nil { + return nil, err + } + var result SessionMCPDisableResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Enables an MCP server for the session. +// +// RPC method: session.mcp.enable. +// +// Parameters: Name of the MCP server to enable for the session. +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 + } + raw, err := a.client.Request("session.mcp.enable", req) + if err != nil { + return nil, err + } + var result SessionMCPEnableResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// ExecuteSampling runs an MCP sampling inference on behalf of an MCP server. +// +// RPC method: session.mcp.executeSampling. +// +// Parameters: Identifiers and raw MCP CreateMessageRequest params used to run a sampling +// inference. +// +// Returns: Outcome of an MCP sampling execution: success result, failure error, or +// cancellation. +func (a *MCPAPI) ExecuteSampling(ctx context.Context, params *MCPExecuteSamplingParams) (*MCPSamplingExecutionResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["mcpRequestId"] = params.MCPRequestID + req["request"] = params.Request + req["requestId"] = params.RequestID + req["serverName"] = params.ServerName + } + raw, err := a.client.Request("session.mcp.executeSampling", req) if err != nil { return nil, err } - var result MCPCancelSamplingExecutionResult + var result MCPSamplingExecutionResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } return &result, nil } -// Disables an MCP server for the session. +// IsServerRunning checks whether a named MCP server is currently running on the session's +// host. // -// RPC method: session.mcp.disable. +// RPC method: session.mcp.isServerRunning. // -// Parameters: Name of the MCP server to disable for the session. -func (a *MCPAPI) Disable(ctx context.Context, params *MCPDisableRequest) (*SessionMCPDisableResult, error) { +// Parameters: Server name to check running status for. +// +// Returns: Whether the named MCP server is running. +func (a *MCPAPI) IsServerRunning(ctx context.Context, params *MCPIsServerRunningRequest) (*MCPIsServerRunningResult, error) { req := map[string]any{"sessionId": a.sessionID} if params != nil { req["serverName"] = params.ServerName } - raw, err := a.client.Request("session.mcp.disable", req) + raw, err := a.client.Request("session.mcp.isServerRunning", req) if err != nil { return nil, err } - var result SessionMCPDisableResult + var result MCPIsServerRunningResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } return &result, nil } -// Enables an MCP server for the session. +// Lists MCP servers configured for the session, their connection status, and host-level +// state. The host-level state (disabled/filtered servers, failed/needs-auth/pending +// connections, mcp3p policy, full config) is empty/zero when no MCP host has been +// initialized for the session. // -// RPC method: session.mcp.enable. +// RPC method: session.mcp.list. // -// Parameters: Name of the MCP server to enable for the session. -func (a *MCPAPI) Enable(ctx context.Context, params *MCPEnableRequest) (*SessionMCPEnableResult, error) { +// Returns: MCP servers configured for the session, with their connection status and +// host-level state. +func (a *MCPAPI) List(ctx context.Context) (*MCPServerList, error) { req := map[string]any{"sessionId": a.sessionID} - if params != nil { - req["serverName"] = params.ServerName - } - raw, err := a.client.Request("session.mcp.enable", req) + raw, err := a.client.Request("session.mcp.list", req) if err != nil { return nil, err } - var result SessionMCPEnableResult + var result MCPServerList if err := json.Unmarshal(raw, &result); err != nil { return nil, err } return &result, nil } -// ExecuteSampling runs an MCP sampling inference on behalf of an MCP server. +// ListTools lists the tools exposed by a connected MCP server on this session's host. // -// RPC method: session.mcp.executeSampling. +// RPC method: session.mcp.listTools. // -// Parameters: Identifiers and raw MCP CreateMessageRequest params used to run a sampling -// inference. +// Parameters: Server name whose tool list should be returned. // -// Returns: Outcome of an MCP sampling execution: success result, failure error, or -// cancellation. -func (a *MCPAPI) ExecuteSampling(ctx context.Context, params *MCPExecuteSamplingParams) (*MCPSamplingExecutionResult, error) { +// Returns: Tools exposed by the connected MCP server. Throws when the server is not +// connected. +func (a *MCPAPI) ListTools(ctx context.Context, params *MCPListToolsRequest) (*MCPListToolsResult, error) { req := map[string]any{"sessionId": a.sessionID} if params != nil { - req["mcpRequestId"] = params.MCPRequestID - req["request"] = params.Request - req["requestId"] = params.RequestID req["serverName"] = params.ServerName } - raw, err := a.client.Request("session.mcp.executeSampling", req) + raw, err := a.client.Request("session.mcp.listTools", req) if err != nil { return nil, err } - var result MCPSamplingExecutionResult + var result MCPListToolsResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } return &result, nil } -// Lists MCP servers configured for the session and their connection status. +// RegisterExternalClient registers a pre-connected external MCP client (e.g. IDE) on the +// session's host. The caller retains lifecycle ownership of the client and transport. +// Marked internal because the `client` and `transport` arguments are in-process MCP SDK +// instances that cannot be serialized across the JSON-RPC boundary; once the CLI moves on +// top of the SDK, external clients will be expressed as transport configs the runtime can +// construct itself. // -// RPC method: session.mcp.list. +// RPC method: session.mcp.registerExternalClient. // -// Returns: MCP servers configured for the session, with their connection status. -func (a *MCPAPI) List(ctx context.Context) (*MCPServerList, error) { +// Parameters: Registration parameters for an external MCP client. +func (a *MCPAPI) RegisterExternalClient(ctx context.Context, params *MCPRegisterExternalClientRequest) (*SessionMCPRegisterExternalClientResult, error) { req := map[string]any{"sessionId": a.sessionID} - raw, err := a.client.Request("session.mcp.list", req) + if params != nil { + req["client"] = params.Client + req["config"] = params.Config + req["serverName"] = params.ServerName + req["transport"] = params.Transport + } + raw, err := a.client.Request("session.mcp.registerExternalClient", req) if err != nil { return nil, err } - var result MCPServerList + var result SessionMCPRegisterExternalClientResult if err := json.Unmarshal(raw, &result); err != nil { return nil, err } @@ -10125,6 +12454,30 @@ func (a *MCPAPI) Reload(ctx context.Context) (*SessionMCPReloadResult, error) { return &result, nil } +// ReloadWithConfig reloads MCP server connections for the session with an explicit +// host-provided configuration. +// +// RPC method: session.mcp.reloadWithConfig. +// +// Parameters: Opaque MCP reload configuration. +// +// Returns: MCP server startup filtering result. +func (a *MCPAPI) ReloadWithConfig(ctx context.Context, params *MCPReloadWithConfigRequest) (*MCPStartServersResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["config"] = params.Config + } + raw, err := a.client.Request("session.mcp.reloadWithConfig", req) + if err != nil { + return nil, err + } + var result MCPStartServersResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // RemoveGitHub removes the auto-managed `github` MCP server when present. // // RPC method: session.mcp.removeGitHub. @@ -10144,6 +12497,28 @@ func (a *MCPAPI) RemoveGitHub(ctx context.Context) (*MCPRemoveGitHubResult, erro return &result, nil } +// RestartServer restarts an individual MCP server on the session's host (stops then starts). +// +// RPC method: session.mcp.restartServer. +// +// Parameters: Server name and opaque configuration for an individual MCP server restart. +func (a *MCPAPI) RestartServer(ctx context.Context, params *MCPRestartServerRequest) (*SessionMCPRestartServerResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["config"] = params.Config + req["serverName"] = params.ServerName + } + raw, err := a.client.Request("session.mcp.restartServer", req) + if err != nil { + return nil, err + } + var result SessionMCPRestartServerResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // SetEnvValueMode sets how environment-variable values supplied to MCP servers are resolved // (direct or indirect). // @@ -10169,6 +12544,75 @@ func (a *MCPAPI) SetEnvValueMode(ctx context.Context, params *MCPSetEnvValueMode return &result, nil } +// StartServer starts an individual MCP server on the session's host. +// +// RPC method: session.mcp.startServer. +// +// Parameters: Server name and opaque configuration for an individual MCP server start. +func (a *MCPAPI) StartServer(ctx context.Context, params *MCPStartServerRequest) (*SessionMCPStartServerResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["config"] = params.Config + req["serverName"] = params.ServerName + } + raw, err := a.client.Request("session.mcp.startServer", req) + if err != nil { + return nil, err + } + var result SessionMCPStartServerResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// StopServer stops an individual MCP server on the session's host. +// +// RPC method: session.mcp.stopServer. +// +// Parameters: Server name for an individual MCP server stop. +func (a *MCPAPI) StopServer(ctx context.Context, params *MCPStopServerRequest) (*SessionMCPStopServerResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["serverName"] = params.ServerName + } + raw, err := a.client.Request("session.mcp.stopServer", req) + if err != nil { + return nil, err + } + var result SessionMCPStopServerResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// UnregisterExternalClient unregisters a previously registered external MCP client by +// server name. Marked internal as the paired companion of `registerExternalClient`: only +// in-process callers that registered a client this way can meaningfully unregister it. +// Disappears alongside `registerExternalClient`: once external clients are described to the +// runtime as config rather than handed in as instances, lifecycle (including +// deregistration) is owned entirely by the runtime. +// +// RPC method: session.mcp.unregisterExternalClient. +// +// Parameters: Server name identifying the external client to remove. +func (a *MCPAPI) UnregisterExternalClient(ctx context.Context, params *MCPUnregisterExternalClientRequest) (*SessionMCPUnregisterExternalClientResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["serverName"] = params.ServerName + } + raw, err := a.client.Request("session.mcp.unregisterExternalClient", req) + if err != nil { + return nil, err + } + var result SessionMCPUnregisterExternalClientResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // Experimental: MCPAppsAPI contains experimental APIs that may change or be removed. type MCPAppsAPI sessionAPI @@ -10359,6 +12803,35 @@ func (a *MCPOauthAPI) Login(ctx context.Context, params *MCPOauthLoginRequest) ( return &result, nil } +// Responds to a pending MCP OAuth provider request. Marked internal because the `provider` +// argument is an in-process OAuthClientProvider instance that cannot be carried over the +// wire; the public OAuth surface will route the response through a wire-clean handshake +// once the CLI moves on top of the SDK. +// +// RPC method: session.mcp.oauth.respond. +// +// Parameters: MCP OAuth request id and optional provider response. +// +// Returns: Empty result after recording the MCP OAuth response. +func (a *MCPOauthAPI) Respond(ctx context.Context, params *MCPOauthRespondRequest) (*MCPOauthRespondResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + if params.Provider != nil { + req["provider"] = params.Provider + } + req["requestId"] = params.RequestID + } + raw, err := a.client.Request("session.mcp.oauth.respond", req) + if err != nil { + return nil, err + } + var result MCPOauthRespondResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // Experimental: Oauth returns experimental APIs that may change or be removed. func (s *MCPAPI) Oauth() *MCPOauthAPI { return (*MCPOauthAPI)(s) @@ -10367,6 +12840,24 @@ func (s *MCPAPI) Oauth() *MCPOauthAPI { // Experimental: MetadataAPI contains experimental APIs that may change or be removed. type MetadataAPI sessionAPI +// Activity returns a snapshot of activity flags for the session. +// +// RPC method: session.metadata.activity. +// +// Returns: Current activity flags for the session. +func (a *MetadataAPI) Activity(ctx context.Context) (*SessionActivity, error) { + req := map[string]any{"sessionId": a.sessionID} + raw, err := a.client.Request("session.metadata.activity", req) + if err != nil { + return nil, err + } + var result SessionActivity + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // ContextInfo returns the token breakdown for the session's current context window for a // given model. // @@ -10771,6 +13262,9 @@ func (a *OptionsAPI) Update(ctx context.Context, params *SessionUpdateOptionsPar if params.CoauthorEnabled != nil { req["coauthorEnabled"] = *params.CoauthorEnabled } + if params.ContextTier != nil { + req["contextTier"] = *params.ContextTier + } if params.ContinueOnAutoMode != nil { req["continueOnAutoMode"] = *params.ContinueOnAutoMode } @@ -10843,20 +13337,29 @@ func (a *OptionsAPI) Update(ctx context.Context, params *SessionUpdateOptionsPar if params.Model != nil { req["model"] = *params.Model } + if params.ModelCapabilitiesOverrides != nil { + req["modelCapabilitiesOverrides"] = *params.ModelCapabilitiesOverrides + } if params.OrganizationCustomInstructions != nil { req["organizationCustomInstructions"] = *params.OrganizationCustomInstructions } if params.Provider != nil { - req["provider"] = params.Provider + req["provider"] = *params.Provider } if params.ReasoningEffort != nil { req["reasoningEffort"] = *params.ReasoningEffort } + if params.ReasoningSummary != nil { + req["reasoningSummary"] = *params.ReasoningSummary + } if params.RunningInInteractiveMode != nil { req["runningInInteractiveMode"] = *params.RunningInInteractiveMode } if params.SandboxConfig != nil { - req["sandboxConfig"] = params.SandboxConfig + req["sandboxConfig"] = *params.SandboxConfig + } + if params.SessionCapabilities != nil { + req["sessionCapabilities"] = params.SessionCapabilities } if params.ShellInitProfile != nil { req["shellInitProfile"] = *params.ShellInitProfile @@ -11493,6 +13996,25 @@ func (a *PlanAPI) Read(ctx context.Context) (*PlanReadResult, error) { return &result, nil } +// ReadSqlTodos reads todo rows from the session SQL database for plan rendering. +// +// RPC method: session.plan.readSqlTodos. +// +// Returns: Todo rows read from the session SQL database. Empty when no session database is +// available. +func (a *PlanAPI) ReadSqlTodos(ctx context.Context) (*PlanReadSQLTodosResult, error) { + req := map[string]any{"sessionId": a.sessionID} + raw, err := a.client.Request("session.plan.readSqlTodos", req) + if err != nil { + return nil, err + } + var result PlanReadSQLTodosResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // Update writes new content to the session plan file. // // RPC method: session.plan.update. @@ -11535,6 +14057,43 @@ func (a *PluginsAPI) List(ctx context.Context) (*PluginList, error) { return &result, nil } +// Reloads the session's plugin set, refreshing MCP servers, custom agents, hooks, and +// skills cache so SDK-driven changes via `server.plugins.*` take effect immediately. +// +// RPC method: session.plugins.reload. +// +// Parameters: Optional flags controlling which side effects the reload performs. +func (a *PluginsAPI) Reload(ctx context.Context, params ...*PluginsReloadRequest) (*SessionPluginsReloadResult, error) { + var requestParams *PluginsReloadRequest + if len(params) > 0 { + requestParams = params[0] + } + req := map[string]any{"sessionId": a.sessionID} + if requestParams != nil { + if requestParams.DeferRepoHooks != nil { + req["deferRepoHooks"] = *requestParams.DeferRepoHooks + } + if requestParams.ReloadCustomAgents != nil { + req["reloadCustomAgents"] = *requestParams.ReloadCustomAgents + } + if requestParams.ReloadHooks != nil { + req["reloadHooks"] = *requestParams.ReloadHooks + } + if requestParams.ReloadMCP != nil { + req["reloadMcp"] = *requestParams.ReloadMCP + } + } + raw, err := a.client.Request("session.plugins.reload", req) + if err != nil { + return nil, err + } + var result SessionPluginsReloadResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // Experimental: QueueAPI contains experimental APIs that may change or be removed. type QueueAPI sessionAPI @@ -11712,6 +14271,29 @@ func (a *ScheduleAPI) Stop(ctx context.Context, params *ScheduleStopRequest) (*S // Experimental: ShellAPI contains experimental APIs that may change or be removed. type ShellAPI sessionAPI +// CancelUserRequested cancels a user-requested shell command by request ID. +// +// RPC method: session.shell.cancelUserRequested. +// +// Parameters: User-requested shell execution cancellation handle. +// +// Returns: Cancellation result for a user-requested shell command. +func (a *ShellAPI) CancelUserRequested(ctx context.Context, params *ShellCancelUserRequestedRequest) (*CancelUserRequestedShellCommandResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["requestId"] = params.RequestID + } + raw, err := a.client.Request("session.shell.cancelUserRequested", req) + if err != nil { + return nil, err + } + var result CancelUserRequestedShellCommandResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // Exec starts a shell command and streams output through session notifications. // // RPC method: session.shell.exec. @@ -11743,6 +14325,30 @@ func (a *ShellAPI) Exec(ctx context.Context, params *ShellExecRequest) (*ShellEx return &result, nil } +// ExecuteUserRequested executes a user-requested shell command through the session runtime. +// +// RPC method: session.shell.executeUserRequested. +// +// Parameters: User-requested shell command and cancellation handle. +// +// Returns: Result of a user-requested shell command. +func (a *ShellAPI) ExecuteUserRequested(ctx context.Context, params *ShellExecuteUserRequestedRequest) (*UserRequestedShellCommandResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["command"] = params.Command + req["requestId"] = params.RequestID + } + raw, err := a.client.Request("session.shell.executeUserRequested", req) + if err != nil { + return nil, err + } + var result UserRequestedShellCommandResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // Kill sends a signal to a shell process previously started via "shell.exec". // // RPC method: session.shell.kill. @@ -12146,6 +14752,25 @@ func (a *TasksAPI) WaitForPending(ctx context.Context) (*TasksWaitForPendingResu // Experimental: TelemetryAPI contains experimental APIs that may change or be removed. type TelemetryAPI sessionAPI +// GetEngagementId gets the telemetry engagement ID currently associated with the session, +// when available. +// +// RPC method: session.telemetry.getEngagementId. +// +// Returns: Telemetry engagement ID for the session, when available. +func (a *TelemetryAPI) GetEngagementId(ctx context.Context) (*SessionTelemetryEngagement, error) { + req := map[string]any{"sessionId": a.sessionID} + raw, err := a.client.Request("session.telemetry.getEngagementId", req) + if err != nil { + return nil, err + } + var result SessionTelemetryEngagement + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // SetFeatureOverrides sets feature override key/value pairs to attach to subsequent // telemetry events for the session. // @@ -12271,6 +14896,36 @@ func (a *UIAPI) Elicitation(ctx context.Context, params *UIElicitationRequest) ( return &result, nil } +// EphemeralQuery runs a transient no-tools model query against the current conversation +// context. +// +// RPC method: session.ui.ephemeralQuery. +// +// Parameters: Transient question to answer without adding it to conversation history. +// +// Returns: Transient answer generated from current conversation context. +func (a *UIAPI) EphemeralQuery(ctx context.Context, params *UIEphemeralQueryRequest) (*UIEphemeralQueryResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + if params.AbortSignal != nil { + req["abortSignal"] = params.AbortSignal + } + if params.OnChunk != nil { + req["onChunk"] = params.OnChunk + } + req["question"] = params.Question + } + raw, err := a.client.Request("session.ui.ephemeralQuery", req) + if err != nil { + return nil, err + } + var result UIEphemeralQueryResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // HandlePendingAutoModeSwitch resolves a pending `auto_mode_switch.requested` event with // the user's accept/decline decision. // @@ -12787,7 +15442,7 @@ func (a *SessionRPC) Send(ctx context.Context, params *SendRequest) (*SendResult req["requiredTool"] = *params.RequiredTool } if params.Source != nil { - req["source"] = params.Source + req["source"] = *params.Source } if params.Traceparent != nil { req["traceparent"] = *params.Traceparent diff --git a/go/rpc/zrpc_encoding.go b/go/rpc/zrpc_encoding.go index 0d192c600..2a4e3e481 100644 --- a/go/rpc/zrpc_encoding.go +++ b/go/rpc/zrpc_encoding.go @@ -2320,6 +2320,161 @@ func (r PushAttachmentSelection) MarshalJSON() ([]byte, error) { }) } +func unmarshalRemoteControlStatus(data []byte) (RemoteControlStatus, error) { + if string(data) == "null" { + return nil, nil + } + type rawUnion struct { + State RemoteControlStatusState `json:"state"` + } + var raw rawUnion + if err := json.Unmarshal(data, &raw); err != nil { + return nil, err + } + + switch raw.State { + case RemoteControlStatusStateActive: + var d RemoteControlStatusActive + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case RemoteControlStatusStateConnecting: + var d RemoteControlStatusConnecting + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case RemoteControlStatusStateError: + var d RemoteControlStatusError + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case RemoteControlStatusStateOff: + var d RemoteControlStatusOff + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + default: + return &RawRemoteControlStatusData{Discriminator: raw.State, Raw: data}, nil + } +} + +func (r RawRemoteControlStatusData) MarshalJSON() ([]byte, error) { + if r.Raw != nil { + return r.Raw, nil + } + return json.Marshal(struct { + State RemoteControlStatusState `json:"state"` + }{ + State: r.Discriminator, + }) +} + +func (r RemoteControlStatusActive) MarshalJSON() ([]byte, error) { + type alias RemoteControlStatusActive + return json.Marshal(struct { + State RemoteControlStatusState `json:"state"` + alias + }{ + State: r.State(), + alias: alias(r), + }) +} + +func (r RemoteControlStatusConnecting) MarshalJSON() ([]byte, error) { + type alias RemoteControlStatusConnecting + return json.Marshal(struct { + State RemoteControlStatusState `json:"state"` + alias + }{ + State: r.State(), + alias: alias(r), + }) +} + +func (r RemoteControlStatusError) MarshalJSON() ([]byte, error) { + type alias RemoteControlStatusError + return json.Marshal(struct { + State RemoteControlStatusState `json:"state"` + alias + }{ + State: r.State(), + alias: alias(r), + }) +} + +func (r RemoteControlStatusOff) MarshalJSON() ([]byte, error) { + type alias RemoteControlStatusOff + return json.Marshal(struct { + State RemoteControlStatusState `json:"state"` + alias + }{ + State: r.State(), + alias: alias(r), + }) +} + +func (r *RemoteControlStatusResult) UnmarshalJSON(data []byte) error { + type rawRemoteControlStatusResult struct { + Status json.RawMessage `json:"status"` + } + var raw rawRemoteControlStatusResult + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw.Status != nil { + value, err := unmarshalRemoteControlStatus(raw.Status) + if err != nil { + return err + } + r.Status = value + } + return nil +} + +func (r *RemoteControlStopResult) UnmarshalJSON(data []byte) error { + type rawRemoteControlStopResult struct { + Status json.RawMessage `json:"status"` + Stopped bool `json:"stopped"` + } + var raw rawRemoteControlStopResult + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw.Status != nil { + value, err := unmarshalRemoteControlStatus(raw.Status) + if err != nil { + return err + } + r.Status = value + } + r.Stopped = raw.Stopped + return nil +} + +func (r *RemoteControlTransferResult) UnmarshalJSON(data []byte) error { + type rawRemoteControlTransferResult struct { + Status json.RawMessage `json:"status"` + Transferred bool `json:"transferred"` + } + var raw rawRemoteControlTransferResult + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw.Status != nil { + value, err := unmarshalRemoteControlStatus(raw.Status) + if err != nil { + return err + } + r.Status = value + } + r.Transferred = raw.Transferred + return nil +} + func (r *SendAttachmentsToMessageParams) UnmarshalJSON(data []byte) error { type rawSendAttachmentsToMessageParams struct { Attachments []json.RawMessage `json:"attachments"` @@ -2354,7 +2509,7 @@ func (r *SendRequest) UnmarshalJSON(data []byte) error { Prompt string `json:"prompt"` RequestHeaders map[string]string `json:"requestHeaders,omitzero"` RequiredTool *string `json:"requiredTool,omitempty"` - Source any `json:"source,omitempty"` + Source *string `json:"source,omitempty"` Traceparent *string `json:"traceparent,omitempty"` Tracestate *string `json:"tracestate,omitempty"` Wait *bool `json:"wait,omitempty"` @@ -2440,6 +2595,341 @@ func (r *SessionInstalledPluginSource) UnmarshalJSON(data []byte) error { return errors.New("data did not match any union variant for SessionInstalledPluginSource") } +func unmarshalSessionListEntry(data []byte) (SessionListEntry, error) { + if string(data) == "null" { + return nil, nil + } + type rawUnion struct { + IsRemote *bool `json:"isRemote"` + } + var raw rawUnion + if err := json.Unmarshal(data, &raw); err != nil { + return nil, err + } + if raw.IsRemote == nil { + return nil, errors.New("data did not match any union variant for SessionListEntry") + } + + switch *raw.IsRemote { + case false: + var d LocalSessionMetadataValue + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case true: + var d RemoteSessionMetadataValue + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + } + return nil, errors.New("data did not match any union variant for SessionListEntry") +} + +func (r LocalSessionMetadataValue) MarshalJSON() ([]byte, error) { + type alias LocalSessionMetadataValue + return json.Marshal(struct { + IsRemote bool `json:"isRemote"` + alias + }{ + IsRemote: r.IsRemote(), + alias: alias(r), + }) +} + +func (r RemoteSessionMetadataValue) MarshalJSON() ([]byte, error) { + type alias RemoteSessionMetadataValue + return json.Marshal(struct { + IsRemote bool `json:"isRemote"` + alias + }{ + IsRemote: r.IsRemote(), + alias: alias(r), + }) +} + +func (r *SessionList) UnmarshalJSON(data []byte) error { + type rawSessionList struct { + Sessions []json.RawMessage `json:"sessions"` + } + var raw rawSessionList + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw.Sessions != nil { + r.Sessions = make([]SessionListEntry, 0, len(raw.Sessions)) + for _, rawItem := range raw.Sessions { + value, err := unmarshalSessionListEntry(rawItem) + if err != nil { + return err + } + r.Sessions = append(r.Sessions, value) + } + } + return nil +} + +func (r *SessionOpenOptions) UnmarshalJSON(data []byte) error { + type rawSessionOpenOptions struct { + AdditionalContentExclusionPolicies []SessionOpenOptionsAdditionalContentExclusionPolicy `json:"additionalContentExclusionPolicies,omitzero"` + AgentContext *string `json:"agentContext,omitempty"` + AskUserDisabled *bool `json:"askUserDisabled,omitempty"` + AuthInfo json.RawMessage `json:"authInfo,omitempty"` + AvailableTools []string `json:"availableTools,omitzero"` + ClientKind *string `json:"clientKind,omitempty"` + ClientName *string `json:"clientName,omitempty"` + CoauthorEnabled *bool `json:"coauthorEnabled,omitempty"` + ConfigDir *string `json:"configDir,omitempty"` + ContinueOnAutoMode *bool `json:"continueOnAutoMode,omitempty"` + CopilotURL *string `json:"copilotUrl,omitempty"` + CustomAgentsLocalOnly *bool `json:"customAgentsLocalOnly,omitempty"` + DetachedFromSpawningParentEngagementID *string `json:"detachedFromSpawningParentEngagementId,omitempty"` + DetachedFromSpawningParentSessionID *string `json:"detachedFromSpawningParentSessionId,omitempty"` + DisabledInstructionSources []string `json:"disabledInstructionSources,omitzero"` + DisabledSkills []string `json:"disabledSkills,omitzero"` + EnableOnDemandInstructionDiscovery *bool `json:"enableOnDemandInstructionDiscovery,omitempty"` + EnableScriptSafety *bool `json:"enableScriptSafety,omitempty"` + EnableStreaming *bool `json:"enableStreaming,omitempty"` + EnvValueMode *SessionOpenOptionsEnvValueMode `json:"envValueMode,omitempty"` + EventsLogDirectory *string `json:"eventsLogDirectory,omitempty"` + ExcludedTools []string `json:"excludedTools,omitzero"` + FeatureFlags map[string]bool `json:"featureFlags,omitzero"` + InstalledPlugins []InstalledPlugin `json:"installedPlugins,omitzero"` + IntegrationID *string `json:"integrationId,omitempty"` + IsExperimentalMode *bool `json:"isExperimentalMode,omitempty"` + LogInteractiveShells *bool `json:"logInteractiveShells,omitempty"` + LspClientName *string `json:"lspClientName,omitempty"` + Model *string `json:"model,omitempty"` + ModelCapabilitiesOverrides *ModelCapabilitiesOverride `json:"modelCapabilitiesOverrides,omitempty"` + Name *string `json:"name,omitempty"` + Provider *ProviderConfig `json:"provider,omitempty"` + ReasoningEffort *string `json:"reasoningEffort,omitempty"` + ReasoningSummary *SessionOpenOptionsReasoningSummary `json:"reasoningSummary,omitempty"` + RemoteDefaultedOn *bool `json:"remoteDefaultedOn,omitempty"` + RemoteExporting *bool `json:"remoteExporting,omitempty"` + RemoteSteerable *bool `json:"remoteSteerable,omitempty"` + RunningInInteractiveMode *bool `json:"runningInInteractiveMode,omitempty"` + SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` + SessionCapabilities []SessionCapability `json:"sessionCapabilities,omitzero"` + SessionID *string `json:"sessionId,omitempty"` + ShellInitProfile *string `json:"shellInitProfile,omitempty"` + ShellProcessFlags []string `json:"shellProcessFlags,omitzero"` + SkillDirectories []string `json:"skillDirectories,omitzero"` + SkipCustomInstructions *bool `json:"skipCustomInstructions,omitempty"` + TrajectoryFile *string `json:"trajectoryFile,omitempty"` + WorkingDirectory *string `json:"workingDirectory,omitempty"` + WorkingDirectoryContext *SessionContext `json:"workingDirectoryContext,omitempty"` + } + var raw rawSessionOpenOptions + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + r.AdditionalContentExclusionPolicies = raw.AdditionalContentExclusionPolicies + r.AgentContext = raw.AgentContext + r.AskUserDisabled = raw.AskUserDisabled + if raw.AuthInfo != nil { + value, err := unmarshalAuthInfo(raw.AuthInfo) + if err != nil { + return err + } + r.AuthInfo = value + } + r.AvailableTools = raw.AvailableTools + r.ClientKind = raw.ClientKind + r.ClientName = raw.ClientName + r.CoauthorEnabled = raw.CoauthorEnabled + r.ConfigDir = raw.ConfigDir + r.ContinueOnAutoMode = raw.ContinueOnAutoMode + r.CopilotURL = raw.CopilotURL + r.CustomAgentsLocalOnly = raw.CustomAgentsLocalOnly + r.DetachedFromSpawningParentEngagementID = raw.DetachedFromSpawningParentEngagementID + r.DetachedFromSpawningParentSessionID = raw.DetachedFromSpawningParentSessionID + r.DisabledInstructionSources = raw.DisabledInstructionSources + r.DisabledSkills = raw.DisabledSkills + r.EnableOnDemandInstructionDiscovery = raw.EnableOnDemandInstructionDiscovery + r.EnableScriptSafety = raw.EnableScriptSafety + r.EnableStreaming = raw.EnableStreaming + r.EnvValueMode = raw.EnvValueMode + r.EventsLogDirectory = raw.EventsLogDirectory + r.ExcludedTools = raw.ExcludedTools + r.FeatureFlags = raw.FeatureFlags + r.InstalledPlugins = raw.InstalledPlugins + r.IntegrationID = raw.IntegrationID + r.IsExperimentalMode = raw.IsExperimentalMode + r.LogInteractiveShells = raw.LogInteractiveShells + r.LspClientName = raw.LspClientName + r.Model = raw.Model + r.ModelCapabilitiesOverrides = raw.ModelCapabilitiesOverrides + r.Name = raw.Name + r.Provider = raw.Provider + r.ReasoningEffort = raw.ReasoningEffort + r.ReasoningSummary = raw.ReasoningSummary + r.RemoteDefaultedOn = raw.RemoteDefaultedOn + r.RemoteExporting = raw.RemoteExporting + r.RemoteSteerable = raw.RemoteSteerable + r.RunningInInteractiveMode = raw.RunningInInteractiveMode + r.SandboxConfig = raw.SandboxConfig + r.SessionCapabilities = raw.SessionCapabilities + r.SessionID = raw.SessionID + r.ShellInitProfile = raw.ShellInitProfile + r.ShellProcessFlags = raw.ShellProcessFlags + r.SkillDirectories = raw.SkillDirectories + r.SkipCustomInstructions = raw.SkipCustomInstructions + r.TrajectoryFile = raw.TrajectoryFile + r.WorkingDirectory = raw.WorkingDirectory + r.WorkingDirectoryContext = raw.WorkingDirectoryContext + return nil +} + +func unmarshalSessionOpenParams(data []byte) (SessionOpenParams, error) { + if string(data) == "null" { + return nil, nil + } + type rawUnion struct { + Kind SessionOpenParamsKind `json:"kind"` + } + var raw rawUnion + if err := json.Unmarshal(data, &raw); err != nil { + return nil, err + } + + switch raw.Kind { + case SessionOpenParamsKindAttach: + var d SessionsOpenAttach + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SessionOpenParamsKindCloud: + var d SessionsOpenCloud + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SessionOpenParamsKindCreate: + var d SessionsOpenCreate + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SessionOpenParamsKindHandoff: + var d SessionsOpenHandoff + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SessionOpenParamsKindRemote: + var d SessionsOpenRemote + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SessionOpenParamsKindResume: + var d SessionsOpenResume + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SessionOpenParamsKindResumeLast: + var d SessionsOpenResumeLast + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + default: + return &RawSessionOpenParamsData{Discriminator: raw.Kind, Raw: data}, nil + } +} + +func (r RawSessionOpenParamsData) MarshalJSON() ([]byte, error) { + if r.Raw != nil { + return r.Raw, nil + } + return json.Marshal(struct { + Kind SessionOpenParamsKind `json:"kind"` + }{ + Kind: r.Discriminator, + }) +} + +func (r SessionsOpenAttach) MarshalJSON() ([]byte, error) { + type alias SessionsOpenAttach + return json.Marshal(struct { + Kind SessionOpenParamsKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + +func (r SessionsOpenCloud) MarshalJSON() ([]byte, error) { + type alias SessionsOpenCloud + return json.Marshal(struct { + Kind SessionOpenParamsKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + +func (r SessionsOpenCreate) MarshalJSON() ([]byte, error) { + type alias SessionsOpenCreate + return json.Marshal(struct { + Kind SessionOpenParamsKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + +func (r SessionsOpenHandoff) MarshalJSON() ([]byte, error) { + type alias SessionsOpenHandoff + return json.Marshal(struct { + Kind SessionOpenParamsKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + +func (r SessionsOpenRemote) MarshalJSON() ([]byte, error) { + type alias SessionsOpenRemote + return json.Marshal(struct { + Kind SessionOpenParamsKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + +func (r SessionsOpenResume) MarshalJSON() ([]byte, error) { + type alias SessionsOpenResume + return json.Marshal(struct { + Kind SessionOpenParamsKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + +func (r SessionsOpenResumeLast) MarshalJSON() ([]byte, error) { + type alias SessionsOpenResumeLast + return json.Marshal(struct { + Kind SessionOpenParamsKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + func (r *SessionSetCredentialsParams) UnmarshalJSON(data []byte) error { type rawSessionSetCredentialsParams struct { Credentials json.RawMessage `json:"credentials,omitempty"` diff --git a/go/rpc/zsession_encoding.go b/go/rpc/zsession_encoding.go index 6b0e04c60..c9091edc5 100644 --- a/go/rpc/zsession_encoding.go +++ b/go/rpc/zsession_encoding.go @@ -263,6 +263,12 @@ func (e *SessionEvent) UnmarshalJSON(data []byte) error { return err } e.Data = &d + case SessionEventTypeSessionCanvasClosed: + var d SessionCanvasClosedData + if err := json.Unmarshal(raw.Data, &d); err != nil { + return err + } + e.Data = &d case SessionEventTypeSessionCanvasOpened: var d SessionCanvasOpenedData if err := json.Unmarshal(raw.Data, &d); err != nil { diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go index 6d05baa3c..5148d46c3 100644 --- a/go/rpc/zsession_events.go +++ b/go/rpc/zsession_events.go @@ -91,6 +91,7 @@ const ( SessionEventTypeSamplingRequested SessionEventType = "sampling.requested" SessionEventTypeSessionAutopilotObjectiveChanged SessionEventType = "session.autopilot_objective_changed" SessionEventTypeSessionBackgroundTasksChanged SessionEventType = "session.background_tasks_changed" + SessionEventTypeSessionCanvasClosed SessionEventType = "session.canvas.closed" SessionEventTypeSessionCanvasOpened SessionEventType = "session.canvas.opened" SessionEventTypeSessionCanvasRegistryChanged SessionEventType = "session.canvas.registry_changed" SessionEventTypeSessionCompactionComplete SessionEventType = "session.compaction_complete" @@ -182,6 +183,8 @@ type AssistantMessageData struct { // Anthropic advisor model ID used for this response, for timeline display on replay // Experimental: AnthropicAdvisorModel is part of an experimental API and may change or be removed. AnthropicAdvisorModel *string `json:"anthropicAdvisorModel,omitempty"` + // Provider's completion / response identifier; shared across all chunks of a single API call. Used to group multi-chunk assistant utterances. + APICallID *string `json:"apiCallId,omitempty"` // The assistant's text response content Content string `json:"content"` // Encrypted reasoning content from OpenAI models. Session-bound and stripped on resume. @@ -715,7 +718,7 @@ func (*SessionCustomNotificationData) Type() SessionEventType { return SessionEventTypeSessionCustomNotification } -// Payload indicating the session is idle with no background agents in flight +// Payload indicating the session is idle with no background agents or attached shell commands in flight type SessionIdleData struct { // True when the preceding agentic loop was cancelled via abort signal Aborted *bool `json:"aborted,omitempty"` @@ -917,6 +920,19 @@ func (*SessionBackgroundTasksChangedData) Type() SessionEventType { return SessionEventTypeSessionBackgroundTasksChanged } +// Schema for the `CanvasClosedData` type. +type SessionCanvasClosedData struct { + // Provider-local canvas identifier + CanvasID string `json:"canvasId"` + // Owning provider identifier + ExtensionID string `json:"extensionId"` + // Stable caller-supplied identifier of the canvas instance that was closed + InstanceID string `json:"instanceId"` +} + +func (*SessionCanvasClosedData) sessionEventData() {} +func (*SessionCanvasClosedData) Type() SessionEventType { return SessionEventTypeSessionCanvasClosed } + // Schema for the `CanvasOpenedData` type. type SessionCanvasOpenedData struct { // Runtime-controlled routing state for the instance. "ready" when the provider connection is live; "stale" when the provider has gone away and the instance is awaiting rebinding. @@ -1336,7 +1352,7 @@ type SubagentFailedData struct { DurationMs *int64 `json:"durationMs,omitempty"` // Error message describing why the sub-agent failed Error string `json:"error"` - // Model used by the sub-agent (if any model calls succeeded before failure) + // Model selected for the sub-agent, when known Model *string `json:"model,omitempty"` // Tool call ID of the parent tool invocation that spawned this sub-agent ToolCallID string `json:"toolCallId"` @@ -1357,7 +1373,7 @@ 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 the sub-agent will run with, when known at start. Model *string `json:"model,omitempty"` // Tool call ID of the parent tool invocation that spawned this sub-agent ToolCallID string `json:"toolCallId"` @@ -1841,6 +1857,8 @@ type HandoffRepository struct { type HookEndError struct { // Human-readable error message Message string `json:"message"` + // Source label of the hook that errored (e.g. the plugin it was loaded from), when known + Source *string `json:"source,omitempty"` // Error stack trace, when available Stack *string `json:"stack,omitempty"` } diff --git a/go/zsession_events.go b/go/zsession_events.go index 70ce3e6d5..5a8962efd 100644 --- a/go/zsession_events.go +++ b/go/zsession_events.go @@ -156,6 +156,7 @@ type ( SamplingRequestedData = rpc.SamplingRequestedData SessionAutopilotObjectiveChangedData = rpc.SessionAutopilotObjectiveChangedData SessionBackgroundTasksChangedData = rpc.SessionBackgroundTasksChangedData + SessionCanvasClosedData = rpc.SessionCanvasClosedData SessionCanvasOpenedData = rpc.SessionCanvasOpenedData SessionCanvasRegistryChangedData = rpc.SessionCanvasRegistryChangedData SessionCompactionCompleteData = rpc.SessionCompactionCompleteData @@ -424,6 +425,7 @@ const ( SessionEventTypeSamplingRequested = rpc.SessionEventTypeSamplingRequested SessionEventTypeSessionAutopilotObjectiveChanged = rpc.SessionEventTypeSessionAutopilotObjectiveChanged SessionEventTypeSessionBackgroundTasksChanged = rpc.SessionEventTypeSessionBackgroundTasksChanged + SessionEventTypeSessionCanvasClosed = rpc.SessionEventTypeSessionCanvasClosed SessionEventTypeSessionCanvasOpened = rpc.SessionEventTypeSessionCanvasOpened SessionEventTypeSessionCanvasRegistryChanged = rpc.SessionEventTypeSessionCanvasRegistryChanged SessionEventTypeSessionCompactionComplete = rpc.SessionEventTypeSessionCompactionComplete diff --git a/java/pom.xml b/java/pom.xml index e8d67842c..310f5e7da 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -86,7 +86,7 @@ DO NOT EDIT MANUALLY. Updated by the update-copilot-dependency workflow. --> - ^1.0.57 + ^1.0.60 diff --git a/java/scripts/codegen/package-lock.json b/java/scripts/codegen/package-lock.json index 71d0f9225..e58973859 100644 --- a/java/scripts/codegen/package-lock.json +++ b/java/scripts/codegen/package-lock.json @@ -6,7 +6,7 @@ "": { "name": "copilot-sdk-java-codegen", "dependencies": { - "@github/copilot": "^1.0.57", + "@github/copilot": "^1.0.60", "json-schema": "^0.4.0", "tsx": "^4.20.6" } @@ -428,9 +428,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.57.tgz", - "integrity": "sha512-7dpOu9/qiodmFohZVpTxYmTcjbcXfstWeHof0Ka5RkhguKMkbS3c+sW23a7TTjtlViTV73z+IZFfFW1ru621kw==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.60.tgz", + "integrity": "sha512-+GjW+GJNo55nwJwt48o9szWcyhuY0u682cBKQI1ay9jVBX8DCCXC6HB6Tyv5/MaM4N7CxTiEgp48aVMkye8K+g==", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "detect-libc": "^2.1.2" @@ -439,20 +439,20 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.57", - "@github/copilot-darwin-x64": "1.0.57", - "@github/copilot-linux-arm64": "1.0.57", - "@github/copilot-linux-x64": "1.0.57", - "@github/copilot-linuxmusl-arm64": "1.0.57", - "@github/copilot-linuxmusl-x64": "1.0.57", - "@github/copilot-win32-arm64": "1.0.57", - "@github/copilot-win32-x64": "1.0.57" + "@github/copilot-darwin-arm64": "1.0.60", + "@github/copilot-darwin-x64": "1.0.60", + "@github/copilot-linux-arm64": "1.0.60", + "@github/copilot-linux-x64": "1.0.60", + "@github/copilot-linuxmusl-arm64": "1.0.60", + "@github/copilot-linuxmusl-x64": "1.0.60", + "@github/copilot-win32-arm64": "1.0.60", + "@github/copilot-win32-x64": "1.0.60" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.57.tgz", - "integrity": "sha512-ZmsojZbitPSRfgw3W9wBrHGLRDsBvMCjGsGnJ7xXOU6qxeF/IyWHADxEv1WKfDw8BdCM+LE5yITPXB8bcvCdqQ==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.60.tgz", + "integrity": "sha512-TErNaVxsv+uB3bdHwdoKorCd1rhiRh7HkX48vnS7jwqa8EtGgAkzNrHKC7mruL2rnYOOsNIdPfhzQk+2Y6PSxQ==", "cpu": [ "arm64" ], @@ -466,9 +466,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.57.tgz", - "integrity": "sha512-F4TFDOdORy4oSHJS4DE+3sTk09uk1lohOloe0jfvoEVxJSU6jdQcJLNGoo+BQljcG7a1HEBrmB04iAWG1UXVfA==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.60.tgz", + "integrity": "sha512-PthhcR6PqbQlT04xQKTElpPSJOrJd65nK/l9Sjmpwtk21RrDKs13DCY/19ubP17updYUWBxp3VNfyfN3DAQKOA==", "cpu": [ "x64" ], @@ -482,9 +482,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.57.tgz", - "integrity": "sha512-6apNY/v7CMxKk45CctUZLzQnddBpIG9keSendFKYN+kBIEBSdy//s/Cz/4YQX1iERnklpgZRP7FvcwaKs0/7YA==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.60.tgz", + "integrity": "sha512-AVahkDVQTiGmHvDjlb4CHO8CFEGqmCEipxi0qTA60oH3Y3W2C4aYBwEBtP/85pN3wUUKZJVrWTCcxdufUBuK2Q==", "cpu": [ "arm64" ], @@ -498,9 +498,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.57.tgz", - "integrity": "sha512-EOOnU4Y+vZHfxVl8eBAP7JtSTmu5d4ZDUC9wCGpAA5k703lEnpu8UOv04mTHRn8KTzb8gj+ijNhxDWe3Xljbaw==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.60.tgz", + "integrity": "sha512-NwQjV2ZyUdJVAO4t7wiT+eR3uNWYP57xaLUIhf6JTMGpsTyN+mAFXW63xpwM/K+Pug62uRDQDBjEeOQRB7qZrA==", "cpu": [ "x64" ], @@ -514,9 +514,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.57.tgz", - "integrity": "sha512-FCAaaJLX5T2ZpMeS1TCNnhQuGqyH9WVZndFdN1VOEnN/iWeSSaVF3lM4TPyRHHnWDVxzZtB+VLqOSjINZntD6g==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.60.tgz", + "integrity": "sha512-AYGPc9vq2k248bVwUbiVJ65kIYYMQQ7ci+S3oefWBIyYtYwAH0n+Q/IGAj49IPrelBarYABAsX+EQZJJC8rhxw==", "cpu": [ "arm64" ], @@ -530,9 +530,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.57.tgz", - "integrity": "sha512-AMIBN830yOvNcrj2Q0tGMImqat/V24wZS/4m5BaUssELM7r7KrT9ZBnBs+nWDZYeQaRoblFWL3f4AfxE3t94lQ==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.60.tgz", + "integrity": "sha512-9/F7yl0/9FpGvYR/TCQtbhu0vIaUVem6U7em85QYaEjkS45nK500pByCMWY0bXv2eSS8U2g+8FOAjfkyLlxwPw==", "cpu": [ "x64" ], @@ -546,9 +546,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.57.tgz", - "integrity": "sha512-3TL2bd1/p/sYbNgDIqbnjES//zlXP5b0sPEXKQRrpVF9ZLN3vjQ1tmBWx8Qx7zn2J3oywH2dG7qKjuxWTJRXKA==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.60.tgz", + "integrity": "sha512-ZxxS+Ua1+7Puz80yTOpQ4WS+s32NjrxIsqo8gE0FpuZId16BGOGbWkzWQvR/k2AVBCqpLZ7SK3LfDVKuKJRbpA==", "cpu": [ "arm64" ], @@ -562,9 +562,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.57.tgz", - "integrity": "sha512-zuKqRn0pIF+ZvuiMXbZkYK1AMlrV21kFTpyf5l7gdI1dzJuwHNI0Qfe0gzaZYaU1B4htbzMk9MhEbjR1PQcoJg==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.60.tgz", + "integrity": "sha512-e91ZlFz9J1lkadExLg36oN8Ms/xIa03vAEir3DmyCeYebZ+Y48vdS+BwhQEma+GLoxJUOhzHndCckGnMRfNIbA==", "cpu": [ "x64" ], diff --git a/java/scripts/codegen/package.json b/java/scripts/codegen/package.json index 07348fb1c..4040da3c7 100644 --- a/java/scripts/codegen/package.json +++ b/java/scripts/codegen/package.json @@ -7,7 +7,7 @@ "generate:java": "tsx java.ts" }, "dependencies": { - "@github/copilot": "^1.0.57", + "@github/copilot": "^1.0.60", "json-schema": "^0.4.0", "tsx": "^4.20.6" } diff --git a/java/src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java b/java/src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java index 7eb1f23ab..84d4e4091 100644 --- a/java/src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java @@ -59,6 +59,8 @@ public record AssistantMessageEventData( @JsonProperty("requestId") String requestId, /** Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation */ @JsonProperty("serviceRequestId") String serviceRequestId, + /** Provider's completion / response identifier; shared across all chunks of a single API call. Used to group multi-chunk assistant utterances. */ + @JsonProperty("apiCallId") String apiCallId, /** Raw Anthropic content array with advisor blocks (server_tool_use, advisor_tool_result) for verbatim round-tripping */ @JsonProperty("anthropicAdvisorBlocks") List anthropicAdvisorBlocks, /** Anthropic advisor model ID used for this response, for timeline display on replay */ diff --git a/java/src/generated/java/com/github/copilot/generated/HookEndError.java b/java/src/generated/java/com/github/copilot/generated/HookEndError.java index 59646b3cc..f70b34b52 100644 --- a/java/src/generated/java/com/github/copilot/generated/HookEndError.java +++ b/java/src/generated/java/com/github/copilot/generated/HookEndError.java @@ -24,6 +24,8 @@ public record HookEndError( /** Human-readable error message */ @JsonProperty("message") String message, /** Error stack trace, when available */ - @JsonProperty("stack") String stack + @JsonProperty("stack") String stack, + /** Source label of the hook that errored (e.g. the plugin it was loaded from), when known */ + @JsonProperty("source") String source ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/SessionCanvasClosedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionCanvasClosedEvent.java new file mode 100644 index 000000000..79fd365c2 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/SessionCanvasClosedEvent.java @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: session-events.schema.json + +package com.github.copilot.generated; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Session event "session.canvas.closed". + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionCanvasClosedEvent extends SessionEvent { + + @Override + public String getType() { return "session.canvas.closed"; } + + @JsonProperty("data") + private SessionCanvasClosedEventData data; + + public SessionCanvasClosedEventData getData() { return data; } + public void setData(SessionCanvasClosedEventData data) { this.data = data; } + + /** Data payload for {@link SessionCanvasClosedEvent}. */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record SessionCanvasClosedEventData( + /** Stable caller-supplied identifier of the canvas instance that was closed */ + @JsonProperty("instanceId") String instanceId, + /** Owning provider identifier */ + @JsonProperty("extensionId") String extensionId, + /** Provider-local canvas identifier */ + @JsonProperty("canvasId") String canvasId + ) { + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/SessionEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionEvent.java index 724faee03..92e975a30 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionEvent.java @@ -111,6 +111,7 @@ @JsonSubTypes.Type(value = SessionExtensionsLoadedEvent.class, name = "session.extensions_loaded"), @JsonSubTypes.Type(value = SessionCanvasOpenedEvent.class, name = "session.canvas.opened"), @JsonSubTypes.Type(value = SessionCanvasRegistryChangedEvent.class, name = "session.canvas.registry_changed"), + @JsonSubTypes.Type(value = SessionCanvasClosedEvent.class, name = "session.canvas.closed"), @JsonSubTypes.Type(value = SessionExtensionsAttachmentsPushedEvent.class, name = "session.extensions.attachments_pushed"), @JsonSubTypes.Type(value = McpAppToolCallCompleteEvent.class, name = "mcp_app.tool_call_complete") }) @@ -202,6 +203,7 @@ public abstract sealed class SessionEvent permits SessionExtensionsLoadedEvent, SessionCanvasOpenedEvent, SessionCanvasRegistryChangedEvent, + SessionCanvasClosedEvent, SessionExtensionsAttachmentsPushedEvent, McpAppToolCallCompleteEvent, UnknownSessionEvent { diff --git a/java/src/generated/java/com/github/copilot/generated/SessionIdleEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionIdleEvent.java index b4b5d0e28..e51a26e5a 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionIdleEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionIdleEvent.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Session event "session.idle". Payload indicating the session is idle with no background agents in flight + * Session event "session.idle". Payload indicating the session is idle with no background agents or attached shell commands in flight * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/src/generated/java/com/github/copilot/generated/SubagentFailedEvent.java b/java/src/generated/java/com/github/copilot/generated/SubagentFailedEvent.java index 4a65fb545..6a48544ce 100644 --- a/java/src/generated/java/com/github/copilot/generated/SubagentFailedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SubagentFailedEvent.java @@ -42,7 +42,7 @@ public record SubagentFailedEventData( @JsonProperty("agentDisplayName") String agentDisplayName, /** Error message describing why the sub-agent failed */ @JsonProperty("error") String error, - /** Model used by the sub-agent (if any model calls succeeded before failure) */ + /** Model selected for the sub-agent, when known */ @JsonProperty("model") String model, /** Total number of tool calls made before the sub-agent failed */ @JsonProperty("totalToolCalls") Long totalToolCalls, diff --git a/java/src/generated/java/com/github/copilot/generated/SubagentStartedEvent.java b/java/src/generated/java/com/github/copilot/generated/SubagentStartedEvent.java index 3269edcb6..fb94f97cf 100644 --- a/java/src/generated/java/com/github/copilot/generated/SubagentStartedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SubagentStartedEvent.java @@ -42,7 +42,7 @@ public record SubagentStartedEventData( @JsonProperty("agentDisplayName") String agentDisplayName, /** Description of what the sub-agent does */ @JsonProperty("agentDescription") String agentDescription, - /** 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 the sub-agent will run with, when known at start. */ @JsonProperty("model") String model ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/InstalledPluginInfo.java b/java/src/generated/java/com/github/copilot/generated/rpc/InstalledPluginInfo.java new file mode 100644 index 000000000..898c5438e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/InstalledPluginInfo.java @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Information about an installed plugin tracked in global state. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record InstalledPluginInfo( + /** Plugin name */ + @JsonProperty("name") String name, + /** Marketplace the plugin came from. Empty string ("") for direct repo / URL / local installs. */ + @JsonProperty("marketplace") String marketplace, + /** Installed version (when reported by the plugin manifest) */ + @JsonProperty("version") String version, + /** Whether the plugin is currently enabled for new sessions */ + @JsonProperty("enabled") Boolean enabled +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/LocalSessionMetadataValue.java b/java/src/generated/java/com/github/copilot/generated/rpc/LocalSessionMetadataValue.java new file mode 100644 index 000000000..80d058199 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/LocalSessionMetadataValue.java @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `LocalSessionMetadataValue` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record LocalSessionMetadataValue( + /** Stable session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Session creation time as an ISO 8601 timestamp */ + @JsonProperty("startTime") String startTime, + /** Last-modified time of the session's persisted state, as ISO 8601 */ + @JsonProperty("modifiedTime") String modifiedTime, + /** Short summary of the session, when one has been derived */ + @JsonProperty("summary") String summary, + /** Optional human-friendly name set via /rename */ + @JsonProperty("name") String name, + /** Runtime client name that created/last resumed this session */ + @JsonProperty("clientName") String clientName, + /** Always false for local sessions. */ + @JsonProperty("isRemote") Boolean isRemote, + /** True for detached maintenance sessions that should be hidden from normal resume lists. */ + @JsonProperty("isDetached") Boolean isDetached, + /** Pre-resolved working-directory context for session startup. */ + @JsonProperty("context") SessionContext context, + /** GitHub task ID, when this local session is bound to one. Only present for local sessions exported to remote control. */ + @JsonProperty("mcTaskId") String mcTaskId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/MarketplaceInfo.java b/java/src/generated/java/com/github/copilot/generated/rpc/MarketplaceInfo.java new file mode 100644 index 000000000..5c7b8b865 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/MarketplaceInfo.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Registered marketplace summary. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record MarketplaceInfo( + /** Marketplace name (matches the @marketplace suffix in plugin specs) */ + @JsonProperty("name") String name, + /** Human-readable description of where the marketplace data is fetched from (e.g. "GitHub: owner/repo"). */ + @JsonProperty("source") String source, + /** True when this is a default marketplace shipped with the runtime. Defaults are not removable. */ + @JsonProperty("isDefault") Boolean isDefault +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/MarketplacePluginInfo.java b/java/src/generated/java/com/github/copilot/generated/rpc/MarketplacePluginInfo.java new file mode 100644 index 000000000..829b80de9 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/MarketplacePluginInfo.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Plugin entry advertised by a marketplace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record MarketplacePluginInfo( + /** Plugin name as listed in the marketplace catalog */ + @JsonProperty("name") String name, + /** Short description from the marketplace catalog, when present */ + @JsonProperty("description") String description +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/MarketplaceRefreshEntry.java b/java/src/generated/java/com/github/copilot/generated/rpc/MarketplaceRefreshEntry.java new file mode 100644 index 000000000..c7b6819dc --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/MarketplaceRefreshEntry.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `MarketplaceRefreshEntry` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record MarketplaceRefreshEntry( + /** Marketplace name that was refreshed */ + @JsonProperty("name") String name, + /** Whether the refresh succeeded */ + @JsonProperty("success") Boolean success, + /** Error message (failure only) */ + @JsonProperty("error") String error +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/McpAllowedServer.java b/java/src/generated/java/com/github/copilot/generated/rpc/McpAllowedServer.java new file mode 100644 index 000000000..8474a916c --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/McpAllowedServer.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `McpAllowedServer` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record McpAllowedServer( + /** Allowed server name */ + @JsonProperty("name") String name, + /** PII-free note explaining why the server was allowed */ + @JsonProperty("redactedNote") String redactedNote +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/McpFilteredServer.java b/java/src/generated/java/com/github/copilot/generated/rpc/McpFilteredServer.java new file mode 100644 index 000000000..9f5e91910 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/McpFilteredServer.java @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `McpFilteredServer` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record McpFilteredServer( + /** Filtered server name */ + @JsonProperty("name") String name, + /** Human-readable filter reason */ + @JsonProperty("reason") String reason, + /** PII-free filter reason */ + @JsonProperty("redactedReason") String redactedReason, + /** Enterprise login associated with an allowlist policy */ + @JsonProperty("enterpriseName") String enterpriseName +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/McpHostState.java b/java/src/generated/java/com/github/copilot/generated/rpc/McpHostState.java new file mode 100644 index 000000000..0326a120e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/McpHostState.java @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; + +/** + * Host-level state, omitted when no MCP host is initialized. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record McpHostState( + /** Whether third-party MCP servers are policy-enabled for this session. */ + @JsonProperty("mcp3pEnabled") Boolean mcp3pEnabled, + /** Configured servers that are explicitly disabled. */ + @JsonProperty("disabledServers") List disabledServers, + /** Configured servers filtered out by enterprise allowlist policy. */ + @JsonProperty("filteredServers") List filteredServers, + /** Names of currently-connected MCP clients. */ + @JsonProperty("clients") List clients, + /** Names of servers with in-flight connection attempts. */ + @JsonProperty("pendingConnections") List pendingConnections, + /** Map of server name to recorded connection failure. */ + @JsonProperty("failedServers") Map failedServers, + /** Map of server name to recorded pending-auth state. */ + @JsonProperty("needsAuthServers") Map needsAuthServers +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/McpServerFailureInfo.java b/java/src/generated/java/com/github/copilot/generated/rpc/McpServerFailureInfo.java new file mode 100644 index 000000000..d929212ff --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/McpServerFailureInfo.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Recorded MCP server connection failure. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record McpServerFailureInfo( + /** Failure message produced when the MCP server connection failed. */ + @JsonProperty("message") String message, + /** epoch-ms timestamp at which the failure was recorded. */ + @JsonProperty("timestamp") Long timestamp +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/McpServerNeedsAuthInfo.java b/java/src/generated/java/com/github/copilot/generated/rpc/McpServerNeedsAuthInfo.java new file mode 100644 index 000000000..1026c582b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/McpServerNeedsAuthInfo.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Recorded MCP server pending-auth state. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record McpServerNeedsAuthInfo( + /** epoch-ms timestamp at which the server signalled it needs authentication. */ + @JsonProperty("timestamp") Long timestamp +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/McpTools.java b/java/src/generated/java/com/github/copilot/generated/rpc/McpTools.java new file mode 100644 index 000000000..31373c1d1 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/McpTools.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `McpTools` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record McpTools( + /** Tool name. */ + @JsonProperty("name") String name, + /** Tool description, when provided. */ + @JsonProperty("description") String description +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ModelCapabilitiesOverride.java b/java/src/generated/java/com/github/copilot/generated/rpc/ModelCapabilitiesOverride.java index 1433a7b5e..fbc87f721 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/ModelCapabilitiesOverride.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ModelCapabilitiesOverride.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Override individual model capabilities resolved by the runtime + * Initial model capability overrides. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicy.java b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicy.java new file mode 100644 index 000000000..13360e808 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicy.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Schema for the `OptionsUpdateAdditionalContentExclusionPolicy` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record OptionsUpdateAdditionalContentExclusionPolicy( + @JsonProperty("rules") List rules, + @JsonProperty("last_updated_at") Object lastUpdatedAt, + /** Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. */ + @JsonProperty("scope") OptionsUpdateAdditionalContentExclusionPolicyScope scope +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRule.java b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRule.java new file mode 100644 index 000000000..af6917cb7 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRule.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRule` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record OptionsUpdateAdditionalContentExclusionPolicyRule( + @JsonProperty("paths") List paths, + @JsonProperty("ifAnyMatch") List ifAnyMatch, + @JsonProperty("ifNoneMatch") List ifNoneMatch, + /** Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. */ + @JsonProperty("source") OptionsUpdateAdditionalContentExclusionPolicyRuleSource source +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRuleSource.java b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRuleSource.java new file mode 100644 index 000000000..8befe476e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRuleSource.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record OptionsUpdateAdditionalContentExclusionPolicyRuleSource( + @JsonProperty("name") String name, + @JsonProperty("type") String type +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyScope.java b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyScope.java new file mode 100644 index 000000000..28fbd2a6f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyScope.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum OptionsUpdateAdditionalContentExclusionPolicyScope { + /** The {@code repo} variant. */ + REPO("repo"), + /** The {@code all} variant. */ + ALL("all"); + + private final String value; + OptionsUpdateAdditionalContentExclusionPolicyScope(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static OptionsUpdateAdditionalContentExclusionPolicyScope fromValue(String value) { + for (OptionsUpdateAdditionalContentExclusionPolicyScope v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown OptionsUpdateAdditionalContentExclusionPolicyScope value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateContextTier.java b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateContextTier.java new file mode 100644 index 000000000..41d3e1c6c --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateContextTier.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Context tier for models with tiered pricing. The session uses this to derive effective `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits honor the selected tier. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum OptionsUpdateContextTier { + /** The {@code default} variant. */ + DEFAULT("default"), + /** The {@code long_context} variant. */ + LONG_CONTEXT("long_context"); + + private final String value; + OptionsUpdateContextTier(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static OptionsUpdateContextTier fromValue(String value) { + for (OptionsUpdateContextTier v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown OptionsUpdateContextTier value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateReasoningSummary.java b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateReasoningSummary.java new file mode 100644 index 000000000..ee0f68052 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateReasoningSummary.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Reasoning summary mode for supported model clients. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum OptionsUpdateReasoningSummary { + /** The {@code none} variant. */ + NONE("none"), + /** The {@code concise} variant. */ + CONCISE("concise"), + /** The {@code detailed} variant. */ + DETAILED("detailed"); + + private final String value; + OptionsUpdateReasoningSummary(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static OptionsUpdateReasoningSummary fromValue(String value) { + for (OptionsUpdateReasoningSummary v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown OptionsUpdateReasoningSummary value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PlanSqlTodosRow.java b/java/src/generated/java/com/github/copilot/generated/rpc/PlanSqlTodosRow.java new file mode 100644 index 000000000..8b1fb61dd --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PlanSqlTodosRow.java @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `PlanSqlTodosRow` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PlanSqlTodosRow( + /** Todo identifier. */ + @JsonProperty("id") String id, + /** Todo title. */ + @JsonProperty("title") String title, + /** Todo description. */ + @JsonProperty("description") String description, + /** Todo status. */ + @JsonProperty("status") String status +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginUpdateAllEntry.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginUpdateAllEntry.java new file mode 100644 index 000000000..548ee3931 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginUpdateAllEntry.java @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `PluginUpdateAllEntry` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginUpdateAllEntry( + /** Plugin name that was updated */ + @JsonProperty("name") String name, + /** Marketplace the plugin came from. Empty string ("") for direct installs. */ + @JsonProperty("marketplace") String marketplace, + /** Whether the update succeeded for this plugin */ + @JsonProperty("success") Boolean success, + /** Previously installed version, when available */ + @JsonProperty("previousVersion") String previousVersion, + /** Version after the update, when available */ + @JsonProperty("newVersion") String newVersion, + /** Number of skills installed after the update (success only) */ + @JsonProperty("skillsInstalled") Long skillsInstalled, + /** Error message (failure only) */ + @JsonProperty("error") String error +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsDisableParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsDisableParams.java new file mode 100644 index 000000000..6621cf167 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsDisableParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Plugin names (or specs) to disable. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsDisableParams( + /** Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins. */ + @JsonProperty("names") List names +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsEnableParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsEnableParams.java new file mode 100644 index 000000000..a5d876eec --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsEnableParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Plugin names (or specs) to enable. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsEnableParams( + /** Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API. */ + @JsonProperty("names") List names +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsInstallParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsInstallParams.java new file mode 100644 index 000000000..4e21cae80 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsInstallParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Plugin source and optional working directory for relative-path resolution. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsInstallParams( + /** Plugin install spec. Accepts the same forms as the CLI: "plugin@marketplace" (marketplace install), "owner/repo" or "owner/repo:subpath" (GitHub direct), an http/https/ssh URL, or a local path. Direct (non-marketplace) installs are deprecated and will produce a deprecationWarning in the result. */ + @JsonProperty("source") String source, + /** Working directory used to resolve relative local paths in `source`. Defaults to the server's current working directory. */ + @JsonProperty("workingDirectory") String workingDirectory +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsInstallResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsInstallResult.java new file mode 100644 index 000000000..c0ccc45ff --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsInstallResult.java @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Result of installing a plugin. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsInstallResult( + /** The newly installed plugin's metadata */ + @JsonProperty("plugin") InstalledPluginInfo plugin, + /** Number of skills discovered and installed from the plugin */ + @JsonProperty("skillsInstalled") Long skillsInstalled, + /** Optional post-install message provided by the plugin (e.g. setup instructions) */ + @JsonProperty("postInstallMessage") String postInstallMessage, + /** Set when the install path is deprecated (e.g. direct repo / URL / local installs). Callers should surface this to end users. */ + @JsonProperty("deprecationWarning") String deprecationWarning +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsListResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsListResult.java new file mode 100644 index 000000000..f49857aba --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsListResult.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Plugins installed in user/global state. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsListResult( + /** Installed plugins */ + @JsonProperty("plugins") List plugins +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesAddParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesAddParams.java new file mode 100644 index 000000000..cab5641fe --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesAddParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Marketplace source to register. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsMarketplacesAddParams( + /** Marketplace source. Accepts the same forms as the CLI: "owner/repo" or "owner/repo#ref" (GitHub), an http/https/ssh URL (optionally with #ref), a git scp-style URL (user@host:path), or a local path. The marketplace's own name (from its manifest) is used as the registration key. */ + @JsonProperty("source") String source +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesAddResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesAddResult.java new file mode 100644 index 000000000..8cb3c68ff --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesAddResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Result of registering a new marketplace. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsMarketplacesAddResult( + /** Final name of the marketplace as resolved from its manifest */ + @JsonProperty("name") String name +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesBrowseParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesBrowseParams.java new file mode 100644 index 000000000..7e1942494 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesBrowseParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Name of the marketplace whose plugin catalog to fetch. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsMarketplacesBrowseParams( + /** Marketplace name to browse */ + @JsonProperty("name") String name +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesBrowseResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesBrowseResult.java new file mode 100644 index 000000000..5611cc5eb --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesBrowseResult.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Plugins advertised by the marketplace. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsMarketplacesBrowseResult( + /** Plugins advertised by the marketplace */ + @JsonProperty("plugins") List plugins +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesListResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesListResult.java new file mode 100644 index 000000000..42942802e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesListResult.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * All registered marketplaces, including built-in defaults. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsMarketplacesListResult( + /** Registered marketplaces */ + @JsonProperty("marketplaces") List marketplaces +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesRefreshResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesRefreshResult.java new file mode 100644 index 000000000..08de984aa --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesRefreshResult.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Result of refreshing one or more marketplace catalogs. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsMarketplacesRefreshResult( + /** Per-marketplace refresh results in deterministic order. */ + @JsonProperty("results") List results +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesRemoveParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesRemoveParams.java new file mode 100644 index 000000000..41dfcd6fb --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesRemoveParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Name of the marketplace to remove and an optional force flag. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsMarketplacesRemoveParams( + /** Marketplace name to remove */ + @JsonProperty("name") String name, + /** When true, also uninstall every plugin sourced from this marketplace. When false (default), removal is a no-op if any plugin from this marketplace is installed and the dependent plugin names are returned in the result. */ + @JsonProperty("force") Boolean force +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesRemoveResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesRemoveResult.java new file mode 100644 index 000000000..22c88c3d2 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsMarketplacesRemoveResult.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Outcome of the remove attempt, including dependent-plugin info when applicable. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsMarketplacesRemoveResult( + /** True when the marketplace was actually removed. False when removal was skipped because the marketplace has dependent plugins and `force` was not set. */ + @JsonProperty("removed") Boolean removed, + /** Names of installed plugins that prevented removal. Populated only when `removed=false`. */ + @JsonProperty("dependentPlugins") List dependentPlugins +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsUninstallParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsUninstallParams.java new file mode 100644 index 000000000..2a23bd6a0 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsUninstallParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Name (or spec) of the plugin to uninstall. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsUninstallParams( + /** Plugin name or "plugin@marketplace" spec to uninstall. When ambiguous, prefer the fully-qualified spec. */ + @JsonProperty("name") String name +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsUpdateAllResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsUpdateAllResult.java new file mode 100644 index 000000000..43a12fb99 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsUpdateAllResult.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Result of updating all installed plugins. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsUpdateAllResult( + /** Per-plugin update results in deterministic order. */ + @JsonProperty("results") List results +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsUpdateParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsUpdateParams.java new file mode 100644 index 000000000..e88392f87 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsUpdateParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Name (or spec) of the plugin to update. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsUpdateParams( + /** Plugin name or "plugin@marketplace" spec to update. */ + @JsonProperty("name") String name +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginsUpdateResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsUpdateResult.java new file mode 100644 index 000000000..008a27062 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginsUpdateResult.java @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Result of updating a single plugin. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsUpdateResult( + /** Version that was previously installed, when available */ + @JsonProperty("previousVersion") String previousVersion, + /** Version after the update, when reported by the plugin manifest */ + @JsonProperty("newVersion") String newVersion, + /** Number of skills discovered and installed after the update */ + @JsonProperty("skillsInstalled") Long skillsInstalled +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfig.java b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfig.java new file mode 100644 index 000000000..f9edc9983 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfig.java @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import javax.annotation.processing.Generated; + +/** + * Custom model-provider configuration (BYOK). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record ProviderConfig( + /** Provider type. Defaults to "openai" for generic OpenAI-compatible APIs. */ + @JsonProperty("type") ProviderConfigType type, + /** Wire API format (openai/azure only). Defaults to "completions". */ + @JsonProperty("wireApi") ProviderConfigWireApi wireApi, + /** API endpoint URL. */ + @JsonProperty("baseUrl") String baseUrl, + /** API key. Optional for local providers like Ollama. */ + @JsonProperty("apiKey") String apiKey, + /** Bearer token for authentication. Sets the Authorization header directly. Takes precedence over apiKey when both are set. */ + @JsonProperty("bearerToken") String bearerToken, + /** Azure-specific provider options. */ + @JsonProperty("azure") ProviderConfigAzure azure, + /** Well-known model ID used for capability lookup. When set, agent behavior config and token limits are inferred from this model. */ + @JsonProperty("modelId") String modelId, + /** The model identifier sent to the provider API for inference (the "wire" model), as opposed to modelId which is the well-known base. */ + @JsonProperty("wireModel") String wireModel, + /** Maximum prompt/input tokens for the model. */ + @JsonProperty("maxPromptTokens") Double maxPromptTokens, + /** Maximum context window tokens for the model. */ + @JsonProperty("maxContextWindowTokens") Double maxContextWindowTokens, + /** Maximum output tokens for the model. */ + @JsonProperty("maxOutputTokens") Double maxOutputTokens, + /** Custom HTTP headers to include in all outbound requests to the provider. */ + @JsonProperty("headers") Map headers +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfigAzure.java b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfigAzure.java new file mode 100644 index 000000000..02653c657 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfigAzure.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Azure-specific provider options. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record ProviderConfigAzure( + /** API version. When set, uses the versioned deployment route. When omitted, uses the GA versionless v1 route. */ + @JsonProperty("apiVersion") String apiVersion +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfigType.java b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfigType.java new file mode 100644 index 000000000..6df0aaccc --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfigType.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Provider type. Defaults to "openai" for generic OpenAI-compatible APIs. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum ProviderConfigType { + /** The {@code openai} variant. */ + OPENAI("openai"), + /** The {@code azure} variant. */ + AZURE("azure"), + /** The {@code anthropic} variant. */ + ANTHROPIC("anthropic"); + + private final String value; + ProviderConfigType(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static ProviderConfigType fromValue(String value) { + for (ProviderConfigType v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown ProviderConfigType value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfigWireApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfigWireApi.java new file mode 100644 index 000000000..cf66b3e61 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderConfigWireApi.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Wire API format (openai/azure only). Defaults to "completions". + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum ProviderConfigWireApi { + /** The {@code completions} variant. */ + COMPLETIONS("completions"), + /** The {@code responses} variant. */ + RESPONSES("responses"); + + private final String value; + ProviderConfigWireApi(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static ProviderConfigWireApi fromValue(String value) { + for (ProviderConfigWireApi v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown ProviderConfigWireApi value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/RemoteControlConfig.java b/java/src/generated/java/com/github/copilot/generated/rpc/RemoteControlConfig.java new file mode 100644 index 000000000..e65184802 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/RemoteControlConfig.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Configuration for the runtime-managed remote-control singleton. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record RemoteControlConfig( + /** Whether remote export should be enabled. */ + @JsonProperty("remote") Boolean remote, + /** Whether the MC session may steer the local session (write mode). */ + @JsonProperty("steerable") Boolean steerable, + /** Whether the user explicitly requested remote (vs. implicit session-sync). Controls warning surfacing for missing-repo cases. */ + @JsonProperty("explicit") Boolean explicit, + /** When true, suppresses timeline messages on successful setup. */ + @JsonProperty("silent") Boolean silent, + /** Existing Mission Control task ID to attach the exported session to. */ + @JsonProperty("taskId") String taskId, + /** Reattach to an existing MC session without creating a new one. */ + @JsonProperty("existingMcSession") RemoteControlConfigExistingMcSession existingMcSession +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/RemoteControlConfigExistingMcSession.java b/java/src/generated/java/com/github/copilot/generated/rpc/RemoteControlConfigExistingMcSession.java new file mode 100644 index 000000000..6bea2c133 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/RemoteControlConfigExistingMcSession.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Reattach to an existing MC session without creating a new one. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record RemoteControlConfigExistingMcSession( + /** Existing MC session ID to reattach to. */ + @JsonProperty("mcSessionId") String mcSessionId, + /** Existing MC task ID for the reattached session. */ + @JsonProperty("mcTaskId") String mcTaskId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataRepository.java b/java/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataRepository.java new file mode 100644 index 000000000..c5fce60b3 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataRepository.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * GitHub repository the remote session belongs to. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record RemoteSessionMetadataRepository( + /** Repository owner. */ + @JsonProperty("owner") String owner, + /** Repository name. */ + @JsonProperty("name") String name, + /** Branch associated with the remote session. */ + @JsonProperty("branch") String branch +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataTaskType.java b/java/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataTaskType.java new file mode 100644 index 000000000..062b43e7f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataTaskType.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Whether the remote task originated from CCA or CLI `--remote`. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum RemoteSessionMetadataTaskType { + /** The {@code cca} variant. */ + CCA("cca"), + /** The {@code cli} variant. */ + CLI("cli"); + + private final String value; + RemoteSessionMetadataTaskType(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static RemoteSessionMetadataTaskType fromValue(String value) { + for (RemoteSessionMetadataTaskType v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown RemoteSessionMetadataTaskType value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataValue.java b/java/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataValue.java new file mode 100644 index 000000000..46f1077d9 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataValue.java @@ -0,0 +1,54 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Remote session metadata for the session to hand off (typically obtained from `sessions.list` with `source: "remote"`). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record RemoteSessionMetadataValue( + /** Stable session identifier. */ + @JsonProperty("sessionId") String sessionId, + /** Session creation time as an ISO 8601 timestamp. */ + @JsonProperty("startTime") String startTime, + /** Last-modified time as an ISO 8601 timestamp. */ + @JsonProperty("modifiedTime") String modifiedTime, + /** Short summary of the session, when one has been derived. */ + @JsonProperty("summary") String summary, + /** Optional human-friendly name set via /rename. */ + @JsonProperty("name") String name, + /** Always true for remote sessions. */ + @JsonProperty("isRemote") Boolean isRemote, + /** Most recent working directory context. */ + @JsonProperty("context") SessionContext context, + /** GitHub repository the remote session belongs to. */ + @JsonProperty("repository") RemoteSessionMetadataRepository repository, + /** Backing remote session IDs (most recent first). */ + @JsonProperty("remoteSessionIds") List remoteSessionIds, + /** Pull request number associated with the session. */ + @JsonProperty("pullRequestNumber") Long pullRequestNumber, + /** Original remote resource identifier (task ID or PR node ID). */ + @JsonProperty("resourceId") String resourceId, + /** Whether the remote task originated from CCA or CLI `--remote`. */ + @JsonProperty("taskType") RemoteSessionMetadataTaskType taskType, + /** Deadline (ISO 8601) at which a CLI remote session becomes stale without further heartbeats. */ + @JsonProperty("staleAt") String staleAt, + /** Server-side task state returned by GitHub. */ + @JsonProperty("state") String state +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java new file mode 100644 index 000000000..29c25a5a6 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import javax.annotation.processing.Generated; + +/** + * Resolved sandbox configuration. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SandboxConfig( + /** Whether sandboxing is enabled for the session. */ + @JsonProperty("enabled") Boolean enabled, + /** User-managed sandbox policy fragment merged into the auto-discovered base policy. */ + @JsonProperty("userPolicy") SandboxConfigUserPolicy userPolicy, + /** Raw `ContainerConfig` (per `@microsoft/mxc-sdk`) passed directly to `spawnSandboxFromConfig`, bypassing policy merging. */ + @JsonProperty("config") Map config, + /** Whether to auto-add the current working directory to readwritePaths. Default: true. */ + @JsonProperty("addCurrentWorkingDirectory") Boolean addCurrentWorkingDirectory +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicy.java b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicy.java new file mode 100644 index 000000000..193e1c43e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicy.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * User-managed sandbox policy fragment merged into the auto-discovered base policy. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SandboxConfigUserPolicy( + /** Filesystem rules to merge into the base policy. */ + @JsonProperty("filesystem") SandboxConfigUserPolicyFilesystem filesystem, + /** Network rules to merge into the base policy. */ + @JsonProperty("network") SandboxConfigUserPolicyNetwork network, + /** Platform-specific experimental policy fields. */ + @JsonProperty("experimental") SandboxConfigUserPolicyExperimental experimental +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyExperimental.java b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyExperimental.java new file mode 100644 index 000000000..d1cf1f0b2 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyExperimental.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Platform-specific experimental policy fields. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SandboxConfigUserPolicyExperimental( + /** macOS seatbelt experimental options. */ + @JsonProperty("seatbelt") SandboxConfigUserPolicyExperimentalSeatbelt seatbelt +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyExperimentalSeatbelt.java b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyExperimentalSeatbelt.java new file mode 100644 index 000000000..888a50443 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyExperimentalSeatbelt.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * macOS seatbelt experimental options. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SandboxConfigUserPolicyExperimentalSeatbelt( + /** Whether the macOS seatbelt profile may access the keychain. */ + @JsonProperty("keychainAccess") Boolean keychainAccess +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyFilesystem.java b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyFilesystem.java new file mode 100644 index 000000000..d5e7612dc --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyFilesystem.java @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Filesystem rules to merge into the base policy. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SandboxConfigUserPolicyFilesystem( + /** Paths granted read/write access. */ + @JsonProperty("readwritePaths") List readwritePaths, + /** Paths granted read-only access. */ + @JsonProperty("readonlyPaths") List readonlyPaths, + /** Paths explicitly denied. */ + @JsonProperty("deniedPaths") List deniedPaths, + /** Whether to clear the policy when the session exits. */ + @JsonProperty("clearPolicyOnExit") Boolean clearPolicyOnExit +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyNetwork.java b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyNetwork.java new file mode 100644 index 000000000..d3d7b901f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyNetwork.java @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Network rules to merge into the base policy. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SandboxConfigUserPolicyNetwork( + /** Whether outbound network traffic is allowed at all. */ + @JsonProperty("allowOutbound") Boolean allowOutbound, + /** Whether traffic to local/loopback addresses is allowed. */ + @JsonProperty("allowLocalNetwork") Boolean allowLocalNetwork, + /** Hosts allowed in addition to the base policy. */ + @JsonProperty("allowedHosts") List allowedHosts, + /** Hosts explicitly blocked. */ + @JsonProperty("blockedHosts") List blockedHosts +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsApi.java new file mode 100644 index 000000000..164318c30 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsApi.java @@ -0,0 +1,102 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code plugins} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class ServerPluginsApi { + + private final RpcCaller caller; + + /** API methods for the {@code plugins.marketplaces} sub-namespace. */ + public final ServerPluginsMarketplacesApi marketplaces; + + /** @param caller the RPC transport function */ + ServerPluginsApi(RpcCaller caller) { + this.caller = caller; + this.marketplaces = new ServerPluginsMarketplacesApi(caller); + } + + /** + * Plugins installed in user/global state. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture list() { + return caller.invoke("plugins.list", java.util.Map.of(), PluginsListResult.class); + } + + /** + * Plugin source and optional working directory for relative-path resolution. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture install(PluginsInstallParams params) { + return caller.invoke("plugins.install", params, PluginsInstallResult.class); + } + + /** + * Name (or spec) of the plugin to uninstall. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture uninstall(PluginsUninstallParams params) { + return caller.invoke("plugins.uninstall", params, Void.class); + } + + /** + * Name (or spec) of the plugin to update. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture update(PluginsUpdateParams params) { + return caller.invoke("plugins.update", params, PluginsUpdateResult.class); + } + + /** + * Result of updating all installed plugins. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture updateAll() { + return caller.invoke("plugins.updateAll", java.util.Map.of(), PluginsUpdateAllResult.class); + } + + /** + * Plugin names (or specs) to enable. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture enable(PluginsEnableParams params) { + return caller.invoke("plugins.enable", params, Void.class); + } + + /** + * Plugin names (or specs) to disable. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture disable(PluginsDisableParams params) { + return caller.invoke("plugins.disable", params, Void.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsMarketplacesApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsMarketplacesApi.java new file mode 100644 index 000000000..401d55de3 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsMarketplacesApi.java @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code plugins.marketplaces} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class ServerPluginsMarketplacesApi { + + private final RpcCaller caller; + + /** @param caller the RPC transport function */ + ServerPluginsMarketplacesApi(RpcCaller caller) { + this.caller = caller; + } + + /** + * All registered marketplaces, including built-in defaults. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture list() { + return caller.invoke("plugins.marketplaces.list", java.util.Map.of(), PluginsMarketplacesListResult.class); + } + + /** + * Marketplace source to register. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture add(PluginsMarketplacesAddParams params) { + return caller.invoke("plugins.marketplaces.add", params, PluginsMarketplacesAddResult.class); + } + + /** + * Name of the marketplace to remove and an optional force flag. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture remove(PluginsMarketplacesRemoveParams params) { + return caller.invoke("plugins.marketplaces.remove", params, PluginsMarketplacesRemoveResult.class); + } + + /** + * Name of the marketplace whose plugin catalog to fetch. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture browse(PluginsMarketplacesBrowseParams params) { + return caller.invoke("plugins.marketplaces.browse", params, PluginsMarketplacesBrowseResult.class); + } + + /** + * Optional marketplace name; omit to refresh all. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture refresh() { + return caller.invoke("plugins.marketplaces.refresh", java.util.Map.of(), PluginsMarketplacesRefreshResult.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ServerRpc.java b/java/src/generated/java/com/github/copilot/generated/rpc/ServerRpc.java index 38b76b581..435de1054 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/ServerRpc.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ServerRpc.java @@ -34,6 +34,8 @@ public final class ServerRpc { public final ServerSecretsApi secrets; /** API methods for the {@code mcp} namespace. */ public final ServerMcpApi mcp; + /** API methods for the {@code plugins} namespace. */ + public final ServerPluginsApi plugins; /** API methods for the {@code skills} namespace. */ public final ServerSkillsApi skills; /** API methods for the {@code user} namespace. */ @@ -59,6 +61,7 @@ public ServerRpc(RpcCaller caller) { this.account = new ServerAccountApi(caller); this.secrets = new ServerSecretsApi(caller); this.mcp = new ServerMcpApi(caller); + this.plugins = new ServerPluginsApi(caller); this.skills = new ServerSkillsApi(caller); this.user = new ServerUserApi(caller); this.runtime = new ServerRuntimeApi(caller); diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ServerSessionsApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/ServerSessionsApi.java index ece70c84a..1675ca455 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/ServerSessionsApi.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ServerSessionsApi.java @@ -25,6 +25,16 @@ public final class ServerSessionsApi { this.caller = caller; } + /** + * Open a session by creating, resuming, attaching, connecting to a remote, or handing off. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture open() { + return caller.invoke("sessions.open", java.util.Map.of(), SessionsOpenResult.class); + } + /** * Source session identifier to fork from, optional event-ID boundary, and optional friendly name for the new session. * @@ -46,7 +56,7 @@ public CompletableFuture connect() { } /** - * Optional metadata-load limit and filters applied to the returned sessions. + * Optional source filter, metadata-load limit, and context filter applied to the returned sessions. * * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 @@ -215,4 +225,94 @@ public CompletableFuture setAdditionalPlugins(SessionsSetAdditionalPlugins return caller.invoke("sessions.setAdditionalPlugins", params, Void.class); } + /** + * Session ID whose board entry count should be returned. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture getBoardEntryCount() { + return caller.invoke("sessions.getBoardEntryCount", java.util.Map.of(), SessionsGetBoardEntryCountResult.class); + } + + /** + * Parameters for attaching the remote-control singleton to a session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture startRemoteControl(SessionsStartRemoteControlParams params) { + return caller.invoke("sessions.startRemoteControl", params, SessionsStartRemoteControlResult.class); + } + + /** + * Parameters for atomically rebinding the remote-control singleton. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture transferRemoteControl(SessionsTransferRemoteControlParams params) { + return caller.invoke("sessions.transferRemoteControl", params, SessionsTransferRemoteControlResult.class); + } + + /** + * Patch for the singleton's steering state. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture setRemoteControlSteering(SessionsSetRemoteControlSteeringParams params) { + return caller.invoke("sessions.setRemoteControlSteering", params, SessionsSetRemoteControlSteeringResult.class); + } + + /** + * Parameters for stopping the remote-control singleton. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture stopRemoteControl() { + return caller.invoke("sessions.stopRemoteControl", java.util.Map.of(), SessionsStopRemoteControlResult.class); + } + + /** + * Wrapper for the singleton's current status. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture getRemoteControlStatus() { + return caller.invoke("sessions.getRemoteControlStatus", java.util.Map.of(), SessionsGetRemoteControlStatusResult.class); + } + + /** + * Cursor and optional long-poll wait for polling runtime-spawned sessions. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture pollSpawnedSessions() { + return caller.invoke("sessions.pollSpawnedSessions", java.util.Map.of(), SessionsPollSpawnedSessionsResult.class); + } + + /** + * Params to attach an extension loader's tools to a session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture registerExtensionToolsOnSession(SessionsRegisterExtensionToolsOnSessionParams params) { + return caller.invoke("sessions.registerExtensionToolsOnSession", params, SessionsRegisterExtensionToolsOnSessionResult.class); + } + + /** + * Params to attach or detach an in-process ExtensionController delegate. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture configureSessionExtensions(SessionsConfigureSessionExtensionsParams params) { + return caller.invoke("sessions.configureSessionExtensions", params, Void.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionCapability.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionCapability.java new file mode 100644 index 000000000..3611b0680 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionCapability.java @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Session capability enabled for this session + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum SessionCapability { + /** The {@code tui-hints} variant. */ + TUI_HINTS("tui-hints"), + /** The {@code plan-mode} variant. */ + PLAN_MODE("plan-mode"), + /** The {@code memory} variant. */ + MEMORY("memory"), + /** The {@code cli-documentation} variant. */ + CLI_DOCUMENTATION("cli-documentation"), + /** The {@code ask-user} variant. */ + ASK_USER("ask-user"), + /** The {@code interactive-mode} variant. */ + INTERACTIVE_MODE("interactive-mode"), + /** The {@code system-notifications} variant. */ + SYSTEM_NOTIFICATIONS("system-notifications"), + /** The {@code elicitation} variant. */ + ELICITATION("elicitation"), + /** The {@code session-store} variant. */ + SESSION_STORE("session-store"), + /** The {@code mcp-apps} variant. */ + MCP_APPS("mcp-apps"), + /** The {@code canvas-renderer} variant. */ + CANVAS_RENDERER("canvas-renderer"); + + private final String value; + SessionCapability(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static SessionCapability fromValue(String value) { + for (SessionCapability v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown SessionCapability value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionContext.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionContext.java index 50376a0f0..12ef324c6 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionContext.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionContext.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `SessionContext` type. + * Pre-resolved working-directory context for session startup. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpApi.java index c9e577fd5..272dc16ce 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpApi.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpApi.java @@ -46,6 +46,21 @@ public CompletableFuture list() { return caller.invoke("session.mcp.list", java.util.Map.of("sessionId", this.sessionId), SessionMcpListResult.class); } + /** + * Server name whose tool list should be returned. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture listTools(SessionMcpListToolsParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.listTools", _p, SessionMcpListToolsResult.class); + } + /** * Name of the MCP server to enable for the session. *

@@ -86,6 +101,21 @@ public CompletableFuture reload() { return caller.invoke("session.mcp.reload", java.util.Map.of("sessionId", this.sessionId), Void.class); } + /** + * Opaque MCP reload configuration. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture reloadWithConfig(SessionMcpReloadWithConfigParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.reloadWithConfig", _p, SessionMcpReloadWithConfigResult.class); + } + /** * Identifiers and raw MCP CreateMessageRequest params used to run a sampling inference. *

@@ -141,4 +171,109 @@ public CompletableFuture removeGitHub() { return caller.invoke("session.mcp.removeGitHub", java.util.Map.of("sessionId", this.sessionId), SessionMcpRemoveGitHubResult.class); } + /** + * Opaque auth info used to configure GitHub MCP. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture configureGitHub(SessionMcpConfigureGitHubParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.configureGitHub", _p, SessionMcpConfigureGitHubResult.class); + } + + /** + * Server name and opaque configuration for an individual MCP server start. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture startServer(SessionMcpStartServerParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.startServer", _p, Void.class); + } + + /** + * Server name and opaque configuration for an individual MCP server restart. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture restartServer(SessionMcpRestartServerParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.restartServer", _p, Void.class); + } + + /** + * Server name for an individual MCP server stop. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture stopServer(SessionMcpStopServerParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.stopServer", _p, Void.class); + } + + /** + * Registration parameters for an external MCP client. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture registerExternalClient(SessionMcpRegisterExternalClientParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.registerExternalClient", _p, Void.class); + } + + /** + * Server name identifying the external client to remove. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture unregisterExternalClient(SessionMcpUnregisterExternalClientParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.unregisterExternalClient", _p, Void.class); + } + + /** + * Server name to check running status for. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture isServerRunning(SessionMcpIsServerRunningParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.isServerRunning", _p, SessionMcpIsServerRunningResult.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpConfigureGitHubParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpConfigureGitHubParams.java new file mode 100644 index 000000000..5495f634a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpConfigureGitHubParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Opaque auth info used to configure GitHub MCP. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpConfigureGitHubParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Opaque runtime auth info for GitHub MCP configuration. Marked internal: an in-process runtime shape (configureGitHubMcp is a no-op over the wire). */ + @JsonProperty("authInfo") Object authInfo +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpConfigureGitHubResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpConfigureGitHubResult.java new file mode 100644 index 000000000..360fc36c0 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpConfigureGitHubResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Result of configuring GitHub MCP. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpConfigureGitHubResult( + /** Whether GitHub MCP configuration changed. */ + @JsonProperty("changed") Boolean changed +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpIsServerRunningParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpIsServerRunningParams.java new file mode 100644 index 000000000..97293366c --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpIsServerRunningParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Server name to check running status for. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpIsServerRunningParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Name of the MCP server to check */ + @JsonProperty("serverName") String serverName +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpIsServerRunningResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpIsServerRunningResult.java new file mode 100644 index 000000000..008169cf3 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpIsServerRunningResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Whether the named MCP server is running. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpIsServerRunningResult( + /** True if the server has an active client and transport. */ + @JsonProperty("running") Boolean running +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpListResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpListResult.java index d855c85f7..f7eab6b0e 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpListResult.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpListResult.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * MCP servers configured for the session, with their connection status. + * MCP servers configured for the session, with their connection status and host-level state. * * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 @@ -24,6 +24,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record SessionMcpListResult( /** Configured MCP servers */ - @JsonProperty("servers") List servers + @JsonProperty("servers") List servers, + /** Host-level state, omitted when no MCP host is initialized. */ + @JsonProperty("host") McpHostState host ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpListToolsParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpListToolsParams.java new file mode 100644 index 000000000..ebb40ab8b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpListToolsParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Server name whose tool list should be returned. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpListToolsParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Name of the connected MCP server whose tools to list. */ + @JsonProperty("serverName") String serverName +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpListToolsResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpListToolsResult.java new file mode 100644 index 000000000..f6fbd25e6 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpListToolsResult.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Tools exposed by the connected MCP server. Throws when the server is not connected. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpListToolsResult( + /** Tools exposed by the server. */ + @JsonProperty("tools") List tools +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthApi.java index 68535ebc4..0df8c7e21 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthApi.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthApi.java @@ -29,6 +29,21 @@ public final class SessionMcpOauthApi { this.sessionId = sessionId; } + /** + * MCP OAuth request id and optional provider response. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture respond(SessionMcpOauthRespondParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.oauth.respond", _p, Void.class); + } + /** * Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, and the callback success-page copy. *

diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthRespondParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthRespondParams.java new file mode 100644 index 000000000..ae8e8f210 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthRespondParams.java @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * MCP OAuth request id and optional provider response. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpOauthRespondParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** OAuth request identifier from mcp.oauth_required */ + @JsonProperty("requestId") String requestId, + /** In-process OAuthClientProvider instance, or omitted to deny. Marked internal: cannot be serialized across the JSON-RPC boundary. */ + @JsonProperty("provider") Object provider +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpRegisterExternalClientParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpRegisterExternalClientParams.java new file mode 100644 index 000000000..b9f248dc6 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpRegisterExternalClientParams.java @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Registration parameters for an external MCP client. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpRegisterExternalClientParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Logical server name for the external client */ + @JsonProperty("serverName") String serverName, + /** In-process MCP Client instance. Marked internal: cannot be serialized across the JSON-RPC boundary. */ + @JsonProperty("client") Object client, + /** In-process MCP Transport instance. Marked internal: cannot be serialized across the JSON-RPC boundary. */ + @JsonProperty("transport") Object transport, + /** In-process server config (MCPServerConfig) paired with the in-process client/transport. Marked internal alongside its companions. */ + @JsonProperty("config") Object config +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadWithConfigParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadWithConfigParams.java new file mode 100644 index 000000000..585e9686e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadWithConfigParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Opaque MCP reload configuration. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpReloadWithConfigParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Opaque runtime MCP reload configuration. Marked internal: an in-process runtime shape (reloadMcpServers throws over the wire). */ + @JsonProperty("config") Object config +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadWithConfigResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadWithConfigResult.java new file mode 100644 index 000000000..b423b6bb5 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadWithConfigResult.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * MCP server startup filtering result. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpReloadWithConfigResult( + /** Servers filtered out before startup */ + @JsonProperty("filteredServers") List filteredServers, + /** Non-default servers allowed by policy */ + @JsonProperty("allowedServers") List allowedServers +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpRestartServerParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpRestartServerParams.java new file mode 100644 index 000000000..8632db643 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpRestartServerParams.java @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Server name and opaque configuration for an individual MCP server restart. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpRestartServerParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Name of the MCP server to restart */ + @JsonProperty("serverName") String serverName, + /** Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime shape supplied only by in-process CLI callers. */ + @JsonProperty("config") Object config +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpStartServerParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpStartServerParams.java new file mode 100644 index 000000000..b6f486d82 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpStartServerParams.java @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Server name and opaque configuration for an individual MCP server start. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpStartServerParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Name of the MCP server to start */ + @JsonProperty("serverName") String serverName, + /** Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime shape supplied only by in-process CLI callers. */ + @JsonProperty("config") Object config +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpStopServerParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpStopServerParams.java new file mode 100644 index 000000000..32921d16d --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpStopServerParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Server name for an individual MCP server stop. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpStopServerParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Name of the MCP server to stop */ + @JsonProperty("serverName") String serverName +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpUnregisterExternalClientParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpUnregisterExternalClientParams.java new file mode 100644 index 000000000..ba2513501 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMcpUnregisterExternalClientParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Server name identifying the external client to remove. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpUnregisterExternalClientParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Server name of the external client to unregister */ + @JsonProperty("serverName") String serverName +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataActivityParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataActivityParams.java new file mode 100644 index 000000000..a39ea35dd --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataActivityParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataActivityParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataActivityResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataActivityResult.java new file mode 100644 index 000000000..86ae2a743 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataActivityResult.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Current activity flags for the session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataActivityResult( + /** Whether an in-flight operation can currently be aborted. */ + @JsonProperty("abortable") Boolean abortable, + /** Whether the session currently has active work, including running turns or tasks. */ + @JsonProperty("hasActiveWork") Boolean hasActiveWork +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataApi.java index 7bd7e66bb..6a4e4d4f7 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataApi.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataApi.java @@ -49,6 +49,16 @@ public CompletableFuture isProcessing() { return caller.invoke("session.metadata.isProcessing", java.util.Map.of("sessionId", this.sessionId), SessionMetadataIsProcessingResult.class); } + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture activity() { + return caller.invoke("session.metadata.activity", java.util.Map.of("sessionId", this.sessionId), SessionMetadataActivityResult.class); + } + /** * Model identifier and token limits used to compute the context-info breakdown. *

diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataContextInfoResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataContextInfoResult.java index 70f082502..79f721cc7 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataContextInfoResult.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataContextInfoResult.java @@ -46,7 +46,7 @@ public record SessionMetadataContextInfoResultContextInfo( @JsonProperty("promptTokenLimit") Long promptTokenLimit, /** Token count at which background compaction starts (configurable percentage of promptTokenLimit) */ @JsonProperty("compactionThreshold") Long compactionThreshold, - /** Total context limit for /context display: promptTokenLimit + outputTokenLimit (the model's full max_output_tokens reserved on top of the prompt budget). */ + /** Prompt token limit plus the model's full output token limit. */ @JsonProperty("limit") Long limit, /** Output reserve plus tokens after the buffer-exhaustion blocking threshold (default 95%) */ @JsonProperty("bufferTokens") Long bufferTokens diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataSnapshotResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataSnapshotResult.java index 092c6302a..8f36bcc26 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataSnapshotResult.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataSnapshotResult.java @@ -71,6 +71,8 @@ public record SessionMetadataSnapshotResultWorkspace( @JsonProperty("branch") String branch, /** Display name for the session, if set */ @JsonProperty("name") String name, + /** Whether the display name was explicitly set by the user */ + @JsonProperty("user_named") Boolean userNamed, /** ISO 8601 timestamp when the workspace was created */ @JsonProperty("created_at") OffsetDateTime createdAt, /** ISO 8601 timestamp when the workspace was last updated */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java index 20adaee6d..0f4518e1e 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java @@ -28,8 +28,12 @@ public record SessionOptionsUpdateParams( @JsonProperty("sessionId") String sessionId, /** The model ID to use for assistant turns. */ @JsonProperty("model") String model, + /** Per-property model capability overrides for the selected model. */ + @JsonProperty("modelCapabilitiesOverrides") ModelCapabilitiesOverride modelCapabilitiesOverrides, /** Reasoning effort for the selected model (model-defined enum). */ @JsonProperty("reasoningEffort") String reasoningEffort, + /** Reasoning summary mode for supported model clients. */ + @JsonProperty("reasoningSummary") OptionsUpdateReasoningSummary reasoningSummary, /** Identifier of the client driving the session. */ @JsonProperty("clientName") String clientName, /** Identifier sent to LSP-style integrations. */ @@ -40,8 +44,8 @@ public record SessionOptionsUpdateParams( @JsonProperty("featureFlags") Map featureFlags, /** Whether experimental capabilities are enabled. */ @JsonProperty("isExperimentalMode") Boolean isExperimentalMode, - /** Custom model-provider configuration (BYOK). Opaque shape; see `ProviderConfig` in the runtime. */ - @JsonProperty("provider") Object provider, + /** Custom model-provider configuration (BYOK). */ + @JsonProperty("provider") ProviderConfig provider, /** Absolute working-directory path for shell tools. */ @JsonProperty("workingDirectory") String workingDirectory, /** Allowlist of tool names available to this session. */ @@ -56,8 +60,8 @@ public record SessionOptionsUpdateParams( @JsonProperty("shellInitProfile") String shellInitProfile, /** Per-shell process flags (e.g., `pwsh` arguments). */ @JsonProperty("shellProcessFlags") List shellProcessFlags, - /** Sandbox configuration shape; opaque to SDK consumers. See `SandboxConfig` in the runtime. */ - @JsonProperty("sandboxConfig") Object sandboxConfig, + /** Resolved sandbox configuration. */ + @JsonProperty("sandboxConfig") SandboxConfig sandboxConfig, /** Whether interactive shell sessions are logged. */ @JsonProperty("logInteractiveShells") Boolean logInteractiveShells, /** How env values are passed to MCP servers (`direct` inlines literal values; `indirect` resolves at launch). */ @@ -98,10 +102,12 @@ public record SessionOptionsUpdateParams( @JsonProperty("agentContext") String agentContext, /** Override directory for the session-events log. When unset, the runtime's default events log directory is used. */ @JsonProperty("eventsLogDirectory") String eventsLogDirectory, - /** Additional content-exclusion policies to merge into the session's policy set. Opaque shape; see `ContentExclusionApiResponse` in the runtime. */ - @JsonProperty("additionalContentExclusionPolicies") List additionalContentExclusionPolicies, + /** Additional content-exclusion policies to merge into the session's policy set. */ + @JsonProperty("additionalContentExclusionPolicies") List additionalContentExclusionPolicies, /** Whether to expose the `manage_schedule` tool to the agent. The runtime always owns the per-session schedule registry; this flag only controls tool exposure (typically gated to staff users). */ @JsonProperty("manageScheduleEnabled") Boolean manageScheduleEnabled, + /** Replaces the session's capability set with the given list. Use to enable or disable capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the field to leave the existing capability set unchanged. */ + @JsonProperty("sessionCapabilities") List sessionCapabilities, /** Whether to skip embedding retrieval pipeline initialization and execution. */ @JsonProperty("skipEmbeddingRetrieval") Boolean skipEmbeddingRetrieval, /** Organization-level custom instructions to inject into the system prompt. */ @@ -113,6 +119,8 @@ public record SessionOptionsUpdateParams( /** Whether to enable cross-session store writes and reads. */ @JsonProperty("enableSessionStore") Boolean enableSessionStore, /** Whether to enable skill directory scanning and loading. Falls back to enableConfigDiscovery when unset. */ - @JsonProperty("enableSkills") Boolean enableSkills + @JsonProperty("enableSkills") Boolean enableSkills, + /** Context tier for models with tiered pricing. The session uses this to derive effective `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits honor the selected tier. */ + @JsonProperty("contextTier") OptionsUpdateContextTier contextTier ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanApi.java index 25ff6884f..486d99378 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanApi.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanApi.java @@ -64,4 +64,14 @@ public CompletableFuture delete() { return caller.invoke("session.plan.delete", java.util.Map.of("sessionId", this.sessionId), Void.class); } + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture readSqlTodos() { + return caller.invoke("session.plan.readSqlTodos", java.util.Map.of("sessionId", this.sessionId), SessionPlanReadSqlTodosResult.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosParams.java new file mode 100644 index 000000000..86197c2c3 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPlanReadSqlTodosParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosResult.java new file mode 100644 index 000000000..1f02679bf --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosResult.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Todo rows read from the session SQL database. Empty when no session database is available. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPlanReadSqlTodosResult( + /** Rows from the session SQL todos table, ordered by creation time and id. */ + @JsonProperty("rows") List rows +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPluginsApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPluginsApi.java index e59e2b398..ffb30b805 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPluginsApi.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPluginsApi.java @@ -37,4 +37,14 @@ public CompletableFuture list() { return caller.invoke("session.plugins.list", java.util.Map.of("sessionId", this.sessionId), SessionPluginsListResult.class); } + /** + * Optional flags controlling which side effects the reload performs. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture reload() { + return caller.invoke("session.plugins.reload", java.util.Map.of("sessionId", this.sessionId), Void.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPluginsReloadParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPluginsReloadParams.java new file mode 100644 index 000000000..e976aabe7 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPluginsReloadParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Optional flags controlling which side effects the reload performs. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPluginsReloadParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSendParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSendParams.java index 8c645c94a..94a3baf06 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSendParams.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSendParams.java @@ -40,8 +40,8 @@ public record SessionSendParams( @JsonProperty("billable") Boolean billable, /** If set, the request will fail if the named tool is not available when this message is among the user messages at the start of the current exchange */ @JsonProperty("requiredTool") String requiredTool, - /** Optional provenance tag copied to the resulting user.message event. Supported values are `system`, `command-*`, and `schedule-*`. */ - @JsonProperty("source") Object source, + /** Optional provenance tag copied to the resulting user.message event. Must match one of three forms: the literal `system`, `command-` for messages originating from a command (e.g. slash command, Mission Control command), or `schedule-` for messages originating from a scheduled job. */ + @JsonProperty("source") String source, /** The UI mode the agent was in when this message was sent. Defaults to the session's current mode. */ @JsonProperty("agentMode") SendAgentMode agentMode, /** Custom HTTP headers to include in outbound model requests for this turn. Merged with session-level provider headers; per-turn headers augment and overwrite session-level headers with the same key. */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellApi.java index 9abf8a626..2762dae50 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellApi.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellApi.java @@ -59,4 +59,34 @@ public CompletableFuture kill(SessionShellKillParams par return caller.invoke("session.shell.kill", _p, SessionShellKillResult.class); } + /** + * User-requested shell command and cancellation handle. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture executeUserRequested(SessionShellExecuteUserRequestedParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.shell.executeUserRequested", _p, SessionShellExecuteUserRequestedResult.class); + } + + /** + * User-requested shell execution cancellation handle. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture cancelUserRequested(SessionShellCancelUserRequestedParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.shell.cancelUserRequested", _p, SessionShellCancelUserRequestedResult.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellCancelUserRequestedParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellCancelUserRequestedParams.java new file mode 100644 index 000000000..e98c972cc --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellCancelUserRequestedParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * User-requested shell execution cancellation handle. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionShellCancelUserRequestedParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Request ID previously passed to executeUserRequested */ + @JsonProperty("requestId") String requestId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellCancelUserRequestedResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellCancelUserRequestedResult.java new file mode 100644 index 000000000..304bef7b8 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellCancelUserRequestedResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Cancellation result for a user-requested shell command. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionShellCancelUserRequestedResult( + /** Whether an in-flight execution was found and signalled to cancel */ + @JsonProperty("cancelled") Boolean cancelled +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellExecuteUserRequestedParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellExecuteUserRequestedParams.java new file mode 100644 index 000000000..01b0e0504 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellExecuteUserRequestedParams.java @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * User-requested shell command and cancellation handle. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionShellExecuteUserRequestedParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Caller-provided cancellation handle for this execution */ + @JsonProperty("requestId") String requestId, + /** Shell command to execute */ + @JsonProperty("command") String command +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellExecuteUserRequestedResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellExecuteUserRequestedResult.java new file mode 100644 index 000000000..b57a7cade --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionShellExecuteUserRequestedResult.java @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Result of a user-requested shell command. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionShellExecuteUserRequestedResult( + /** Tool call id emitted for the shell execution */ + @JsonProperty("toolCallId") String toolCallId, + /** Whether the command completed successfully */ + @JsonProperty("success") Boolean success, + /** Captured command output */ + @JsonProperty("output") String output, + /** Process exit code, when available */ + @JsonProperty("exitCode") Long exitCode, + /** Error output when the execution failed */ + @JsonProperty("error") String error +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionTelemetryApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionTelemetryApi.java index 92c24b4e8..5ea6e6181 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionTelemetryApi.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionTelemetryApi.java @@ -29,6 +29,16 @@ public final class SessionTelemetryApi { this.sessionId = sessionId; } + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture getEngagementId() { + return caller.invoke("session.telemetry.getEngagementId", java.util.Map.of("sessionId", this.sessionId), SessionTelemetryGetEngagementIdResult.class); + } + /** * Feature override key/value pairs to attach to subsequent telemetry events from this session. *

diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionTelemetryGetEngagementIdParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionTelemetryGetEngagementIdParams.java new file mode 100644 index 000000000..21d23fac4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionTelemetryGetEngagementIdParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionTelemetryGetEngagementIdParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionTelemetryGetEngagementIdResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionTelemetryGetEngagementIdResult.java new file mode 100644 index 000000000..e13278c6e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionTelemetryGetEngagementIdResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Telemetry engagement ID for the session, when available. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionTelemetryGetEngagementIdResult( + /** Current telemetry engagement ID, when available. */ + @JsonProperty("engagementId") String engagementId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiApi.java index c3116fe58..47e44f7eb 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiApi.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiApi.java @@ -29,6 +29,21 @@ public final class SessionUiApi { this.sessionId = sessionId; } + /** + * Transient question to answer without adding it to conversation history. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture ephemeralQuery(SessionUiEphemeralQueryParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.ui.ephemeralQuery", _p, SessionUiEphemeralQueryResult.class); + } + /** * Prompt message and JSON schema describing the form fields to elicit from the user. *

diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiEphemeralQueryParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiEphemeralQueryParams.java new file mode 100644 index 000000000..a59d2e7c2 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiEphemeralQueryParams.java @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Transient question to answer without adding it to conversation history. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiEphemeralQueryParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Question to answer from the current conversation context. */ + @JsonProperty("question") String question, + /** In-process streaming callback `(text) => void` invoked with each token as the model emits it. Marked internal: excluded from the public SDK surface. In a process-separated SDK this is replaced by a streaming RPC that yields chunks and a final answer. */ + @JsonProperty("onChunk") Object onChunk, + /** In-process `AbortSignal` forwarded to the model client to cancel an in-flight request. Marked internal: excluded from the public SDK surface. Replaced by an explicit cancellation token + cancel RPC in the SDK migration. */ + @JsonProperty("abortSignal") Object abortSignal +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiEphemeralQueryResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiEphemeralQueryResult.java new file mode 100644 index 000000000..46818e79b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiEphemeralQueryResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Transient answer generated from current conversation context. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiEphemeralQueryResult( + /** Full assistant response text. */ + @JsonProperty("answer") String answer +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsConfigureSessionExtensionsParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsConfigureSessionExtensionsParams.java new file mode 100644 index 000000000..6cc165042 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsConfigureSessionExtensionsParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Params to attach or detach an in-process ExtensionController delegate. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsConfigureSessionExtensionsParams( + /** Session to attach the extension controller delegate to. */ + @JsonProperty("sessionId") String sessionId, + /** In-process ExtensionController delegate (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. The post-SDK extension surface exposes list/enable/disable/reload via dedicated RPCs served by the runtime. */ + @JsonProperty("controller") Object controller +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsEnrichMetadataParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsEnrichMetadataParams.java index 2354a0375..435ea21e7 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsEnrichMetadataParams.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsEnrichMetadataParams.java @@ -24,6 +24,6 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record SessionsEnrichMetadataParams( /** Session metadata records to enrich. Records that already have summary and context are returned unchanged. */ - @JsonProperty("sessions") List sessions + @JsonProperty("sessions") List sessions ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsEnrichMetadataResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsEnrichMetadataResult.java index 20acf2578..73d68962a 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsEnrichMetadataResult.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsEnrichMetadataResult.java @@ -24,6 +24,6 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record SessionsEnrichMetadataResult( /** Enriched records, with summary and context backfilled. Sessions confirmed empty and unnamed may be omitted. */ - @JsonProperty("sessions") List sessions + @JsonProperty("sessions") List sessions ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsGetBoardEntryCountParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsGetBoardEntryCountParams.java new file mode 100644 index 000000000..1d5a2bbf3 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsGetBoardEntryCountParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Session ID whose board entry count should be returned. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsGetBoardEntryCountParams( + /** Session ID whose board entry count should be returned. */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsGetBoardEntryCountResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsGetBoardEntryCountResult.java new file mode 100644 index 000000000..639b1471a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsGetBoardEntryCountResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Dynamic-context board entry count, when available. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsGetBoardEntryCountResult( + /** Board entry count, when available. */ + @JsonProperty("count") Long count +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsGetRemoteControlStatusResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsGetRemoteControlStatusResult.java new file mode 100644 index 000000000..8ef9a161f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsGetRemoteControlStatusResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Wrapper for the singleton's current status. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsGetRemoteControlStatusResult( + /** State of the runtime-managed remote-control singleton. */ + @JsonProperty("status") Object status +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsListResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsListResult.java index b5376202a..bc2239b81 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsListResult.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsListResult.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Persisted sessions matching the filter, ordered most-recently-modified first. + * Sessions matching the filter, ordered most-recently-modified first. * * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionsListResult( - /** Sessions ordered most-recently-modified first */ - @JsonProperty("sessions") List sessions + /** Sessions ordered most-recently-modified first. Discriminated by `isRemote`. */ + @JsonProperty("sessions") List sessions ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgress.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgress.java new file mode 100644 index 000000000..44d1aa0de --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgress.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `SessionsOpenProgress` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsOpenProgress( + /** Handoff step. */ + @JsonProperty("step") SessionsOpenProgressStep step, + /** Step status. */ + @JsonProperty("status") SessionsOpenProgressStatus status, + /** Optional step message. */ + @JsonProperty("message") String message +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgressStatus.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgressStatus.java new file mode 100644 index 000000000..86a7798c9 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgressStatus.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Step status. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum SessionsOpenProgressStatus { + /** The {@code in-progress} variant. */ + IN_PROGRESS("in-progress"), + /** The {@code complete} variant. */ + COMPLETE("complete"); + + private final String value; + SessionsOpenProgressStatus(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static SessionsOpenProgressStatus fromValue(String value) { + for (SessionsOpenProgressStatus v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown SessionsOpenProgressStatus value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgressStep.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgressStep.java new file mode 100644 index 000000000..73465a3eb --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgressStep.java @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Handoff step. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum SessionsOpenProgressStep { + /** The {@code load-session} variant. */ + LOAD_SESSION("load-session"), + /** The {@code validate-repo} variant. */ + VALIDATE_REPO("validate-repo"), + /** The {@code check-changes} variant. */ + CHECK_CHANGES("check-changes"), + /** The {@code checkout-branch} variant. */ + CHECKOUT_BRANCH("checkout-branch"), + /** The {@code create-session} variant. */ + CREATE_SESSION("create-session"), + /** The {@code save-session} variant. */ + SAVE_SESSION("save-session"); + + private final String value; + SessionsOpenProgressStep(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static SessionsOpenProgressStep fromValue(String value) { + for (SessionsOpenProgressStep v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown SessionsOpenProgressStep value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenResult.java new file mode 100644 index 000000000..e1d652da9 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenResult.java @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Result of opening a session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsOpenResult( + /** Outcome of the open request. */ + @JsonProperty("status") SessionsOpenStatus status, + /** Opened session ID. Omitted when status is `not_found`. */ + @JsonProperty("sessionId") String sessionId, + /** In-process SessionClientApi handle for the opened session, returned to CLI callers as a transitional shortcut. Marked internal so the public SDK surface does not expose it; SDK consumers should construct per-session clients from `sessionId` instead. */ + @JsonProperty("sessionApi") Object sessionApi, + /** Startup prompts queued by user-level hook configs at session creation. Only populated when status is `created`; resumed sessions return an empty array. */ + @JsonProperty("startupPrompts") List startupPrompts, + /** Remote session ID, present when status is `connected`. */ + @JsonProperty("remoteSessionId") String remoteSessionId, + /** Remote session metadata, present when status is `connected`. */ + @JsonProperty("metadata") RemoteSessionMetadataValue metadata, + /** Handoff progress steps, present when status is `handed_off`. */ + @JsonProperty("progress") List progress +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenStatus.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenStatus.java new file mode 100644 index 000000000..1ebab5484 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenStatus.java @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Outcome of the open request. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum SessionsOpenStatus { + /** The {@code created} variant. */ + CREATED("created"), + /** The {@code resumed} variant. */ + RESUMED("resumed"), + /** The {@code not_found} variant. */ + NOT_FOUND("not_found"), + /** The {@code connected} variant. */ + CONNECTED("connected"), + /** The {@code handed_off} variant. */ + HANDED_OFF("handed_off"); + + private final String value; + SessionsOpenStatus(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static SessionsOpenStatus fromValue(String value) { + for (SessionsOpenStatus v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown SessionsOpenStatus value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsPollSpawnedSessionsEvent.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsPollSpawnedSessionsEvent.java new file mode 100644 index 000000000..09b6ed113 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsPollSpawnedSessionsEvent.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `SessionsPollSpawnedSessionsEvent` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsPollSpawnedSessionsEvent( + /** Session id of the newly-spawned session. */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsPollSpawnedSessionsResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsPollSpawnedSessionsResult.java new file mode 100644 index 000000000..caeed0c3c --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsPollSpawnedSessionsResult.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Batch of spawn events plus a cursor for follow-up polls. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsPollSpawnedSessionsResult( + /** Spawn events emitted since the supplied cursor. */ + @JsonProperty("events") List events, + /** Opaque cursor to pass back to receive only events after this batch. */ + @JsonProperty("cursor") String cursor +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsRegisterExtensionToolsOnSessionOptions.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsRegisterExtensionToolsOnSessionOptions.java new file mode 100644 index 000000000..440c01b2a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsRegisterExtensionToolsOnSessionOptions.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Optional registration options. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsRegisterExtensionToolsOnSessionOptions( + /** In-process `() => boolean` gating callback (CLI-only optimization). Marked internal: replaced by runtime-side enable/disable RPCs in the SDK migration. */ + @JsonProperty("enabled") Object enabled +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsRegisterExtensionToolsOnSessionParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsRegisterExtensionToolsOnSessionParams.java new file mode 100644 index 000000000..650809b54 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsRegisterExtensionToolsOnSessionParams.java @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Params to attach an extension loader's tools to a session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsRegisterExtensionToolsOnSessionParams( + /** Session to register extension tools on. */ + @JsonProperty("sessionId") String sessionId, + /** In-process ExtensionLoader handle (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, extension discovery/launch moves entirely into the runtime — the CLI passes pure config (search paths, disabled ids) via SessionOptions instead. */ + @JsonProperty("loader") Object loader, + /** Optional registration options. */ + @JsonProperty("options") SessionsRegisterExtensionToolsOnSessionOptions options +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsRegisterExtensionToolsOnSessionResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsRegisterExtensionToolsOnSessionResult.java new file mode 100644 index 000000000..b85b2c023 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsRegisterExtensionToolsOnSessionResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Handle for releasing the extension tool registration. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsRegisterExtensionToolsOnSessionResult( + /** In-process unsubscribe function (CLI-only optimization). Marked internal: replaced by an explicit `extensions.unregister` RPC in the SDK migration. */ + @JsonProperty("unsubscribe") Object unsubscribe +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsSetRemoteControlSteeringParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsSetRemoteControlSteeringParams.java new file mode 100644 index 000000000..e12dd07fe --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsSetRemoteControlSteeringParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Patch for the singleton's steering state. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsSetRemoteControlSteeringParams( + /** Target steering state. Today only `true` is actionable on the underlying exporter; `false` is reserved for future use. */ + @JsonProperty("enabled") Boolean enabled +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsSetRemoteControlSteeringResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsSetRemoteControlSteeringResult.java new file mode 100644 index 000000000..1de927231 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsSetRemoteControlSteeringResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Wrapper for the singleton's current status. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsSetRemoteControlSteeringResult( + /** State of the runtime-managed remote-control singleton. */ + @JsonProperty("status") Object status +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsStartRemoteControlParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsStartRemoteControlParams.java new file mode 100644 index 000000000..3bcc11c83 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsStartRemoteControlParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Parameters for attaching the remote-control singleton to a session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsStartRemoteControlParams( + /** Local session id to attach remote control to. */ + @JsonProperty("sessionId") String sessionId, + /** Configuration for the runtime-managed remote-control singleton. */ + @JsonProperty("config") RemoteControlConfig config +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsStartRemoteControlResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsStartRemoteControlResult.java new file mode 100644 index 000000000..2995ca24f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsStartRemoteControlResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Wrapper for the singleton's current status. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsStartRemoteControlResult( + /** State of the runtime-managed remote-control singleton. */ + @JsonProperty("status") Object status +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsStopRemoteControlResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsStopRemoteControlResult.java new file mode 100644 index 000000000..03c973e3f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsStopRemoteControlResult.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Outcome of a stopRemoteControl call. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsStopRemoteControlResult( + /** State of the runtime-managed remote-control singleton. */ + @JsonProperty("status") Object status, + /** Whether the singleton was actually torn down by this call. */ + @JsonProperty("stopped") Boolean stopped +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsTransferRemoteControlParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsTransferRemoteControlParams.java new file mode 100644 index 000000000..b4a03083a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsTransferRemoteControlParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Parameters for atomically rebinding the remote-control singleton. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsTransferRemoteControlParams( + /** Local session id to point remote control at. */ + @JsonProperty("toSessionId") String toSessionId, + /** When provided, the transfer is rejected unless the singleton currently points at this session id (compare-and-swap semantics to avoid clobbering newer state). */ + @JsonProperty("expectedFromSessionId") String expectedFromSessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsTransferRemoteControlResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsTransferRemoteControlResult.java new file mode 100644 index 000000000..988e0938e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsTransferRemoteControlResult.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Outcome of a transferRemoteControl call. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsTransferRemoteControlResult( + /** State of the runtime-managed remote-control singleton. */ + @JsonProperty("status") Object status, + /** Whether the rebinding actually happened. */ + @JsonProperty("transferred") Boolean transferred +) { +} diff --git a/nodejs/package-lock.json b/nodejs/package-lock.json index e2339954c..fa7e47207 100644 --- a/nodejs/package-lock.json +++ b/nodejs/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0-dev", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.57", + "@github/copilot": "^1.0.60", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }, @@ -697,9 +697,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.57.tgz", - "integrity": "sha512-7dpOu9/qiodmFohZVpTxYmTcjbcXfstWeHof0Ka5RkhguKMkbS3c+sW23a7TTjtlViTV73z+IZFfFW1ru621kw==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.60.tgz", + "integrity": "sha512-+GjW+GJNo55nwJwt48o9szWcyhuY0u682cBKQI1ay9jVBX8DCCXC6HB6Tyv5/MaM4N7CxTiEgp48aVMkye8K+g==", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "detect-libc": "^2.1.2" @@ -708,20 +708,20 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.57", - "@github/copilot-darwin-x64": "1.0.57", - "@github/copilot-linux-arm64": "1.0.57", - "@github/copilot-linux-x64": "1.0.57", - "@github/copilot-linuxmusl-arm64": "1.0.57", - "@github/copilot-linuxmusl-x64": "1.0.57", - "@github/copilot-win32-arm64": "1.0.57", - "@github/copilot-win32-x64": "1.0.57" + "@github/copilot-darwin-arm64": "1.0.60", + "@github/copilot-darwin-x64": "1.0.60", + "@github/copilot-linux-arm64": "1.0.60", + "@github/copilot-linux-x64": "1.0.60", + "@github/copilot-linuxmusl-arm64": "1.0.60", + "@github/copilot-linuxmusl-x64": "1.0.60", + "@github/copilot-win32-arm64": "1.0.60", + "@github/copilot-win32-x64": "1.0.60" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.57.tgz", - "integrity": "sha512-ZmsojZbitPSRfgw3W9wBrHGLRDsBvMCjGsGnJ7xXOU6qxeF/IyWHADxEv1WKfDw8BdCM+LE5yITPXB8bcvCdqQ==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.60.tgz", + "integrity": "sha512-TErNaVxsv+uB3bdHwdoKorCd1rhiRh7HkX48vnS7jwqa8EtGgAkzNrHKC7mruL2rnYOOsNIdPfhzQk+2Y6PSxQ==", "cpu": [ "arm64" ], @@ -735,9 +735,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.57.tgz", - "integrity": "sha512-F4TFDOdORy4oSHJS4DE+3sTk09uk1lohOloe0jfvoEVxJSU6jdQcJLNGoo+BQljcG7a1HEBrmB04iAWG1UXVfA==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.60.tgz", + "integrity": "sha512-PthhcR6PqbQlT04xQKTElpPSJOrJd65nK/l9Sjmpwtk21RrDKs13DCY/19ubP17updYUWBxp3VNfyfN3DAQKOA==", "cpu": [ "x64" ], @@ -751,9 +751,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.57.tgz", - "integrity": "sha512-6apNY/v7CMxKk45CctUZLzQnddBpIG9keSendFKYN+kBIEBSdy//s/Cz/4YQX1iERnklpgZRP7FvcwaKs0/7YA==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.60.tgz", + "integrity": "sha512-AVahkDVQTiGmHvDjlb4CHO8CFEGqmCEipxi0qTA60oH3Y3W2C4aYBwEBtP/85pN3wUUKZJVrWTCcxdufUBuK2Q==", "cpu": [ "arm64" ], @@ -767,9 +767,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.57.tgz", - "integrity": "sha512-EOOnU4Y+vZHfxVl8eBAP7JtSTmu5d4ZDUC9wCGpAA5k703lEnpu8UOv04mTHRn8KTzb8gj+ijNhxDWe3Xljbaw==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.60.tgz", + "integrity": "sha512-NwQjV2ZyUdJVAO4t7wiT+eR3uNWYP57xaLUIhf6JTMGpsTyN+mAFXW63xpwM/K+Pug62uRDQDBjEeOQRB7qZrA==", "cpu": [ "x64" ], @@ -783,9 +783,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.57.tgz", - "integrity": "sha512-FCAaaJLX5T2ZpMeS1TCNnhQuGqyH9WVZndFdN1VOEnN/iWeSSaVF3lM4TPyRHHnWDVxzZtB+VLqOSjINZntD6g==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.60.tgz", + "integrity": "sha512-AYGPc9vq2k248bVwUbiVJ65kIYYMQQ7ci+S3oefWBIyYtYwAH0n+Q/IGAj49IPrelBarYABAsX+EQZJJC8rhxw==", "cpu": [ "arm64" ], @@ -799,9 +799,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.57.tgz", - "integrity": "sha512-AMIBN830yOvNcrj2Q0tGMImqat/V24wZS/4m5BaUssELM7r7KrT9ZBnBs+nWDZYeQaRoblFWL3f4AfxE3t94lQ==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.60.tgz", + "integrity": "sha512-9/F7yl0/9FpGvYR/TCQtbhu0vIaUVem6U7em85QYaEjkS45nK500pByCMWY0bXv2eSS8U2g+8FOAjfkyLlxwPw==", "cpu": [ "x64" ], @@ -815,9 +815,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.57.tgz", - "integrity": "sha512-3TL2bd1/p/sYbNgDIqbnjES//zlXP5b0sPEXKQRrpVF9ZLN3vjQ1tmBWx8Qx7zn2J3oywH2dG7qKjuxWTJRXKA==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.60.tgz", + "integrity": "sha512-ZxxS+Ua1+7Puz80yTOpQ4WS+s32NjrxIsqo8gE0FpuZId16BGOGbWkzWQvR/k2AVBCqpLZ7SK3LfDVKuKJRbpA==", "cpu": [ "arm64" ], @@ -831,9 +831,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.57.tgz", - "integrity": "sha512-zuKqRn0pIF+ZvuiMXbZkYK1AMlrV21kFTpyf5l7gdI1dzJuwHNI0Qfe0gzaZYaU1B4htbzMk9MhEbjR1PQcoJg==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.60.tgz", + "integrity": "sha512-e91ZlFz9J1lkadExLg36oN8Ms/xIa03vAEir3DmyCeYebZ+Y48vdS+BwhQEma+GLoxJUOhzHndCckGnMRfNIbA==", "cpu": [ "x64" ], diff --git a/nodejs/package.json b/nodejs/package.json index 88da9c0d4..95e626d35 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -56,7 +56,7 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.57", + "@github/copilot": "^1.0.60", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }, diff --git a/nodejs/samples/package-lock.json b/nodejs/samples/package-lock.json index 1b0e7fb6f..e82d971ad 100644 --- a/nodejs/samples/package-lock.json +++ b/nodejs/samples/package-lock.json @@ -18,7 +18,7 @@ "version": "0.0.0-dev", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.57", + "@github/copilot": "^1.0.60", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }, diff --git a/nodejs/src/generated/rpc.ts b/nodejs/src/generated/rpc.ts index 505af2026..53aa71fd2 100644 --- a/nodejs/src/generated/rpc.ts +++ b/nodejs/src/generated/rpc.ts @@ -162,7 +162,7 @@ export type AgentRegistrySpawnValidationErrorField = /** The permissionMode parameter */ | "permissionMode"; /** - * The new auth credentials to install on the session. When omitted or `undefined`, the call is a no-op and the session's existing credentials are preserved. The runtime stores the value verbatim and uses it for outbound model/API requests; it does NOT re-validate or re-fetch the associated Copilot user response. Several variants carry secret material; treat this method's params as containing secrets at rest and in transit. + * Initial authentication info for the session. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "AuthInfo". @@ -457,6 +457,18 @@ export type InstructionsSourcesLocation = | "working-directory" /** Instructions live in plugin-provided configuration. */ | "plugin"; +/** + * Repository host type + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionContextHostType". + */ +/** @experimental */ +export type SessionContextHostType = + /** Session repository is hosted on GitHub. */ + | "github" + /** Session repository is hosted on Azure DevOps. */ + | "ado"; /** * Log severity level. Determines how the message is displayed in the timeline. Defaults to "info". * @@ -682,7 +694,7 @@ export type SessionContextInfo = { */ compactionThreshold: number; /** - * Total context limit for /context display: promptTokenLimit + outputTokenLimit (the model's full max_output_tokens reserved on top of the prompt budget). + * Prompt token limit plus the model's full output token limit. */ limit: number; /** @@ -769,6 +781,30 @@ export type ModelPickerPriceCategory = | "high" /** Highest relative token cost tier. */ | "very_high"; +/** + * Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "OptionsUpdateAdditionalContentExclusionPolicyScope". + */ +/** @experimental */ +export type OptionsUpdateAdditionalContentExclusionPolicyScope = + /** The content exclusion policy applies to the current repository. */ + | "repo" + /** The content exclusion policy applies across all repositories. */ + | "all"; +/** + * Context tier for models with tiered pricing. The session uses this to derive effective `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits honor the selected tier. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "OptionsUpdateContextTier". + */ +/** @experimental */ +export type OptionsUpdateContextTier = + /** Use the model's default context tier and its standard token limits / pricing. */ + | "default" + /** Use the model's long-context tier (when available) so larger inputs are accepted and tier-specific pricing applies. */ + | "long_context"; /** * How env values are passed to MCP servers (`direct` inlines literal values; `indirect` resolves at launch). * @@ -781,6 +817,20 @@ export type OptionsUpdateEnvValueMode = | "direct" /** Resolve MCP server environment values from host-side references. */ | "indirect"; +/** + * Reasoning summary mode for supported model clients. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "OptionsUpdateReasoningSummary". + */ +/** @experimental */ +export type OptionsUpdateReasoningSummary = + /** Do not request reasoning summaries from the model. */ + | "none" + /** Request a concise summary of model reasoning. */ + | "concise" + /** Request a detailed summary of model reasoning. */ + | "detailed"; /** * Controls how availableTools (allowlist) and excludedTools (denylist) combine when both are set. * @@ -935,6 +985,32 @@ export type PermissionsSetApproveAllSource = | "autopilot_confirmation" /** Allow-all was enabled through an RPC caller. */ | "rpc"; +/** + * Provider type. Defaults to "openai" for generic OpenAI-compatible APIs. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ProviderConfigType". + */ +/** @experimental */ +export type ProviderConfigType = + /** Generic OpenAI-compatible API. */ + | "openai" + /** Azure OpenAI Service endpoint. */ + | "azure" + /** Anthropic API endpoint. */ + | "anthropic"; +/** + * Wire API format (openai/azure only). Defaults to "completions". + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ProviderConfigWireApi". + */ +/** @experimental */ +export type ProviderConfigWireApi = + /** OpenAI Chat Completions wire format. */ + | "completions" + /** OpenAI Responses API wire format. */ + | "responses"; /** * Schema for the `PushAttachment` type. * @@ -975,6 +1051,18 @@ export type QueuePendingItemsKind = | "message" /** A queued slash command or model-change command. */ | "command"; +/** + * State of the runtime-managed remote-control singleton. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "RemoteControlStatus". + */ +/** @experimental */ +export type RemoteControlStatus = + | RemoteControlStatusOff + | RemoteControlStatusConnecting + | RemoteControlStatusActive + | RemoteControlStatusError; /** * Per-session remote mode. "off" disables remote, "export" exports session events to GitHub without enabling remote steering, "on" enables both export and remote steering. * @@ -989,6 +1077,18 @@ export type RemoteSessionMode = | "export" /** Enable both remote session export and remote steering. */ | "on"; +/** + * Whether the remote task originated from CCA or CLI `--remote`. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "RemoteSessionMetadataTaskType". + */ +/** @experimental */ +export type RemoteSessionMetadataTaskType = + /** GitHub Copilot coding agent task. */ + | "cca" + /** CLI remote task. */ + | "cli"; /** * The UI mode the agent was in when this message was sent. Defaults to the session's current mode. * @@ -1018,17 +1118,35 @@ export type SendMode = /** Interject the message during the in-progress turn. */ | "immediate"; /** - * Repository host type + * Session capability enabled for this session * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionContextHostType". + * via the `definition` "SessionCapability". */ /** @experimental */ -export type SessionContextHostType = - /** Session repository is hosted on GitHub. */ - | "github" - /** Session repository is hosted on Azure DevOps. */ - | "ado"; +export type SessionCapability = + /** TUI-specific prompt hints such as keyboard shortcuts. */ + | "tui-hints" + /** Plan-mode handling and instructions. */ + | "plan-mode" + /** Memory tool and memories prompt section. */ + | "memory" + /** Copilot CLI documentation tool and prompt section. */ + | "cli-documentation" + /** Interactive ask_user tool support. */ + | "ask-user" + /** Interactive CLI identity and behavior. */ + | "interactive-mode" + /** Automatic hidden system notifications. */ + | "system-notifications" + /** SDK elicitation support. */ + | "elicitation" + /** Cross-session history tools and session-store SQL prompt/tool metadata. */ + | "session-store" + /** MCP Apps UI passthrough. */ + | "mcp-apps" + /** Host-provided canvas rendering support. */ + | "canvas-renderer"; /** * Error classification * @@ -1090,6 +1208,14 @@ export type SessionInstalledPluginSource = | SessionInstalledPluginSourceGitHub | SessionInstalledPluginSourceUrl | SessionInstalledPluginSourceLocal; +/** + * Local or remote session metadata entry. Narrow on `isRemote` to access source-specific fields. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionListEntry". + */ +/** @experimental */ +export type SessionListEntry = LocalSessionMetadataValue | RemoteSessionMetadataValue; /** * Public-facing workspace metadata for this session, or null if the session has no associated workspace. Excludes runtime-internal fields (GitHub IDs, summary count, internal flags). * @@ -1123,6 +1249,10 @@ export type WorkspaceSummary = { * Display name for the session, if set */ name?: string; + /** + * Whether the display name was explicitly set by the user + */ + user_named?: boolean; /** * ISO 8601 timestamp when the workspace was created */ @@ -1144,6 +1274,135 @@ export type WorkspaceSummaryHostType = | "github" /** Workspace summary repository is hosted on Azure DevOps. */ | "ado"; +/** + * Initial reasoning summary mode for supported model clients. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionOpenOptionsReasoningSummary". + */ +/** @experimental */ +export type SessionOpenOptionsReasoningSummary = + /** Do not request reasoning summaries from the model. */ + | "none" + /** Request a concise summary of model reasoning. */ + | "concise" + /** Request a detailed summary of model reasoning. */ + | "detailed"; +/** + * How MCP server environment values are interpreted. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionOpenOptionsEnvValueMode". + */ +/** @experimental */ +export type SessionOpenOptionsEnvValueMode = + /** Pass MCP server environment values as literal strings. */ + | "direct" + /** Resolve MCP server environment values from host-side references. */ + | "indirect"; +/** + * Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` enumeration. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionOpenOptionsAdditionalContentExclusionPolicyScope". + */ +/** @experimental */ +export type SessionOpenOptionsAdditionalContentExclusionPolicyScope = + /** The content exclusion policy applies to the current repository. */ + | "repo" + /** The content exclusion policy applies across all repositories. */ + | "all"; +/** + * Open a session by creating, resuming, attaching, connecting to a remote, or handing off. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionOpenParams". + */ +/** @experimental */ +export type SessionOpenParams = + | SessionsOpenCreate + | SessionsOpenResume + | SessionsOpenResumeLast + | SessionsOpenAttach + | SessionsOpenRemote + | SessionsOpenCloud + | SessionsOpenHandoff; +/** + * Task type determines the handoff strategy (CCA fetches events; CLI prepares a transient session). + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsOpenHandoffTaskType". + */ +/** @experimental */ +export type SessionsOpenHandoffTaskType = + /** GitHub Copilot coding agent task. */ + | "cca" + /** CLI remote task. */ + | "cli"; +/** + * Outcome of the open request. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsOpenStatus". + */ +/** @experimental */ +export type SessionsOpenStatus = + /** A new session was created. */ + | "created" + /** An existing session was loaded or reattached. */ + | "resumed" + /** No matching persisted session was found. */ + | "not_found" + /** Connected to an existing remote session. */ + | "connected" + /** Remote session was handed off to a new local session. */ + | "handed_off"; +/** + * Handoff step. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsOpenProgressStep". + */ +/** @experimental */ +export type SessionsOpenProgressStep = + /** Loading the source session's events from the remote service. */ + | "load-session" + /** Validating that the local repository matches the remote session's repository. */ + | "validate-repo" + /** Checking the local working tree for uncommitted changes that would block the handoff. */ + | "check-changes" + /** Checking out the branch associated with the remote session in the local working tree. */ + | "checkout-branch" + /** Creating the new local session and seeding it with the source session's events. */ + | "create-session" + /** Persisting the newly-created local session to disk. */ + | "save-session"; +/** + * Step status. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsOpenProgressStatus". + */ +/** @experimental */ +export type SessionsOpenProgressStatus = + /** The step has started and has not yet finished. */ + | "in-progress" + /** The step has completed successfully. */ + | "complete"; +/** + * Which session sources to include. Defaults to `local` for backward compatibility. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionSource". + */ +/** @experimental */ +export type SessionSource = + /** Return only local sessions. */ + | "local" + /** Return only remote sessions. */ + | "remote" + /** Return both local and remote sessions. */ + | "all"; /** * Signal to send (default: SIGTERM) * @@ -2145,6 +2404,19 @@ export interface GhCliAuthInfo { token: string; copilotUser?: CopilotUserResponse; } +/** + * Cancellation result for a user-requested shell command. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "CancelUserRequestedShellCommandResult". + */ +/** @experimental */ +export interface CancelUserRequestedShellCommandResult { + /** + * Whether an in-flight execution was found and signalled to cancel + */ + cancelled: boolean; +} /** * Canvas action that the agent or host can invoke. To discover the input schema for a particular action, call the list_canvas_capabilities tool. * @@ -2699,6 +2971,30 @@ export interface CommandsRespondToQueuedCommandResult { */ success: boolean; } +/** + * Params to attach or detach an in-process ExtensionController delegate. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ConfigureSessionExtensionsParams". + */ +/** @experimental */ +/** @internal */ +export interface ConfigureSessionExtensionsParams { + /** + * Session to attach the extension controller delegate to. + */ + sessionId: string; + /** + * In-process ExtensionController delegate (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. The post-SDK extension surface exposes list/enable/disable/reload via dedicated RPCs served by the runtime. + * + * @internal + * + * @internal + */ + controller?: { + [k: string]: unknown | undefined; + }; +} /** * Metadata for a connected remote session. * @@ -3643,6 +3939,31 @@ export interface InstalledPluginSourceLocal { source: "local"; path: string; } +/** + * Information about an installed plugin tracked in global state. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "InstalledPluginInfo". + */ +/** @experimental */ +export interface InstalledPluginInfo { + /** + * Plugin name + */ + name: string; + /** + * Marketplace the plugin came from. Empty string ("") for direct repo / URL / local installs. + */ + marketplace: string; + /** + * Installed version (when reported by the plugin manifest) + */ + version?: string; + /** + * Whether the plugin is currently enabled for new sessions + */ + enabled: boolean; +} /** * Instruction sources loaded for the session, in merge order. * @@ -3695,6 +4016,78 @@ export interface InstructionsSources { */ defaultDisabled?: boolean; } +/** + * Schema for the `LocalSessionMetadataValue` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "LocalSessionMetadataValue". + */ +/** @experimental */ +export interface LocalSessionMetadataValue { + /** + * Stable session identifier + */ + sessionId: string; + /** + * Session creation time as an ISO 8601 timestamp + */ + startTime: string; + /** + * Last-modified time of the session's persisted state, as ISO 8601 + */ + modifiedTime: string; + /** + * Short summary of the session, when one has been derived + */ + summary?: string; + /** + * Optional human-friendly name set via /rename + */ + name?: string; + /** + * Runtime client name that created/last resumed this session + */ + clientName?: string; + /** + * Always false for local sessions. + */ + isRemote: false; + /** + * True for detached maintenance sessions that should be hidden from normal resume lists. + */ + isDetached?: boolean; + context?: SessionContext; + /** + * GitHub task ID, when this local session is bound to one. Only present for local sessions exported to remote control. + */ + mcTaskId?: string; +} +/** + * Pre-resolved working-directory context for session startup. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionContext". + */ +/** @experimental */ +export interface SessionContext { + /** + * Most recent working directory for this session + */ + cwd: string; + /** + * Git repository root, if the cwd was inside a git repo + */ + gitRoot?: string; + /** + * Repository slug in `owner/name` form, when known + */ + repository?: string; + hostType?: SessionContextHostType; + /** + * Active git branch + */ + branch?: string; +} /** * Message text, optional severity level, persistence flag, optional follow-up URL, and optional tip. * @@ -3760,23 +4153,168 @@ export interface LspInitializeRequest { force?: boolean; } /** - * MCP server, tool name, and arguments to invoke from an MCP App view. + * Result of registering a new marketplace. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "McpAppsCallToolRequest". + * via the `definition` "MarketplaceAddResult". */ /** @experimental */ -export interface McpAppsCallToolRequest { +export interface MarketplaceAddResult { /** - * MCP server hosting the tool + * Final name of the marketplace as resolved from its manifest */ - serverName: string; + name: string; +} +/** + * Plugins advertised by the marketplace. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "MarketplaceBrowseResult". + */ +/** @experimental */ +export interface MarketplaceBrowseResult { /** - * MCP tool name + * Plugins advertised by the marketplace */ - toolName: string; - /** - * Tool arguments + plugins: MarketplacePluginInfo[]; +} +/** + * Plugin entry advertised by a marketplace. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "MarketplacePluginInfo". + */ +/** @experimental */ +export interface MarketplacePluginInfo { + /** + * Plugin name as listed in the marketplace catalog + */ + name: string; + /** + * Short description from the marketplace catalog, when present + */ + description?: string; +} +/** + * Registered marketplace summary. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "MarketplaceInfo". + */ +/** @experimental */ +export interface MarketplaceInfo { + /** + * Marketplace name (matches the @marketplace suffix in plugin specs) + */ + name: string; + /** + * Human-readable description of where the marketplace data is fetched from (e.g. "GitHub: owner/repo"). + */ + source: string; + /** + * True when this is a default marketplace shipped with the runtime. Defaults are not removable. + */ + isDefault?: boolean; +} +/** + * All registered marketplaces, including built-in defaults. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "MarketplaceListResult". + */ +/** @experimental */ +export interface MarketplaceListResult { + /** + * Registered marketplaces + */ + marketplaces: MarketplaceInfo[]; +} +/** + * Schema for the `MarketplaceRefreshEntry` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "MarketplaceRefreshEntry". + */ +/** @experimental */ +export interface MarketplaceRefreshEntry { + /** + * Marketplace name that was refreshed + */ + name: string; + /** + * Whether the refresh succeeded + */ + success: boolean; + /** + * Error message (failure only) + */ + error?: string; +} +/** + * Result of refreshing one or more marketplace catalogs. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "MarketplaceRefreshResult". + */ +/** @experimental */ +export interface MarketplaceRefreshResult { + /** + * Per-marketplace refresh results in deterministic order. + */ + results: MarketplaceRefreshEntry[]; +} +/** + * Outcome of the remove attempt, including dependent-plugin info when applicable. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "MarketplaceRemoveResult". + */ +/** @experimental */ +export interface MarketplaceRemoveResult { + /** + * True when the marketplace was actually removed. False when removal was skipped because the marketplace has dependent plugins and `force` was not set. + */ + removed: boolean; + /** + * Names of installed plugins that prevented removal. Populated only when `removed=false`. + */ + dependentPlugins?: string[]; +} +/** + * Schema for the `McpAllowedServer` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpAllowedServer". + */ +/** @experimental */ +export interface McpAllowedServer { + /** + * Allowed server name + */ + name: string; + /** + * PII-free note explaining why the server was allowed + */ + redactedNote?: string; +} +/** + * MCP server, tool name, and arguments to invoke from an MCP App view. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpAppsCallToolRequest". + */ +/** @experimental */ +export interface McpAppsCallToolRequest { + /** + * MCP server hosting the tool + */ + serverName: string; + /** + * MCP tool name + */ + toolName: string; + /** + * Tool arguments */ arguments?: { [k: string]: unknown | undefined; @@ -4226,6 +4764,37 @@ export interface McpConfigUpdateRequest { name: string; config: McpServerConfig; } +/** + * Opaque auth info used to configure GitHub MCP. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpConfigureGitHubRequest". + */ +/** @experimental */ +/** @internal */ +export interface McpConfigureGitHubRequest { + /** + * Opaque runtime auth info for GitHub MCP configuration. Marked internal: an in-process runtime shape (configureGitHubMcp is a no-op over the wire). + * + * @internal + */ + authInfo: { + [k: string]: unknown | undefined; + }; +} +/** + * Result of configuring GitHub MCP. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpConfigureGitHubResult". + */ +/** @experimental */ +export interface McpConfigureGitHubResult { + /** + * Whether GitHub MCP configuration changed. + */ + changed: boolean; +} /** * Name of the MCP server to disable for the session. * @@ -4319,191 +4888,531 @@ export interface McpExecuteSamplingResult { [k: string]: unknown | undefined; } /** - * Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, and the callback success-page copy. + * Schema for the `McpFilteredServer` type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "McpOauthLoginRequest". + * via the `definition` "McpFilteredServer". */ /** @experimental */ -export interface McpOauthLoginRequest { +export interface McpFilteredServer { /** - * Name of the remote MCP server to authenticate + * Filtered server name */ - serverName: string; + name: string; /** - * 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. + * Human-readable filter reason */ - forceReauth?: boolean; + reason: string; /** - * 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. + * PII-free filter reason */ - clientName?: string; + redactedReason?: string; /** - * 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. + * Enterprise login associated with an allowlist policy */ - callbackSuccessMessage?: string; + enterpriseName?: string; } /** - * OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server. + * Host-level state, omitted when no MCP host is initialized. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "McpOauthLoginResult". + * via the `definition` "McpHostState". */ /** @experimental */ -export interface McpOauthLoginResult { +export interface McpHostState { /** - * 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. + * Whether third-party MCP servers are policy-enabled for this session. */ - authorizationUrl?: string; + mcp3pEnabled: boolean; + /** + * Configured servers that are explicitly disabled. + */ + disabledServers: string[]; + /** + * Configured servers filtered out by enterprise allowlist policy. + */ + filteredServers: string[]; + /** + * Names of currently-connected MCP clients. + */ + clients: string[]; + /** + * Names of servers with in-flight connection attempts. + */ + pendingConnections: string[]; + /** + * Map of server name to recorded connection failure. + */ + failedServers: { + [k: string]: McpServerFailureInfo | undefined; + }; + /** + * Map of server name to recorded pending-auth state. + */ + needsAuthServers: { + [k: string]: McpServerNeedsAuthInfo | undefined; + }; } /** - * Indicates whether the auto-managed `github` MCP server was removed (false when nothing to remove). + * Recorded MCP server connection failure. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "McpRemoveGitHubResult". + * via the `definition` "McpServerFailureInfo". */ /** @experimental */ -export interface McpRemoveGitHubResult { +export interface McpServerFailureInfo { /** - * True when the auto-managed `github` MCP server was removed; false when no removal happened (e.g. user has explicitly configured a `github` server, or the server was not registered). + * Failure message produced when the MCP server connection failed. */ - removed: boolean; + message: string; + /** + * epoch-ms timestamp at which the failure was recorded. + */ + timestamp: number; } /** - * Outcome of an MCP sampling execution: success result, failure error, or cancellation. + * Recorded MCP server pending-auth state. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "McpSamplingExecutionResult". + * via the `definition` "McpServerNeedsAuthInfo". */ /** @experimental */ -export interface McpSamplingExecutionResult { - action: McpSamplingExecutionAction; - result?: McpExecuteSamplingResult; +export interface McpServerNeedsAuthInfo { /** - * Error description, present when action='failure'. + * epoch-ms timestamp at which the server signalled it needs authentication. */ - error?: string; + timestamp: number; } /** - * Schema for the `McpServer` type. + * Server name to check running status for. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "McpServer". + * via the `definition` "McpIsServerRunningRequest". */ /** @experimental */ -export interface McpServer { +export interface McpIsServerRunningRequest { /** - * Server name (config key) - */ - name: string; - status: McpServerStatus; - source?: McpServerSource; - /** - * Error message if the server failed to connect + * Name of the MCP server to check */ - error?: string; + serverName: string; } /** - * MCP servers configured for the session, with their connection status. + * Whether the named MCP server is running. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "McpServerList". + * via the `definition` "McpIsServerRunningResult". */ /** @experimental */ -export interface McpServerList { +export interface McpIsServerRunningResult { /** - * Configured MCP servers + * True if the server has an active client and transport. */ - servers: McpServer[]; + running: boolean; } /** - * Mode controlling how MCP server env values are resolved (`direct` or `indirect`). + * Server name whose tool list should be returned. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "McpSetEnvValueModeParams". + * via the `definition` "McpListToolsRequest". */ /** @experimental */ -export interface McpSetEnvValueModeParams { - mode: McpSetEnvValueModeDetails; +export interface McpListToolsRequest { + /** + * Name of the connected MCP server whose tools to list. + */ + serverName: string; } /** - * Env-value mode recorded on the session after the update. + * Tools exposed by the connected MCP server. Throws when the server is not connected. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "McpSetEnvValueModeResult". + * via the `definition` "McpListToolsResult". */ /** @experimental */ -export interface McpSetEnvValueModeResult { - mode: McpSetEnvValueModeDetails; +export interface McpListToolsResult { + /** + * Tools exposed by the server. + */ + tools: McpTools[]; } /** - * Model identifier and token limits used to compute the context-info breakdown. + * Schema for the `McpTools` type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "MetadataContextInfoRequest". + * via the `definition` "McpTools". */ /** @experimental */ -export interface MetadataContextInfoRequest { - /** - * Maximum prompt tokens allowed by the target model. Pass 0 to use the runtime default. - */ - promptTokenLimit: number; +export interface McpTools { /** - * Maximum output tokens allowed by the target model. Pass 0 if unknown. + * Tool name. */ - outputTokenLimit: number; + name: string; /** - * Model identifier used for tokenization. Omit to use the session default. Used both for token counting and to compute display values. + * Tool description, when provided. */ - selectedModel?: string; + description?: string; } /** - * Token breakdown for the session's current context window, or null if uninitialized. + * 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` "MetadataContextInfoResult". + * via the `definition` "McpOauthLoginRequest". */ /** @experimental */ -export interface MetadataContextInfoResult { +export interface McpOauthLoginRequest { /** - * Token breakdown for the current context window, or null if the session has not yet been initialized (no system prompt or tool metadata cached). + * Name of the remote MCP server to authenticate */ - contextInfo?: SessionContextInfo | null; + serverName: string; + /** + * When true, clears any cached OAuth token for the server and runs a full new authorization. Use when the user explicitly wants to switch accounts or believes their session is stuck. + */ + forceReauth?: boolean; + /** + * Optional override for the OAuth client display name shown on the consent screen. Applies to newly registered dynamic clients only — existing registrations keep the name they were created with. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass their own surface-specific label so the consent screen matches the product the user sees. + */ + clientName?: string; + /** + * Optional override for the body text shown on the OAuth loopback callback success page. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass surface-specific copy telling the user where to return. + */ + callbackSuccessMessage?: string; } /** - * Indicates whether the local session is currently processing a turn or background continuation. + * 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` "MetadataIsProcessingResult". + * via the `definition` "McpOauthLoginResult". */ /** @experimental */ -export interface MetadataIsProcessingResult { +export interface McpOauthLoginResult { /** - * Whether the session is currently processing user/agent messages. False for non-local sessions (which don't run a local agentic loop). Reflects an in-flight turn or background continuation. + * 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. */ - processing: boolean; + authorizationUrl?: string; } /** - * Model identifier to use when re-tokenizing the session's existing messages. + * MCP OAuth request id and optional provider response. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "MetadataRecomputeContextTokensRequest". + * via the `definition` "McpOauthRespondRequest". */ /** @experimental */ -export interface MetadataRecomputeContextTokensRequest { +/** @internal */ +export interface McpOauthRespondRequest { /** - * Model identifier used for tokenization. The runtime token-counts both chat-context and system-context messages against this model. + * OAuth request identifier from mcp.oauth_required */ - modelId: string; + requestId: string; + /** + * In-process OAuthClientProvider instance, or omitted to deny. Marked internal: cannot be serialized across the JSON-RPC boundary. + * + * @internal + */ + provider?: { + [k: string]: unknown | undefined; + }; } /** - * Re-tokenize the session's existing messages against `modelId` and return the token totals. Useful for hosts that want an initial estimate of context usage on session resume, before the next agent turn fires `session.context_info_changed` events. Returns zeros for an empty session. + * Empty result after recording the MCP OAuth response. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "MetadataRecomputeContextTokensResult". + * via the `definition` "McpOauthRespondResult". */ /** @experimental */ -export interface MetadataRecomputeContextTokensResult { +export interface McpOauthRespondResult {} +/** + * Registration parameters for an external MCP client. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpRegisterExternalClientRequest". + */ +/** @experimental */ +/** @internal */ +export interface McpRegisterExternalClientRequest { + /** + * Logical server name for the external client + */ + serverName: string; + /** + * In-process MCP Client instance. Marked internal: cannot be serialized across the JSON-RPC boundary. + * + * @internal + */ + client: { + [k: string]: unknown | undefined; + }; + /** + * In-process MCP Transport instance. Marked internal: cannot be serialized across the JSON-RPC boundary. + * + * @internal + */ + transport: { + [k: string]: unknown | undefined; + }; + /** + * In-process server config (MCPServerConfig) paired with the in-process client/transport. Marked internal alongside its companions. + * + * @internal + */ + config: { + [k: string]: unknown | undefined; + }; +} +/** + * Opaque MCP reload configuration. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpReloadWithConfigRequest". + */ +/** @experimental */ +/** @internal */ +export interface McpReloadWithConfigRequest { + /** + * Opaque runtime MCP reload configuration. Marked internal: an in-process runtime shape (reloadMcpServers throws over the wire). + * + * @internal + */ + config: { + [k: string]: unknown | undefined; + }; +} +/** + * Indicates whether the auto-managed `github` MCP server was removed (false when nothing to remove). + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpRemoveGitHubResult". + */ +/** @experimental */ +export interface McpRemoveGitHubResult { + /** + * True when the auto-managed `github` MCP server was removed; false when no removal happened (e.g. user has explicitly configured a `github` server, or the server was not registered). + */ + removed: boolean; +} +/** + * Server name and opaque configuration for an individual MCP server restart. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpRestartServerRequest". + */ +/** @experimental */ +/** @internal */ +export interface McpRestartServerRequest { + /** + * Name of the MCP server to restart + */ + serverName: string; + /** + * Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime shape supplied only by in-process CLI callers. + * + * @internal + */ + config: { + [k: string]: unknown | undefined; + }; +} +/** + * Outcome of an MCP sampling execution: success result, failure error, or cancellation. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpSamplingExecutionResult". + */ +/** @experimental */ +export interface McpSamplingExecutionResult { + action: McpSamplingExecutionAction; + result?: McpExecuteSamplingResult; + /** + * Error description, present when action='failure'. + */ + error?: string; +} +/** + * Schema for the `McpServer` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpServer". + */ +/** @experimental */ +export interface McpServer { + /** + * Server name (config key) + */ + name: string; + status: McpServerStatus; + source?: McpServerSource; + /** + * Error message if the server failed to connect + */ + error?: string; +} +/** + * MCP servers configured for the session, with their connection status and host-level state. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpServerList". + */ +/** @experimental */ +export interface McpServerList { + /** + * Configured MCP servers + */ + servers: McpServer[]; + host?: McpHostState; +} +/** + * Mode controlling how MCP server env values are resolved (`direct` or `indirect`). + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpSetEnvValueModeParams". + */ +/** @experimental */ +export interface McpSetEnvValueModeParams { + mode: McpSetEnvValueModeDetails; +} +/** + * Env-value mode recorded on the session after the update. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpSetEnvValueModeResult". + */ +/** @experimental */ +export interface McpSetEnvValueModeResult { + mode: McpSetEnvValueModeDetails; +} +/** + * Server name and opaque configuration for an individual MCP server start. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpStartServerRequest". + */ +/** @experimental */ +/** @internal */ +export interface McpStartServerRequest { + /** + * Name of the MCP server to start + */ + serverName: string; + /** + * Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime shape supplied only by in-process CLI callers. + * + * @internal + */ + config: { + [k: string]: unknown | undefined; + }; +} +/** + * MCP server startup filtering result. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpStartServersResult". + */ +/** @experimental */ +export interface McpStartServersResult { + /** + * Servers filtered out before startup + */ + filteredServers: McpFilteredServer[]; + /** + * Non-default servers allowed by policy + */ + allowedServers?: McpAllowedServer[]; +} +/** + * Server name for an individual MCP server stop. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpStopServerRequest". + */ +/** @experimental */ +export interface McpStopServerRequest { + /** + * Name of the MCP server to stop + */ + serverName: string; +} +/** + * Server name identifying the external client to remove. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpUnregisterExternalClientRequest". + */ +/** @experimental */ +/** @internal */ +export interface McpUnregisterExternalClientRequest { + /** + * Server name of the external client to unregister + */ + serverName: string; +} +/** + * Model identifier and token limits used to compute the context-info breakdown. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "MetadataContextInfoRequest". + */ +/** @experimental */ +export interface MetadataContextInfoRequest { + /** + * Maximum prompt tokens allowed by the target model. Pass 0 to use the runtime default. + */ + promptTokenLimit: number; + /** + * Maximum output tokens allowed by the target model. Pass 0 if unknown. + */ + outputTokenLimit: number; + /** + * Model identifier used for tokenization. Omit to use the session default. Used both for token counting and to compute display values. + */ + selectedModel?: string; +} +/** + * Token breakdown for the session's current context window, or null if uninitialized. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "MetadataContextInfoResult". + */ +/** @experimental */ +export interface MetadataContextInfoResult { + /** + * Token breakdown for the current context window, or null if the session has not yet been initialized (no system prompt or tool metadata cached). + */ + contextInfo?: SessionContextInfo | null; +} +/** + * Indicates whether the local session is currently processing a turn or background continuation. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "MetadataIsProcessingResult". + */ +/** @experimental */ +export interface MetadataIsProcessingResult { + /** + * Whether the session is currently processing user/agent messages. False for non-local sessions (which don't run a local agentic loop). Reflects an in-flight turn or background continuation. + */ + processing: boolean; +} +/** + * Model identifier to use when re-tokenizing the session's existing messages. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "MetadataRecomputeContextTokensRequest". + */ +/** @experimental */ +export interface MetadataRecomputeContextTokensRequest { + /** + * Model identifier used for tokenization. The runtime token-counts both chat-context and system-context messages against this model. + */ + modelId: string; +} +/** + * Re-tokenize the session's existing messages against `modelId` and return the token totals. Useful for hosts that want an initial estimate of context usage on session resume, before the next agent turn fires `session.context_info_changed` events. Returns zeros for an empty session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "MetadataRecomputeContextTokensResult". + */ +/** @experimental */ +export interface MetadataRecomputeContextTokensResult { /** * Sum of tokens across chat-context and system-context messages currently held by the session. */ @@ -4815,7 +5724,7 @@ export interface ModelBillingTokenPricesLongContext { contextMax?: number; } /** - * Override individual model capabilities resolved by the runtime + * Initial model capability overrides. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "ModelCapabilitiesOverride". @@ -5039,17 +5948,55 @@ export interface NameSetRequest { name: string; } /** - * Schema for the `PendingPermissionRequest` type. + * Schema for the `OptionsUpdateAdditionalContentExclusionPolicy` type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "PendingPermissionRequest". + * via the `definition` "OptionsUpdateAdditionalContentExclusionPolicy". */ /** @experimental */ -export interface PendingPermissionRequest { - /** - * Unique identifier for the pending permission request - */ - requestId: string; +export interface OptionsUpdateAdditionalContentExclusionPolicy { + rules: OptionsUpdateAdditionalContentExclusionPolicyRule[]; + last_updated_at: string | number; + scope: OptionsUpdateAdditionalContentExclusionPolicyScope; + [k: string]: unknown | undefined; +} +/** + * Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRule` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "OptionsUpdateAdditionalContentExclusionPolicyRule". + */ +/** @experimental */ +export interface OptionsUpdateAdditionalContentExclusionPolicyRule { + paths: string[]; + ifAnyMatch?: string[]; + ifNoneMatch?: string[]; + source: OptionsUpdateAdditionalContentExclusionPolicyRuleSource; + [k: string]: unknown | undefined; +} +/** + * Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "OptionsUpdateAdditionalContentExclusionPolicyRuleSource". + */ +/** @experimental */ +export interface OptionsUpdateAdditionalContentExclusionPolicyRuleSource { + name: string; + type: string; +} +/** + * Schema for the `PendingPermissionRequest` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PendingPermissionRequest". + */ +/** @experimental */ +export interface PendingPermissionRequest { + /** + * Unique identifier for the pending permission request + */ + requestId: string; request: PermissionPromptRequest; } /** @@ -6391,6 +7338,44 @@ export interface PlanReadResult { */ path: string | null; } +/** + * Todo rows read from the session SQL database. Empty when no session database is available. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PlanReadSqlTodosResult". + */ +/** @experimental */ +export interface PlanReadSqlTodosResult { + /** + * Rows from the session SQL todos table, ordered by creation time and id. + */ + rows: PlanSqlTodosRow[]; +} +/** + * Schema for the `PlanSqlTodosRow` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PlanSqlTodosRow". + */ +/** @experimental */ +export interface PlanSqlTodosRow { + /** + * Todo identifier. + */ + id?: string; + /** + * Todo title. + */ + title?: string; + /** + * Todo description. + */ + description?: string; + /** + * Todo status. + */ + status?: string; +} /** * Replacement contents to write to the session plan file. * @@ -6429,6 +7414,28 @@ export interface Plugin { */ enabled: boolean; } +/** + * Result of installing a plugin. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PluginInstallResult". + */ +/** @experimental */ +export interface PluginInstallResult { + plugin: InstalledPluginInfo; + /** + * Number of skills discovered and installed from the plugin + */ + skillsInstalled: number; + /** + * Optional post-install message provided by the plugin (e.g. setup instructions) + */ + postInstallMessage?: string; + /** + * Set when the install path is deprecated (e.g. direct repo / URL / local installs). Callers should surface this to end users. + */ + deprecationWarning?: string; +} /** * Plugins installed for the session, with their enabled state and version metadata. * @@ -6443,1333 +7450,2460 @@ export interface PluginList { plugins: Plugin[]; } /** - * File attachment + * Plugins installed in user/global state. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "PushAttachmentFile". + * via the `definition` "PluginListResult". */ /** @experimental */ -export interface PushAttachmentFile { - /** - * Attachment type discriminator - */ - type: "file"; - /** - * Absolute file path - */ - path: string; +export interface PluginListResult { /** - * User-facing display name for the attachment + * Installed plugins */ - displayName: string; - lineRange?: PushAttachmentFileLineRange; + plugins: InstalledPluginInfo[]; } /** - * Optional line range to scope the attachment to a specific section of the file + * Plugin names (or specs) to disable. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "PushAttachmentFileLineRange". + * via the `definition` "PluginsDisableRequest". */ /** @experimental */ -export interface PushAttachmentFileLineRange { +export interface PluginsDisableRequest { /** - * Start line number (1-based) - */ - start: number; - /** - * End line number (1-based, inclusive) + * Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins. */ - end: number; + names: string[]; } /** - * Directory attachment + * Plugin names (or specs) to enable. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "PushAttachmentDirectory". + * via the `definition` "PluginsEnableRequest". */ /** @experimental */ -export interface PushAttachmentDirectory { - /** - * Attachment type discriminator - */ - type: "directory"; - /** - * Absolute directory path - */ - path: string; +export interface PluginsEnableRequest { /** - * User-facing display name for the attachment + * Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API. */ - displayName: string; + names: string[]; } /** - * Code selection attachment from an editor + * Plugin source and optional working directory for relative-path resolution. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "PushAttachmentSelection". + * via the `definition` "PluginsInstallRequest". */ /** @experimental */ -export interface PushAttachmentSelection { +export interface PluginsInstallRequest { /** - * Attachment type discriminator - */ - type: "selection"; - /** - * Absolute path to the file containing the selection - */ - filePath: string; - /** - * User-facing display name for the selection + * Plugin install spec. Accepts the same forms as the CLI: "plugin@marketplace" (marketplace install), "owner/repo" or "owner/repo:subpath" (GitHub direct), an http/https/ssh URL, or a local path. Direct (non-marketplace) installs are deprecated and will produce a deprecationWarning in the result. */ - displayName: string; + source: string; /** - * The selected text content + * Working directory used to resolve relative local paths in `source`. Defaults to the server's current working directory. */ - text: string; - selection: PushAttachmentSelectionDetails; + workingDirectory?: string; } /** - * Position range of the selection within the file + * Marketplace source to register. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "PushAttachmentSelectionDetails". + * via the `definition` "PluginsMarketplacesAddRequest". */ /** @experimental */ -export interface PushAttachmentSelectionDetails { - start: PushAttachmentSelectionDetailsStart; - end: PushAttachmentSelectionDetailsEnd; +export interface PluginsMarketplacesAddRequest { + /** + * Marketplace source. Accepts the same forms as the CLI: "owner/repo" or "owner/repo#ref" (GitHub), an http/https/ssh URL (optionally with #ref), a git scp-style URL (user@host:path), or a local path. The marketplace's own name (from its manifest) is used as the registration key. + */ + source: string; } /** - * Start position of the selection + * Name of the marketplace whose plugin catalog to fetch. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "PushAttachmentSelectionDetailsStart". + * via the `definition` "PluginsMarketplacesBrowseRequest". */ /** @experimental */ -export interface PushAttachmentSelectionDetailsStart { +export interface PluginsMarketplacesBrowseRequest { /** - * Start line number (0-based) + * Marketplace name to browse */ - line: number; + name: string; +} + +/** @experimental */ +export interface PluginsMarketplacesRefreshRequest { /** - * Start character offset within the line (0-based) + * Marketplace name to refresh. When omitted, every registered marketplace is refreshed. */ - character: number; + name?: string; } /** - * End position of the selection + * Name of the marketplace to remove and an optional force flag. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "PushAttachmentSelectionDetailsEnd". + * via the `definition` "PluginsMarketplacesRemoveRequest". */ /** @experimental */ -export interface PushAttachmentSelectionDetailsEnd { +export interface PluginsMarketplacesRemoveRequest { /** - * End line number (0-based) + * Marketplace name to remove */ - line: number; + name: string; /** - * End character offset within the line (0-based) + * When true, also uninstall every plugin sourced from this marketplace. When false (default), removal is a no-op if any plugin from this marketplace is installed and the dependent plugin names are returned in the result. */ - character: number; + force?: boolean; } /** - * GitHub issue, pull request, or discussion reference + * Optional flags controlling which side effects the reload performs. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "PushAttachmentGitHubReference". + * via the `definition` "PluginsReloadRequest". */ /** @experimental */ -export interface PushAttachmentGitHubReference { - /** - * Attachment type discriminator - */ - type: "github_reference"; +export interface PluginsReloadRequest { /** - * Issue, pull request, or discussion number + * Reload MCP server connections after refreshing plugins. Defaults to true. */ - number: number; + reloadMcp?: boolean; /** - * Title of the referenced item + * Re-run custom-agent discovery after refreshing plugins. Defaults to true. */ - title: string; - referenceType: PushAttachmentGitHubReferenceType; + reloadCustomAgents?: boolean; /** - * Current state of the referenced item (e.g., open, closed, merged) + * Re-load user, plugin, and (subject to `deferRepoHooks`) repo hooks. Defaults to true. Has no effect when the host has not registered a hook reloader (e.g. remote sessions). */ - state: string; + reloadHooks?: boolean; /** - * URL to the referenced item on GitHub + * When true, skip repo-level hooks during the hook reload. Use before folder trust is confirmed; load them post-trust via `sessions.loadDeferredRepoHooks`. */ - url: string; + deferRepoHooks?: boolean; } /** - * Blob attachment with inline base64-encoded data + * Name (or spec) of the plugin to uninstall. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "PushAttachmentBlob". + * via the `definition` "PluginsUninstallRequest". */ /** @experimental */ -export interface PushAttachmentBlob { - /** - * Attachment type discriminator - */ - type: "blob"; - /** - * Base64-encoded content - */ - data: string; - /** - * MIME type of the inline data - */ - mimeType: string; +export interface PluginsUninstallRequest { /** - * User-facing display name for the attachment + * Plugin name or "plugin@marketplace" spec to uninstall. When ambiguous, prefer the fully-qualified spec. */ - displayName?: string; + name: string; } /** - * Schema for the `QueuePendingItems` type. + * Name (or spec) of the plugin to update. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "QueuePendingItems". + * via the `definition` "PluginsUpdateRequest". */ /** @experimental */ -export interface QueuePendingItems { - kind: QueuePendingItemsKind; +export interface PluginsUpdateRequest { /** - * Human-readable text to display for this queue entry in the UI + * Plugin name or "plugin@marketplace" spec to update. */ - displayText: string; + name: string; } /** - * Snapshot of the session's pending queued items and immediate-steering messages. + * Schema for the `PluginUpdateAllEntry` type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "QueuePendingItemsResult". + * via the `definition` "PluginUpdateAllEntry". */ /** @experimental */ -export interface QueuePendingItemsResult { +export interface PluginUpdateAllEntry { /** - * Pending queued items in submission order. Includes user messages, queued slash commands, and queued model changes; omits internal system items. + * Plugin name that was updated */ - items: QueuePendingItems[]; + name: string; /** - * Display text for messages currently in the immediate steering queue (interjections sent during a running turn). + * Marketplace the plugin came from. Empty string ("") for direct installs. */ - steeringMessages: string[]; + marketplace: string; + /** + * Whether the update succeeded for this plugin + */ + success: boolean; + /** + * Previously installed version, when available + */ + previousVersion?: string; + /** + * Version after the update, when available + */ + newVersion?: string; + /** + * Number of skills installed after the update (success only) + */ + skillsInstalled?: number; + /** + * Error message (failure only) + */ + error?: string; } /** - * Indicates whether a user-facing pending item was removed. + * Result of updating all installed plugins. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "QueueRemoveMostRecentResult". + * via the `definition` "PluginUpdateAllResult". */ /** @experimental */ -export interface QueueRemoveMostRecentResult { +export interface PluginUpdateAllResult { /** - * True if a user-facing pending item was removed (LIFO across both queues); false when no removable items remained. + * Per-plugin update results in deterministic order. */ - removed: boolean; + results: PluginUpdateAllEntry[]; } /** - * Event type to register consumer interest for, used by runtime gating logic. + * Result of updating a single plugin. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "RegisterEventInterestParams". + * via the `definition` "PluginUpdateResult". */ /** @experimental */ -export interface RegisterEventInterestParams { +export interface PluginUpdateResult { /** - * The event type the consumer wants the runtime to treat as 'observed' for behavior-switching gating. Some runtime code paths inspect whether any consumer is interested in a specific event type and choose a different implementation accordingly (e.g. `mcp.oauth_required`: when interest is registered the runtime delegates the full interactive OAuth flow to the consumer; when no interest is registered the runtime installs a browserless fallback that silently reuses cached tokens). SDK clients that long-poll events do NOT automatically appear as listeners to these gating checks — they must explicitly call `registerInterest` for each event type they want the runtime to count as having a consumer. Multiple registrations for the same event type from the same or different consumers are tracked independently and must each be released. See: `mcp.oauth_required`, `sampling.requested`, `auto_mode_switch.requested`, `user_input.requested`, `elicitation.requested`, `command.queued`, `exit_plan_mode.requested`. + * Version that was previously installed, when available */ - eventType: string; + previousVersion?: string; + /** + * Version after the update, when reported by the plugin manifest + */ + newVersion?: string; + /** + * Number of skills discovered and installed after the update + */ + skillsInstalled: number; } /** - * Opaque handle representing an event-type interest registration. + * Batch of spawn events plus a cursor for follow-up polls. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "RegisterEventInterestResult". + * via the `definition` "PollSpawnedSessionsResult". */ /** @experimental */ -export interface RegisterEventInterestResult { +export interface PollSpawnedSessionsResult { /** - * Opaque handle for this registration. Pass to releaseInterest to release. Each call to registerInterest produces a fresh handle, even when the same eventType is registered multiple times. + * Spawn events emitted since the supplied cursor. */ - handle: string; + events: SessionsPollSpawnedSessionsEvent[]; + /** + * Opaque cursor to pass back to receive only events after this batch. + */ + cursor: string; } /** - * Opaque handle previously returned by `registerInterest` to release. + * Schema for the `SessionsPollSpawnedSessionsEvent` type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "ReleaseEventInterestParams". + * via the `definition` "SessionsPollSpawnedSessionsEvent". */ /** @experimental */ -export interface ReleaseEventInterestParams { +export interface SessionsPollSpawnedSessionsEvent { /** - * Handle returned by a previous `registerInterest` call. Idempotent: releasing an unknown or already-released handle is a no-op (returns success). When the last outstanding handle for an event type is released, the runtime reverts to its 'no consumer' code path for that event type. + * Session id of the newly-spawned session. */ - handle: string; + sessionId: string; } /** - * Optional remote session mode ("off", "export", or "on"); defaults to enabling both export and remote steering. + * Custom model-provider configuration (BYOK). * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "RemoteEnableRequest". + * via the `definition` "ProviderConfig". */ /** @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 { +export interface ProviderConfig { + type?: ProviderConfigType; + wireApi?: ProviderConfigWireApi; /** - * GitHub frontend URL for this session + * API endpoint URL. */ - url?: string; + baseUrl: string; /** - * Whether remote steering is enabled + * API key. Optional for local providers like Ollama. */ - remoteSteerable: boolean; + apiKey?: string; + /** + * Bearer token for authentication. Sets the Authorization header directly. Takes precedence over apiKey when both are set. + */ + bearerToken?: string; + azure?: ProviderConfigAzure; + /** + * Well-known model ID used for capability lookup. When set, agent behavior config and token limits are inferred from this model. + */ + modelId?: string; + /** + * The model identifier sent to the provider API for inference (the "wire" model), as opposed to modelId which is the well-known base. + */ + wireModel?: string; + /** + * Maximum prompt/input tokens for the model. + */ + maxPromptTokens?: number; + /** + * Maximum context window tokens for the model. + */ + maxContextWindowTokens?: number; + /** + * Maximum output tokens for the model. + */ + maxOutputTokens?: number; + /** + * Custom HTTP headers to include in all outbound requests to the provider. + */ + headers?: { + [k: string]: string | undefined; + }; } /** - * New remote-steerability state to persist as a `session.remote_steerable_changed` event. + * Azure-specific provider options. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "RemoteNotifySteerableChangedRequest". + * via the `definition` "ProviderConfigAzure". */ /** @experimental */ -export interface RemoteNotifySteerableChangedRequest { +export interface ProviderConfigAzure { /** - * Whether the session now supports remote steering via GitHub. The runtime persists this as a `session.remote_steerable_changed` event so resume/replay sees the up-to-date capability. + * API version. When set, uses the versioned deployment route. When omitted, uses the GA versionless v1 route. */ - remoteSteerable: boolean; + apiVersion?: string; } /** - * Persist a steerability change as a `session.remote_steerable_changed` event. Used by the host (CLI / SDK consumer) when it has just finished enabling or disabling steering on a remote exporter that the runtime does not directly own. + * File attachment * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "RemoteNotifySteerableChangedResult". + * via the `definition` "PushAttachmentFile". */ /** @experimental */ -export interface RemoteNotifySteerableChangedResult {} +export interface PushAttachmentFile { + /** + * Attachment type discriminator + */ + type: "file"; + /** + * Absolute file path + */ + path: string; + /** + * User-facing display name for the attachment + */ + displayName: string; + lineRange?: PushAttachmentFileLineRange; +} /** - * Remote session connection result. + * Optional line range to scope the attachment to a specific section of the file * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "RemoteSessionConnectionResult". + * via the `definition` "PushAttachmentFileLineRange". */ /** @experimental */ -export interface RemoteSessionConnectionResult { +export interface PushAttachmentFileLineRange { /** - * SDK session ID for the connected remote session. + * Start line number (1-based) */ - sessionId: string; - metadata: ConnectedRemoteSessionMetadata; + start: number; + /** + * End line number (1-based, inclusive) + */ + end: number; } /** - * Schema for the `ScheduleEntry` type. + * Directory attachment * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "ScheduleEntry". + * via the `definition` "PushAttachmentDirectory". */ /** @experimental */ -export interface ScheduleEntry { - /** - * Sequential id assigned by the runtime within the session. Stable across resumes (rebuilt from the event log). - */ - id: number; - /** - * Interval between scheduled ticks, in milliseconds. - */ - intervalMs: number; - /** - * Prompt text that gets enqueued on every tick. - */ - prompt: string; +export interface PushAttachmentDirectory { /** - * Whether the schedule re-arms after each tick (`/every`) or fires once (`/after`). + * Attachment type discriminator */ - recurring: boolean; + type: "directory"; /** - * Display-only label for the prompt as shown in the UI (e.g. `/skill-name` for a skill-invocation schedule). The actual enqueued prompt is `prompt`. + * Absolute directory path */ - displayPrompt?: string; + path: string; /** - * ISO 8601 timestamp when the next tick is scheduled to fire. + * User-facing display name for the attachment */ - nextRunAt: string; + displayName: string; } /** - * Snapshot of the currently active recurring prompts for this session. + * Code selection attachment from an editor * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "ScheduleList". + * via the `definition` "PushAttachmentSelection". */ /** @experimental */ -export interface ScheduleList { +export interface PushAttachmentSelection { /** - * Active scheduled prompts, ordered by id. + * Attachment type discriminator */ - entries: ScheduleEntry[]; -} -/** - * Identifier of the scheduled prompt to remove. - * - * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "ScheduleStopRequest". - */ -/** @experimental */ -export interface ScheduleStopRequest { + type: "selection"; /** - * Id of the scheduled prompt to remove. + * Absolute path to the file containing the selection */ - id: number; + filePath: string; + /** + * User-facing display name for the selection + */ + displayName: string; + /** + * The selected text content + */ + text: string; + selection: PushAttachmentSelectionDetails; } /** - * Remove a scheduled prompt by id. The result entry is omitted if the id was unknown. + * Position range of the selection within the file * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "ScheduleStopResult". + * via the `definition` "PushAttachmentSelectionDetails". */ /** @experimental */ -export interface ScheduleStopResult { - entry?: ScheduleEntry; +export interface PushAttachmentSelectionDetails { + start: PushAttachmentSelectionDetailsStart; + end: PushAttachmentSelectionDetailsEnd; } /** - * Secret values to add to the redaction filter. + * Start position of the selection * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SecretsAddFilterValuesRequest". + * via the `definition` "PushAttachmentSelectionDetailsStart". */ -export interface SecretsAddFilterValuesRequest { +/** @experimental */ +export interface PushAttachmentSelectionDetailsStart { /** - * Raw secret values to register for redaction + * Start line number (0-based) */ - values: string[]; -} -/** - * Confirmation that the secret values were registered. - * - * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SecretsAddFilterValuesResult". - */ -export interface SecretsAddFilterValuesResult { + line: number; /** - * Whether the values were successfully registered + * Start character offset within the line (0-based) */ - ok: true; + character: number; } /** - * Parameters for session.extensions.sendAttachmentsToMessage. + * End position of the selection * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SendAttachmentsToMessageParams". + * via the `definition` "PushAttachmentSelectionDetailsEnd". */ /** @experimental */ -export interface SendAttachmentsToMessageParams { +export interface PushAttachmentSelectionDetailsEnd { /** - * Optional canvas instance binding the push for provenance. When supplied, the runtime resolves the canvas, verifies it is owned by the calling extension, and stamps canvasId/instanceId onto each extension_context entry. When omitted, no resolution runs and those fields stay unset on the attachment. + * End line number (0-based) */ - instanceId?: string; + line: number; /** - * Attachments to push into the next user-message turn. extension_context entries take the slim shape; standard variants take their full AttachmentSchema shape. + * End character offset within the line (0-based) */ - attachments: PushAttachment[]; + character: number; } /** - * Parameters for sending a user message to the session + * GitHub issue, pull request, or discussion reference * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SendRequest". + * via the `definition` "PushAttachmentGitHubReference". */ /** @experimental */ -export interface SendRequest { - /** - * The user message text - */ - prompt: string; - /** - * If provided, this is shown in the timeline instead of `prompt` - */ - displayPrompt?: string; +export interface PushAttachmentGitHubReference { /** - * Optional attachments (files, directories, selections, blobs, GitHub references) to include with the message + * Attachment type discriminator */ - attachments?: Attachment[]; - mode?: SendMode; + type: "github_reference"; /** - * If true, adds the message to the front of the queue instead of the end + * Issue, pull request, or discussion number */ - prepend?: boolean; + number: number; /** - * If false, this message will not trigger a Premium Request Unit charge. User messages default to billable. + * Title of the referenced item */ - billable?: boolean; + title: string; + referenceType: PushAttachmentGitHubReferenceType; /** - * If set, the request will fail if the named tool is not available when this message is among the user messages at the start of the current exchange + * Current state of the referenced item (e.g., open, closed, merged) */ - requiredTool?: string; + state: string; /** - * Optional provenance tag copied to the resulting user.message event. Supported values are `system`, `command-*`, and `schedule-*`. - * - * @internal + * URL to the referenced item on GitHub */ - source?: { - [k: string]: unknown | undefined; - }; - agentMode?: SendAgentMode; + url: string; +} +/** + * Blob attachment with inline base64-encoded data + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PushAttachmentBlob". + */ +/** @experimental */ +export interface PushAttachmentBlob { /** - * Custom HTTP headers to include in outbound model requests for this turn. Merged with session-level provider headers; per-turn headers augment and overwrite session-level headers with the same key. + * Attachment type discriminator */ - requestHeaders?: { - [k: string]: string | undefined; - }; + type: "blob"; /** - * W3C Trace Context traceparent header for distributed tracing of this agent turn + * Base64-encoded content */ - traceparent?: string; + data: string; /** - * W3C Trace Context tracestate header for distributed tracing + * MIME type of the inline data */ - tracestate?: string; + mimeType: string; /** - * If true, await completion of the agentic loop for this message before returning. Defaults to false (fire-and-forget). When true, the result still contains the same `messageId`; the caller can rely on the agent having processed the message before the call resolves. + * User-facing display name for the attachment */ - wait?: boolean; + displayName?: string; } /** - * Result of sending a user message + * Schema for the `QueuePendingItems` type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SendResult". + * via the `definition` "QueuePendingItems". */ /** @experimental */ -export interface SendResult { +export interface QueuePendingItems { + kind: QueuePendingItemsKind; /** - * Unique identifier assigned to the message + * Human-readable text to display for this queue entry in the UI */ - messageId: string; + displayText: string; } /** - * Schema for the `ServerSkill` type. + * Snapshot of the session's pending queued items and immediate-steering messages. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "ServerSkill". + * via the `definition` "QueuePendingItemsResult". */ -export interface ServerSkill { +/** @experimental */ +export interface QueuePendingItemsResult { /** - * Unique identifier for the skill - */ - name: string; - /** - * Description of what the skill does - */ - description: string; - source: SkillSource; - /** - * Whether the skill can be invoked by the user as a slash command - */ - userInvocable: boolean; - /** - * Whether the skill is currently enabled (based on global config) - */ - enabled: boolean; - /** - * Absolute path to the skill file + * Pending queued items in submission order. Includes user messages, queued slash commands, and queued model changes; omits internal system items. */ - path?: string; + items: QueuePendingItems[]; /** - * The project path this skill belongs to (only for project/inherited skills) + * Display text for messages currently in the immediate steering queue (interjections sent during a running turn). */ - projectPath?: string; + steeringMessages: string[]; } /** - * Skills discovered across global and project sources. + * Indicates whether a user-facing pending item was removed. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "ServerSkillList". + * via the `definition` "QueueRemoveMostRecentResult". */ -export interface ServerSkillList { +/** @experimental */ +export interface QueueRemoveMostRecentResult { /** - * All discovered skills across all sources + * True if a user-facing pending item was removed (LIFO across both queues); false when no removable items remained. */ - skills: ServerSkill[]; + removed: boolean; } /** - * Authentication status and account metadata for the session. + * Event type to register consumer interest for, used by runtime gating logic. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionAuthStatus". + * via the `definition` "RegisterEventInterestParams". */ /** @experimental */ -export interface SessionAuthStatus { - /** - * Whether the session has resolved authentication - */ - isAuthenticated: boolean; - authType?: AuthInfoType; +export interface RegisterEventInterestParams { /** - * Authentication host URL + * The event type the consumer wants the runtime to treat as 'observed' for behavior-switching gating. Some runtime code paths inspect whether any consumer is interested in a specific event type and choose a different implementation accordingly (e.g. `mcp.oauth_required`: when interest is registered the runtime delegates the full interactive OAuth flow to the consumer; when no interest is registered the runtime installs a browserless fallback that silently reuses cached tokens). SDK clients that long-poll events do NOT automatically appear as listeners to these gating checks — they must explicitly call `registerInterest` for each event type they want the runtime to count as having a consumer. Multiple registrations for the same event type from the same or different consumers are tracked independently and must each be released. See: `mcp.oauth_required`, `sampling.requested`, `auto_mode_switch.requested`, `user_input.requested`, `elicitation.requested`, `command.queued`, `exit_plan_mode.requested`. */ - host?: string; + eventType: string; +} +/** + * Opaque handle representing an event-type interest registration. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "RegisterEventInterestResult". + */ +/** @experimental */ +export interface RegisterEventInterestResult { /** - * Authenticated login/username, if available + * Opaque handle for this registration. Pass to releaseInterest to release. Each call to registerInterest produces a fresh handle, even when the same eventType is registered multiple times. */ - login?: string; + handle: string; +} +/** + * Params to attach an extension loader's tools to a session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "RegisterExtensionToolsParams". + */ +/** @experimental */ +/** @internal */ +export interface RegisterExtensionToolsParams { /** - * Human-readable authentication status description + * Session to register extension tools on. */ - statusMessage?: string; + sessionId: string; /** - * Copilot plan tier (e.g., individual_pro, business) + * In-process ExtensionLoader handle (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, extension discovery/launch moves entirely into the runtime — the CLI passes pure config (search paths, disabled ids) via SessionOptions instead. + * + * @internal + * + * @internal */ - copilotPlan?: string; + loader: { + [k: string]: unknown | undefined; + }; + options?: SessionsRegisterExtensionToolsOnSessionOptions; } /** - * Map of sessionId -> bytes freed by removing the session's workspace directory. + * Optional registration options. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionBulkDeleteResult". + * via the `definition` "SessionsRegisterExtensionToolsOnSessionOptions". */ /** @experimental */ -export interface SessionBulkDeleteResult { +export interface SessionsRegisterExtensionToolsOnSessionOptions { /** - * Map of sessionId -> bytes freed by removing the session's workspace directory. Sessions whose deletion failed are omitted from this map (failures are logged on the server but not surfaced per-id; check the map for absent IDs to detect them). + * In-process `() => boolean` gating callback (CLI-only optimization). Marked internal: replaced by runtime-side enable/disable RPCs in the SDK migration. + * + * @internal */ - freedBytes: { - [k: string]: number | undefined; + enabled?: { + [k: string]: unknown | undefined; }; } /** - * Schema for the `SessionContext` type. + * Handle for releasing the extension tool registration. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionContext". + * via the `definition` "RegisterExtensionToolsResult". */ /** @experimental */ -export interface SessionContext { - /** - * Most recent working directory for this session - */ - cwd: string; - /** - * Git repository root, if the cwd was inside a git repo - */ - gitRoot?: string; - /** - * Repository slug in `owner/name` form, when known - */ - repository?: string; - hostType?: SessionContextHostType; +/** @internal */ +export interface RegisterExtensionToolsResult { /** - * Active git branch + * In-process unsubscribe function (CLI-only optimization). Marked internal: replaced by an explicit `extensions.unregister` RPC in the SDK migration. + * + * @internal + * + * @internal */ - branch?: string; + unsubscribe: { + [k: string]: unknown | undefined; + }; } /** - * The enriched metadata records, with summary and context fields backfilled where available. Sessions confirmed empty and unnamed are omitted. + * Opaque handle previously returned by `registerInterest` to release. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionEnrichMetadataResult". + * via the `definition` "ReleaseEventInterestParams". */ /** @experimental */ -export interface SessionEnrichMetadataResult { +export interface ReleaseEventInterestParams { /** - * Enriched records, with summary and context backfilled. Sessions confirmed empty and unnamed may be omitted. + * Handle returned by a previous `registerInterest` call. Idempotent: releasing an unknown or already-released handle is a no-op (returns success). When the last outstanding handle for an event type is released, the runtime reverts to its 'no consumer' code path for that event type. */ - sessions: SessionMetadata[]; + handle: string; } /** - * Schema for the `SessionMetadata` type. + * Configuration for the runtime-managed remote-control singleton. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionMetadata". + * via the `definition` "RemoteControlConfig". */ /** @experimental */ -export interface SessionMetadata { - /** - * Stable session identifier - */ - sessionId: string; +export interface RemoteControlConfig { /** - * Session creation time as an ISO 8601 timestamp - */ - startTime: string; - /** - * Last-modified time of the session's persisted state, as ISO 8601 - */ - modifiedTime: string; - /** - * Short summary of the session, when one has been derived - */ - summary?: string; - /** - * Optional human-friendly name set via /rename + * Whether remote export should be enabled. */ - name?: string; + remote: boolean; /** - * Runtime client name that created/last resumed this session + * Whether the MC session may steer the local session (write mode). */ - clientName?: string; + steerable: boolean; /** - * True for remote (GitHub) sessions; false for local + * Whether the user explicitly requested remote (vs. implicit session-sync). Controls warning surfacing for missing-repo cases. */ - isRemote: boolean; + explicit: boolean; /** - * True for detached maintenance sessions that should be hidden from normal resume lists. + * When true, suppresses timeline messages on successful setup. */ - isDetached?: boolean; - context?: SessionContext; + silent: boolean; /** - * GitHub task ID, when this local session is bound to one. Only present for local sessions exported to remote control. + * Existing Mission Control task ID to attach the exported session to. */ - mcTaskId?: string; + taskId?: string; + existingMcSession?: RemoteControlConfigExistingMcSession; } /** - * File path, content to append, and optional mode for the client-provided session filesystem. + * Reattach to an existing MC session without creating a new one. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsAppendFileRequest". + * via the `definition` "RemoteControlConfigExistingMcSession". */ /** @experimental */ -export interface SessionFsAppendFileRequest { - /** - * Target session identifier - */ - sessionId: string; - /** - * Path using SessionFs conventions - */ - path: string; +export interface RemoteControlConfigExistingMcSession { /** - * Content to append + * Existing MC session ID to reattach to. */ - content: string; + mcSessionId: string; /** - * Optional POSIX-style mode for newly created files + * Existing MC task ID for the reattached session. */ - mode?: number; + mcTaskId: string; } /** - * Describes a filesystem error. + * Remote control is not connected. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsError". + * via the `definition` "RemoteControlStatusOff". */ /** @experimental */ -export interface SessionFsError { - code: SessionFsErrorCode; +export interface RemoteControlStatusOff { /** - * Free-form detail about the error, for logging/diagnostics + * Remote control state tag: not connected. */ - message?: string; + state: "off"; } /** - * Path to test for existence in the client-provided session filesystem. + * Remote control is in the middle of initial setup. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsExistsRequest". + * via the `definition` "RemoteControlStatusConnecting". */ /** @experimental */ -export interface SessionFsExistsRequest { +export interface RemoteControlStatusConnecting { /** - * Target session identifier + * Remote control state tag: connecting. */ - sessionId: string; + state: "connecting"; /** - * Path using SessionFs conventions + * Session id the connection is attaching to. */ - path: string; + attachedSessionId: string; } /** - * Indicates whether the requested path exists in the client-provided session filesystem. + * Remote control is connected to a local session. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsExistsResult". + * via the `definition` "RemoteControlStatusActive". */ /** @experimental */ -export interface SessionFsExistsResult { +export interface RemoteControlStatusActive { /** - * Whether the path exists + * Remote control state tag: active. */ - 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". - */ -/** @experimental */ -export interface SessionFsMkdirRequest { + state: "active"; /** - * Target session identifier + * Session id remote control is pointed at. */ - sessionId: string; + attachedSessionId: string; /** - * Path using SessionFs conventions + * MC frontend URL for this session, when known. */ - path: string; + frontendUrl?: string; /** - * Create parent directories as needed + * Whether the MC session may steer this session. */ - recursive?: boolean; + isSteerable: boolean; /** - * Optional POSIX-style mode for newly created directories + * In-process prompt-manager handle (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, the same bidirectional prompt-routing handshake is expressed via dedicated remote-control RPCs (register/resolve) rather than a shared in-process object. + * + * @internal */ - mode?: number; + promptManager?: { + [k: string]: unknown | undefined; + }; } /** - * Directory path whose entries should be listed from the client-provided session filesystem. + * The last setup attempt failed. The singleton is otherwise off. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsReaddirRequest". + * via the `definition` "RemoteControlStatusError". */ /** @experimental */ -export interface SessionFsReaddirRequest { +export interface RemoteControlStatusError { /** - * Target session identifier + * Remote control state tag: setup failed. */ - sessionId: string; + state: "error"; /** - * Path using SessionFs conventions + * Human-readable error message from the last setup attempt. */ - path: string; + error: string; + /** + * Session id the failing setup attempt targeted, when known. + */ + attachedSessionId?: string; } /** - * Names of entries in the requested directory, or a filesystem error if the read failed. + * Wrapper for the singleton's current status. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsReaddirResult". + * via the `definition` "RemoteControlStatusResult". */ /** @experimental */ -export interface SessionFsReaddirResult { - /** - * Entry names in the directory - */ - entries: string[]; - error?: SessionFsError; +export interface RemoteControlStatusResult { + status: RemoteControlStatus; } /** - * Schema for the `SessionFsReaddirWithTypesEntry` type. + * Outcome of a stopRemoteControl call. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsReaddirWithTypesEntry". + * via the `definition` "RemoteControlStopResult". */ /** @experimental */ -export interface SessionFsReaddirWithTypesEntry { +export interface RemoteControlStopResult { + status: RemoteControlStatus; /** - * Entry name + * Whether the singleton was actually torn down by this call. */ - name: string; - type: SessionFsReaddirWithTypesEntryType; + stopped: boolean; } /** - * Directory path whose entries (with type information) should be listed from the client-provided session filesystem. + * Outcome of a transferRemoteControl call. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsReaddirWithTypesRequest". + * via the `definition` "RemoteControlTransferResult". */ /** @experimental */ -export interface SessionFsReaddirWithTypesRequest { - /** - * Target session identifier - */ - sessionId: string; +export interface RemoteControlTransferResult { + status: RemoteControlStatus; /** - * Path using SessionFs conventions + * Whether the rebinding actually happened. */ - path: string; + transferred: boolean; } /** - * Entries in the requested directory paired with file/directory type information, or a filesystem error if the read failed. + * 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` "SessionFsReaddirWithTypesResult". + * via the `definition` "RemoteEnableRequest". */ /** @experimental */ -export interface SessionFsReaddirWithTypesResult { - /** - * Directory entries with type information - */ - entries: SessionFsReaddirWithTypesEntry[]; - error?: SessionFsError; +export interface RemoteEnableRequest { + mode?: RemoteSessionMode; } /** - * Path of the file to read from the client-provided session filesystem. + * 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` "SessionFsReadFileRequest". + * via the `definition` "RemoteEnableResult". */ /** @experimental */ -export interface SessionFsReadFileRequest { +export interface RemoteEnableResult { /** - * Target session identifier + * GitHub frontend URL for this session */ - sessionId: string; + url?: string; /** - * Path using SessionFs conventions + * Whether remote steering is enabled */ - path: string; + remoteSteerable: boolean; } /** - * File content as a UTF-8 string, or a filesystem error if the read failed. + * New remote-steerability state to persist as a `session.remote_steerable_changed` event. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsReadFileResult". + * via the `definition` "RemoteNotifySteerableChangedRequest". */ /** @experimental */ -export interface SessionFsReadFileResult { +export interface RemoteNotifySteerableChangedRequest { /** - * File content as UTF-8 string + * Whether the session now supports remote steering via GitHub. The runtime persists this as a `session.remote_steerable_changed` event so resume/replay sees the up-to-date capability. */ - content: string; - error?: SessionFsError; + remoteSteerable: boolean; } /** - * Source and destination paths for renaming or moving an entry in the client-provided session filesystem. + * Persist a steerability change as a `session.remote_steerable_changed` event. Used by the host (CLI / SDK consumer) when it has just finished enabling or disabling steering on a remote exporter that the runtime does not directly own. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsRenameRequest". + * via the `definition` "RemoteNotifySteerableChangedResult". */ /** @experimental */ -export interface SessionFsRenameRequest { +export interface RemoteNotifySteerableChangedResult {} +/** + * Remote session connection result. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "RemoteSessionConnectionResult". + */ +/** @experimental */ +export interface RemoteSessionConnectionResult { /** - * Target session identifier + * SDK session ID for the connected remote session. */ sessionId: string; + metadata: ConnectedRemoteSessionMetadata; +} +/** + * GitHub repository the remote session belongs to. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "RemoteSessionMetadataRepository". + */ +/** @experimental */ +export interface RemoteSessionMetadataRepository { /** - * Source path using SessionFs conventions + * Repository owner. */ - src: string; + owner: string; /** - * Destination path using SessionFs conventions + * Repository name. */ - dest: string; + name: string; + /** + * Branch associated with the remote session. + */ + branch: string; } /** - * Path to remove from the client-provided session filesystem, with options for recursive removal and force. + * Remote session metadata for the session to hand off (typically obtained from `sessions.list` with `source: "remote"`). * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsRmRequest". + * via the `definition` "RemoteSessionMetadataValue". */ /** @experimental */ -export interface SessionFsRmRequest { +export interface RemoteSessionMetadataValue { /** - * Target session identifier + * Stable session identifier. */ sessionId: string; /** - * Path using SessionFs conventions + * Session creation time as an ISO 8601 timestamp. */ - path: string; + startTime: string; /** - * Remove directories and their contents recursively + * Last-modified time as an ISO 8601 timestamp. */ - recursive?: boolean; + modifiedTime: string; /** - * Ignore errors if the path does not exist + * Short summary of the session, when one has been derived. */ - force?: boolean; -} -/** - * Optional capabilities declared by the provider - * - * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsSetProviderCapabilities". - */ -export interface SessionFsSetProviderCapabilities { + summary?: string; /** - * Whether the provider supports SQLite query/exists operations + * Optional human-friendly name set via /rename. */ - sqlite?: boolean; + name?: string; + /** + * Always true for remote sessions. + */ + isRemote: true; + context?: SessionContext; + repository: RemoteSessionMetadataRepository; + /** + * Backing remote session IDs (most recent first). + */ + remoteSessionIds: string[]; + /** + * Pull request number associated with the session. + */ + pullRequestNumber?: number; + /** + * Original remote resource identifier (task ID or PR node ID). + */ + resourceId?: string; + taskType?: RemoteSessionMetadataTaskType; + /** + * Deadline (ISO 8601) at which a CLI remote session becomes stale without further heartbeats. + */ + staleAt?: string; + /** + * Server-side task state returned by GitHub. + */ + state?: string; } /** - * Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider. + * Repository context for the remote session. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsSetProviderRequest". + * via the `definition` "RemoteSessionRepository". */ -export interface SessionFsSetProviderRequest { +/** @experimental */ +export interface RemoteSessionRepository { /** - * Initial working directory for sessions + * Repository owner or organization login. */ - initialCwd: string; + owner: string; /** - * Path within each session's SessionFs where the runtime stores files for that session + * Repository name. */ - sessionStatePath: string; - conventions: SessionFsSetProviderConventions; - capabilities?: SessionFsSetProviderCapabilities; + name: string; + /** + * Optional branch associated with the remote session. + */ + branch?: string; } /** - * Indicates whether the calling client was registered as the session filesystem provider. + * Resolved sandbox configuration. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsSetProviderResult". + * via the `definition` "SandboxConfig". */ -export interface SessionFsSetProviderResult { +/** @experimental */ +export interface SandboxConfig { /** - * Whether the provider was set successfully + * Whether sandboxing is enabled for the session. */ - success: boolean; + enabled: boolean; + userPolicy?: SandboxConfigUserPolicy; + /** + * Raw `ContainerConfig` (per `@microsoft/mxc-sdk`) passed directly to `spawnSandboxFromConfig`, bypassing policy merging. + */ + config?: { + [k: string]: unknown | undefined; + }; + /** + * Whether to auto-add the current working directory to readwritePaths. Default: true. + */ + addCurrentWorkingDirectory?: boolean; } /** - * Indicates whether the per-session SQLite database already exists. + * User-managed sandbox policy fragment merged into the auto-discovered base policy. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsSqliteExistsResult". + * via the `definition` "SandboxConfigUserPolicy". */ /** @experimental */ -export interface SessionFsSqliteExistsResult { - /** - * Whether the session database already exists - */ - exists: boolean; +export interface SandboxConfigUserPolicy { + filesystem?: SandboxConfigUserPolicyFilesystem; + network?: SandboxConfigUserPolicyNetwork; + experimental?: SandboxConfigUserPolicyExperimental; } /** - * SQL query, query type, and optional bind parameters for executing a SQLite query against the per-session database. + * Filesystem rules to merge into the base policy. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsSqliteQueryRequest". + * via the `definition` "SandboxConfigUserPolicyFilesystem". */ /** @experimental */ -export interface SessionFsSqliteQueryRequest { +export interface SandboxConfigUserPolicyFilesystem { /** - * Target session identifier + * Paths granted read/write access. */ - sessionId: string; + readwritePaths?: string[]; /** - * SQL query to execute + * Paths granted read-only access. */ - query: string; - queryType: SessionFsSqliteQueryType; + readonlyPaths?: string[]; /** - * Optional named bind parameters + * Paths explicitly denied. */ - params?: { - [k: string]: (string | number | null) | undefined; - }; + deniedPaths?: string[]; + /** + * Whether to clear the policy when the session exits. + */ + clearPolicyOnExit?: boolean; } /** - * Query results including rows, columns, and rows affected, or a filesystem error if execution failed. + * Network rules to merge into the base policy. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsSqliteQueryResult". + * via the `definition` "SandboxConfigUserPolicyNetwork". */ /** @experimental */ -export interface SessionFsSqliteQueryResult { +export interface SandboxConfigUserPolicyNetwork { /** - * For SELECT: array of row objects. For others: empty array. + * Whether outbound network traffic is allowed at all. */ - rows: { - [k: string]: unknown | undefined; - }[]; + allowOutbound?: boolean; /** - * Column names from the result set + * Whether traffic to local/loopback addresses is allowed. */ - columns: string[]; + allowLocalNetwork?: boolean; /** - * Number of rows affected (for INSERT/UPDATE/DELETE) + * Hosts allowed in addition to the base policy. */ - rowsAffected: number; + allowedHosts?: string[]; /** - * SQLite last_insert_rowid() value for INSERT. + * Hosts explicitly blocked. */ - lastInsertRowid?: number; - error?: SessionFsError; + blockedHosts?: string[]; } /** - * Path whose metadata should be returned from the client-provided session filesystem. + * Platform-specific experimental policy fields. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsStatRequest". + * via the `definition` "SandboxConfigUserPolicyExperimental". */ /** @experimental */ -export interface SessionFsStatRequest { - /** - * Target session identifier - */ - sessionId: string; +export interface SandboxConfigUserPolicyExperimental { + seatbelt?: SandboxConfigUserPolicyExperimentalSeatbelt; +} +/** + * macOS seatbelt experimental options. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SandboxConfigUserPolicyExperimentalSeatbelt". + */ +/** @experimental */ +export interface SandboxConfigUserPolicyExperimentalSeatbelt { /** - * Path using SessionFs conventions + * Whether the macOS seatbelt profile may access the keychain. */ - path: string; + keychainAccess?: boolean; } /** - * Filesystem metadata for the requested path, or a filesystem error if the stat failed. + * Schema for the `ScheduleEntry` type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsStatResult". + * via the `definition` "ScheduleEntry". */ /** @experimental */ -export interface SessionFsStatResult { +export interface ScheduleEntry { /** - * Whether the path is a file + * Sequential id assigned by the runtime within the session. Stable across resumes (rebuilt from the event log). */ - isFile: boolean; + id: number; /** - * Whether the path is a directory + * Interval between scheduled ticks, in milliseconds. */ - isDirectory: boolean; + intervalMs: number; /** - * File size in bytes + * Prompt text that gets enqueued on every tick. */ - size: number; + prompt: string; /** - * ISO 8601 timestamp of last modification + * Whether the schedule re-arms after each tick (`/every`) or fires once (`/after`). */ - mtime: string; + recurring: boolean; /** - * ISO 8601 timestamp of creation + * Display-only label for the prompt as shown in the UI (e.g. `/skill-name` for a skill-invocation schedule). The actual enqueued prompt is `prompt`. */ - birthtime: string; - error?: SessionFsError; + displayPrompt?: string; + /** + * ISO 8601 timestamp when the next tick is scheduled to fire. + */ + nextRunAt: string; } /** - * File path, content to write, and optional mode for the client-provided session filesystem. + * Snapshot of the currently active recurring prompts for this session. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionFsWriteFileRequest". + * via the `definition` "ScheduleList". */ /** @experimental */ -export interface SessionFsWriteFileRequest { - /** - * Target session identifier - */ - sessionId: string; - /** - * Path using SessionFs conventions - */ - path: string; +export interface ScheduleList { /** - * Content to write + * Active scheduled prompts, ordered by id. */ - content: string; + entries: ScheduleEntry[]; +} +/** + * Identifier of the scheduled prompt to remove. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ScheduleStopRequest". + */ +/** @experimental */ +export interface ScheduleStopRequest { /** - * Optional POSIX-style mode for newly created files + * Id of the scheduled prompt to remove. */ - mode?: number; + id: number; } /** - * Schema for the `SessionInstalledPlugin` type. + * Remove a scheduled prompt by id. The result entry is omitted if the id was unknown. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionInstalledPlugin". + * via the `definition` "ScheduleStopResult". */ /** @experimental */ -export interface SessionInstalledPlugin { +export interface ScheduleStopResult { + entry?: ScheduleEntry; +} +/** + * Secret values to add to the redaction filter. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SecretsAddFilterValuesRequest". + */ +export interface SecretsAddFilterValuesRequest { + /** + * Raw secret values to register for redaction + */ + values: string[]; +} +/** + * Confirmation that the secret values were registered. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SecretsAddFilterValuesResult". + */ +export interface SecretsAddFilterValuesResult { + /** + * Whether the values were successfully registered + */ + ok: true; +} +/** + * Parameters for session.extensions.sendAttachmentsToMessage. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SendAttachmentsToMessageParams". + */ +/** @experimental */ +export interface SendAttachmentsToMessageParams { + /** + * Optional canvas instance binding the push for provenance. When supplied, the runtime resolves the canvas, verifies it is owned by the calling extension, and stamps canvasId/instanceId onto each extension_context entry. When omitted, no resolution runs and those fields stay unset on the attachment. + */ + instanceId?: string; + /** + * Attachments to push into the next user-message turn. extension_context entries take the slim shape; standard variants take their full AttachmentSchema shape. + */ + attachments: PushAttachment[]; +} +/** + * Parameters for sending a user message to the session + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SendRequest". + */ +/** @experimental */ +export interface SendRequest { + /** + * The user message text + */ + prompt: string; + /** + * If provided, this is shown in the timeline instead of `prompt` + */ + displayPrompt?: string; + /** + * Optional attachments (files, directories, selections, blobs, GitHub references) to include with the message + */ + attachments?: Attachment[]; + mode?: SendMode; + /** + * If true, adds the message to the front of the queue instead of the end + */ + prepend?: boolean; + /** + * If false, this message will not trigger a Premium Request Unit charge. User messages default to billable. + */ + billable?: boolean; + /** + * If set, the request will fail if the named tool is not available when this message is among the user messages at the start of the current exchange + */ + requiredTool?: string; + /** + * Optional provenance tag copied to the resulting user.message event. Must match one of three forms: the literal `system`, `command-` for messages originating from a command (e.g. slash command, Mission Control command), or `schedule-` for messages originating from a scheduled job. + * + * @internal + */ + source?: string; + agentMode?: SendAgentMode; + /** + * Custom HTTP headers to include in outbound model requests for this turn. Merged with session-level provider headers; per-turn headers augment and overwrite session-level headers with the same key. + */ + requestHeaders?: { + [k: string]: string | undefined; + }; + /** + * W3C Trace Context traceparent header for distributed tracing of this agent turn + */ + traceparent?: string; + /** + * W3C Trace Context tracestate header for distributed tracing + */ + tracestate?: string; + /** + * If true, await completion of the agentic loop for this message before returning. Defaults to false (fire-and-forget). When true, the result still contains the same `messageId`; the caller can rely on the agent having processed the message before the call resolves. + */ + wait?: boolean; +} +/** + * Result of sending a user message + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SendResult". + */ +/** @experimental */ +export interface SendResult { + /** + * Unique identifier assigned to the message + */ + messageId: string; +} +/** + * 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 + */ + name: string; + /** + * Description of what the skill does + */ + description: string; + source: SkillSource; + /** + * Whether the skill can be invoked by the user as a slash command + */ + userInvocable: boolean; + /** + * Whether the skill is currently enabled (based on global config) + */ + enabled: boolean; + /** + * Absolute path to the skill file + */ + path?: string; + /** + * The project path this skill belongs to (only for project/inherited skills) + */ + 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[]; +} +/** + * Current activity flags for the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionActivity". + */ +/** @experimental */ +export interface SessionActivity { + /** + * Whether an in-flight operation can currently be aborted. + */ + abortable: boolean; + /** + * Whether the session currently has active work, including running turns or tasks. + */ + hasActiveWork: boolean; +} +/** + * Authentication status and account metadata for the session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionAuthStatus". + */ +/** @experimental */ +export interface SessionAuthStatus { + /** + * Whether the session has resolved authentication + */ + isAuthenticated: boolean; + authType?: AuthInfoType; + /** + * Authentication host URL + */ + host?: string; + /** + * Authenticated login/username, if available + */ + login?: string; + /** + * Human-readable authentication status description + */ + statusMessage?: string; + /** + * Copilot plan tier (e.g., individual_pro, business) + */ + copilotPlan?: string; +} +/** + * Map of sessionId -> bytes freed by removing the session's workspace directory. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionBulkDeleteResult". + */ +/** @experimental */ +export interface SessionBulkDeleteResult { + /** + * Map of sessionId -> bytes freed by removing the session's workspace directory. Sessions whose deletion failed are omitted from this map (failures are logged on the server but not surfaced per-id; check the map for absent IDs to detect them). + */ + freedBytes: { + [k: string]: number | undefined; + }; +} +/** + * The enriched metadata records, with summary and context fields backfilled where available. Sessions confirmed empty and unnamed are omitted. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionEnrichMetadataResult". + */ +/** @experimental */ +export interface SessionEnrichMetadataResult { + /** + * Enriched records, with summary and context backfilled. Sessions confirmed empty and unnamed may be omitted. + */ + sessions: LocalSessionMetadataValue[]; +} +/** + * 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". + */ +/** @experimental */ +export interface SessionFsAppendFileRequest { + /** + * Target session identifier + */ + sessionId: string; + /** + * Path using SessionFs conventions + */ + path: string; + /** + * Content to append + */ + content: string; + /** + * Optional POSIX-style mode for newly created files + */ + mode?: number; +} +/** + * Describes a filesystem error. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsError". + */ +/** @experimental */ +export interface SessionFsError { + code: SessionFsErrorCode; + /** + * Free-form detail about the error, for logging/diagnostics + */ + 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". + */ +/** @experimental */ +export interface SessionFsExistsRequest { + /** + * Target session identifier + */ + sessionId: string; + /** + * Path using SessionFs conventions + */ + 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". + */ +/** @experimental */ +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". + */ +/** @experimental */ +export interface SessionFsMkdirRequest { + /** + * Target session identifier + */ + sessionId: string; + /** + * Path using SessionFs conventions + */ + path: string; + /** + * Create parent directories as needed + */ + recursive?: boolean; + /** + * Optional POSIX-style mode for newly created directories + */ + 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". + */ +/** @experimental */ +export interface SessionFsReaddirRequest { + /** + * Target session identifier + */ + sessionId: string; + /** + * Path using SessionFs conventions + */ + 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". + */ +/** @experimental */ +export interface SessionFsReaddirResult { + /** + * Entry names in the directory + */ + entries: string[]; + error?: SessionFsError; +} +/** + * Schema for the `SessionFsReaddirWithTypesEntry` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionFsReaddirWithTypesEntry". + */ +/** @experimental */ +export interface SessionFsReaddirWithTypesEntry { + /** + * Entry name + */ + 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". + */ +/** @experimental */ +export interface SessionFsReaddirWithTypesRequest { + /** + * Target session identifier + */ + sessionId: string; + /** + * Path using SessionFs conventions + */ + 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". + */ +/** @experimental */ +export interface SessionFsReaddirWithTypesResult { + /** + * Directory entries with type information + */ + 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". + */ +/** @experimental */ +export interface SessionFsReadFileRequest { + /** + * Target session identifier + */ + sessionId: string; + /** + * Path using SessionFs conventions + */ + 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". + */ +/** @experimental */ +export interface SessionFsReadFileResult { + /** + * File content as UTF-8 string + */ + 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". + */ +/** @experimental */ +export interface SessionFsRenameRequest { + /** + * Target session identifier + */ + sessionId: string; + /** + * Source path using SessionFs conventions + */ + src: string; + /** + * Destination path using SessionFs conventions + */ + 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". + */ +/** @experimental */ +export interface SessionFsRmRequest { + /** + * Target session identifier + */ + sessionId: string; + /** + * Path using SessionFs conventions + */ + path: string; + /** + * Remove directories and their contents recursively + */ + recursive?: boolean; + /** + * Ignore errors if the path does not exist + */ + 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 + */ + initialCwd: string; + /** + * Path within each session's SessionFs where the runtime stores files for that session + */ + 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". + */ +/** @experimental */ +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". + */ +/** @experimental */ +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) | undefined; + }; +} +/** + * 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". + */ +/** @experimental */ +export interface SessionFsSqliteQueryResult { + /** + * For SELECT: array of row objects. For others: empty array. + */ + rows: { + [k: string]: unknown | undefined; + }[]; + /** + * Column names from the result set + */ + columns: string[]; + /** + * Number of rows affected (for INSERT/UPDATE/DELETE) + */ + rowsAffected: number; + /** + * SQLite last_insert_rowid() value 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". + */ +/** @experimental */ +export interface SessionFsStatRequest { + /** + * Target session identifier + */ + sessionId: string; + /** + * Path using SessionFs conventions + */ + 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". + */ +/** @experimental */ +export interface SessionFsStatResult { + /** + * Whether the path is a file + */ + isFile: boolean; + /** + * Whether the path is a directory + */ + isDirectory: boolean; + /** + * File size in bytes + */ + size: number; + /** + * ISO 8601 timestamp of last modification + */ + mtime: string; + /** + * ISO 8601 timestamp of creation + */ + 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". + */ +/** @experimental */ +export interface SessionFsWriteFileRequest { + /** + * Target session identifier + */ + sessionId: string; + /** + * Path using SessionFs conventions + */ + path: string; + /** + * Content to write + */ + content: string; + /** + * Optional POSIX-style mode for newly created files + */ + mode?: number; +} +/** + * Schema for the `SessionInstalledPlugin` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionInstalledPlugin". + */ +/** @experimental */ +export interface SessionInstalledPlugin { + /** + * Plugin name + */ + name: string; + /** + * Marketplace the plugin came from (empty string for direct repo installs) + */ + marketplace: string; + /** + * Installed version, if known + */ + version?: string; + /** + * Installation timestamp (ISO-8601) + */ + installed_at: string; + /** + * Whether the plugin is currently enabled + */ + enabled: boolean; + /** + * Path where the plugin is cached locally + */ + cache_path?: string; + source?: SessionInstalledPluginSource; +} +/** + * Schema for the `SessionInstalledPluginSourceGitHub` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionInstalledPluginSourceGitHub". + */ +/** @experimental */ +export interface SessionInstalledPluginSourceGitHub { + /** + * Constant value. Always "github". + */ + source: "github"; + repo: string; + ref?: string; + path?: string; +} +/** + * Schema for the `SessionInstalledPluginSourceUrl` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionInstalledPluginSourceUrl". + */ +/** @experimental */ +export interface SessionInstalledPluginSourceUrl { + /** + * Constant value. Always "url". + */ + source: "url"; + url: string; + ref?: string; + path?: string; +} +/** + * Schema for the `SessionInstalledPluginSourceLocal` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionInstalledPluginSourceLocal". + */ +/** @experimental */ +export interface SessionInstalledPluginSourceLocal { + /** + * Constant value. Always "local". + */ + source: "local"; + path: string; +} +/** + * Sessions matching the filter, ordered most-recently-modified first. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionList". + */ +/** @experimental */ +export interface SessionList { + /** + * Sessions ordered most-recently-modified first. Discriminated by `isRemote`. + */ + sessions: SessionListEntry[]; +} +/** + * Optional filter applied to the returned sessions + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionListFilter". + */ +/** @experimental */ +export interface SessionListFilter { + /** + * Match sessions whose context.cwd equals this value + */ + cwd?: string; + /** + * Match sessions whose context.gitRoot equals this value + */ + gitRoot?: string; + /** + * Match sessions whose context.repository equals this value + */ + repository?: string; + /** + * Match sessions whose context.branch equals this value + */ + branch?: string; +} +/** + * Queued repo-level startup prompts and the total hook command count after loading. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionLoadDeferredRepoHooksResult". + */ +/** @experimental */ +export interface SessionLoadDeferredRepoHooksResult { + /** + * Repo-level startup prompts queued from repo hook configs. Empty on resume, when no repo configs were pending, or when disableAllHooks is set. + */ + startupPrompts: string[]; + /** + * Total hook command count (user + plugin + repo) loaded for the session by this call. Captured atomically with startupPrompts so callers don't need to read a separate counter. + */ + hookCount: number; +} +/** + * Point-in-time snapshot of slow-changing session identifier and state fields + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionMetadataSnapshot". + */ +/** @experimental */ +export interface SessionMetadataSnapshot { + /** + * The unique identifier of the session + */ + sessionId: string; + /** + * ISO 8601 timestamp of when the session started + */ + startTime: string; + /** + * ISO 8601 timestamp of when the session's persisted state was last modified on disk. For new sessions, equals startTime. For resumed sessions, reflects the previous modification time at construction. + */ + modifiedTime: string; + /** + * Whether this is a remote session (i.e., one whose runtime executes elsewhere and is steered through this process) + */ + isRemote: boolean; + /** + * True when the session was detected to be in use by another process at construction time. Local consumers may surface a confirmation prompt before fully attaching. Always false for new sessions. + */ + alreadyInUse: boolean; + /** + * Absolute path to the session's workspace directory on disk, or null if the session has no associated workspace + */ + workspacePath: string | null; + /** + * User-provided name supplied at session construction (via `--name`), if any. Immutable after construction. + */ + initialName?: string; + /** + * Runtime client name associated with the session (telemetry identifier). + */ + clientName?: string; + remoteMetadata?: MetadataSnapshotRemoteMetadata; + /** + * Short human-readable summary of the session, if known. Omitted when no summary has been generated. + */ + summary?: string; + /** + * Absolute path to the session's current working directory + */ + workingDirectory: string; + currentMode: MetadataSnapshotCurrentMode; + /** + * Currently selected model identifier, if any + */ + selectedModel?: string; + /** + * Public-facing workspace metadata for this session, or null if the session has no associated workspace. Excludes runtime-internal fields (GitHub IDs, summary count, internal flags). + */ + workspace?: WorkspaceSummary | null; +} +/** + * The list of models available to this session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionModelList". + */ +/** @experimental */ +export interface SessionModelList { + /** + * Available models, ordered with the most preferred default first. + */ + list: unknown[]; + /** + * Per-quota snapshots returned alongside the model list, keyed by quota type. + */ + quotaSnapshots?: { + [k: string]: unknown | undefined; + }; +} +/** + * Session construction options. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionOpenOptions". + */ +/** @experimental */ +export interface SessionOpenOptions { + /** + * Optional stable session identifier to use for a new session. + */ + sessionId?: string; + /** + * Optional human-friendly session name. + */ + name?: string; + /** + * Initial model identifier. + */ + model?: string; + /** + * Initial reasoning effort level. + */ + reasoningEffort?: string; + reasoningSummary?: SessionOpenOptionsReasoningSummary; + /** + * Identifier of the client driving the session. + */ + clientName?: string; + /** + * Structured client kind used for runtime behavior gates. + */ + clientKind?: string; + /** + * Identifier sent to LSP-style integrations. + */ + lspClientName?: string; + /** + * Stable integration identifier for analytics. + */ + integrationId?: string; + /** + * Feature-flag values resolved by the host. + */ + featureFlags?: { + [k: string]: boolean | undefined; + }; + /** + * Whether experimental behavior is enabled. + */ + isExperimentalMode?: boolean; + authInfo?: AuthInfo; + provider?: ProviderConfig; + /** + * Working directory to anchor the session. + */ + workingDirectory?: string; + workingDirectoryContext?: SessionContext; + /** + * Whether this session supports remote steering. + */ + remoteSteerable?: boolean; + /** + * Telemetry-only remote exporting flag. + */ + remoteExporting?: boolean; + /** + * Telemetry-only remote-defaulted flag. + */ + remoteDefaultedOn?: boolean; + /** + * Parent session ID for detached child telemetry rollup. + */ + detachedFromSpawningParentSessionId?: string; + /** + * Parent engagement ID for detached child telemetry rollup. + */ + detachedFromSpawningParentEngagementId?: string; + /** + * Allowlist of available tool names. + */ + availableTools?: string[]; + /** + * Denylist of tool names. + */ + excludedTools?: string[]; + /** + * Whether shell-script safety heuristics are enabled. + */ + enableScriptSafety?: boolean; + /** + * Shell init profile. + */ + shellInitProfile?: string; + /** + * Per-shell process flags. + */ + shellProcessFlags?: string[]; + sandboxConfig?: SandboxConfig; + /** + * Whether interactive shell sessions are logged. + */ + logInteractiveShells?: boolean; + envValueMode?: SessionOpenOptionsEnvValueMode; + /** + * Additional directories to search for skills. + */ + skillDirectories?: string[]; + /** + * Skill IDs disabled for this session. + */ + disabledSkills?: string[]; + /** + * Installed plugins visible to the session. + */ + installedPlugins?: InstalledPlugin[]; + /** + * Whether custom agents default to local-only execution. + */ + customAgentsLocalOnly?: boolean; + /** + * Whether to skip custom instruction sources. + */ + skipCustomInstructions?: boolean; + /** + * Instruction source IDs disabled for this session. + */ + disabledInstructionSources?: string[]; + /** + * Whether commit-message coauthor trailers are enabled. + */ + coauthorEnabled?: boolean; + /** + * Optional trajectory output file path. + */ + trajectoryFile?: string; + /** + * Whether model responses stream as delta events. + */ + enableStreaming?: boolean; + /** + * Override URL for the Copilot API endpoint. + */ + copilotUrl?: string; /** - * Plugin name + * Whether ask_user is explicitly disabled. */ - name: string; + askUserDisabled?: boolean; /** - * Marketplace the plugin came from (empty string for direct repo installs) + * Whether auto-mode continuation is enabled. */ - marketplace: string; + continueOnAutoMode?: boolean; /** - * Installed version, if known + * Whether the host is an interactive UI. */ - version?: string; + runningInInteractiveMode?: boolean; /** - * Installation timestamp (ISO-8601) + * Whether on-demand custom instruction discovery is enabled. */ - installed_at: string; + enableOnDemandInstructionDiscovery?: boolean; + modelCapabilitiesOverrides?: ModelCapabilitiesOverride; /** - * Whether the plugin is currently enabled + * Runtime context discriminator for agent filtering. */ - enabled: boolean; + agentContext?: string; /** - * Path where the plugin is cached locally + * Override directory for session event logs. */ - cache_path?: string; - source?: SessionInstalledPluginSource; + eventsLogDirectory?: string; + /** + * Override Copilot configuration directory. + */ + configDir?: string; + /** + * Additional content-exclusion policies to merge into the session policy set. + * + * @experimental + */ + additionalContentExclusionPolicies?: SessionOpenOptionsAdditionalContentExclusionPolicy[]; + /** + * Capabilities enabled for this session. + */ + sessionCapabilities?: SessionCapability[]; } /** - * Schema for the `SessionInstalledPluginSourceGitHub` type. + * Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicy` type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionInstalledPluginSourceGitHub". + * via the `definition` "SessionOpenOptionsAdditionalContentExclusionPolicy". */ /** @experimental */ -export interface SessionInstalledPluginSourceGitHub { - /** - * Constant value. Always "github". - */ - source: "github"; - repo: string; - ref?: string; - path?: string; +export interface SessionOpenOptionsAdditionalContentExclusionPolicy { + rules: SessionOpenOptionsAdditionalContentExclusionPolicyRule[]; + last_updated_at: string | number; + scope: SessionOpenOptionsAdditionalContentExclusionPolicyScope; + [k: string]: unknown | undefined; } /** - * Schema for the `SessionInstalledPluginSourceUrl` type. + * Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRule` type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionInstalledPluginSourceUrl". + * via the `definition` "SessionOpenOptionsAdditionalContentExclusionPolicyRule". */ /** @experimental */ -export interface SessionInstalledPluginSourceUrl { - /** - * Constant value. Always "url". - */ - source: "url"; - url: string; - ref?: string; - path?: string; +export interface SessionOpenOptionsAdditionalContentExclusionPolicyRule { + paths: string[]; + ifAnyMatch?: string[]; + ifNoneMatch?: string[]; + source: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource; + [k: string]: unknown | undefined; } /** - * Schema for the `SessionInstalledPluginSourceLocal` type. + * Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionInstalledPluginSourceLocal". + * via the `definition` "SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource". */ /** @experimental */ -export interface SessionInstalledPluginSourceLocal { - /** - * Constant value. Always "local". - */ - source: "local"; - path: string; +export interface SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource { + name: string; + type: string; } /** - * Persisted sessions matching the filter, ordered most-recently-modified first. + * Parameters for creating a new local session. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionList". + * via the `definition` "SessionsOpenCreate". */ /** @experimental */ -export interface SessionList { +export interface SessionsOpenCreate { + /** + * Create a new local session. + */ + kind: "create"; + options?: SessionOpenOptions; /** - * Sessions ordered most-recently-modified first + * Whether to emit session.start during creation. Defaults to true. */ - sessions: SessionMetadata[]; + emitStart?: boolean; } /** - * Optional filter applied to the returned sessions + * Parameters for resuming a specific local session. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionListFilter". + * via the `definition` "SessionsOpenResume". */ /** @experimental */ -export interface SessionListFilter { +export interface SessionsOpenResume { /** - * Match sessions whose context.cwd equals this value + * Resume a specific local session by ID or prefix. */ - cwd?: string; + kind: "resume"; /** - * Match sessions whose context.gitRoot equals this value + * Session ID or unique prefix to resume. */ - gitRoot?: string; + sessionId: string; + options?: SessionOpenOptions; /** - * Match sessions whose context.repository equals this value + * Whether to emit session.resume after loading. Defaults to true. */ - repository?: string; + resume?: boolean; /** - * Match sessions whose context.branch equals this value + * Suppress workspace.yaml metadata writeback when resuming from an incidental cwd. */ - branch?: string; + suppressResumeWorkspaceMetadataWriteback?: boolean; } /** - * Queued repo-level startup prompts and the total hook command count after loading. + * Parameters for resuming the most relevant local session. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionLoadDeferredRepoHooksResult". + * via the `definition` "SessionsOpenResumeLast". */ /** @experimental */ -export interface SessionLoadDeferredRepoHooksResult { +export interface SessionsOpenResumeLast { /** - * Repo-level startup prompts queued from repo hook configs. Empty on resume, when no repo configs were pending, or when disableAllHooks is set. + * Resume the most relevant existing local session. */ - startupPrompts: string[]; + kind: "resumeLast"; + context?: SessionContext; + options?: SessionOpenOptions; /** - * Total hook command count (user + plugin + repo) loaded for the session by this call. Captured atomically with startupPrompts so callers don't need to read a separate counter. + * Suppress workspace.yaml metadata writeback when resuming from an incidental cwd. */ - hookCount: number; + suppressResumeWorkspaceMetadataWriteback?: boolean; } /** - * Point-in-time snapshot of slow-changing session identifier and state fields + * Parameters for attaching to an already-active session by ID. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionMetadataSnapshot". + * via the `definition` "SessionsOpenAttach". */ /** @experimental */ -export interface SessionMetadataSnapshot { +export interface SessionsOpenAttach { /** - * The unique identifier of the session + * Attach to an already-active in-process session by ID. Unlike `resume`, this does NOT re-load from disk; the session must already be loaded by an earlier `create`/`resume` call. Returns `status: 'not_found'` when no active session matches the id. Useful for in-process consumers that need a fresh API handle to a session opened elsewhere (e.g., a peer foreground-session switch). + */ + kind: "attach"; + /** + * Session ID to attach to. */ sessionId: string; +} +/** + * Parameters for connecting to a live remote session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsOpenRemote". + */ +/** @experimental */ +export interface SessionsOpenRemote { /** - * ISO 8601 timestamp of when the session started + * Connect to a live remote session. */ - startTime: string; + kind: "remote"; /** - * ISO 8601 timestamp of when the session's persisted state was last modified on disk. For new sessions, equals startTime. For resumed sessions, reflects the previous modification time at construction. + * Remote session identifier to connect to. */ - modifiedTime: string; + remoteSessionId: string; + repository?: RemoteSessionRepository; + options?: SessionOpenOptions; +} +/** + * Parameters for creating a new cloud session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsOpenCloud". + */ +/** @experimental */ +export interface SessionsOpenCloud { /** - * Whether this is a remote session (i.e., one whose runtime executes elsewhere and is steered through this process) + * Create a new cloud (coding-agent) session. */ - isRemote: boolean; + kind: "cloud"; + repository?: RemoteSessionRepository; /** - * True when the session was detected to be in use by another process at construction time. Local consumers may surface a confirmation prompt before fully attaching. Always false for new sessions. + * Optional owner (user or organization login) to associate with the cloud session when no repository is provided. Ignored when `repository` is set (the repo's owner takes precedence). */ - alreadyInUse: boolean; + owner?: string; + options?: SessionOpenOptions; /** - * Absolute path to the session's workspace directory on disk, or null if the session has no associated workspace + * In-process callback invoked when the cloud task is created (before connection). Marked internal because a function reference cannot cross the JSON-RPC boundary. Disappears in the SDK migration: the field is purely cosmetic (it flips a single CLI phase label from 'creating' to 'connecting') and the wire-clean version just drops the intermediate phase. + * + * @internal */ - workspacePath: string | null; + onTaskCreated?: { + [k: string]: unknown | undefined; + }; +} +/** + * Parameters for fetching a remote session and handing it off to a new local session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsOpenHandoff". + */ +/** @experimental */ +export interface SessionsOpenHandoff { /** - * User-provided name supplied at session construction (via `--name`), if any. Immutable after construction. + * Fetch a remote session and hand it off to a new local session. */ - initialName?: string; + kind: "handoff"; + metadata: RemoteSessionMetadataValue; + options?: SessionOpenOptions; + taskType?: SessionsOpenHandoffTaskType; /** - * Runtime client name associated with the session (telemetry identifier). + * In-process progress callback `(update) => void` invoked for each handoff step. Marked internal because a function reference cannot cross the JSON-RPC boundary. The host-side `handoffSession` is already declared as `AsyncGenerator`; the schema layer flattens it because it does not yet support streaming methods. The wire-clean replacement is to expose the AsyncGenerator directly (or use vscode-jsonrpc `$/progress` notifications) once the schema/transport layer supports it. + * + * @internal */ - clientName?: string; - remoteMetadata?: MetadataSnapshotRemoteMetadata; + onProgress?: { + [k: string]: unknown | undefined; + }; +} +/** + * Result of opening a session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionOpenResult". + */ +/** @experimental */ +export interface SessionOpenResult { + status: SessionsOpenStatus; /** - * Short human-readable summary of the session, if known. Omitted when no summary has been generated. + * Opened session ID. Omitted when status is `not_found`. */ - summary?: string; + sessionId?: string; /** - * Absolute path to the session's current working directory + * In-process SessionClientApi handle for the opened session, returned to CLI callers as a transitional shortcut. Marked internal so the public SDK surface does not expose it; SDK consumers should construct per-session clients from `sessionId` instead. + * + * @internal + * + * @internal */ - workingDirectory: string; - currentMode: MetadataSnapshotCurrentMode; + sessionApi?: { + [k: string]: unknown | undefined; + }; /** - * Currently selected model identifier, if any + * Startup prompts queued by user-level hook configs at session creation. Only populated when status is `created`; resumed sessions return an empty array. */ - selectedModel?: string; + startupPrompts?: string[]; /** - * Public-facing workspace metadata for this session, or null if the session has no associated workspace. Excludes runtime-internal fields (GitHub IDs, summary count, internal flags). + * Remote session ID, present when status is `connected`. */ - workspace?: WorkspaceSummary | null; + remoteSessionId?: string; + metadata?: RemoteSessionMetadataValue; + /** + * Handoff progress steps, present when status is `handed_off`. + */ + progress?: SessionsOpenProgress[]; } /** - * The list of models available to this session. + * Schema for the `SessionsOpenProgress` type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "SessionModelList". + * via the `definition` "SessionsOpenProgress". */ /** @experimental */ -export interface SessionModelList { - /** - * Available models, ordered with the most preferred default first. - */ - list: unknown[]; +export interface SessionsOpenProgress { + step: SessionsOpenProgressStep; + status: SessionsOpenProgressStatus; /** - * Per-quota snapshots returned alongside the model list, keyed by quota type. + * Optional step message. */ - quotaSnapshots?: { - [k: string]: unknown | undefined; - }; + message?: string; } /** * Outcome of the prune operation: deleted IDs, dry-run candidates, skipped IDs, total bytes freed, and the dry-run flag. @@ -7871,7 +10005,7 @@ export interface SessionsEnrichMetadataRequest { /** * Session metadata records to enrich. Records that already have summary and context are returned unchanged. */ - sessions: SessionMetadata[]; + sessions: LocalSessionMetadataValue[]; } /** * New auth credentials to install on the session. Omit to leave credentials unchanged. @@ -7986,6 +10120,32 @@ export interface SessionsForkResult { */ name?: string; } +/** + * Session ID whose board entry count should be returned. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsGetBoardEntryCountRequest". + */ +/** @experimental */ +export interface SessionsGetBoardEntryCountRequest { + /** + * Session ID whose board entry count should be returned. + */ + sessionId: string; +} +/** + * Dynamic-context board entry count, when available. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsGetBoardEntryCountResult". + */ +/** @experimental */ +export interface SessionsGetBoardEntryCountResult { + /** + * Board entry count, when available. + */ + count?: number; +} /** * Session ID whose event-log file path to compute. * @@ -8077,15 +10237,16 @@ export interface SessionSizes { }; } /** - * Optional metadata-load limit and filters applied to the returned sessions. + * Optional source filter, metadata-load limit, and context filter applied to the returned sessions. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionsListRequest". */ /** @experimental */ export interface SessionsListRequest { + source?: SessionSource; /** - * When provided, only the first N sessions (sorted by modification time, newest first) load full metadata; remaining sessions return basic info only. Use 0 to return only basic info for every session. + * When provided, only the first N local sessions (sorted by modification time, newest first) load full metadata; remaining sessions return basic info only. Use 0 to return only basic info for every local session. Has no effect on remote entries (which always carry their full shape). */ metadataLimit?: number; filter?: SessionListFilter; @@ -8093,6 +10254,10 @@ export interface SessionsListRequest { * When true, include detached maintenance sessions. Defaults to false for user-facing session lists. */ includeDetached?: boolean; + /** + * Only meaningful when `source` includes remote. When true, propagates errors from the remote service instead of silently returning an empty remote list. Defaults to false. + */ + throwOnError?: boolean; } /** * Active session ID whose deferred repo-level hooks should be loaded. @@ -8107,6 +10272,18 @@ export interface SessionsLoadDeferredRepoHooksRequest { */ sessionId: string; } + +/** @experimental */ +export interface SessionsPollSpawnedSessionsRequest { + /** + * Opaque cursor returned by a previous poll. Omit on the first call to receive any spawn events buffered since the runtime started. + */ + cursor?: string; + /** + * Milliseconds to wait for new spawn events when the cursor is at the tail. 0 (default) returns immediately even if no events are buffered. Capped at 60000ms. + */ + waitMs?: number; +} /** * Age threshold and optional flags controlling which old sessions are pruned (or simulated when dryRun is true). * @@ -8220,6 +10397,75 @@ export interface SessionsSetAdditionalPluginsRequest { */ /** @experimental */ export interface SessionsSetAdditionalPluginsResult {} +/** + * Patch for the singleton's steering state. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsSetRemoteControlSteeringRequest". + */ +/** @experimental */ +export interface SessionsSetRemoteControlSteeringRequest { + /** + * Target steering state. Today only `true` is actionable on the underlying exporter; `false` is reserved for future use. + */ + enabled: boolean; +} +/** + * Parameters for attaching the remote-control singleton to a session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsStartRemoteControlRequest". + */ +/** @experimental */ +export interface SessionsStartRemoteControlRequest { + /** + * Local session id to attach remote control to. + */ + sessionId: string; + config: RemoteControlConfig; +} + +/** @experimental */ +export interface SessionsStopRemoteControlRequest { + /** + * When provided, the stop is rejected unless the singleton currently points at this session id (compare-and-swap semantics). + */ + expectedSessionId?: string; + /** + * When true, the singleton is unconditionally torn down regardless of `expectedSessionId`. Use during shutdown or explicit `/remote off`. + */ + force?: boolean; +} +/** + * Parameters for atomically rebinding the remote-control singleton. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionsTransferRemoteControlRequest". + */ +/** @experimental */ +export interface SessionsTransferRemoteControlRequest { + /** + * Local session id to point remote control at. + */ + toSessionId: string; + /** + * When provided, the transfer is rejected unless the singleton currently points at this session id (compare-and-swap semantics to avoid clobbering newer state). + */ + expectedFromSessionId?: string; +} +/** + * Telemetry engagement ID for the session, when available. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionTelemetryEngagement". + */ +/** @experimental */ +export interface SessionTelemetryEngagement { + /** + * Current telemetry engagement ID, when available. + */ + engagementId?: string; +} /** * Patch of mutable session options to apply to the running session. * @@ -8232,10 +10478,12 @@ export interface SessionUpdateOptionsParams { * The model ID to use for assistant turns. */ model?: string; + modelCapabilitiesOverrides?: ModelCapabilitiesOverride; /** * Reasoning effort for the selected model (model-defined enum). */ reasoningEffort?: string; + reasoningSummary?: OptionsUpdateReasoningSummary; /** * Identifier of the client driving the session. */ @@ -8258,14 +10506,7 @@ export interface SessionUpdateOptionsParams { * Whether experimental capabilities are enabled. */ isExperimentalMode?: boolean; - /** - * Custom model-provider configuration (BYOK). Opaque shape; see `ProviderConfig` in the runtime. - * - * @experimental - */ - provider?: { - [k: string]: unknown | undefined; - }; + provider?: ProviderConfig; /** * Absolute working-directory path for shell tools. */ @@ -8287,18 +10528,11 @@ export interface SessionUpdateOptionsParams { * Shell init profile (`None` or `NonInteractive`). */ shellInitProfile?: string; - /** - * Per-shell process flags (e.g., `pwsh` arguments). - */ - shellProcessFlags?: string[]; - /** - * Sandbox configuration shape; opaque to SDK consumers. See `SandboxConfig` in the runtime. - * - * @experimental + /** + * Per-shell process flags (e.g., `pwsh` arguments). */ - sandboxConfig?: { - [k: string]: unknown | undefined; - }; + shellProcessFlags?: string[]; + sandboxConfig?: SandboxConfig; /** * Whether interactive shell sessions are logged. */ @@ -8377,15 +10611,19 @@ export interface SessionUpdateOptionsParams { */ eventsLogDirectory?: string; /** - * Additional content-exclusion policies to merge into the session's policy set. Opaque shape; see `ContentExclusionApiResponse` in the runtime. + * Additional content-exclusion policies to merge into the session's policy set. * * @experimental */ - additionalContentExclusionPolicies?: unknown[]; + additionalContentExclusionPolicies?: OptionsUpdateAdditionalContentExclusionPolicy[]; /** * Whether to expose the `manage_schedule` tool to the agent. The runtime always owns the per-session schedule registry; this flag only controls tool exposure (typically gated to staff users). */ manageScheduleEnabled?: boolean; + /** + * Replaces the session's capability set with the given list. Use to enable or disable capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the field to leave the existing capability set unchanged. + */ + sessionCapabilities?: SessionCapability[]; /** * Whether to skip embedding retrieval pipeline initialization and execution. */ @@ -8410,6 +10648,7 @@ export interface SessionUpdateOptionsParams { * Whether to enable skill directory scanning and loading. Falls back to enableConfigDiscovery when unset. */ enableSkills?: boolean; + contextTier?: OptionsUpdateContextTier; } /** * Indicates whether the session options patch was applied successfully. @@ -8424,6 +10663,19 @@ export interface SessionUpdateOptionsResult { */ success: boolean; } +/** + * User-requested shell execution cancellation handle. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ShellCancelUserRequestedRequest". + */ +/** @experimental */ +export interface ShellCancelUserRequestedRequest { + /** + * Request ID previously passed to executeUserRequested + */ + requestId: string; +} /** * Shell command to run, with optional working directory and timeout in milliseconds. * @@ -8458,6 +10710,23 @@ export interface ShellExecResult { */ processId: string; } +/** + * User-requested shell command and cancellation handle. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ShellExecuteUserRequestedRequest". + */ +/** @experimental */ +export interface ShellExecuteUserRequestedRequest { + /** + * Caller-provided cancellation handle for this execution + */ + requestId: string; + /** + * Shell command to execute + */ + command: string; +} /** * Identifier of a process previously returned by "shell.exec" and the signal to send. * @@ -8835,7 +11104,7 @@ export interface TaskAgentInfo { */ agentType: string; /** - * Prompt passed to the agent + * Most recent prompt delivered to the agent. Updated whenever the agent receives a follow-up message. */ prompt: string; /** @@ -9644,6 +11913,48 @@ export interface UIElicitationResult { */ success: boolean; } +/** + * Transient question to answer without adding it to conversation history. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIEphemeralQueryRequest". + */ +/** @experimental */ +export interface UIEphemeralQueryRequest { + /** + * Question to answer from the current conversation context. + */ + question: string; + /** + * In-process streaming callback `(text) => void` invoked with each token as the model emits it. Marked internal: excluded from the public SDK surface. In a process-separated SDK this is replaced by a streaming RPC that yields chunks and a final answer. + * + * @internal + */ + onChunk?: { + [k: string]: unknown | undefined; + }; + /** + * In-process `AbortSignal` forwarded to the model client to cancel an in-flight request. Marked internal: excluded from the public SDK surface. Replaced by an explicit cancellation token + cancel RPC in the SDK migration. + * + * @internal + */ + abortSignal?: { + [k: string]: unknown | undefined; + }; +} +/** + * Transient answer generated from current conversation context. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UIEphemeralQueryResult". + */ +/** @experimental */ +export interface UIEphemeralQueryResult { + /** + * Full assistant response text. + */ + answer: string; +} /** * Schema for the `UIExitPlanModeResponse` type. * @@ -9987,6 +12298,35 @@ export interface UsageMetricsModelMetricTokenDetail { */ tokenCount: number; } +/** + * Result of a user-requested shell command. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UserRequestedShellCommandResult". + */ +/** @experimental */ +export interface UserRequestedShellCommandResult { + /** + * Tool call id emitted for the shell execution + */ + toolCallId: string; + /** + * Whether the command completed successfully + */ + success: boolean; + /** + * Captured command output + */ + output: string; + /** + * Process exit code, when available + */ + exitCode?: number | null; + /** + * Error output when the execution failed + */ + error?: string; +} /** * A single changed file and its unified diff. * @@ -10376,6 +12716,108 @@ export function createServerRpc(connection: MessageConnection) { discover: async (params: McpDiscoverRequest): Promise => connection.sendRequest("mcp.discover", params), }, + /** @experimental */ + plugins: { + /** + * Lists plugins installed in user/global state. + * + * @returns Plugins installed in user/global state. + */ + list: async (): Promise => + connection.sendRequest("plugins.list", {}), + /** + * Installs a plugin from a marketplace, GitHub repo, URL, or local path. + * + * @param params Plugin source and optional working directory for relative-path resolution. + * + * @returns Result of installing a plugin. + */ + install: async (params: PluginsInstallRequest): Promise => + connection.sendRequest("plugins.install", params), + /** + * Uninstalls an installed plugin. + * + * @param params Name (or spec) of the plugin to uninstall. + */ + uninstall: async (params: PluginsUninstallRequest): Promise => + connection.sendRequest("plugins.uninstall", params), + /** + * Updates an installed plugin to its latest published version. + * + * @param params Name (or spec) of the plugin to update. + * + * @returns Result of updating a single plugin. + */ + update: async (params: PluginsUpdateRequest): Promise => + connection.sendRequest("plugins.update", params), + /** + * Updates every installed plugin to its latest published version. + * + * @returns Result of updating all installed plugins. + */ + updateAll: async (): Promise => + connection.sendRequest("plugins.updateAll", {}), + /** + * Enables installed plugins for new sessions. + * + * @param params Plugin names (or specs) to enable. + */ + enable: async (params: PluginsEnableRequest): Promise => + connection.sendRequest("plugins.enable", params), + /** + * Disables installed plugins for new sessions. + * + * @param params Plugin names (or specs) to disable. + */ + disable: async (params: PluginsDisableRequest): Promise => + connection.sendRequest("plugins.disable", params), + /** @experimental */ + marketplaces: { + /** + * Lists all registered marketplaces (defaults + user-added). + * + * @returns All registered marketplaces, including built-in defaults. + */ + list: async (): Promise => + connection.sendRequest("plugins.marketplaces.list", {}), + /** + * Registers a new marketplace from a source (owner/repo, URL, or local path). + * + * @param params Marketplace source to register. + * + * @returns Result of registering a new marketplace. + */ + add: async (params: PluginsMarketplacesAddRequest): Promise => + connection.sendRequest("plugins.marketplaces.add", params), + /** + * Removes a previously-registered marketplace. When the marketplace has dependent plugins and `force` is not set, the marketplace is left intact and the result lists the dependents so the caller can decide whether to retry with `force=true`. + * + * @param params Name of the marketplace to remove and an optional force flag. + * + * @returns Outcome of the remove attempt, including dependent-plugin info when applicable. + */ + remove: async (params: PluginsMarketplacesRemoveRequest): Promise => + connection.sendRequest("plugins.marketplaces.remove", params), + /** + * Lists plugins advertised by a registered marketplace. + * + * @param params Name of the marketplace whose plugin catalog to fetch. + * + * @returns Plugins advertised by the marketplace. + */ + browse: async (params: PluginsMarketplacesBrowseRequest): Promise => + connection.sendRequest("plugins.marketplaces.browse", params), + /** + * Re-fetches one or all registered marketplace catalogs. + * + * @param params Optional marketplace name; omit to refresh all. + * + * @returns Result of refreshing one or more marketplace catalogs. + */ + refresh: async (params: PluginsMarketplacesRefreshRequest): Promise => + connection.sendRequest("plugins.marketplaces.refresh", params), + }, + }, skills: { config: { /** @@ -10425,6 +12867,15 @@ export function createServerRpc(connection: MessageConnection) { }, /** @experimental */ sessions: { + /** + * Creates or resumes a local session and returns the opened session ID. + * + * @param params Open a session by creating, resuming, attaching, connecting to a remote, or handing off. + * + * @returns Result of opening a session. + */ + open: async (params: SessionOpenParams): Promise => + connection.sendRequest("sessions.open", params), /** * Creates a new session by forking persisted history from an existing session. * @@ -10444,11 +12895,11 @@ export function createServerRpc(connection: MessageConnection) { connect: async (params: ConnectRemoteSessionParams): Promise => connection.sendRequest("sessions.connect", params), /** - * Lists persisted sessions, optionally filtered by working-directory context. + * Lists sessions, optionally filtered by source and working-directory context. Returned entries are discriminated by `isRemote`: local entries carry only the lightweight `LocalSessionMetadataValue` shape; remote entries carry the full `RemoteSessionMetadataValue` shape (repository, PR number, taskType, etc.). * - * @param params Optional metadata-load limit and filters applied to the returned sessions. + * @param params Optional source filter, metadata-load limit, and context filter applied to the returned sessions. * - * @returns Persisted sessions matching the filter, ordered most-recently-modified first. + * @returns Sessions matching the filter, ordered most-recently-modified first. */ list: async (params: SessionsListRequest): Promise => connection.sendRequest("sessions.list", params), @@ -10479,15 +12930,6 @@ export function createServerRpc(connection: MessageConnection) { */ getLastForContext: async (params: SessionsGetLastForContextRequest): Promise => connection.sendRequest("sessions.getLastForContext", params), - /** - * Computes the absolute path to a session's persisted events.jsonl file. - * - * @param params Session ID whose event-log file path to compute. - * - * @returns Absolute path to the session's events.jsonl file on disk. - */ - getEventFilePath: async (params: SessionsGetEventFilePathRequest): Promise => - connection.sendRequest("sessions.getEventFilePath", params), /** * Returns the on-disk byte size of each session's workspace directory. * @@ -10504,15 +12946,6 @@ export function createServerRpc(connection: MessageConnection) { */ checkInUse: async (params: SessionsCheckInUseRequest): Promise => connection.sendRequest("sessions.checkInUse", params), - /** - * Returns a session's persisted remote-steerable flag, if any has been recorded. - * - * @param params Session ID to look up the persisted remote-steerable flag for. - * - * @returns The session's persisted remote-steerable flag, or omitted when no value has been persisted. - */ - getPersistedRemoteSteerable: async (params: SessionsGetPersistedRemoteSteerableRequest): Promise => - connection.sendRequest("sessions.getPersistedRemoteSteerable", params), /** * Closes a session: emits shutdown, flushes pending events, releases the in-use lock, and disposes the active session. * @@ -10594,6 +13027,49 @@ export function createServerRpc(connection: MessageConnection) { */ setAdditionalPlugins: async (params: SessionsSetAdditionalPluginsRequest): Promise => connection.sendRequest("sessions.setAdditionalPlugins", params), + /** + * Attaches the runtime-managed remote-control singleton to a session, awaiting initial setup. If remote control is already attached to a different session, the singleton is transferred (preserving the underlying Mission Control connection). Returns the final status. + * + * @param params Parameters for attaching the remote-control singleton to a session. + * + * @returns Wrapper for the singleton's current status. + */ + startRemoteControl: async (params: SessionsStartRemoteControlRequest): Promise => + connection.sendRequest("sessions.startRemoteControl", params), + /** + * Atomically rebinds the remote-control singleton to a different session, preserving the underlying Mission Control connection. When `expectedFromSessionId` is provided and does not match the singleton's current `attachedSessionId`, the transfer is rejected with `transferred: false` and the current status is returned unchanged. + * + * @param params Parameters for atomically rebinding the remote-control singleton. + * + * @returns Outcome of a transferRemoteControl call. + */ + transferRemoteControl: async (params: SessionsTransferRemoteControlRequest): Promise => + connection.sendRequest("sessions.transferRemoteControl", params), + /** + * Patches the steering state of the active remote-control singleton. When remote control is off, this is a no-op and the off status is returned. Today only `enabled: true` is actionable on the underlying exporter; passing `false` is reserved for future use. + * + * @param params Patch for the singleton's steering state. + * + * @returns Wrapper for the singleton's current status. + */ + setRemoteControlSteering: async (params: SessionsSetRemoteControlSteeringRequest): Promise => + connection.sendRequest("sessions.setRemoteControlSteering", params), + /** + * Stops the remote-control singleton. When `expectedSessionId` is provided and does not match the singleton's current `attachedSessionId`, the stop is rejected with `stopped: false` and the current status is returned unchanged (unless `force` is set, in which case the singleton is unconditionally torn down). + * + * @param params Parameters for stopping the remote-control singleton. + * + * @returns Outcome of a stopRemoteControl call. + */ + stopRemoteControl: async (params: SessionsStopRemoteControlRequest): Promise => + connection.sendRequest("sessions.stopRemoteControl", params), + /** + * Returns the current state of the remote-control singleton, including the attached session id and frontend URL when active. + * + * @returns Wrapper for the singleton's current status. + */ + getRemoteControlStatus: async (): Promise => + connection.sendRequest("sessions.getRemoteControlStatus", {}), }, /** @experimental */ agentRegistry: { @@ -10618,7 +13094,7 @@ export function createServerRpc(connection: MessageConnection) { export function createInternalServerRpc(connection: MessageConnection) { return { /** - * Performs the SDK server connection handshake and validates the optional connection token. + * Performs the SDK server connection handshake and validates the optional connection token. Marked internal because this is JSON-RPC transport plumbing invoked automatically by an SDK client's own `connect()` wrapper, not a user-facing method. Stays internal as long as the SDK client owns the handshake; would only become public if the SDK ever exposed the raw schema surface to consumers without a connection wrapper. * * @param params Optional connection token presented by the SDK client during the handshake. * @@ -10626,6 +13102,61 @@ export function createInternalServerRpc(connection: MessageConnection) { */ connect: async (params: ConnectRequest): Promise => connection.sendRequest("connect", params), + /** @experimental */ + sessions: { + /** + * Computes the absolute path to a session's persisted events.jsonl file. Internal: filesystem paths are only meaningful in-process (CLI and runtime share a filesystem). Currently used by the CLI's contribution-graph feature to read historical events directly. Remote SDK consumers must not depend on this; a proper event-query API would replace it if the contribution graph ever needed to work over the wire. + * + * @param params Session ID whose event-log file path to compute. + * + * @returns Absolute path to the session's events.jsonl file on disk. + */ + getEventFilePath: async (params: SessionsGetEventFilePathRequest): Promise => + connection.sendRequest("sessions.getEventFilePath", params), + /** + * Returns a session's persisted remote-steerable flag, if any has been recorded. Internal: this is CLI-specific book-keeping used by `--continue` / `--resume` to inherit the prior session's remote-steerable preference. SDK consumers that want similar behavior should manage their own persistence around start/stop calls rather than relying on this runtime-side flag. + * + * @param params Session ID to look up the persisted remote-steerable flag for. + * + * @returns The session's persisted remote-steerable flag, or omitted when no value has been persisted. + */ + getPersistedRemoteSteerable: async (params: SessionsGetPersistedRemoteSteerableRequest): Promise => + connection.sendRequest("sessions.getPersistedRemoteSteerable", params), + /** + * Gets the dynamic-context board entry count associated with a session, when available. Internal: this exists solely so CLI telemetry events (`rem_spawn_gate`, `rem_consolidation_complete`) can pair START / END board counts around the detached rem-agent spawn. "Dynamic context board" is a runtime-internal concept that is not part of the public SDK contract; the long-term plan is to relocate the telemetry emission into the runtime so this method can be deleted entirely. + * + * @param params Session ID whose board entry count should be returned. + * + * @returns Dynamic-context board entry count, when available. + */ + getBoardEntryCount: async (params: SessionsGetBoardEntryCountRequest): Promise => + connection.sendRequest("sessions.getBoardEntryCount", params), + /** + * Cursor-based long-poll for sessions spawned by the runtime (e.g. in response to a Mission Control `start_session` command). The cursor is an opaque token; pass it back to receive only spawn events that occurred AFTER the cursor was issued. Omit the cursor on the first call to receive any events buffered since the runtime started. Internal: this is a CLI background-daemon plumbing primitive. SDK consumers that need to react to runtime-spawned sessions should subscribe to a higher-level event stream rather than driving a long-poll loop. + * + * @param params Cursor and optional long-poll wait for polling runtime-spawned sessions. + * + * @returns Batch of spawn events plus a cursor for follow-up polls. + */ + pollSpawnedSessions: async (params: SessionsPollSpawnedSessionsRequest): Promise => + connection.sendRequest("sessions.pollSpawnedSessions", params), + /** + * Registers extension-provided tools on the given session, gated by an optional `enabled` callback. Returns an opaque unsubscribe function the caller must invoke to deregister the tools when the extension is torn down. Marked internal because `loader`, `enabled`, and the returned `unsubscribe` are in-process handles that cannot cross the JSON-RPC boundary. Disappears once extension discovery / launch / tool registration are owned by the runtime: SDK consumers will pass pure config (search paths, disabled ids) via `SessionOptions` and the runtime will resolve, launch, register, and tear down extensions itself. + * + * @param params Params to attach an extension loader's tools to a session. + * + * @returns Handle for releasing the extension tool registration. + */ + registerExtensionToolsOnSession: async (params: RegisterExtensionToolsParams): Promise => + connection.sendRequest("sessions.registerExtensionToolsOnSession", params), + /** + * Attaches (or detaches) an in-process ExtensionController delegate for the given session, used by shared-API surfaces that need to query or modify the session's extension state. Pass `controller: undefined` to detach. Marked internal because the controller is an in-process object that cannot cross the JSON-RPC boundary. Disappears alongside `registerExtensionToolsOnSession`: once the runtime owns extension management, the public surface exposes list/enable/disable/reload as dedicated RPCs served by the runtime. + * + * @param params Params to attach or detach an in-process ExtensionController delegate. + */ + configureSessionExtensions: async (params: ConfigureSessionExtensionsParams): Promise => + connection.sendRequest("sessions.configureSessionExtensions", params), + }, }; } @@ -10835,6 +13366,13 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin */ delete: async (): Promise => connection.sendRequest("session.plan.delete", { sessionId }), + /** + * Reads todo rows from the session SQL database for plan rendering. + * + * @returns Todo rows read from the session SQL database. Empty when no session database is available. + */ + readSqlTodos: async (): Promise => + connection.sendRequest("session.plan.readSqlTodos", { sessionId }), }, /** @experimental */ workspaces: { @@ -11101,12 +13639,21 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin /** @experimental */ mcp: { /** - * Lists MCP servers configured for the session and their connection status. + * Lists MCP servers configured for the session, their connection status, and host-level state. The host-level state (disabled/filtered servers, failed/needs-auth/pending connections, mcp3p policy, full config) is empty/zero when no MCP host has been initialized for the session. * - * @returns MCP servers configured for the session, with their connection status. + * @returns MCP servers configured for the session, with their connection status and host-level state. */ list: async (): Promise => connection.sendRequest("session.mcp.list", { sessionId }), + /** + * Lists the tools exposed by a connected MCP server on this session's host. + * + * @param params Server name whose tool list should be returned. + * + * @returns Tools exposed by the connected MCP server. Throws when the server is not connected. + */ + listTools: async (params: McpListToolsRequest): Promise => + connection.sendRequest("session.mcp.listTools", { sessionId, ...params }), /** * Enables an MCP server for the session. * @@ -11126,6 +13673,15 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin */ reload: async (): Promise => connection.sendRequest("session.mcp.reload", { sessionId }), + /** + * Reloads MCP server connections for the session with an explicit host-provided configuration. + * + * @param params Opaque MCP reload configuration. + * + * @returns MCP server startup filtering result. + */ + reloadWithConfig: async (params: McpReloadWithConfigRequest): Promise => + connection.sendRequest("session.mcp.reloadWithConfig", { sessionId, ...params }), /** * Runs an MCP sampling inference on behalf of an MCP server. * @@ -11160,8 +13716,70 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin */ removeGitHub: async (): Promise => connection.sendRequest("session.mcp.removeGitHub", { sessionId }), + /** + * Configures the built-in GitHub MCP server for the session's current auth context. + * + * @param params Opaque auth info used to configure GitHub MCP. + * + * @returns Result of configuring GitHub MCP. + */ + configureGitHub: async (params: McpConfigureGitHubRequest): Promise => + connection.sendRequest("session.mcp.configureGitHub", { sessionId, ...params }), + /** + * Starts an individual MCP server on the session's host. + * + * @param params Server name and opaque configuration for an individual MCP server start. + */ + startServer: async (params: McpStartServerRequest): Promise => + connection.sendRequest("session.mcp.startServer", { sessionId, ...params }), + /** + * Restarts an individual MCP server on the session's host (stops then starts). + * + * @param params Server name and opaque configuration for an individual MCP server restart. + */ + restartServer: async (params: McpRestartServerRequest): Promise => + connection.sendRequest("session.mcp.restartServer", { sessionId, ...params }), + /** + * Stops an individual MCP server on the session's host. + * + * @param params Server name for an individual MCP server stop. + */ + stopServer: async (params: McpStopServerRequest): Promise => + connection.sendRequest("session.mcp.stopServer", { sessionId, ...params }), + /** + * Registers a pre-connected external MCP client (e.g. IDE) on the session's host. The caller retains lifecycle ownership of the client and transport. Marked internal because the `client` and `transport` arguments are in-process MCP SDK instances that cannot be serialized across the JSON-RPC boundary; once the CLI moves on top of the SDK, external clients will be expressed as transport configs the runtime can construct itself. + * + * @param params Registration parameters for an external MCP client. + */ + registerExternalClient: async (params: McpRegisterExternalClientRequest): Promise => + connection.sendRequest("session.mcp.registerExternalClient", { sessionId, ...params }), + /** + * Unregisters a previously registered external MCP client by server name. Marked internal as the paired companion of `registerExternalClient`: only in-process callers that registered a client this way can meaningfully unregister it. Disappears alongside `registerExternalClient`: once external clients are described to the runtime as config rather than handed in as instances, lifecycle (including deregistration) is owned entirely by the runtime. + * + * @param params Server name identifying the external client to remove. + */ + unregisterExternalClient: async (params: McpUnregisterExternalClientRequest): Promise => + connection.sendRequest("session.mcp.unregisterExternalClient", { sessionId, ...params }), + /** + * Checks whether a named MCP server is currently running on the session's host. + * + * @param params Server name to check running status for. + * + * @returns Whether the named MCP server is running. + */ + isServerRunning: async (params: McpIsServerRunningRequest): Promise => + connection.sendRequest("session.mcp.isServerRunning", { sessionId, ...params }), /** @experimental */ oauth: { + /** + * Responds to a pending MCP OAuth provider request. Marked internal because the `provider` argument is an in-process OAuthClientProvider instance that cannot be carried over the wire; the public OAuth surface will route the response through a wire-clean handshake once the CLI moves on top of the SDK. + * + * @param params MCP OAuth request id and optional provider response. + * + * @returns Empty result after recording the MCP OAuth response. + */ + respond: async (params: McpOauthRespondRequest): Promise => + connection.sendRequest("session.mcp.oauth.respond", { sessionId, ...params }), /** * Starts OAuth authentication for a remote MCP server. * @@ -11235,6 +13853,13 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin */ list: async (): Promise => connection.sendRequest("session.plugins.list", { sessionId }), + /** + * Reloads the session's plugin set, refreshing MCP servers, custom agents, hooks, and skills cache so SDK-driven changes via `server.plugins.*` take effect immediately. + * + * @param params Optional flags controlling which side effects the reload performs. + */ + reload: async (params?: PluginsReloadRequest): Promise => + connection.sendRequest("session.plugins.reload", { sessionId, ...params }), }, /** @experimental */ options: { @@ -11379,6 +14004,13 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin }, /** @experimental */ telemetry: { + /** + * Gets the telemetry engagement ID currently associated with the session, when available. + * + * @returns Telemetry engagement ID for the session, when available. + */ + getEngagementId: async (): Promise => + connection.sendRequest("session.telemetry.getEngagementId", { sessionId }), /** * Sets feature override key/value pairs to attach to subsequent telemetry events for the session. * @@ -11389,6 +14021,15 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin }, /** @experimental */ ui: { + /** + * Runs a transient no-tools model query against the current conversation context. + * + * @param params Transient question to answer without adding it to conversation history. + * + * @returns Transient answer generated from current conversation context. + */ + ephemeralQuery: async (params: UIEphemeralQueryRequest): Promise => + connection.sendRequest("session.ui.ephemeralQuery", { sessionId, ...params }), /** * Requests structured input from a UI-capable client. * @@ -11683,6 +14324,13 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin */ isProcessing: async (): Promise => connection.sendRequest("session.metadata.isProcessing", { sessionId }), + /** + * Returns a snapshot of activity flags for the session. + * + * @returns Current activity flags for the session. + */ + activity: async (): Promise => + connection.sendRequest("session.metadata.activity", { sessionId }), /** * Returns the token breakdown for the session's current context window for a given model. * @@ -11740,6 +14388,24 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin */ kill: async (params: ShellKillRequest): Promise => connection.sendRequest("session.shell.kill", { sessionId, ...params }), + /** + * Executes a user-requested shell command through the session runtime. + * + * @param params User-requested shell command and cancellation handle. + * + * @returns Result of a user-requested shell command. + */ + executeUserRequested: async (params: ShellExecuteUserRequestedRequest): Promise => + connection.sendRequest("session.shell.executeUserRequested", { sessionId, ...params }), + /** + * Cancels a user-requested shell command by request ID. + * + * @param params User-requested shell execution cancellation handle. + * + * @returns Cancellation result for a user-requested shell command. + */ + cancelUserRequested: async (params: ShellCancelUserRequestedRequest): Promise => + connection.sendRequest("session.shell.cancelUserRequested", { sessionId, ...params }), }, /** @experimental */ history: { diff --git a/nodejs/src/generated/session-events.ts b/nodejs/src/generated/session-events.ts index 3834a7795..77a354cb6 100644 --- a/nodejs/src/generated/session-events.ts +++ b/nodejs/src/generated/session-events.ts @@ -93,6 +93,7 @@ export type SessionEvent = | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent + | CanvasClosedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent; /** @@ -847,7 +848,7 @@ export interface ErrorData { url?: string; } /** - * Session event "session.idle". Payload indicating the session is idle with no background agents in flight + * Session event "session.idle". Payload indicating the session is idle with no background agents or attached shell commands in flight */ export interface IdleEvent { /** @@ -877,7 +878,7 @@ export interface IdleEvent { type: "session.idle"; } /** - * Payload indicating the session is idle with no background agents in flight + * Payload indicating the session is idle with no background agents or attached shell commands in flight */ export interface IdleData { /** @@ -2644,6 +2645,10 @@ export interface AssistantMessageData { * @experimental */ anthropicAdvisorModel?: string; + /** + * Provider's completion / response identifier; shared across all chunks of a single API call. Used to group multi-chunk assistant utterances. + */ + apiCallId?: string; /** * The assistant's text response content */ @@ -3889,7 +3894,7 @@ export interface SubagentStartedData { */ 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 the sub-agent will run with, when known at start. */ model?: string; /** @@ -4011,7 +4016,7 @@ export interface SubagentFailedData { */ error: string; /** - * Model used by the sub-agent (if any model calls succeeded before failure) + * Model selected for the sub-agent, when known */ model?: string; /** @@ -4219,6 +4224,10 @@ export interface HookEndError { * Human-readable error message */ message: string; + /** + * Source label of the hook that errored (e.g. the plugin it was loaded from), when known + */ + source?: string; /** * Error stack trace, when available */ @@ -6956,6 +6965,53 @@ export interface CanvasRegistryChangedCanvasAction { */ name: string; } +/** + * Session event "session.canvas.closed". + */ +export interface CanvasClosedEvent { + /** + * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events. + */ + agentId?: string; + data: CanvasClosedData; + /** + * Always true for events that are transient and not persisted to the session event log on disk. + */ + ephemeral: true; + /** + * Unique event identifier (UUID v4), generated when the event is emitted + */ + id: string; + /** + * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event. + */ + parentId: string | null; + /** + * ISO 8601 timestamp when the event was created + */ + timestamp: string; + /** + * Type discriminator. Always "session.canvas.closed". + */ + type: "session.canvas.closed"; +} +/** + * Schema for the `CanvasClosedData` type. + */ +export interface CanvasClosedData { + /** + * Provider-local canvas identifier + */ + canvasId: string; + /** + * Owning provider identifier + */ + extensionId: string; + /** + * Stable caller-supplied identifier of the canvas instance that was closed + */ + instanceId: string; +} /** * Session event "session.extensions.attachments_pushed". */ diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py index 199584b3d..b04b4a0b5 100644 --- a/python/copilot/generated/rpc.py +++ b/python/copilot/generated/rpc.py @@ -403,6 +403,25 @@ class AuthInfoType(Enum): TOKEN = "token" USER = "user" +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class CancelUserRequestedShellCommandResult: + """Cancellation result for a user-requested shell command.""" + + cancelled: bool + """Whether an in-flight execution was found and signalled to cancel""" + + @staticmethod + def from_dict(obj: Any) -> 'CancelUserRequestedShellCommandResult': + assert isinstance(obj, dict) + cancelled = from_bool(obj.get("cancelled")) + return CancelUserRequestedShellCommandResult(cancelled) + + def to_dict(self) -> dict: + result: dict = {} + result["cancelled"] = from_bool(self.cancelled) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CanvasAction: @@ -742,6 +761,35 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +# Experimental: this type is part of an experimental API and may change or be removed. +# Internal: this type is an internal SDK API and is not part of the public surface. +@dataclass +class _ConfigureSessionExtensionsParams: + """Params to attach or detach an in-process ExtensionController delegate.""" + + session_id: str + """Session to attach the extension controller delegate to.""" + + controller: Any = None + """In-process ExtensionController delegate (CLI-only optimization). Marked internal: this + field is excluded from the public SDK surface. The post-SDK extension surface exposes + list/enable/disable/reload via dedicated RPCs served by the runtime. + """ + + @staticmethod + def from_dict(obj: Any) -> '_ConfigureSessionExtensionsParams': + assert isinstance(obj, dict) + session_id = from_str(obj.get("sessionId")) + controller = obj.get("controller") + return _ConfigureSessionExtensionsParams(session_id, controller) + + def to_dict(self) -> dict: + result: dict = {} + result["sessionId"] = from_str(self.session_id) + if self.controller is not None: + result["controller"] = self.controller + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ConnectRemoteSessionParams: @@ -1678,6 +1726,19 @@ class InstructionsSourcesType(Enum): REPO = "repo" VSCODE = "vscode" +# Experimental: this type is part of an experimental API and may change or be removed. +class HostType(Enum): + """Repository host type + + Hosting platform type of the repository + + Repository host type, if known + + Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. + """ + ADO = "ado" + GITHUB = "github" + # Experimental: this type is part of an experimental API and may change or be removed. class SessionLogLevel(Enum): """Log severity level. Determines how the message is displayed in the timeline. Defaults to @@ -1742,6 +1803,139 @@ def to_dict(self) -> dict: result["workingDirectory"] = from_union([from_str, from_none], self.working_directory) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MarketplaceAddResult: + """Result of registering a new marketplace.""" + + name: str + """Final name of the marketplace as resolved from its manifest""" + + @staticmethod + def from_dict(obj: Any) -> 'MarketplaceAddResult': + assert isinstance(obj, dict) + name = from_str(obj.get("name")) + return MarketplaceAddResult(name) + + def to_dict(self) -> dict: + result: dict = {} + result["name"] = from_str(self.name) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MarketplaceInfo: + """Registered marketplace summary.""" + + name: str + """Marketplace name (matches the @marketplace suffix in plugin specs)""" + + source: str + """Human-readable description of where the marketplace data is fetched from (e.g. "GitHub: + owner/repo"). + """ + is_default: bool | None = None + """True when this is a default marketplace shipped with the runtime. Defaults are not + removable. + """ + + @staticmethod + def from_dict(obj: Any) -> 'MarketplaceInfo': + assert isinstance(obj, dict) + name = from_str(obj.get("name")) + source = from_str(obj.get("source")) + is_default = from_union([from_bool, from_none], obj.get("isDefault")) + return MarketplaceInfo(name, source, is_default) + + def to_dict(self) -> dict: + result: dict = {} + result["name"] = from_str(self.name) + result["source"] = from_str(self.source) + if self.is_default is not None: + result["isDefault"] = from_union([from_bool, from_none], self.is_default) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MarketplaceRefreshEntry: + """Schema for the `MarketplaceRefreshEntry` type.""" + + name: str + """Marketplace name that was refreshed""" + + success: bool + """Whether the refresh succeeded""" + + error: str | None = None + """Error message (failure only)""" + + @staticmethod + def from_dict(obj: Any) -> 'MarketplaceRefreshEntry': + assert isinstance(obj, dict) + name = from_str(obj.get("name")) + success = from_bool(obj.get("success")) + error = from_union([from_str, from_none], obj.get("error")) + return MarketplaceRefreshEntry(name, success, error) + + def to_dict(self) -> dict: + result: dict = {} + result["name"] = from_str(self.name) + result["success"] = from_bool(self.success) + if self.error is not None: + result["error"] = from_union([from_str, from_none], self.error) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MarketplaceRemoveResult: + """Outcome of the remove attempt, including dependent-plugin info when applicable.""" + + removed: bool + """True when the marketplace was actually removed. False when removal was skipped because + the marketplace has dependent plugins and `force` was not set. + """ + dependent_plugins: list[str] | None = None + """Names of installed plugins that prevented removal. Populated only when `removed=false`.""" + + @staticmethod + def from_dict(obj: Any) -> 'MarketplaceRemoveResult': + assert isinstance(obj, dict) + removed = from_bool(obj.get("removed")) + dependent_plugins = from_union([lambda x: from_list(from_str, x), from_none], obj.get("dependentPlugins")) + return MarketplaceRemoveResult(removed, dependent_plugins) + + def to_dict(self) -> dict: + result: dict = {} + result["removed"] = from_bool(self.removed) + if self.dependent_plugins is not None: + result["dependentPlugins"] = from_union([lambda x: from_list(from_str, x), from_none], self.dependent_plugins) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPAllowedServer: + """Schema for the `McpAllowedServer` type.""" + + name: str + """Allowed server name""" + + redacted_note: str | None = None + """PII-free note explaining why the server was allowed""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPAllowedServer': + assert isinstance(obj, dict) + name = from_str(obj.get("name")) + redacted_note = from_union([from_str, from_none], obj.get("redactedNote")) + return MCPAllowedServer(name, redacted_note) + + def to_dict(self) -> dict: + result: dict = {} + result["name"] = from_str(self.name) + if self.redacted_note is not None: + result["redactedNote"] = from_union([from_str, from_none], self.redacted_note) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPAppsDiagnoseCapability: @@ -2088,6 +2282,47 @@ def to_dict(self) -> dict: result["name"] = from_str(self.name) return result +# Experimental: this type is part of an experimental API and may change or be removed. +# Internal: this type is an internal SDK API and is not part of the public surface. +@dataclass +class MCPConfigureGitHubRequest: + """Opaque auth info used to configure GitHub MCP.""" + + auth_info: Any = None + """Opaque runtime auth info for GitHub MCP configuration. Marked internal: an in-process + runtime shape (configureGitHubMcp is a no-op over the wire). + """ + + @staticmethod + def from_dict(obj: Any) -> 'MCPConfigureGitHubRequest': + assert isinstance(obj, dict) + auth_info = obj.get("authInfo") + return MCPConfigureGitHubRequest(auth_info) + + def to_dict(self) -> dict: + result: dict = {} + result["authInfo"] = self.auth_info + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPConfigureGitHubResult: + """Result of configuring GitHub MCP.""" + + changed: bool + """Whether GitHub MCP configuration changed.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPConfigureGitHubResult': + assert isinstance(obj, dict) + changed = from_bool(obj.get("changed")) + return MCPConfigureGitHubResult(changed) + + def to_dict(self) -> dict: + result: dict = {} + result["changed"] = from_bool(self.changed) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPDisableRequest: @@ -2145,6 +2380,142 @@ def to_dict(self) -> dict: result["serverName"] = from_str(self.server_name) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPFilteredServer: + """Schema for the `McpFilteredServer` type.""" + + name: str + """Filtered server name""" + + reason: str + """Human-readable filter reason""" + + enterprise_name: str | None = None + """Enterprise login associated with an allowlist policy""" + + redacted_reason: str | None = None + """PII-free filter reason""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPFilteredServer': + assert isinstance(obj, dict) + name = from_str(obj.get("name")) + reason = from_str(obj.get("reason")) + enterprise_name = from_union([from_str, from_none], obj.get("enterpriseName")) + redacted_reason = from_union([from_str, from_none], obj.get("redactedReason")) + return MCPFilteredServer(name, reason, enterprise_name, redacted_reason) + + def to_dict(self) -> dict: + result: dict = {} + result["name"] = from_str(self.name) + result["reason"] = from_str(self.reason) + if self.enterprise_name is not None: + result["enterpriseName"] = from_union([from_str, from_none], self.enterprise_name) + if self.redacted_reason is not None: + result["redactedReason"] = from_union([from_str, from_none], self.redacted_reason) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPServerFailureInfo: + """Recorded MCP server connection failure.""" + + message: str + """Failure message produced when the MCP server connection failed.""" + + timestamp: int + """epoch-ms timestamp at which the failure was recorded.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPServerFailureInfo': + assert isinstance(obj, dict) + message = from_str(obj.get("message")) + timestamp = from_int(obj.get("timestamp")) + return MCPServerFailureInfo(message, timestamp) + + def to_dict(self) -> dict: + result: dict = {} + result["message"] = from_str(self.message) + result["timestamp"] = from_int(self.timestamp) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPServerNeedsAuthInfo: + """Recorded MCP server pending-auth state.""" + + timestamp: int + """epoch-ms timestamp at which the server signalled it needs authentication.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPServerNeedsAuthInfo': + assert isinstance(obj, dict) + timestamp = from_int(obj.get("timestamp")) + return MCPServerNeedsAuthInfo(timestamp) + + def to_dict(self) -> dict: + result: dict = {} + result["timestamp"] = from_int(self.timestamp) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPIsServerRunningRequest: + """Server name to check running status for.""" + + server_name: str + """Name of the MCP server to check""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPIsServerRunningRequest': + assert isinstance(obj, dict) + server_name = from_str(obj.get("serverName")) + return MCPIsServerRunningRequest(server_name) + + def to_dict(self) -> dict: + result: dict = {} + result["serverName"] = from_str(self.server_name) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPIsServerRunningResult: + """Whether the named MCP server is running.""" + + running: bool + """True if the server has an active client and transport.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPIsServerRunningResult': + assert isinstance(obj, dict) + running = from_bool(obj.get("running")) + return MCPIsServerRunningResult(running) + + def to_dict(self) -> dict: + result: dict = {} + result["running"] = from_bool(self.running) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPListToolsRequest: + """Server name whose tool list should be returned.""" + + server_name: str + """Name of the connected MCP server whose tools to list.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPListToolsRequest': + assert isinstance(obj, dict) + server_name = from_str(obj.get("serverName")) + return MCPListToolsRequest(server_name) + + def to_dict(self) -> dict: + result: dict = {} + result["serverName"] = from_str(self.server_name) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPOauthLoginRequest: @@ -2220,32 +2591,67 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class MCPRemoveGitHubResult: - """Indicates whether the auto-managed `github` MCP server was removed (false when nothing to - remove). - """ - removed: bool - """True when the auto-managed `github` MCP server was removed; false when no removal - happened (e.g. user has explicitly configured a `github` server, or the server was not - registered). - """ - +class MCPOauthRespondResult: + """Empty result after recording the MCP OAuth response.""" @staticmethod - def from_dict(obj: Any) -> 'MCPRemoveGitHubResult': + def from_dict(obj: Any) -> 'MCPOauthRespondResult': assert isinstance(obj, dict) - removed = from_bool(obj.get("removed")) - return MCPRemoveGitHubResult(removed) + return MCPOauthRespondResult() def to_dict(self) -> dict: result: dict = {} - result["removed"] = from_bool(self.removed) return result # Experimental: this type is part of an experimental API and may change or be removed. -class MCPSamplingExecutionAction(Enum): - """Outcome of the sampling inference. 'success' produced a response; 'failure' encountered - an error (including agent-side rejection by content filter or criteria); 'cancelled' the - caller cancelled this execution via cancelSamplingExecution. +# Internal: this type is an internal SDK API and is not part of the public surface. +@dataclass +class MCPReloadWithConfigRequest: + """Opaque MCP reload configuration.""" + + config: Any = None + """Opaque runtime MCP reload configuration. Marked internal: an in-process runtime shape + (reloadMcpServers throws over the wire). + """ + + @staticmethod + def from_dict(obj: Any) -> 'MCPReloadWithConfigRequest': + assert isinstance(obj, dict) + config = obj.get("config") + return MCPReloadWithConfigRequest(config) + + def to_dict(self) -> dict: + result: dict = {} + result["config"] = self.config + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPRemoveGitHubResult: + """Indicates whether the auto-managed `github` MCP server was removed (false when nothing to + remove). + """ + removed: bool + """True when the auto-managed `github` MCP server was removed; false when no removal + happened (e.g. user has explicitly configured a `github` server, or the server was not + registered). + """ + + @staticmethod + def from_dict(obj: Any) -> 'MCPRemoveGitHubResult': + assert isinstance(obj, dict) + removed = from_bool(obj.get("removed")) + return MCPRemoveGitHubResult(removed) + + def to_dict(self) -> dict: + result: dict = {} + result["removed"] = from_bool(self.removed) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +class MCPSamplingExecutionAction(Enum): + """Outcome of the sampling inference. 'success' produced a response; 'failure' encountered + an error (including agent-side rejection by content filter or criteria); 'cancelled' the + caller cancelled this execution via cancelSamplingExecution. """ CANCELLED = "cancelled" FAILURE = "failure" @@ -2299,10 +2705,51 @@ class MCPSetEnvValueModeDetails(Enum): How env values are passed to MCP servers (`direct` inlines literal values; `indirect` resolves at launch). + + How MCP server environment values are interpreted. """ DIRECT = "direct" INDIRECT = "indirect" +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPStopServerRequest: + """Server name for an individual MCP server stop.""" + + server_name: str + """Name of the MCP server to stop""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPStopServerRequest': + assert isinstance(obj, dict) + server_name = from_str(obj.get("serverName")) + return MCPStopServerRequest(server_name) + + def to_dict(self) -> dict: + result: dict = {} + result["serverName"] = from_str(self.server_name) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +# Internal: this type is an internal SDK API and is not part of the public surface. +@dataclass +class MCPUnregisterExternalClientRequest: + """Server name identifying the external client to remove.""" + + server_name: str + """Server name of the external client to unregister""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPUnregisterExternalClientRequest': + assert isinstance(obj, dict) + server_name = from_str(obj.get("serverName")) + return MCPUnregisterExternalClientRequest(server_name) + + def to_dict(self) -> dict: + result: dict = {} + result["serverName"] = from_str(self.server_name) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionContextInfo: @@ -2319,9 +2766,8 @@ class SessionContextInfo: """Tokens consumed by user/assistant/tool messages""" limit: int - """Total context limit for /context display: promptTokenLimit + outputTokenLimit (the - model's full max_output_tokens reserved on top of the prompt budget). - """ + """Prompt token limit plus the model's full output token limit.""" + mcp_tools_tokens: int """Tokens consumed by MCP tool definitions (subset of toolDefinitionsTokens, excludes deferred tools) @@ -2427,19 +2873,6 @@ def to_dict(self) -> dict: result["totalTokens"] = from_int(self.total_tokens) return result -# Experimental: this type is part of an experimental API and may change or be removed. -class HostType(Enum): - """Hosting platform type of the repository - - Repository host type - - Repository host type, if known - - Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. - """ - ADO = "ado" - GITHUB = "github" - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MetadataRecordContextChangeResult: @@ -2539,9 +2972,14 @@ def to_dict(self) -> dict: return result # Experimental: this type is part of an experimental API and may change or be removed. -class MetadataSnapshotRemoteMetadataTaskType(Enum): +class TaskType(Enum): """Whether the remote task originated from Copilot Coding Agent (cca) or a CLI `--remote` invocation. + + Whether the remote task originated from CCA or CLI `--remote`. + + Task type determines the handoff strategy (CCA fetches events; CLI prepares a transient + session). """ CCA = "cca" CLI = "cli" @@ -2911,6 +3349,59 @@ def to_dict(self) -> dict: result["name"] = from_str(self.name) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class OptionsUpdateAdditionalContentExclusionPolicyRuleSource: + """Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type.""" + + name: str + type: str + + @staticmethod + def from_dict(obj: Any) -> 'OptionsUpdateAdditionalContentExclusionPolicyRuleSource': + assert isinstance(obj, dict) + name = from_str(obj.get("name")) + type = from_str(obj.get("type")) + return OptionsUpdateAdditionalContentExclusionPolicyRuleSource(name, type) + + def to_dict(self) -> dict: + result: dict = {} + result["name"] = from_str(self.name) + result["type"] = from_str(self.type) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +class AdditionalContentExclusionPolicyScope(Enum): + """Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. + + Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` + enumeration. + + Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` + enumeration. + """ + ALL = "all" + REPO = "repo" + +# Experimental: this type is part of an experimental API and may change or be removed. +class OptionsUpdateContextTier(Enum): + """Context tier for models with tiered pricing. The session uses this to derive effective + `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits + honor the selected tier. + """ + DEFAULT = "default" + LONG_CONTEXT = "long_context" + +# Experimental: this type is part of an experimental API and may change or be removed. +class ReasoningSummary(Enum): + """Reasoning summary mode for supported model clients. + + Initial reasoning summary mode for supported model clients. + """ + CONCISE = "concise" + DETAILED = "detailed" + NONE = "none" + # Experimental: this type is part of an experimental API and may change or be removed. class OptionsUpdateToolFilterPrecedence(Enum): """Controls how availableTools (allowlist) and excludedTools (denylist) combine when both @@ -3393,14 +3884,6 @@ def to_dict(self) -> dict: result["type"] = from_str(self.type) return result -# Experimental: this type is part of an experimental API and may change or be removed. -class PermissionsConfigureAdditionalContentExclusionPolicyScope(Enum): - """Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` - enumeration. - """ - ALL = "all" - REPO = "repo" - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsConfigureResult: @@ -3769,6 +4252,44 @@ def to_dict(self) -> dict: result["path"] = from_union([from_none, from_str], self.path) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PlanSQLTodosRow: + """Schema for the `PlanSqlTodosRow` type.""" + + description: str | None = None + """Todo description.""" + + id: str | None = None + """Todo identifier.""" + + status: str | None = None + """Todo status.""" + + title: str | None = None + """Todo title.""" + + @staticmethod + def from_dict(obj: Any) -> 'PlanSQLTodosRow': + assert isinstance(obj, dict) + description = from_union([from_str, from_none], obj.get("description")) + id = from_union([from_str, from_none], obj.get("id")) + status = from_union([from_str, from_none], obj.get("status")) + title = from_union([from_str, from_none], obj.get("title")) + return PlanSQLTodosRow(description, id, status, title) + + def to_dict(self) -> dict: + result: dict = {} + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.id is not None: + result["id"] = from_union([from_str, from_none], self.id) + if self.status is not None: + result["status"] = from_union([from_str, from_none], self.status) + if self.title is not None: + result["title"] = from_union([from_str, from_none], self.title) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PlanUpdateRequest: @@ -3825,139 +4346,354 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class PushAttachmentFileLineRange: - """Optional line range to scope the attachment to a specific section of the file""" +class PluginUpdateResult: + """Result of updating a single plugin.""" - end: int - """End line number (1-based, inclusive)""" + skills_installed: int + """Number of skills discovered and installed after the update""" - start: int - """Start line number (1-based)""" + new_version: str | None = None + """Version after the update, when reported by the plugin manifest""" + + previous_version: str | None = None + """Version that was previously installed, when available""" @staticmethod - def from_dict(obj: Any) -> 'PushAttachmentFileLineRange': + def from_dict(obj: Any) -> 'PluginUpdateResult': assert isinstance(obj, dict) - end = from_int(obj.get("end")) - start = from_int(obj.get("start")) - return PushAttachmentFileLineRange(end, start) + skills_installed = from_int(obj.get("skillsInstalled")) + new_version = from_union([from_str, from_none], obj.get("newVersion")) + previous_version = from_union([from_str, from_none], obj.get("previousVersion")) + return PluginUpdateResult(skills_installed, new_version, previous_version) def to_dict(self) -> dict: result: dict = {} - result["end"] = from_int(self.end) - result["start"] = from_int(self.start) + result["skillsInstalled"] = from_int(self.skills_installed) + if self.new_version is not None: + result["newVersion"] = from_union([from_str, from_none], self.new_version) + if self.previous_version is not None: + result["previousVersion"] = from_union([from_str, from_none], self.previous_version) return result -class PushAttachmentGitHubReferenceTypeEnum(Enum): - """Type of GitHub reference""" - - DISCUSSION = "discussion" - ISSUE = "issue" - PR = "pr" - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class PushAttachmentSelectionDetailsEnd: - """End position of the selection""" +class PluginsMarketplacesAddRequest: + """Marketplace source to register.""" - character: int - """End character offset within the line (0-based)""" - - line: int - """End line number (0-based)""" + source: str + """Marketplace source. Accepts the same forms as the CLI: "owner/repo" or "owner/repo#ref" + (GitHub), an http/https/ssh URL (optionally with #ref), a git scp-style URL + (user@host:path), or a local path. The marketplace's own name (from its manifest) is used + as the registration key. + """ @staticmethod - def from_dict(obj: Any) -> 'PushAttachmentSelectionDetailsEnd': + def from_dict(obj: Any) -> 'PluginsMarketplacesAddRequest': assert isinstance(obj, dict) - character = from_int(obj.get("character")) - line = from_int(obj.get("line")) - return PushAttachmentSelectionDetailsEnd(character, line) + source = from_str(obj.get("source")) + return PluginsMarketplacesAddRequest(source) def to_dict(self) -> dict: result: dict = {} - result["character"] = from_int(self.character) - result["line"] = from_int(self.line) + result["source"] = from_str(self.source) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class PushAttachmentSelectionDetailsStart: - """Start position of the selection""" - - character: int - """Start character offset within the line (0-based)""" +class PluginsMarketplacesBrowseRequest: + """Name of the marketplace whose plugin catalog to fetch.""" - line: int - """Start line number (0-based)""" + name: str + """Marketplace name to browse""" @staticmethod - def from_dict(obj: Any) -> 'PushAttachmentSelectionDetailsStart': + def from_dict(obj: Any) -> 'PluginsMarketplacesBrowseRequest': assert isinstance(obj, dict) - character = from_int(obj.get("character")) - line = from_int(obj.get("line")) - return PushAttachmentSelectionDetailsStart(character, line) + name = from_str(obj.get("name")) + return PluginsMarketplacesBrowseRequest(name) def to_dict(self) -> dict: result: dict = {} - result["character"] = from_int(self.character) - result["line"] = from_int(self.line) + result["name"] = from_str(self.name) return result -class PushAttachmentType(Enum): - BLOB = "blob" - DIRECTORY = "directory" - EXTENSION_CONTEXT = "extension_context" - FILE = "file" - GITHUB_REFERENCE = "github_reference" - SELECTION = "selection" - -class PushAttachmentBlobType(Enum): - BLOB = "blob" - -class PushAttachmentFileType(Enum): - FILE = "file" - # Experimental: this type is part of an experimental API and may change or be removed. -class PushAttachmentGitHubReferenceType(Enum): - GITHUB_REFERENCE = "github_reference" - -class PushAttachmentSelectionType(Enum): - SELECTION = "selection" +@dataclass +class PluginsMarketplacesRefreshRequest: + name: str | None = None + """Marketplace name to refresh. When omitted, every registered marketplace is refreshed.""" -# Experimental: this type is part of an experimental API and may change or be removed. -class QueuePendingItemsKind(Enum): - """Whether this item is a queued user message or a queued slash command / model change""" + @staticmethod + def from_dict(obj: Any) -> 'PluginsMarketplacesRefreshRequest': + assert isinstance(obj, dict) + name = from_union([from_str, from_none], obj.get("name")) + return PluginsMarketplacesRefreshRequest(name) - COMMAND = "command" - MESSAGE = "message" + def to_dict(self) -> dict: + result: dict = {} + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class QueueRemoveMostRecentResult: - """Indicates whether a user-facing pending item was removed.""" +class PluginsMarketplacesRemoveRequest: + """Name of the marketplace to remove and an optional force flag.""" - removed: bool - """True if a user-facing pending item was removed (LIFO across both queues); false when no - removable items remained. + name: str + """Marketplace name to remove""" + + force: bool | None = None + """When true, also uninstall every plugin sourced from this marketplace. When false + (default), removal is a no-op if any plugin from this marketplace is installed and the + dependent plugin names are returned in the result. """ @staticmethod - def from_dict(obj: Any) -> 'QueueRemoveMostRecentResult': + def from_dict(obj: Any) -> 'PluginsMarketplacesRemoveRequest': assert isinstance(obj, dict) - removed = from_bool(obj.get("removed")) - return QueueRemoveMostRecentResult(removed) + name = from_str(obj.get("name")) + force = from_union([from_bool, from_none], obj.get("force")) + return PluginsMarketplacesRemoveRequest(name, force) def to_dict(self) -> dict: result: dict = {} - result["removed"] = from_bool(self.removed) + result["name"] = from_str(self.name) + if self.force is not None: + result["force"] = from_union([from_bool, from_none], self.force) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class QueuedCommandHandled: - """Schema for the `QueuedCommandHandled` type.""" - - handled: ClassVar[str] = "true" - """The host actually executed the queued command.""" +class PluginsReloadRequest: + """Optional flags controlling which side effects the reload performs.""" + + defer_repo_hooks: bool | None = None + """When true, skip repo-level hooks during the hook reload. Use before folder trust is + confirmed; load them post-trust via `sessions.loadDeferredRepoHooks`. + """ + reload_custom_agents: bool | None = None + """Re-run custom-agent discovery after refreshing plugins. Defaults to true.""" + + reload_hooks: bool | None = None + """Re-load user, plugin, and (subject to `deferRepoHooks`) repo hooks. Defaults to true. Has + no effect when the host has not registered a hook reloader (e.g. remote sessions). + """ + reload_mcp: bool | None = None + """Reload MCP server connections after refreshing plugins. Defaults to true.""" + + @staticmethod + def from_dict(obj: Any) -> 'PluginsReloadRequest': + assert isinstance(obj, dict) + defer_repo_hooks = from_union([from_bool, from_none], obj.get("deferRepoHooks")) + reload_custom_agents = from_union([from_bool, from_none], obj.get("reloadCustomAgents")) + reload_hooks = from_union([from_bool, from_none], obj.get("reloadHooks")) + reload_mcp = from_union([from_bool, from_none], obj.get("reloadMcp")) + return PluginsReloadRequest(defer_repo_hooks, reload_custom_agents, reload_hooks, reload_mcp) + + def to_dict(self) -> dict: + result: dict = {} + if self.defer_repo_hooks is not None: + result["deferRepoHooks"] = from_union([from_bool, from_none], self.defer_repo_hooks) + if self.reload_custom_agents is not None: + result["reloadCustomAgents"] = from_union([from_bool, from_none], self.reload_custom_agents) + if self.reload_hooks is not None: + result["reloadHooks"] = from_union([from_bool, from_none], self.reload_hooks) + if self.reload_mcp is not None: + result["reloadMcp"] = from_union([from_bool, from_none], self.reload_mcp) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsPollSpawnedSessionsEvent: + """Schema for the `SessionsPollSpawnedSessionsEvent` type.""" + + session_id: str + """Session id of the newly-spawned session.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionsPollSpawnedSessionsEvent': + assert isinstance(obj, dict) + session_id = from_str(obj.get("sessionId")) + return SessionsPollSpawnedSessionsEvent(session_id) + + def to_dict(self) -> dict: + result: dict = {} + result["sessionId"] = from_str(self.session_id) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class ProviderConfigAzure: + """Azure-specific provider options.""" + + api_version: str | None = None + """API version. When set, uses the versioned deployment route. When omitted, uses the GA + versionless v1 route. + """ + + @staticmethod + def from_dict(obj: Any) -> 'ProviderConfigAzure': + assert isinstance(obj, dict) + api_version = from_union([from_str, from_none], obj.get("apiVersion")) + return ProviderConfigAzure(api_version) + + def to_dict(self) -> dict: + result: dict = {} + if self.api_version is not None: + result["apiVersion"] = from_union([from_str, from_none], self.api_version) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +class ProviderConfigType(Enum): + """Provider type. Defaults to "openai" for generic OpenAI-compatible APIs.""" + + ANTHROPIC = "anthropic" + AZURE = "azure" + OPENAI = "openai" + +# Experimental: this type is part of an experimental API and may change or be removed. +class ProviderConfigWireAPI(Enum): + """Wire API format (openai/azure only). Defaults to "completions".""" + + COMPLETIONS = "completions" + RESPONSES = "responses" + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PushAttachmentFileLineRange: + """Optional line range to scope the attachment to a specific section of the file""" + + end: int + """End line number (1-based, inclusive)""" + + start: int + """Start line number (1-based)""" + + @staticmethod + def from_dict(obj: Any) -> 'PushAttachmentFileLineRange': + assert isinstance(obj, dict) + end = from_int(obj.get("end")) + start = from_int(obj.get("start")) + return PushAttachmentFileLineRange(end, start) + + def to_dict(self) -> dict: + result: dict = {} + result["end"] = from_int(self.end) + result["start"] = from_int(self.start) + return result + +class PushAttachmentGitHubReferenceTypeEnum(Enum): + """Type of GitHub reference""" + + DISCUSSION = "discussion" + ISSUE = "issue" + PR = "pr" + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PushAttachmentSelectionDetailsEnd: + """End position of the selection""" + + character: int + """End character offset within the line (0-based)""" + + line: int + """End line number (0-based)""" + + @staticmethod + def from_dict(obj: Any) -> 'PushAttachmentSelectionDetailsEnd': + assert isinstance(obj, dict) + character = from_int(obj.get("character")) + line = from_int(obj.get("line")) + return PushAttachmentSelectionDetailsEnd(character, line) + + def to_dict(self) -> dict: + result: dict = {} + result["character"] = from_int(self.character) + result["line"] = from_int(self.line) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PushAttachmentSelectionDetailsStart: + """Start position of the selection""" + + character: int + """Start character offset within the line (0-based)""" + + line: int + """Start line number (0-based)""" + + @staticmethod + def from_dict(obj: Any) -> 'PushAttachmentSelectionDetailsStart': + assert isinstance(obj, dict) + character = from_int(obj.get("character")) + line = from_int(obj.get("line")) + return PushAttachmentSelectionDetailsStart(character, line) + + def to_dict(self) -> dict: + result: dict = {} + result["character"] = from_int(self.character) + result["line"] = from_int(self.line) + return result + +class PushAttachmentType(Enum): + BLOB = "blob" + DIRECTORY = "directory" + EXTENSION_CONTEXT = "extension_context" + FILE = "file" + GITHUB_REFERENCE = "github_reference" + SELECTION = "selection" + +class PushAttachmentBlobType(Enum): + BLOB = "blob" + +class PushAttachmentFileType(Enum): + FILE = "file" + +# Experimental: this type is part of an experimental API and may change or be removed. +class PushAttachmentGitHubReferenceType(Enum): + GITHUB_REFERENCE = "github_reference" + +class PushAttachmentSelectionType(Enum): + SELECTION = "selection" + +# Experimental: this type is part of an experimental API and may change or be removed. +class QueuePendingItemsKind(Enum): + """Whether this item is a queued user message or a queued slash command / model change""" + + COMMAND = "command" + MESSAGE = "message" + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class QueueRemoveMostRecentResult: + """Indicates whether a user-facing pending item was removed.""" + + removed: bool + """True if a user-facing pending item was removed (LIFO across both queues); false when no + removable items remained. + """ + + @staticmethod + def from_dict(obj: Any) -> 'QueueRemoveMostRecentResult': + assert isinstance(obj, dict) + removed = from_bool(obj.get("removed")) + return QueueRemoveMostRecentResult(removed) + + def to_dict(self) -> dict: + result: dict = {} + result["removed"] = from_bool(self.removed) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class QueuedCommandHandled: + """Schema for the `QueuedCommandHandled` type.""" + + handled: ClassVar[str] = "true" + """The host actually executed the queued command.""" stop_processing_queue: bool | None = None """When true, the runtime will not process subsequent queued commands until a new request @@ -4051,6 +4787,29 @@ def to_dict(self) -> dict: result["handle"] = from_str(self.handle) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsRegisterExtensionToolsOnSessionOptions: + """Optional registration options.""" + + # Internal: this field is an internal SDK API and is not part of the public surface. + enabled: Any = None + """In-process `() => boolean` gating callback (CLI-only optimization). Marked internal: + replaced by runtime-side enable/disable RPCs in the SDK migration. + """ + + @staticmethod + def from_dict(obj: Any) -> 'SessionsRegisterExtensionToolsOnSessionOptions': + assert isinstance(obj, dict) + enabled = obj.get("enabled") + return SessionsRegisterExtensionToolsOnSessionOptions(enabled) + + def to_dict(self) -> dict: + result: dict = {} + if self.enabled is not None: + result["enabled"] = self.enabled + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ReleaseEventInterestParams: @@ -4064,86 +4823,352 @@ class ReleaseEventInterestParams: """ @staticmethod - def from_dict(obj: Any) -> 'ReleaseEventInterestParams': + def from_dict(obj: Any) -> 'ReleaseEventInterestParams': + assert isinstance(obj, dict) + handle = from_str(obj.get("handle")) + return ReleaseEventInterestParams(handle) + + def to_dict(self) -> dict: + result: dict = {} + result["handle"] = from_str(self.handle) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteControlConfigExistingMcSession: + """Reattach to an existing MC session without creating a new one.""" + + mc_session_id: str + """Existing MC session ID to reattach to.""" + + mc_task_id: str + """Existing MC task ID for the reattached session.""" + + @staticmethod + def from_dict(obj: Any) -> 'RemoteControlConfigExistingMcSession': + assert isinstance(obj, dict) + mc_session_id = from_str(obj.get("mcSessionId")) + mc_task_id = from_str(obj.get("mcTaskId")) + return RemoteControlConfigExistingMcSession(mc_session_id, mc_task_id) + + def to_dict(self) -> dict: + result: dict = {} + result["mcSessionId"] = from_str(self.mc_session_id) + result["mcTaskId"] = from_str(self.mc_task_id) + return result + +class RemoteControlStatusState(Enum): + ACTIVE = "active" + CONNECTING = "connecting" + ERROR = "error" + OFF = "off" + +class RemoteControlStatusActiveState(Enum): + ACTIVE = "active" + +class RemoteControlStatusConnectingState(Enum): + CONNECTING = "connecting" + +class RemoteControlStatusErrorState(Enum): + ERROR = "error" + +class RemoteControlStatusOffState(Enum): + OFF = "off" + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteControlStatusResult: + """Wrapper for the singleton's current status.""" + + status: RemoteControlStatus + """State of the runtime-managed remote-control singleton.""" + + @staticmethod + def from_dict(obj: Any) -> 'RemoteControlStatusResult': + assert isinstance(obj, dict) + status = _load_RemoteControlStatus(obj.get("status")) + return RemoteControlStatusResult(status) + + def to_dict(self) -> dict: + result: dict = {} + result["status"] = (self.status).to_dict() + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteControlStopResult: + """Outcome of a stopRemoteControl call.""" + + status: RemoteControlStatus + """State of the runtime-managed remote-control singleton.""" + + stopped: bool + """Whether the singleton was actually torn down by this call.""" + + @staticmethod + def from_dict(obj: Any) -> 'RemoteControlStopResult': + assert isinstance(obj, dict) + status = _load_RemoteControlStatus(obj.get("status")) + stopped = from_bool(obj.get("stopped")) + return RemoteControlStopResult(status, stopped) + + def to_dict(self) -> dict: + result: dict = {} + result["status"] = (self.status).to_dict() + result["stopped"] = from_bool(self.stopped) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteControlTransferResult: + """Outcome of a transferRemoteControl call.""" + + status: RemoteControlStatus + """State of the runtime-managed remote-control singleton.""" + + transferred: bool + """Whether the rebinding actually happened.""" + + @staticmethod + def from_dict(obj: Any) -> 'RemoteControlTransferResult': + assert isinstance(obj, dict) + status = _load_RemoteControlStatus(obj.get("status")) + transferred = from_bool(obj.get("transferred")) + return RemoteControlTransferResult(status, transferred) + + def to_dict(self) -> dict: + result: dict = {} + result["status"] = (self.status).to_dict() + result["transferred"] = from_bool(self.transferred) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +class RemoteSessionMode(Enum): + """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" + ON = "on" + +# 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 + """GitHub frontend URL for this session""" + + @staticmethod + def from_dict(obj: Any) -> 'RemoteEnableResult': + assert isinstance(obj, dict) + remote_steerable = from_bool(obj.get("remoteSteerable")) + url = from_union([from_str, from_none], obj.get("url")) + return RemoteEnableResult(remote_steerable, url) + + def to_dict(self) -> dict: + result: dict = {} + result["remoteSteerable"] = from_bool(self.remote_steerable) + if self.url is not None: + result["url"] = from_union([from_str, from_none], self.url) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteNotifySteerableChangedRequest: + """New remote-steerability state to persist as a `session.remote_steerable_changed` event.""" + + remote_steerable: bool + """Whether the session now supports remote steering via GitHub. The runtime persists this as + a `session.remote_steerable_changed` event so resume/replay sees the up-to-date + capability. + """ + + @staticmethod + def from_dict(obj: Any) -> 'RemoteNotifySteerableChangedRequest': + assert isinstance(obj, dict) + remote_steerable = from_bool(obj.get("remoteSteerable")) + return RemoteNotifySteerableChangedRequest(remote_steerable) + + def to_dict(self) -> dict: + result: dict = {} + result["remoteSteerable"] = from_bool(self.remote_steerable) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteNotifySteerableChangedResult: + """Persist a steerability change as a `session.remote_steerable_changed` event. Used by the + host (CLI / SDK consumer) when it has just finished enabling or disabling steering on a + remote exporter that the runtime does not directly own. + """ + @staticmethod + def from_dict(obj: Any) -> 'RemoteNotifySteerableChangedResult': + assert isinstance(obj, dict) + return RemoteNotifySteerableChangedResult() + + def to_dict(self) -> dict: + result: dict = {} + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteSessionMetadataRepository: + """GitHub repository the remote session belongs to.""" + + branch: str + """Branch associated with the remote session.""" + + name: str + """Repository name.""" + + owner: str + """Repository owner.""" + + @staticmethod + def from_dict(obj: Any) -> 'RemoteSessionMetadataRepository': + assert isinstance(obj, dict) + branch = from_str(obj.get("branch")) + name = from_str(obj.get("name")) + owner = from_str(obj.get("owner")) + return RemoteSessionMetadataRepository(branch, name, owner) + + def to_dict(self) -> dict: + result: dict = {} + result["branch"] = from_str(self.branch) + result["name"] = from_str(self.name) + result["owner"] = from_str(self.owner) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteSessionRepository: + """Repository context for the remote session. + + Repository for the cloud session. + """ + name: str + """Repository name.""" + + owner: str + """Repository owner or organization login.""" + + branch: str | None = None + """Optional branch associated with the remote session.""" + + @staticmethod + def from_dict(obj: Any) -> 'RemoteSessionRepository': assert isinstance(obj, dict) - handle = from_str(obj.get("handle")) - return ReleaseEventInterestParams(handle) + name = from_str(obj.get("name")) + owner = from_str(obj.get("owner")) + branch = from_union([from_str, from_none], obj.get("branch")) + return RemoteSessionRepository(name, owner, branch) def to_dict(self) -> dict: result: dict = {} - result["handle"] = from_str(self.handle) + result["name"] = from_str(self.name) + result["owner"] = from_str(self.owner) + if self.branch is not None: + result["branch"] = from_union([from_str, from_none], self.branch) return result -# Experimental: this type is part of an experimental API and may change or be removed. -class RemoteSessionMode(Enum): - """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" - ON = "on" - # 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""" +class SandboxConfigUserPolicyExperimentalSeatbelt: + """macOS seatbelt experimental options.""" - url: str | None = None - """GitHub frontend URL for this session""" + keychain_access: bool | None = None + """Whether the macOS seatbelt profile may access the keychain.""" @staticmethod - def from_dict(obj: Any) -> 'RemoteEnableResult': + def from_dict(obj: Any) -> 'SandboxConfigUserPolicyExperimentalSeatbelt': assert isinstance(obj, dict) - remote_steerable = from_bool(obj.get("remoteSteerable")) - url = from_union([from_str, from_none], obj.get("url")) - return RemoteEnableResult(remote_steerable, url) + keychain_access = from_union([from_bool, from_none], obj.get("keychainAccess")) + return SandboxConfigUserPolicyExperimentalSeatbelt(keychain_access) def to_dict(self) -> dict: result: dict = {} - result["remoteSteerable"] = from_bool(self.remote_steerable) - if self.url is not None: - result["url"] = from_union([from_str, from_none], self.url) + if self.keychain_access is not None: + result["keychainAccess"] = from_union([from_bool, from_none], self.keychain_access) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class RemoteNotifySteerableChangedRequest: - """New remote-steerability state to persist as a `session.remote_steerable_changed` event.""" +class SandboxConfigUserPolicyFilesystem: + """Filesystem rules to merge into the base policy.""" - remote_steerable: bool - """Whether the session now supports remote steering via GitHub. The runtime persists this as - a `session.remote_steerable_changed` event so resume/replay sees the up-to-date - capability. - """ + clear_policy_on_exit: bool | None = None + """Whether to clear the policy when the session exits.""" + + denied_paths: list[str] | None = None + """Paths explicitly denied.""" + + readonly_paths: list[str] | None = None + """Paths granted read-only access.""" + + readwrite_paths: list[str] | None = None + """Paths granted read/write access.""" @staticmethod - def from_dict(obj: Any) -> 'RemoteNotifySteerableChangedRequest': + def from_dict(obj: Any) -> 'SandboxConfigUserPolicyFilesystem': assert isinstance(obj, dict) - remote_steerable = from_bool(obj.get("remoteSteerable")) - return RemoteNotifySteerableChangedRequest(remote_steerable) + clear_policy_on_exit = from_union([from_bool, from_none], obj.get("clearPolicyOnExit")) + denied_paths = from_union([lambda x: from_list(from_str, x), from_none], obj.get("deniedPaths")) + readonly_paths = from_union([lambda x: from_list(from_str, x), from_none], obj.get("readonlyPaths")) + readwrite_paths = from_union([lambda x: from_list(from_str, x), from_none], obj.get("readwritePaths")) + return SandboxConfigUserPolicyFilesystem(clear_policy_on_exit, denied_paths, readonly_paths, readwrite_paths) def to_dict(self) -> dict: result: dict = {} - result["remoteSteerable"] = from_bool(self.remote_steerable) + if self.clear_policy_on_exit is not None: + result["clearPolicyOnExit"] = from_union([from_bool, from_none], self.clear_policy_on_exit) + if self.denied_paths is not None: + result["deniedPaths"] = from_union([lambda x: from_list(from_str, x), from_none], self.denied_paths) + if self.readonly_paths is not None: + result["readonlyPaths"] = from_union([lambda x: from_list(from_str, x), from_none], self.readonly_paths) + if self.readwrite_paths is not None: + result["readwritePaths"] = from_union([lambda x: from_list(from_str, x), from_none], self.readwrite_paths) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class RemoteNotifySteerableChangedResult: - """Persist a steerability change as a `session.remote_steerable_changed` event. Used by the - host (CLI / SDK consumer) when it has just finished enabling or disabling steering on a - remote exporter that the runtime does not directly own. - """ +class SandboxConfigUserPolicyNetwork: + """Network rules to merge into the base policy.""" + + allowed_hosts: list[str] | None = None + """Hosts allowed in addition to the base policy.""" + + allow_local_network: bool | None = None + """Whether traffic to local/loopback addresses is allowed.""" + + allow_outbound: bool | None = None + """Whether outbound network traffic is allowed at all.""" + + blocked_hosts: list[str] | None = None + """Hosts explicitly blocked.""" + @staticmethod - def from_dict(obj: Any) -> 'RemoteNotifySteerableChangedResult': + def from_dict(obj: Any) -> 'SandboxConfigUserPolicyNetwork': assert isinstance(obj, dict) - return RemoteNotifySteerableChangedResult() + allowed_hosts = from_union([lambda x: from_list(from_str, x), from_none], obj.get("allowedHosts")) + allow_local_network = from_union([from_bool, from_none], obj.get("allowLocalNetwork")) + allow_outbound = from_union([from_bool, from_none], obj.get("allowOutbound")) + blocked_hosts = from_union([lambda x: from_list(from_str, x), from_none], obj.get("blockedHosts")) + return SandboxConfigUserPolicyNetwork(allowed_hosts, allow_local_network, allow_outbound, blocked_hosts) def to_dict(self) -> dict: result: dict = {} + if self.allowed_hosts is not None: + result["allowedHosts"] = from_union([lambda x: from_list(from_str, x), from_none], self.allowed_hosts) + if self.allow_local_network is not None: + result["allowLocalNetwork"] = from_union([from_bool, from_none], self.allow_local_network) + if self.allow_outbound is not None: + result["allowOutbound"] = from_union([from_bool, from_none], self.allow_outbound) + if self.blocked_hosts is not None: + result["blockedHosts"] = from_union([lambda x: from_list(from_str, x), from_none], self.blocked_hosts) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -4368,6 +5393,30 @@ def to_dict(self) -> dict: result["projectPath"] = from_union([from_str, from_none], self.project_path) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionActivity: + """Current activity flags for the session.""" + + abortable: bool + """Whether an in-flight operation can currently be aborted.""" + + has_active_work: bool + """Whether the session currently has active work, including running turns or tasks.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionActivity': + assert isinstance(obj, dict) + abortable = from_bool(obj.get("abortable")) + has_active_work = from_bool(obj.get("hasActiveWork")) + return SessionActivity(abortable, has_active_work) + + def to_dict(self) -> dict: + result: dict = {} + result["abortable"] = from_bool(self.abortable) + result["hasActiveWork"] = from_bool(self.has_active_work) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionBulkDeleteResult: @@ -4390,6 +5439,24 @@ def to_dict(self) -> dict: result["freedBytes"] = from_dict(from_int, self.freed_bytes) return result +# Experimental: this type is part of an experimental API and may change or be removed. +class SessionCapability(Enum): + """Session capability enabled for this session + + Session capability id + """ + ASK_USER = "ask-user" + CANVAS_RENDERER = "canvas-renderer" + CLI_DOCUMENTATION = "cli-documentation" + ELICITATION = "elicitation" + INTERACTIVE_MODE = "interactive-mode" + MCP_APPS = "mcp-apps" + MEMORY = "memory" + PLAN_MODE = "plan-mode" + SESSION_STORE = "session-store" + SYSTEM_NOTIFICATIONS = "system-notifications" + TUI_HINTS = "tui-hints" + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionFSAppendFileRequest: @@ -4809,6 +5876,25 @@ def to_dict(self) -> dict: result["mode"] = from_union([from_int, from_none], self.mode) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionList: + """Sessions matching the filter, ordered most-recently-modified first.""" + + sessions: list[SessionListEntry] + """Sessions ordered most-recently-modified first. Discriminated by `isRemote`.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionList': + assert isinstance(obj, dict) + sessions = from_list(_load_SessionListEntry, obj.get("sessions")) + return SessionList(sessions) + + def to_dict(self) -> dict: + result: dict = {} + result["sessions"] = from_list(lambda x: (x).to_dict(), self.sessions) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionListFilter: @@ -4899,6 +5985,64 @@ def to_dict(self) -> dict: result["quotaSnapshots"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.quota_snapshots) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource: + """Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type.""" + + name: str + type: str + + @staticmethod + def from_dict(obj: Any) -> 'SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource': + assert isinstance(obj, dict) + name = from_str(obj.get("name")) + type = from_str(obj.get("type")) + return SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource(name, type) + + def to_dict(self) -> dict: + result: dict = {} + result["name"] = from_str(self.name) + result["type"] = from_str(self.type) + return result + +class SessionOpenParamsKind(Enum): + ATTACH = "attach" + CLOUD = "cloud" + CREATE = "create" + HANDOFF = "handoff" + REMOTE = "remote" + RESUME = "resume" + RESUME_LAST = "resumeLast" + +# Experimental: this type is part of an experimental API and may change or be removed. +class SessionsOpenProgressStatus(Enum): + """Step status.""" + + COMPLETE = "complete" + IN_PROGRESS = "in-progress" + +# Experimental: this type is part of an experimental API and may change or be removed. +class SessionsOpenProgressStep(Enum): + """Handoff step.""" + + CHECKOUT_BRANCH = "checkout-branch" + CHECK_CHANGES = "check-changes" + CREATE_SESSION = "create-session" + LOAD_SESSION = "load-session" + SAVE_SESSION = "save-session" + VALIDATE_REPO = "validate-repo" + +# Experimental: this type is part of an experimental API and may change or be removed. +class SessionsOpenStatus(Enum): + """Outcome of the open request.""" + + CONNECTED = "connected" + CREATED = "created" + HANDED_OFF = "handed_off" + NOT_FOUND = "not_found" + RESUMED = "resumed" + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionPruneResult: @@ -5002,6 +6146,34 @@ def to_dict(self) -> dict: result["sizes"] = from_dict(from_int, self.sizes) return result +# Experimental: this type is part of an experimental API and may change or be removed. +class SessionSource(Enum): + """Which session sources to include. Defaults to `local` for backward compatibility.""" + + ALL = "all" + LOCAL = "local" + REMOTE = "remote" + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionTelemetryEngagement: + """Telemetry engagement ID for the session, when available.""" + + engagement_id: str | None = None + """Current telemetry engagement ID, when available.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionTelemetryEngagement': + assert isinstance(obj, dict) + engagement_id = from_union([from_str, from_none], obj.get("engagementId")) + return SessionTelemetryEngagement(engagement_id) + + def to_dict(self) -> dict: + result: dict = {} + if self.engagement_id is not None: + result["engagementId"] = from_union([from_str, from_none], self.engagement_id) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionUpdateOptionsResult: @@ -5254,6 +6426,45 @@ def to_dict(self) -> dict: result["name"] = from_union([from_str, from_none], self.name) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsGetBoardEntryCountRequest: + """Session ID whose board entry count should be returned.""" + + session_id: str + """Session ID whose board entry count should be returned.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionsGetBoardEntryCountRequest': + assert isinstance(obj, dict) + session_id = from_str(obj.get("sessionId")) + return SessionsGetBoardEntryCountRequest(session_id) + + def to_dict(self) -> dict: + result: dict = {} + result["sessionId"] = from_str(self.session_id) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsGetBoardEntryCountResult: + """Dynamic-context board entry count, when available.""" + + count: int | None = None + """Board entry count, when available.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionsGetBoardEntryCountResult': + assert isinstance(obj, dict) + count = from_union([from_int, from_none], obj.get("count")) + return SessionsGetBoardEntryCountResult(count) + + def to_dict(self) -> dict: + result: dict = {} + if self.count is not None: + result["count"] = from_union([from_int, from_none], self.count) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionsGetEventFilePathRequest: @@ -5373,6 +6584,54 @@ def to_dict(self) -> dict: result["sessionId"] = from_str(self.session_id) return result +class SessionsOpenAttachKind(Enum): + ATTACH = "attach" + +class SessionsOpenCloudKind(Enum): + CLOUD = "cloud" + +class SessionsOpenCreateKind(Enum): + CREATE = "create" + +class SessionsOpenHandoffKind(Enum): + HANDOFF = "handoff" + +class SessionsOpenRemoteKind(Enum): + REMOTE = "remote" + +class SessionsOpenResumeKind(Enum): + RESUME = "resume" + +class SessionsOpenResumeLastKind(Enum): + RESUME_LAST = "resumeLast" + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsPollSpawnedSessionsRequest: + cursor: str | None = None + """Opaque cursor returned by a previous poll. Omit on the first call to receive any spawn + events buffered since the runtime started. + """ + wait_ms: int | None = None + """Milliseconds to wait for new spawn events when the cursor is at the tail. 0 (default) + returns immediately even if no events are buffered. Capped at 60000ms. + """ + + @staticmethod + def from_dict(obj: Any) -> 'SessionsPollSpawnedSessionsRequest': + assert isinstance(obj, dict) + cursor = from_union([from_str, from_none], obj.get("cursor")) + wait_ms = from_union([from_int, from_none], obj.get("waitMs")) + return SessionsPollSpawnedSessionsRequest(cursor, wait_ms) + + def to_dict(self) -> dict: + result: dict = {} + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.wait_ms is not None: + result["waitMs"] = from_union([from_int, from_none], self.wait_ms) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionsPruneOldRequest: @@ -5514,28 +6773,122 @@ class SessionsSaveResult: (e.g., already closed). """ @staticmethod - def from_dict(obj: Any) -> 'SessionsSaveResult': + def from_dict(obj: Any) -> 'SessionsSaveResult': + assert isinstance(obj, dict) + return SessionsSaveResult() + + def to_dict(self) -> dict: + result: dict = {} + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsSetAdditionalPluginsResult: + """Replace the manager-wide additional plugins. New session creations and subsequent hook + reloads see the new set; already-running sessions keep their existing hook installation + until the next reload. + """ + @staticmethod + def from_dict(obj: Any) -> 'SessionsSetAdditionalPluginsResult': + assert isinstance(obj, dict) + return SessionsSetAdditionalPluginsResult() + + def to_dict(self) -> dict: + result: dict = {} + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsSetRemoteControlSteeringRequest: + """Patch for the singleton's steering state.""" + + enabled: bool + """Target steering state. Today only `true` is actionable on the underlying exporter; + `false` is reserved for future use. + """ + + @staticmethod + def from_dict(obj: Any) -> 'SessionsSetRemoteControlSteeringRequest': + assert isinstance(obj, dict) + enabled = from_bool(obj.get("enabled")) + return SessionsSetRemoteControlSteeringRequest(enabled) + + def to_dict(self) -> dict: + result: dict = {} + result["enabled"] = from_bool(self.enabled) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsStopRemoteControlRequest: + expected_session_id: str | None = None + """When provided, the stop is rejected unless the singleton currently points at this session + id (compare-and-swap semantics). + """ + force: bool | None = None + """When true, the singleton is unconditionally torn down regardless of `expectedSessionId`. + Use during shutdown or explicit `/remote off`. + """ + + @staticmethod + def from_dict(obj: Any) -> 'SessionsStopRemoteControlRequest': + assert isinstance(obj, dict) + expected_session_id = from_union([from_str, from_none], obj.get("expectedSessionId")) + force = from_union([from_bool, from_none], obj.get("force")) + return SessionsStopRemoteControlRequest(expected_session_id, force) + + def to_dict(self) -> dict: + result: dict = {} + if self.expected_session_id is not None: + result["expectedSessionId"] = from_union([from_str, from_none], self.expected_session_id) + if self.force is not None: + result["force"] = from_union([from_bool, from_none], self.force) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsTransferRemoteControlRequest: + """Parameters for atomically rebinding the remote-control singleton.""" + + to_session_id: str + """Local session id to point remote control at.""" + + expected_from_session_id: str | None = None + """When provided, the transfer is rejected unless the singleton currently points at this + session id (compare-and-swap semantics to avoid clobbering newer state). + """ + + @staticmethod + def from_dict(obj: Any) -> 'SessionsTransferRemoteControlRequest': assert isinstance(obj, dict) - return SessionsSaveResult() + to_session_id = from_str(obj.get("toSessionId")) + expected_from_session_id = from_union([from_str, from_none], obj.get("expectedFromSessionId")) + return SessionsTransferRemoteControlRequest(to_session_id, expected_from_session_id) def to_dict(self) -> dict: result: dict = {} + result["toSessionId"] = from_str(self.to_session_id) + if self.expected_from_session_id is not None: + result["expectedFromSessionId"] = from_union([from_str, from_none], self.expected_from_session_id) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class SessionsSetAdditionalPluginsResult: - """Replace the manager-wide additional plugins. New session creations and subsequent hook - reloads see the new set; already-running sessions keep their existing hook installation - until the next reload. - """ +class ShellCancelUserRequestedRequest: + """User-requested shell execution cancellation handle.""" + + request_id: str + """Request ID previously passed to executeUserRequested""" + @staticmethod - def from_dict(obj: Any) -> 'SessionsSetAdditionalPluginsResult': + def from_dict(obj: Any) -> 'ShellCancelUserRequestedRequest': assert isinstance(obj, dict) - return SessionsSetAdditionalPluginsResult() + request_id = from_str(obj.get("requestId")) + return ShellCancelUserRequestedRequest(request_id) def to_dict(self) -> dict: result: dict = {} + result["requestId"] = from_str(self.request_id) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -5589,6 +6942,30 @@ def to_dict(self) -> dict: result["processId"] = from_str(self.process_id) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class ShellExecuteUserRequestedRequest: + """User-requested shell command and cancellation handle.""" + + command: str + """Shell command to execute""" + + request_id: str + """Caller-provided cancellation handle for this execution""" + + @staticmethod + def from_dict(obj: Any) -> 'ShellExecuteUserRequestedRequest': + assert isinstance(obj, dict) + command = from_str(obj.get("command")) + request_id = from_str(obj.get("requestId")) + return ShellExecuteUserRequestedRequest(command, request_id) + + def to_dict(self) -> dict: + result: dict = {} + result["command"] = from_str(self.command) + result["requestId"] = from_str(self.request_id) + return result + # Experimental: this type is part of an experimental API and may change or be removed. class ShellKillSignal(Enum): """Signal to send (default: SIGTERM)""" @@ -6503,6 +7880,25 @@ class UIElicitationSchemaPropertyNumberType(Enum): INTEGER = "integer" NUMBER = "number" +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class UIEphemeralQueryResult: + """Transient answer generated from current conversation context.""" + + answer: str + """Full assistant response text.""" + + @staticmethod + def from_dict(obj: Any) -> 'UIEphemeralQueryResult': + assert isinstance(obj, dict) + answer = from_str(obj.get("answer")) + return UIEphemeralQueryResult(answer) + + def to_dict(self) -> dict: + result: dict = {} + result["answer"] = from_str(self.answer) + return result + # Experimental: this type is part of an experimental API and may change or be removed. class UIExitPlanModeAction(Enum): """The action the user selected. Defaults to 'autopilot' when autoApproveEdits is true, @@ -8260,6 +9656,200 @@ def to_dict(self) -> dict: result["description"] = from_union([from_str, from_none], self.description) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionContext: + """Pre-resolved working-directory context for session startup. + + Most recent working directory context. + + Working-directory context used to choose the most relevant session. + + Optional working-directory context used to score session relevance. When omitted the + most-recently-modified session wins. + """ + cwd: str + """Most recent working directory for this session""" + + branch: str | None = None + """Active git branch""" + + git_root: str | None = None + """Git repository root, if the cwd was inside a git repo""" + + host_type: HostType | None = None + """Repository host type""" + + repository: str | None = None + """Repository slug in `owner/name` form, when known""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionContext': + assert isinstance(obj, dict) + cwd = from_str(obj.get("cwd")) + branch = from_union([from_str, from_none], obj.get("branch")) + git_root = from_union([from_str, from_none], obj.get("gitRoot")) + host_type = from_union([HostType, from_none], obj.get("hostType")) + repository = from_union([from_str, from_none], obj.get("repository")) + return SessionContext(cwd, branch, git_root, host_type, repository) + + def to_dict(self) -> dict: + result: dict = {} + result["cwd"] = from_str(self.cwd) + if self.branch is not None: + result["branch"] = from_union([from_str, from_none], self.branch) + if self.git_root is not None: + result["gitRoot"] = from_union([from_str, from_none], self.git_root) + if self.host_type is not None: + result["hostType"] = from_union([lambda x: to_enum(HostType, x), from_none], self.host_type) + if self.repository is not None: + result["repository"] = from_union([from_str, from_none], self.repository) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionWorkingDirectoryContext: + """Updated working directory and git context. Emitted as the new payload of + `session.context_changed`. + """ + cwd: str + """Current working directory path""" + + base_commit: str | None = None + """Merge-base commit SHA (fork point from the remote default branch)""" + + branch: str | None = None + """Current git branch name""" + + git_root: str | None = None + """Root directory of the git repository, resolved via git rev-parse""" + + head_commit: str | None = None + """Head commit of the current git branch""" + + host_type: HostType | None = None + """Hosting platform type of the repository""" + + repository: str | None = None + """Repository identifier derived from the git remote URL ("owner/name" for GitHub, + "org/project/repo" for Azure DevOps) + """ + repository_host: str | None = None + """Raw host string from the git remote URL (e.g. "github.com", "dev.azure.com")""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionWorkingDirectoryContext': + assert isinstance(obj, dict) + cwd = from_str(obj.get("cwd")) + base_commit = from_union([from_str, from_none], obj.get("baseCommit")) + branch = from_union([from_str, from_none], obj.get("branch")) + git_root = from_union([from_str, from_none], obj.get("gitRoot")) + head_commit = from_union([from_str, from_none], obj.get("headCommit")) + host_type = from_union([HostType, from_none], obj.get("hostType")) + repository = from_union([from_str, from_none], obj.get("repository")) + repository_host = from_union([from_str, from_none], obj.get("repositoryHost")) + return SessionWorkingDirectoryContext(cwd, base_commit, branch, git_root, head_commit, host_type, repository, repository_host) + + def to_dict(self) -> dict: + result: dict = {} + result["cwd"] = from_str(self.cwd) + if self.base_commit is not None: + result["baseCommit"] = from_union([from_str, from_none], self.base_commit) + if self.branch is not None: + result["branch"] = from_union([from_str, from_none], self.branch) + if self.git_root is not None: + result["gitRoot"] = from_union([from_str, from_none], self.git_root) + if self.head_commit is not None: + result["headCommit"] = from_union([from_str, from_none], self.head_commit) + if self.host_type is not None: + result["hostType"] = from_union([lambda x: to_enum(HostType, x), from_none], self.host_type) + if self.repository is not None: + result["repository"] = from_union([from_str, from_none], self.repository) + if self.repository_host is not None: + result["repositoryHost"] = from_union([from_str, from_none], self.repository_host) + return result + +@dataclass +class Workspace: + id: str + branch: str | None = None + chronicle_sync_dismissed: bool | None = None + client_name: str | None = None + created_at: datetime | None = None + cwd: str | None = None + git_root: str | None = None + host_type: HostType | None = None + """Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration.""" + + mc_last_event_id: str | None = None + mc_session_id: str | None = None + mc_task_id: str | None = None + name: str | None = None + remote_steerable: bool | None = None + repository: str | None = None + summary_count: int | None = None + updated_at: datetime | None = None + user_named: bool | None = None + + @staticmethod + def from_dict(obj: Any) -> 'Workspace': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + branch = from_union([from_str, from_none], obj.get("branch")) + chronicle_sync_dismissed = from_union([from_bool, from_none], obj.get("chronicle_sync_dismissed")) + client_name = from_union([from_str, from_none], obj.get("client_name")) + created_at = from_union([from_datetime, from_none], obj.get("created_at")) + cwd = from_union([from_str, from_none], obj.get("cwd")) + git_root = from_union([from_str, from_none], obj.get("git_root")) + host_type = from_union([HostType, from_none], obj.get("host_type")) + mc_last_event_id = from_union([from_str, from_none], obj.get("mc_last_event_id")) + mc_session_id = from_union([from_str, from_none], obj.get("mc_session_id")) + mc_task_id = from_union([from_str, from_none], obj.get("mc_task_id")) + name = from_union([from_str, from_none], obj.get("name")) + remote_steerable = from_union([from_bool, from_none], obj.get("remote_steerable")) + repository = from_union([from_str, from_none], obj.get("repository")) + summary_count = from_union([from_int, from_none], obj.get("summary_count")) + updated_at = from_union([from_datetime, from_none], obj.get("updated_at")) + user_named = from_union([from_bool, from_none], obj.get("user_named")) + return Workspace(id, branch, chronicle_sync_dismissed, client_name, created_at, cwd, git_root, host_type, mc_last_event_id, mc_session_id, mc_task_id, name, remote_steerable, repository, summary_count, updated_at, user_named) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + if self.branch is not None: + result["branch"] = from_union([from_str, from_none], self.branch) + if self.chronicle_sync_dismissed is not None: + result["chronicle_sync_dismissed"] = from_union([from_bool, from_none], self.chronicle_sync_dismissed) + if self.client_name is not None: + result["client_name"] = from_union([from_str, from_none], self.client_name) + if self.created_at is not None: + result["created_at"] = from_union([lambda x: x.isoformat(), from_none], self.created_at) + if self.cwd is not None: + result["cwd"] = from_union([from_str, from_none], self.cwd) + if self.git_root is not None: + result["git_root"] = from_union([from_str, from_none], self.git_root) + if self.host_type is not None: + result["host_type"] = from_union([lambda x: to_enum(HostType, x), from_none], self.host_type) + if self.mc_last_event_id is not None: + result["mc_last_event_id"] = from_union([from_str, from_none], self.mc_last_event_id) + if self.mc_session_id is not None: + result["mc_session_id"] = from_union([from_str, from_none], self.mc_session_id) + if self.mc_task_id is not None: + result["mc_task_id"] = from_union([from_str, from_none], self.mc_task_id) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.remote_steerable is not None: + result["remote_steerable"] = from_union([from_bool, from_none], self.remote_steerable) + if self.repository is not None: + result["repository"] = from_union([from_str, from_none], self.repository) + if self.summary_count is not None: + result["summary_count"] = from_union([from_int, from_none], self.summary_count) + if self.updated_at is not None: + result["updated_at"] = from_union([lambda x: x.isoformat(), from_none], self.updated_at) + if self.user_named is not None: + result["user_named"] = from_union([from_bool, from_none], self.user_named) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class LogRequest: @@ -8312,6 +9902,44 @@ def to_dict(self) -> dict: result["url"] = from_union([from_str, from_none], self.url) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MarketplaceListResult: + """All registered marketplaces, including built-in defaults.""" + + marketplaces: list[MarketplaceInfo] + """Registered marketplaces""" + + @staticmethod + def from_dict(obj: Any) -> 'MarketplaceListResult': + assert isinstance(obj, dict) + marketplaces = from_list(MarketplaceInfo.from_dict, obj.get("marketplaces")) + return MarketplaceListResult(marketplaces) + + def to_dict(self) -> dict: + result: dict = {} + result["marketplaces"] = from_list(lambda x: to_class(MarketplaceInfo, x), self.marketplaces) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MarketplaceRefreshResult: + """Result of refreshing one or more marketplace catalogs.""" + + results: list[MarketplaceRefreshEntry] + """Per-marketplace refresh results in deterministic order.""" + + @staticmethod + def from_dict(obj: Any) -> 'MarketplaceRefreshResult': + assert isinstance(obj, dict) + results = from_list(MarketplaceRefreshEntry.from_dict, obj.get("results")) + return MarketplaceRefreshResult(results) + + def to_dict(self) -> dict: + result: dict = {} + result["results"] = from_list(lambda x: to_class(MarketplaceRefreshEntry, x), self.results) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPAppsDiagnoseResult: @@ -8742,6 +10370,80 @@ def to_dict(self) -> dict: result["type"] = from_union([lambda x: to_enum(MCPServerConfigHTTPType, x), from_none], self.type) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPStartServersResult: + """MCP server startup filtering result.""" + + filtered_servers: list[MCPFilteredServer] + """Servers filtered out before startup""" + + allowed_servers: list[MCPAllowedServer] | None = None + """Non-default servers allowed by policy""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPStartServersResult': + assert isinstance(obj, dict) + filtered_servers = from_list(MCPFilteredServer.from_dict, obj.get("filteredServers")) + allowed_servers = from_union([lambda x: from_list(MCPAllowedServer.from_dict, x), from_none], obj.get("allowedServers")) + return MCPStartServersResult(filtered_servers, allowed_servers) + + def to_dict(self) -> dict: + result: dict = {} + result["filteredServers"] = from_list(lambda x: to_class(MCPFilteredServer, x), self.filtered_servers) + if self.allowed_servers is not None: + result["allowedServers"] = from_union([lambda x: from_list(lambda x: to_class(MCPAllowedServer, x), x), from_none], self.allowed_servers) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPHostState: + """Host-level state, omitted when no MCP host is initialized.""" + + clients: list[str] + """Names of currently-connected MCP clients.""" + + disabled_servers: list[str] + """Configured servers that are explicitly disabled.""" + + failed_servers: dict[str, MCPServerFailureInfo] + """Map of server name to recorded connection failure.""" + + filtered_servers: list[str] + """Configured servers filtered out by enterprise allowlist policy.""" + + mcp3_p_enabled: bool + """Whether third-party MCP servers are policy-enabled for this session.""" + + needs_auth_servers: dict[str, MCPServerNeedsAuthInfo] + """Map of server name to recorded pending-auth state.""" + + pending_connections: list[str] + """Names of servers with in-flight connection attempts.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPHostState': + assert isinstance(obj, dict) + clients = from_list(from_str, obj.get("clients")) + disabled_servers = from_list(from_str, obj.get("disabledServers")) + failed_servers = from_dict(MCPServerFailureInfo.from_dict, obj.get("failedServers")) + filtered_servers = from_list(from_str, obj.get("filteredServers")) + mcp3_p_enabled = from_bool(obj.get("mcp3pEnabled")) + needs_auth_servers = from_dict(MCPServerNeedsAuthInfo.from_dict, obj.get("needsAuthServers")) + pending_connections = from_list(from_str, obj.get("pendingConnections")) + return MCPHostState(clients, disabled_servers, failed_servers, filtered_servers, mcp3_p_enabled, needs_auth_servers, pending_connections) + + def to_dict(self) -> dict: + result: dict = {} + result["clients"] = from_list(from_str, self.clients) + result["disabledServers"] = from_list(from_str, self.disabled_servers) + result["failedServers"] = from_dict(lambda x: to_class(MCPServerFailureInfo, x), self.failed_servers) + result["filteredServers"] = from_list(from_str, self.filtered_servers) + result["mcp3pEnabled"] = from_bool(self.mcp3_p_enabled) + result["needsAuthServers"] = from_dict(lambda x: to_class(MCPServerNeedsAuthInfo, x), self.needs_auth_servers) + result["pendingConnections"] = from_list(from_str, self.pending_connections) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPSamplingExecutionResult: @@ -8778,25 +10480,6 @@ def to_dict(self) -> dict: result["result"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.result) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class MCPServerList: - """MCP servers configured for the session, with their connection status.""" - - servers: list[MCPServer] - """Configured MCP servers""" - - @staticmethod - def from_dict(obj: Any) -> 'MCPServerList': - assert isinstance(obj, dict) - servers = from_list(MCPServer.from_dict, obj.get("servers")) - return MCPServerList(servers) - - def to_dict(self) -> dict: - result: dict = {} - result["servers"] = from_list(lambda x: to_class(MCPServer, x), self.servers) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPSetEnvValueModeParams: @@ -8862,196 +10545,6 @@ def to_dict(self) -> dict: result["contextInfo"] = from_union([lambda x: to_class(SessionContextInfo, x), from_none], self.context_info) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class SessionWorkingDirectoryContext: - """Updated working directory and git context. Emitted as the new payload of - `session.context_changed`. - """ - cwd: str - """Current working directory path""" - - base_commit: str | None = None - """Merge-base commit SHA (fork point from the remote default branch)""" - - branch: str | None = None - """Current git branch name""" - - git_root: str | None = None - """Root directory of the git repository, resolved via git rev-parse""" - - head_commit: str | None = None - """Head commit of the current git branch""" - - host_type: HostType | None = None - """Hosting platform type of the repository""" - - repository: str | None = None - """Repository identifier derived from the git remote URL ("owner/name" for GitHub, - "org/project/repo" for Azure DevOps) - """ - repository_host: str | None = None - """Raw host string from the git remote URL (e.g. "github.com", "dev.azure.com")""" - - @staticmethod - def from_dict(obj: Any) -> 'SessionWorkingDirectoryContext': - assert isinstance(obj, dict) - cwd = from_str(obj.get("cwd")) - base_commit = from_union([from_str, from_none], obj.get("baseCommit")) - branch = from_union([from_str, from_none], obj.get("branch")) - git_root = from_union([from_str, from_none], obj.get("gitRoot")) - head_commit = from_union([from_str, from_none], obj.get("headCommit")) - host_type = from_union([HostType, from_none], obj.get("hostType")) - repository = from_union([from_str, from_none], obj.get("repository")) - repository_host = from_union([from_str, from_none], obj.get("repositoryHost")) - return SessionWorkingDirectoryContext(cwd, base_commit, branch, git_root, head_commit, host_type, repository, repository_host) - - def to_dict(self) -> dict: - result: dict = {} - result["cwd"] = from_str(self.cwd) - if self.base_commit is not None: - result["baseCommit"] = from_union([from_str, from_none], self.base_commit) - if self.branch is not None: - result["branch"] = from_union([from_str, from_none], self.branch) - if self.git_root is not None: - result["gitRoot"] = from_union([from_str, from_none], self.git_root) - if self.head_commit is not None: - result["headCommit"] = from_union([from_str, from_none], self.head_commit) - if self.host_type is not None: - result["hostType"] = from_union([lambda x: to_enum(HostType, x), from_none], self.host_type) - if self.repository is not None: - result["repository"] = from_union([from_str, from_none], self.repository) - if self.repository_host is not None: - result["repositoryHost"] = from_union([from_str, from_none], self.repository_host) - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class SessionContext: - """Schema for the `SessionContext` type. - - Optional working-directory context used to score session relevance. When omitted the - most-recently-modified session wins. - """ - cwd: str - """Most recent working directory for this session""" - - branch: str | None = None - """Active git branch""" - - git_root: str | None = None - """Git repository root, if the cwd was inside a git repo""" - - host_type: HostType | None = None - """Repository host type""" - - repository: str | None = None - """Repository slug in `owner/name` form, when known""" - - @staticmethod - def from_dict(obj: Any) -> 'SessionContext': - assert isinstance(obj, dict) - cwd = from_str(obj.get("cwd")) - branch = from_union([from_str, from_none], obj.get("branch")) - git_root = from_union([from_str, from_none], obj.get("gitRoot")) - host_type = from_union([HostType, from_none], obj.get("hostType")) - repository = from_union([from_str, from_none], obj.get("repository")) - return SessionContext(cwd, branch, git_root, host_type, repository) - - def to_dict(self) -> dict: - result: dict = {} - result["cwd"] = from_str(self.cwd) - if self.branch is not None: - result["branch"] = from_union([from_str, from_none], self.branch) - if self.git_root is not None: - result["gitRoot"] = from_union([from_str, from_none], self.git_root) - if self.host_type is not None: - result["hostType"] = from_union([lambda x: to_enum(HostType, x), from_none], self.host_type) - if self.repository is not None: - result["repository"] = from_union([from_str, from_none], self.repository) - return result - -@dataclass -class Workspace: - id: str - branch: str | None = None - chronicle_sync_dismissed: bool | None = None - client_name: str | None = None - created_at: datetime | None = None - cwd: str | None = None - git_root: str | None = None - host_type: HostType | None = None - """Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration.""" - - mc_last_event_id: str | None = None - mc_session_id: str | None = None - mc_task_id: str | None = None - name: str | None = None - remote_steerable: bool | None = None - repository: str | None = None - summary_count: int | None = None - updated_at: datetime | None = None - user_named: bool | None = None - - @staticmethod - def from_dict(obj: Any) -> 'Workspace': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - branch = from_union([from_str, from_none], obj.get("branch")) - chronicle_sync_dismissed = from_union([from_bool, from_none], obj.get("chronicle_sync_dismissed")) - client_name = from_union([from_str, from_none], obj.get("client_name")) - created_at = from_union([from_datetime, from_none], obj.get("created_at")) - cwd = from_union([from_str, from_none], obj.get("cwd")) - git_root = from_union([from_str, from_none], obj.get("git_root")) - host_type = from_union([HostType, from_none], obj.get("host_type")) - mc_last_event_id = from_union([from_str, from_none], obj.get("mc_last_event_id")) - mc_session_id = from_union([from_str, from_none], obj.get("mc_session_id")) - mc_task_id = from_union([from_str, from_none], obj.get("mc_task_id")) - name = from_union([from_str, from_none], obj.get("name")) - remote_steerable = from_union([from_bool, from_none], obj.get("remote_steerable")) - repository = from_union([from_str, from_none], obj.get("repository")) - summary_count = from_union([from_int, from_none], obj.get("summary_count")) - updated_at = from_union([from_datetime, from_none], obj.get("updated_at")) - user_named = from_union([from_bool, from_none], obj.get("user_named")) - return Workspace(id, branch, chronicle_sync_dismissed, client_name, created_at, cwd, git_root, host_type, mc_last_event_id, mc_session_id, mc_task_id, name, remote_steerable, repository, summary_count, updated_at, user_named) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - if self.branch is not None: - result["branch"] = from_union([from_str, from_none], self.branch) - if self.chronicle_sync_dismissed is not None: - result["chronicle_sync_dismissed"] = from_union([from_bool, from_none], self.chronicle_sync_dismissed) - if self.client_name is not None: - result["client_name"] = from_union([from_str, from_none], self.client_name) - if self.created_at is not None: - result["created_at"] = from_union([lambda x: x.isoformat(), from_none], self.created_at) - if self.cwd is not None: - result["cwd"] = from_union([from_str, from_none], self.cwd) - if self.git_root is not None: - result["git_root"] = from_union([from_str, from_none], self.git_root) - if self.host_type is not None: - result["host_type"] = from_union([lambda x: to_enum(HostType, x), from_none], self.host_type) - if self.mc_last_event_id is not None: - result["mc_last_event_id"] = from_union([from_str, from_none], self.mc_last_event_id) - if self.mc_session_id is not None: - result["mc_session_id"] = from_union([from_str, from_none], self.mc_session_id) - if self.mc_task_id is not None: - result["mc_task_id"] = from_union([from_str, from_none], self.mc_task_id) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.remote_steerable is not None: - result["remote_steerable"] = from_union([from_bool, from_none], self.remote_steerable) - if self.repository is not None: - result["repository"] = from_union([from_str, from_none], self.repository) - if self.summary_count is not None: - result["summary_count"] = from_union([from_int, from_none], self.summary_count) - if self.updated_at is not None: - result["updated_at"] = from_union([lambda x: x.isoformat(), from_none], self.updated_at) - if self.user_named is not None: - result["user_named"] = from_union([from_bool, from_none], self.user_named) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MetadataSnapshotRemoteMetadata: @@ -9068,7 +10561,7 @@ class MetadataSnapshotRemoteMetadata: """The original resource identifier (task ID or PR node ID), preserved across event-replay reconstructions. Falls back to `sessionId` when absent. """ - task_type: MetadataSnapshotRemoteMetadataTaskType | None = None + task_type: TaskType | None = None """Whether the remote task originated from Copilot Coding Agent (cca) or a CLI `--remote` invocation. """ @@ -9079,7 +10572,7 @@ def from_dict(obj: Any) -> 'MetadataSnapshotRemoteMetadata': repository = MetadataSnapshotRemoteMetadataRepository.from_dict(obj.get("repository")) pull_request_number = from_union([from_int, from_none], obj.get("pullRequestNumber")) resource_id = from_union([from_str, from_none], obj.get("resourceId")) - task_type = from_union([MetadataSnapshotRemoteMetadataTaskType, from_none], obj.get("taskType")) + task_type = from_union([TaskType, from_none], obj.get("taskType")) return MetadataSnapshotRemoteMetadata(repository, pull_request_number, resource_id, task_type) def to_dict(self) -> dict: @@ -9090,7 +10583,7 @@ def to_dict(self) -> dict: if self.resource_id is not None: result["resourceId"] = from_union([from_str, from_none], self.resource_id) if self.task_type is not None: - result["taskType"] = from_union([lambda x: to_enum(MetadataSnapshotRemoteMetadataTaskType, x), from_none], self.task_type) + result["taskType"] = from_union([lambda x: to_enum(TaskType, x), from_none], self.task_type) return result @dataclass @@ -9242,6 +10735,37 @@ def to_dict(self) -> dict: result["vision"] = from_union([lambda x: to_class(ModelCapabilitiesOverrideLimitsVision, x), from_none], self.vision) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class OptionsUpdateAdditionalContentExclusionPolicyRule: + """Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRule` type.""" + + paths: list[str] + source: OptionsUpdateAdditionalContentExclusionPolicyRuleSource + """Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type.""" + + if_any_match: list[str] | None = None + if_none_match: list[str] | None = None + + @staticmethod + def from_dict(obj: Any) -> 'OptionsUpdateAdditionalContentExclusionPolicyRule': + assert isinstance(obj, dict) + paths = from_list(from_str, obj.get("paths")) + source = OptionsUpdateAdditionalContentExclusionPolicyRuleSource.from_dict(obj.get("source")) + if_any_match = from_union([lambda x: from_list(from_str, x), from_none], obj.get("ifAnyMatch")) + if_none_match = from_union([lambda x: from_list(from_str, x), from_none], obj.get("ifNoneMatch")) + return OptionsUpdateAdditionalContentExclusionPolicyRule(paths, source, if_any_match, if_none_match) + + def to_dict(self) -> dict: + result: dict = {} + result["paths"] = from_list(from_str, self.paths) + result["source"] = to_class(OptionsUpdateAdditionalContentExclusionPolicyRuleSource, self.source) + if self.if_any_match is not None: + result["ifAnyMatch"] = from_union([lambda x: from_list(from_str, x), from_none], self.if_any_match) + if self.if_none_match is not None: + result["ifNoneMatch"] = from_union([lambda x: from_list(from_str, x), from_none], self.if_none_match) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PendingPermissionRequestList: @@ -10195,127 +11719,489 @@ def from_dict(obj: Any) -> 'PermissionLocationApplyResult': def to_dict(self) -> dict: result: dict = {} - result["appliedDirectoryCount"] = from_int(self.applied_directory_count) - result["appliedRuleCount"] = from_int(self.applied_rule_count) - result["appliedRules"] = from_list(lambda x: to_class(PermissionRule, x), self.applied_rules) - result["changed"] = from_bool(self.changed) - result["locationKey"] = from_str(self.location_key) - result["locationType"] = to_enum(PermissionLocationType, self.location_type) + result["appliedDirectoryCount"] = from_int(self.applied_directory_count) + result["appliedRuleCount"] = from_int(self.applied_rule_count) + result["appliedRules"] = from_list(lambda x: to_class(PermissionRule, x), self.applied_rules) + result["changed"] = from_bool(self.changed) + result["locationKey"] = from_str(self.location_key) + result["locationType"] = to_enum(PermissionLocationType, self.location_type) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionLocationResolveResult: + """Resolved location-permissions key and type.""" + + location_key: str + """Location key used in the location-permissions store""" + + location_type: PermissionLocationType + """Whether the location is a git repo or directory""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionLocationResolveResult': + assert isinstance(obj, dict) + location_key = from_str(obj.get("locationKey")) + location_type = PermissionLocationType(obj.get("locationType")) + return PermissionLocationResolveResult(location_key, location_type) + + def to_dict(self) -> dict: + result: dict = {} + result["locationKey"] = from_str(self.location_key) + result["locationType"] = to_enum(PermissionLocationType, self.location_type) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsConfigureAdditionalContentExclusionPolicyRule: + """Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRule` type.""" + + paths: list[str] + source: PermissionsConfigureAdditionalContentExclusionPolicyRuleSource + """Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type.""" + + if_any_match: list[str] | None = None + if_none_match: list[str] | None = None + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsConfigureAdditionalContentExclusionPolicyRule': + assert isinstance(obj, dict) + paths = from_list(from_str, obj.get("paths")) + source = PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.from_dict(obj.get("source")) + if_any_match = from_union([lambda x: from_list(from_str, x), from_none], obj.get("ifAnyMatch")) + if_none_match = from_union([lambda x: from_list(from_str, x), from_none], obj.get("ifNoneMatch")) + return PermissionsConfigureAdditionalContentExclusionPolicyRule(paths, source, if_any_match, if_none_match) + + def to_dict(self) -> dict: + result: dict = {} + result["paths"] = from_list(from_str, self.paths) + result["source"] = to_class(PermissionsConfigureAdditionalContentExclusionPolicyRuleSource, self.source) + if self.if_any_match is not None: + result["ifAnyMatch"] = from_union([lambda x: from_list(from_str, x), from_none], self.if_any_match) + if self.if_none_match is not None: + result["ifNoneMatch"] = from_union([lambda x: from_list(from_str, x), from_none], self.if_none_match) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsModifyRulesParams: + """Scope and add/remove instructions for modifying session- or location-scoped permission + rules. + """ + scope: PermissionsModifyRulesScope + """Whether the change applies to ephemeral session-scoped rules (cleared at session end) or + to location-scoped rules persisted via the location-permissions config file. + """ + add: list[PermissionRule] | None = None + """Rules to add to the scope. Applied before `remove`/`removeAll`.""" + + remove: list[PermissionRule] | None = None + """Specific rules to remove from the scope. Ignored when `removeAll` is true.""" + + remove_all: bool | None = None + """When true, removes every rule currently in the scope (after any `add` is applied). Useful + for clearing the location scope wholesale. + """ + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsModifyRulesParams': + assert isinstance(obj, dict) + scope = PermissionsModifyRulesScope(obj.get("scope")) + add = from_union([lambda x: from_list(PermissionRule.from_dict, x), from_none], obj.get("add")) + remove = from_union([lambda x: from_list(PermissionRule.from_dict, x), from_none], obj.get("remove")) + remove_all = from_union([from_bool, from_none], obj.get("removeAll")) + return PermissionsModifyRulesParams(scope, add, remove, remove_all) + + def to_dict(self) -> dict: + result: dict = {} + result["scope"] = to_enum(PermissionsModifyRulesScope, self.scope) + if self.add is not None: + result["add"] = from_union([lambda x: from_list(lambda x: to_class(PermissionRule, x), x), from_none], self.add) + if self.remove is not None: + result["remove"] = from_union([lambda x: from_list(lambda x: to_class(PermissionRule, x), x), from_none], self.remove) + if self.remove_all is not None: + result["removeAll"] = from_union([from_bool, from_none], self.remove_all) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PlanReadSQLTodosResult: + """Todo rows read from the session SQL database. Empty when no session database is available.""" + + rows: list[PlanSQLTodosRow] + """Rows from the session SQL todos table, ordered by creation time and id.""" + + @staticmethod + def from_dict(obj: Any) -> 'PlanReadSQLTodosResult': + assert isinstance(obj, dict) + rows = from_list(PlanSQLTodosRow.from_dict, obj.get("rows")) + return PlanReadSQLTodosResult(rows) + + def to_dict(self) -> dict: + result: dict = {} + result["rows"] = from_list(lambda x: to_class(PlanSQLTodosRow, x), self.rows) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class InstalledPluginInfo: + """Information about an installed plugin tracked in global state. + + The newly installed plugin's metadata + """ + enabled: bool + """Whether the plugin is currently enabled for new sessions""" + + marketplace: str + """Marketplace the plugin came from. Empty string ("") for direct repo / URL / local + installs. + """ + name: str + """Plugin name""" + + version: str | None = None + """Installed version (when reported by the plugin manifest)""" + + @staticmethod + def from_dict(obj: Any) -> 'InstalledPluginInfo': + assert isinstance(obj, dict) + enabled = from_bool(obj.get("enabled")) + marketplace = from_str(obj.get("marketplace")) + name = from_str(obj.get("name")) + version = from_union([from_str, from_none], obj.get("version")) + return InstalledPluginInfo(enabled, marketplace, name, version) + + def to_dict(self) -> dict: + result: dict = {} + result["enabled"] = from_bool(self.enabled) + result["marketplace"] = from_str(self.marketplace) + result["name"] = from_str(self.name) + if self.version is not None: + result["version"] = from_union([from_str, from_none], self.version) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MarketplacePluginInfo: + """Plugin entry advertised by a marketplace.""" + + name: str + """Plugin name as listed in the marketplace catalog""" + + description: str | None = None + """Short description from the marketplace catalog, when present""" + + @staticmethod + def from_dict(obj: Any) -> 'MarketplacePluginInfo': + assert isinstance(obj, dict) + name = from_str(obj.get("name")) + description = from_union([from_str, from_none], obj.get("description")) + return MarketplacePluginInfo(name, description) + + def to_dict(self) -> dict: + result: dict = {} + result["name"] = from_str(self.name) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + return result + +# 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""" + + @staticmethod + def from_dict(obj: Any) -> 'PluginList': + assert isinstance(obj, dict) + plugins = from_list(Plugin.from_dict, obj.get("plugins")) + return PluginList(plugins) + + def to_dict(self) -> dict: + result: dict = {} + result["plugins"] = from_list(lambda x: to_class(Plugin, x), self.plugins) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PluginUpdateAllEntry: + """Schema for the `PluginUpdateAllEntry` type.""" + + marketplace: str + """Marketplace the plugin came from. Empty string ("") for direct installs.""" + + name: str + """Plugin name that was updated""" + + success: bool + """Whether the update succeeded for this plugin""" + + error: str | None = None + """Error message (failure only)""" + + new_version: str | None = None + """Version after the update, when available""" + + previous_version: str | None = None + """Previously installed version, when available""" + + skills_installed: int | None = None + """Number of skills installed after the update (success only)""" + + @staticmethod + def from_dict(obj: Any) -> 'PluginUpdateAllEntry': + assert isinstance(obj, dict) + marketplace = from_str(obj.get("marketplace")) + name = from_str(obj.get("name")) + success = from_bool(obj.get("success")) + error = from_union([from_str, from_none], obj.get("error")) + new_version = from_union([from_str, from_none], obj.get("newVersion")) + previous_version = from_union([from_str, from_none], obj.get("previousVersion")) + skills_installed = from_union([from_int, from_none], obj.get("skillsInstalled")) + return PluginUpdateAllEntry(marketplace, name, success, error, new_version, previous_version, skills_installed) + + def to_dict(self) -> dict: + result: dict = {} + result["marketplace"] = from_str(self.marketplace) + result["name"] = from_str(self.name) + result["success"] = from_bool(self.success) + if self.error is not None: + result["error"] = from_union([from_str, from_none], self.error) + if self.new_version is not None: + result["newVersion"] = from_union([from_str, from_none], self.new_version) + if self.previous_version is not None: + result["previousVersion"] = from_union([from_str, from_none], self.previous_version) + if self.skills_installed is not None: + result["skillsInstalled"] = from_union([from_int, from_none], self.skills_installed) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PluginsDisableRequest: + """Plugin names (or specs) to disable.""" + + names: list[str] + """Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. + Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. + Plugin-owned MCP servers are stopped in active sessions immediately; other plugin + contributions remain available until each session reloads plugins. + """ + + @staticmethod + def from_dict(obj: Any) -> 'PluginsDisableRequest': + assert isinstance(obj, dict) + names = from_list(from_str, obj.get("names")) + return PluginsDisableRequest(names) + + def to_dict(self) -> dict: + result: dict = {} + result["names"] = from_list(from_str, self.names) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PluginsEnableRequest: + """Plugin names (or specs) to enable.""" + + names: list[str] + """Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. + Non-marketplace direct installs are always enabled and cannot be toggled via this API. + """ + + @staticmethod + def from_dict(obj: Any) -> 'PluginsEnableRequest': + assert isinstance(obj, dict) + names = from_list(from_str, obj.get("names")) + return PluginsEnableRequest(names) + + def to_dict(self) -> dict: + result: dict = {} + result["names"] = from_list(from_str, self.names) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PluginsInstallRequest: + """Plugin source and optional working directory for relative-path resolution.""" + + source: str + """Plugin install spec. Accepts the same forms as the CLI: "plugin@marketplace" (marketplace + install), "owner/repo" or "owner/repo:subpath" (GitHub direct), an http/https/ssh URL, or + a local path. Direct (non-marketplace) installs are deprecated and will produce a + deprecationWarning in the result. + """ + working_directory: str | None = None + """Working directory used to resolve relative local paths in `source`. Defaults to the + server's current working directory. + """ + + @staticmethod + def from_dict(obj: Any) -> 'PluginsInstallRequest': + assert isinstance(obj, dict) + source = from_str(obj.get("source")) + working_directory = from_union([from_str, from_none], obj.get("workingDirectory")) + return PluginsInstallRequest(source, working_directory) + + def to_dict(self) -> dict: + result: dict = {} + result["source"] = from_str(self.source) + if self.working_directory is not None: + result["workingDirectory"] = from_union([from_str, from_none], self.working_directory) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class PermissionLocationResolveResult: - """Resolved location-permissions key and type.""" - - location_key: str - """Location key used in the location-permissions store""" +class PluginsUninstallRequest: + """Name (or spec) of the plugin to uninstall.""" - location_type: PermissionLocationType - """Whether the location is a git repo or directory""" + name: str + """Plugin name or "plugin@marketplace" spec to uninstall. When ambiguous, prefer the + fully-qualified spec. + """ @staticmethod - def from_dict(obj: Any) -> 'PermissionLocationResolveResult': + def from_dict(obj: Any) -> 'PluginsUninstallRequest': assert isinstance(obj, dict) - location_key = from_str(obj.get("locationKey")) - location_type = PermissionLocationType(obj.get("locationType")) - return PermissionLocationResolveResult(location_key, location_type) + name = from_str(obj.get("name")) + return PluginsUninstallRequest(name) def to_dict(self) -> dict: result: dict = {} - result["locationKey"] = from_str(self.location_key) - result["locationType"] = to_enum(PermissionLocationType, self.location_type) + result["name"] = from_str(self.name) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class PermissionsConfigureAdditionalContentExclusionPolicyRule: - """Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRule` type.""" +class PluginsUpdateRequest: + """Name (or spec) of the plugin to update.""" - paths: list[str] - source: PermissionsConfigureAdditionalContentExclusionPolicyRuleSource - """Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type.""" - - if_any_match: list[str] | None = None - if_none_match: list[str] | None = None + name: str + """Plugin name or "plugin@marketplace" spec to update.""" @staticmethod - def from_dict(obj: Any) -> 'PermissionsConfigureAdditionalContentExclusionPolicyRule': + def from_dict(obj: Any) -> 'PluginsUpdateRequest': assert isinstance(obj, dict) - paths = from_list(from_str, obj.get("paths")) - source = PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.from_dict(obj.get("source")) - if_any_match = from_union([lambda x: from_list(from_str, x), from_none], obj.get("ifAnyMatch")) - if_none_match = from_union([lambda x: from_list(from_str, x), from_none], obj.get("ifNoneMatch")) - return PermissionsConfigureAdditionalContentExclusionPolicyRule(paths, source, if_any_match, if_none_match) + name = from_str(obj.get("name")) + return PluginsUpdateRequest(name) def to_dict(self) -> dict: result: dict = {} - result["paths"] = from_list(from_str, self.paths) - result["source"] = to_class(PermissionsConfigureAdditionalContentExclusionPolicyRuleSource, self.source) - if self.if_any_match is not None: - result["ifAnyMatch"] = from_union([lambda x: from_list(from_str, x), from_none], self.if_any_match) - if self.if_none_match is not None: - result["ifNoneMatch"] = from_union([lambda x: from_list(from_str, x), from_none], self.if_none_match) + result["name"] = from_str(self.name) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class PermissionsModifyRulesParams: - """Scope and add/remove instructions for modifying session- or location-scoped permission - rules. - """ - scope: PermissionsModifyRulesScope - """Whether the change applies to ephemeral session-scoped rules (cleared at session end) or - to location-scoped rules persisted via the location-permissions config file. - """ - add: list[PermissionRule] | None = None - """Rules to add to the scope. Applied before `remove`/`removeAll`.""" +class PollSpawnedSessionsResult: + """Batch of spawn events plus a cursor for follow-up polls.""" - remove: list[PermissionRule] | None = None - """Specific rules to remove from the scope. Ignored when `removeAll` is true.""" + cursor: str + """Opaque cursor to pass back to receive only events after this batch.""" - remove_all: bool | None = None - """When true, removes every rule currently in the scope (after any `add` is applied). Useful - for clearing the location scope wholesale. - """ + events: list[SessionsPollSpawnedSessionsEvent] + """Spawn events emitted since the supplied cursor.""" @staticmethod - def from_dict(obj: Any) -> 'PermissionsModifyRulesParams': + def from_dict(obj: Any) -> 'PollSpawnedSessionsResult': assert isinstance(obj, dict) - scope = PermissionsModifyRulesScope(obj.get("scope")) - add = from_union([lambda x: from_list(PermissionRule.from_dict, x), from_none], obj.get("add")) - remove = from_union([lambda x: from_list(PermissionRule.from_dict, x), from_none], obj.get("remove")) - remove_all = from_union([from_bool, from_none], obj.get("removeAll")) - return PermissionsModifyRulesParams(scope, add, remove, remove_all) + cursor = from_str(obj.get("cursor")) + events = from_list(SessionsPollSpawnedSessionsEvent.from_dict, obj.get("events")) + return PollSpawnedSessionsResult(cursor, events) def to_dict(self) -> dict: result: dict = {} - result["scope"] = to_enum(PermissionsModifyRulesScope, self.scope) - if self.add is not None: - result["add"] = from_union([lambda x: from_list(lambda x: to_class(PermissionRule, x), x), from_none], self.add) - if self.remove is not None: - result["remove"] = from_union([lambda x: from_list(lambda x: to_class(PermissionRule, x), x), from_none], self.remove) - if self.remove_all is not None: - result["removeAll"] = from_union([from_bool, from_none], self.remove_all) + result["cursor"] = from_str(self.cursor) + result["events"] = from_list(lambda x: to_class(SessionsPollSpawnedSessionsEvent, x), self.events) return result # 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.""" +class ProviderConfig: + """Custom model-provider configuration (BYOK).""" - plugins: list[Plugin] - """Installed plugins""" + base_url: str + """API endpoint URL.""" + + api_key: str | None = None + """API key. Optional for local providers like Ollama.""" + + azure: ProviderConfigAzure | None = None + """Azure-specific provider options.""" + + bearer_token: str | None = None + """Bearer token for authentication. Sets the Authorization header directly. Takes precedence + over apiKey when both are set. + """ + headers: dict[str, str] | None = None + """Custom HTTP headers to include in all outbound requests to the provider.""" + + max_context_window_tokens: float | None = None + """Maximum context window tokens for the model.""" + + max_output_tokens: float | None = None + """Maximum output tokens for the model.""" + + max_prompt_tokens: float | None = None + """Maximum prompt/input tokens for the model.""" + + model_id: str | None = None + """Well-known model ID used for capability lookup. When set, agent behavior config and token + limits are inferred from this model. + """ + type: ProviderConfigType | None = None + """Provider type. Defaults to "openai" for generic OpenAI-compatible APIs.""" + + wire_api: ProviderConfigWireAPI | None = None + """Wire API format (openai/azure only). Defaults to "completions".""" + + wire_model: str | None = None + """The model identifier sent to the provider API for inference (the "wire" model), as + opposed to modelId which is the well-known base. + """ @staticmethod - def from_dict(obj: Any) -> 'PluginList': + def from_dict(obj: Any) -> 'ProviderConfig': assert isinstance(obj, dict) - plugins = from_list(Plugin.from_dict, obj.get("plugins")) - return PluginList(plugins) + base_url = from_str(obj.get("baseUrl")) + api_key = from_union([from_str, from_none], obj.get("apiKey")) + azure = from_union([ProviderConfigAzure.from_dict, from_none], obj.get("azure")) + bearer_token = from_union([from_str, from_none], obj.get("bearerToken")) + headers = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("headers")) + max_context_window_tokens = from_union([from_float, from_none], obj.get("maxContextWindowTokens")) + max_output_tokens = from_union([from_float, from_none], obj.get("maxOutputTokens")) + max_prompt_tokens = from_union([from_float, from_none], obj.get("maxPromptTokens")) + model_id = from_union([from_str, from_none], obj.get("modelId")) + type = from_union([ProviderConfigType, from_none], obj.get("type")) + wire_api = from_union([ProviderConfigWireAPI, from_none], obj.get("wireApi")) + wire_model = from_union([from_str, from_none], obj.get("wireModel")) + return ProviderConfig(base_url, api_key, azure, bearer_token, headers, max_context_window_tokens, max_output_tokens, max_prompt_tokens, model_id, type, wire_api, wire_model) def to_dict(self) -> dict: result: dict = {} - result["plugins"] = from_list(lambda x: to_class(Plugin, x), self.plugins) + result["baseUrl"] = from_str(self.base_url) + if self.api_key is not None: + result["apiKey"] = from_union([from_str, from_none], self.api_key) + if self.azure is not None: + result["azure"] = from_union([lambda x: to_class(ProviderConfigAzure, x), from_none], self.azure) + if self.bearer_token is not None: + result["bearerToken"] = from_union([from_str, from_none], self.bearer_token) + if self.headers is not None: + result["headers"] = from_union([lambda x: from_dict(from_str, x), from_none], self.headers) + if self.max_context_window_tokens is not None: + result["maxContextWindowTokens"] = from_union([to_float, from_none], self.max_context_window_tokens) + if self.max_output_tokens is not None: + result["maxOutputTokens"] = from_union([to_float, from_none], self.max_output_tokens) + if self.max_prompt_tokens is not None: + result["maxPromptTokens"] = from_union([to_float, from_none], self.max_prompt_tokens) + if self.model_id is not None: + result["modelId"] = from_union([from_str, from_none], self.model_id) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(ProviderConfigType, x), from_none], self.type) + if self.wire_api is not None: + result["wireApi"] = from_union([lambda x: to_enum(ProviderConfigWireAPI, x), from_none], self.wire_api) + if self.wire_model is not None: + result["wireModel"] = from_union([from_str, from_none], self.wire_model) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -10477,6 +12363,202 @@ def to_dict(self) -> dict: result["kind"] = to_enum(QueuePendingItemsKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. +# Internal: this type is an internal SDK API and is not part of the public surface. +@dataclass +class _RegisterExtensionToolsParams: + """Params to attach an extension loader's tools to a session.""" + + loader: Any + """In-process ExtensionLoader handle (CLI-only optimization). Marked internal: this field is + excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, + extension discovery/launch moves entirely into the runtime — the CLI passes pure config + (search paths, disabled ids) via SessionOptions instead. + """ + session_id: str + """Session to register extension tools on.""" + + options: SessionsRegisterExtensionToolsOnSessionOptions | None = None + """Optional registration options.""" + + @staticmethod + def from_dict(obj: Any) -> '_RegisterExtensionToolsParams': + assert isinstance(obj, dict) + loader = obj.get("loader") + session_id = from_str(obj.get("sessionId")) + options = from_union([SessionsRegisterExtensionToolsOnSessionOptions.from_dict, from_none], obj.get("options")) + return _RegisterExtensionToolsParams(loader, session_id, options) + + def to_dict(self) -> dict: + result: dict = {} + result["loader"] = self.loader + result["sessionId"] = from_str(self.session_id) + if self.options is not None: + result["options"] = from_union([lambda x: to_class(SessionsRegisterExtensionToolsOnSessionOptions, x), from_none], self.options) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteControlConfig: + """Configuration for the runtime-managed remote-control singleton.""" + + explicit: bool + """Whether the user explicitly requested remote (vs. implicit session-sync). Controls + warning surfacing for missing-repo cases. + """ + remote: bool + """Whether remote export should be enabled.""" + + silent: bool + """When true, suppresses timeline messages on successful setup.""" + + steerable: bool + """Whether the MC session may steer the local session (write mode).""" + + existing_mc_session: RemoteControlConfigExistingMcSession | None = None + """Reattach to an existing MC session without creating a new one.""" + + task_id: str | None = None + """Existing Mission Control task ID to attach the exported session to.""" + + @staticmethod + def from_dict(obj: Any) -> 'RemoteControlConfig': + assert isinstance(obj, dict) + explicit = from_bool(obj.get("explicit")) + remote = from_bool(obj.get("remote")) + silent = from_bool(obj.get("silent")) + steerable = from_bool(obj.get("steerable")) + existing_mc_session = from_union([RemoteControlConfigExistingMcSession.from_dict, from_none], obj.get("existingMcSession")) + task_id = from_union([from_str, from_none], obj.get("taskId")) + return RemoteControlConfig(explicit, remote, silent, steerable, existing_mc_session, task_id) + + def to_dict(self) -> dict: + result: dict = {} + result["explicit"] = from_bool(self.explicit) + result["remote"] = from_bool(self.remote) + result["silent"] = from_bool(self.silent) + result["steerable"] = from_bool(self.steerable) + if self.existing_mc_session is not None: + result["existingMcSession"] = from_union([lambda x: to_class(RemoteControlConfigExistingMcSession, x), from_none], self.existing_mc_session) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteControlStatusActive: + """Remote control is connected to a local session.""" + + attached_session_id: str + """Session id remote control is pointed at.""" + + is_steerable: bool + """Whether the MC session may steer this session.""" + + state: ClassVar[str] = "active" + """Remote control state tag: active.""" + + frontend_url: str | None = None + """MC frontend URL for this session, when known.""" + + # Internal: this field is an internal SDK API and is not part of the public surface. + prompt_manager: Any = None + """In-process prompt-manager handle (CLI-only optimization). Marked internal: this field is + excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, + the same bidirectional prompt-routing handshake is expressed via dedicated remote-control + RPCs (register/resolve) rather than a shared in-process object. + """ + + @staticmethod + def from_dict(obj: Any) -> 'RemoteControlStatusActive': + assert isinstance(obj, dict) + attached_session_id = from_str(obj.get("attachedSessionId")) + is_steerable = from_bool(obj.get("isSteerable")) + frontend_url = from_union([from_str, from_none], obj.get("frontendUrl")) + prompt_manager = obj.get("promptManager") + return RemoteControlStatusActive(attached_session_id, is_steerable, frontend_url, prompt_manager) + + def to_dict(self) -> dict: + result: dict = {} + result["attachedSessionId"] = from_str(self.attached_session_id) + result["isSteerable"] = from_bool(self.is_steerable) + result["state"] = self.state + if self.frontend_url is not None: + result["frontendUrl"] = from_union([from_str, from_none], self.frontend_url) + if self.prompt_manager is not None: + result["promptManager"] = self.prompt_manager + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteControlStatusConnecting: + """Remote control is in the middle of initial setup.""" + + attached_session_id: str + """Session id the connection is attaching to.""" + + state: ClassVar[str] = "connecting" + """Remote control state tag: connecting.""" + + @staticmethod + def from_dict(obj: Any) -> 'RemoteControlStatusConnecting': + assert isinstance(obj, dict) + attached_session_id = from_str(obj.get("attachedSessionId")) + return RemoteControlStatusConnecting(attached_session_id) + + def to_dict(self) -> dict: + result: dict = {} + result["attachedSessionId"] = from_str(self.attached_session_id) + result["state"] = self.state + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteControlStatusError: + """The last setup attempt failed. The singleton is otherwise off.""" + + error: str + """Human-readable error message from the last setup attempt.""" + + state: ClassVar[str] = "error" + """Remote control state tag: setup failed.""" + + attached_session_id: str | None = None + """Session id the failing setup attempt targeted, when known.""" + + @staticmethod + def from_dict(obj: Any) -> 'RemoteControlStatusError': + assert isinstance(obj, dict) + error = from_str(obj.get("error")) + attached_session_id = from_union([from_str, from_none], obj.get("attachedSessionId")) + return RemoteControlStatusError(error, attached_session_id) + + def to_dict(self) -> dict: + result: dict = {} + result["error"] = from_str(self.error) + result["state"] = self.state + if self.attached_session_id is not None: + result["attachedSessionId"] = from_union([from_str, from_none], self.attached_session_id) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteControlStatusOff: + """Remote control is not connected.""" + + state: ClassVar[str] = "off" + """Remote control state tag: not connected.""" + + @staticmethod + def from_dict(obj: Any) -> 'RemoteControlStatusOff': + assert isinstance(obj, dict) + return RemoteControlStatusOff() + + def to_dict(self) -> dict: + result: dict = {} + result["state"] = self.state + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class RemoteEnableRequest: @@ -10500,6 +12582,26 @@ def to_dict(self) -> dict: result["mode"] = from_union([lambda x: to_enum(RemoteSessionMode, x), from_none], self.mode) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SandboxConfigUserPolicyExperimental: + """Platform-specific experimental policy fields.""" + + seatbelt: SandboxConfigUserPolicyExperimentalSeatbelt | None = None + """macOS seatbelt experimental options.""" + + @staticmethod + def from_dict(obj: Any) -> 'SandboxConfigUserPolicyExperimental': + assert isinstance(obj, dict) + seatbelt = from_union([SandboxConfigUserPolicyExperimentalSeatbelt.from_dict, from_none], obj.get("seatbelt")) + return SandboxConfigUserPolicyExperimental(seatbelt) + + def to_dict(self) -> dict: + result: dict = {} + if self.seatbelt is not None: + result["seatbelt"] = from_union([lambda x: to_class(SandboxConfigUserPolicyExperimentalSeatbelt, x), from_none], self.seatbelt) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ScheduleList: @@ -10579,9 +12681,11 @@ class SendRequest: among the user messages at the start of the current exchange """ # Internal: this field is an internal SDK API and is not part of the public surface. - source: Any = None - """Optional provenance tag copied to the resulting user.message event. Supported values are - `system`, `command-*`, and `schedule-*`. + source: str | None = None + """Optional provenance tag copied to the resulting user.message event. Must match one of + three forms: the literal `system`, `command-` for messages originating from a + command (e.g. slash command, Mission Control command), or `schedule-` for + messages originating from a scheduled job. """ traceparent: str | None = None """W3C Trace Context traceparent header for distributed tracing of this agent turn""" @@ -10607,7 +12711,7 @@ def from_dict(obj: Any) -> 'SendRequest': prepend = from_union([from_bool, from_none], obj.get("prepend")) request_headers = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("requestHeaders")) required_tool = from_union([from_str, from_none], obj.get("requiredTool")) - source = obj.get("source") + source = from_union([from_str, from_none], obj.get("source")) traceparent = from_union([from_str, from_none], obj.get("traceparent")) tracestate = from_union([from_str, from_none], obj.get("tracestate")) wait = from_union([from_bool, from_none], obj.get("wait")) @@ -10633,7 +12737,7 @@ def to_dict(self) -> dict: if self.required_tool is not None: result["requiredTool"] = from_union([from_str, from_none], self.required_tool) if self.source is not None: - result["source"] = self.source + result["source"] = from_union([from_str, from_none], self.source) if self.traceparent is not None: result["traceparent"] = from_union([from_str, from_none], self.traceparent) if self.tracestate is not None: @@ -10774,18 +12878,80 @@ def from_dict(obj: Any) -> 'SessionFSSqliteQueryRequest': def to_dict(self) -> dict: result: dict = {} - 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) + 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 + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionOpenOptionsAdditionalContentExclusionPolicyRule: + """Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRule` type.""" + + paths: list[str] + source: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource + """Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type.""" + + if_any_match: list[str] | None = None + if_none_match: list[str] | None = None + + @staticmethod + def from_dict(obj: Any) -> 'SessionOpenOptionsAdditionalContentExclusionPolicyRule': + assert isinstance(obj, dict) + paths = from_list(from_str, obj.get("paths")) + source = SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource.from_dict(obj.get("source")) + if_any_match = from_union([lambda x: from_list(from_str, x), from_none], obj.get("ifAnyMatch")) + if_none_match = from_union([lambda x: from_list(from_str, x), from_none], obj.get("ifNoneMatch")) + return SessionOpenOptionsAdditionalContentExclusionPolicyRule(paths, source, if_any_match, if_none_match) + + def to_dict(self) -> dict: + result: dict = {} + result["paths"] = from_list(from_str, self.paths) + result["source"] = to_class(SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource, self.source) + if self.if_any_match is not None: + result["ifAnyMatch"] = from_union([lambda x: from_list(from_str, x), from_none], self.if_any_match) + if self.if_none_match is not None: + result["ifNoneMatch"] = from_union([lambda x: from_list(from_str, x), from_none], self.if_none_match) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsOpenProgress: + """Schema for the `SessionsOpenProgress` type.""" + + status: SessionsOpenProgressStatus + """Step status.""" + + step: SessionsOpenProgressStep + """Handoff step.""" + + message: str | None = None + """Optional step message.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionsOpenProgress': + assert isinstance(obj, dict) + status = SessionsOpenProgressStatus(obj.get("status")) + step = SessionsOpenProgressStep(obj.get("step")) + message = from_union([from_str, from_none], obj.get("message")) + return SessionsOpenProgress(status, step, message) + + def to_dict(self) -> dict: + result: dict = {} + result["status"] = to_enum(SessionsOpenProgressStatus, self.status) + result["step"] = to_enum(SessionsOpenProgressStep, self.step) + if self.message is not None: + result["message"] = from_union([from_str, from_none], self.message) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionsListRequest: - """Optional metadata-load limit and filters applied to the returned sessions.""" - + """Optional source filter, metadata-load limit, and context filter applied to the returned + sessions. + """ filter: SessionListFilter | None = None """Optional filter applied to the returned sessions""" @@ -10794,9 +12960,17 @@ class SessionsListRequest: session lists. """ metadata_limit: int | None = None - """When provided, only the first N sessions (sorted by modification time, newest first) load - full metadata; remaining sessions return basic info only. Use 0 to return only basic info - for every session. + """When provided, only the first N local sessions (sorted by modification time, newest + first) load full metadata; remaining sessions return basic info only. Use 0 to return + only basic info for every local session. Has no effect on remote entries (which always + carry their full shape). + """ + source: SessionSource | None = None + """Which session sources to include. Defaults to `local` for backward compatibility.""" + + throw_on_error: bool | None = None + """Only meaningful when `source` includes remote. When true, propagates errors from the + remote service instead of silently returning an empty remote list. Defaults to false. """ @staticmethod @@ -10805,7 +12979,9 @@ def from_dict(obj: Any) -> 'SessionsListRequest': filter = from_union([SessionListFilter.from_dict, from_none], obj.get("filter")) include_detached = from_union([from_bool, from_none], obj.get("includeDetached")) metadata_limit = from_union([from_int, from_none], obj.get("metadataLimit")) - return SessionsListRequest(filter, include_detached, metadata_limit) + source = from_union([SessionSource, from_none], obj.get("source")) + throw_on_error = from_union([from_bool, from_none], obj.get("throwOnError")) + return SessionsListRequest(filter, include_detached, metadata_limit, source, throw_on_error) def to_dict(self) -> dict: result: dict = {} @@ -10815,6 +12991,37 @@ def to_dict(self) -> dict: result["includeDetached"] = from_union([from_bool, from_none], self.include_detached) if self.metadata_limit is not None: result["metadataLimit"] = from_union([from_int, from_none], self.metadata_limit) + if self.source is not None: + result["source"] = from_union([lambda x: to_enum(SessionSource, x), from_none], self.source) + if self.throw_on_error is not None: + result["throwOnError"] = from_union([from_bool, from_none], self.throw_on_error) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsOpenAttach: + """Parameters for attaching to an already-active session by ID.""" + + kind: ClassVar[str] = "attach" + """Attach to an already-active in-process session by ID. Unlike `resume`, this does NOT + re-load from disk; the session must already be loaded by an earlier `create`/`resume` + call. Returns `status: 'not_found'` when no active session matches the id. Useful for + in-process consumers that need a fresh API handle to a session opened elsewhere (e.g., a + peer foreground-session switch). + """ + session_id: str + """Session ID to attach to.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionsOpenAttach': + assert isinstance(obj, dict) + session_id = from_str(obj.get("sessionId")) + return SessionsOpenAttach(session_id) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = self.kind + result["sessionId"] = from_str(self.session_id) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -11273,6 +13480,31 @@ def to_dict(self) -> dict: result["arguments"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.arguments) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPTools: + """Schema for the `McpTools` type.""" + + name: str + """Tool name.""" + + description: str | None = None + """Tool description, when provided.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPTools': + assert isinstance(obj, dict) + name = from_str(obj.get("name")) + description = from_union([from_str, from_none], obj.get("description")) + return MCPTools(name, description) + + def to_dict(self) -> dict: + result: dict = {} + result["name"] = from_str(self.name) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionLocationAddToolApprovalParams: @@ -11315,6 +13547,47 @@ def to_dict(self) -> dict: result["tools"] = from_list(lambda x: to_class(Tool, x), self.tools) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class UserRequestedShellCommandResult: + """Result of a user-requested shell command.""" + + output: str + """Captured command output""" + + success: bool + """Whether the command completed successfully""" + + tool_call_id: str + """Tool call id emitted for the shell execution""" + + error: str | None = None + """Error output when the execution failed""" + + exit_code: int | None = None + """Process exit code, when available""" + + @staticmethod + def from_dict(obj: Any) -> 'UserRequestedShellCommandResult': + assert isinstance(obj, dict) + output = from_str(obj.get("output")) + success = from_bool(obj.get("success")) + tool_call_id = from_str(obj.get("toolCallId")) + error = from_union([from_str, from_none], obj.get("error")) + exit_code = from_union([from_int, from_none], obj.get("exitCode")) + return UserRequestedShellCommandResult(output, success, tool_call_id, error, exit_code) + + def to_dict(self) -> dict: + result: dict = {} + result["output"] = from_str(self.output) + result["success"] = from_bool(self.success) + result["toolCallId"] = from_str(self.tool_call_id) + if self.error is not None: + result["error"] = from_union([from_str, from_none], self.error) + if self.exit_code is not None: + result["exitCode"] = from_union([from_int, from_none], self.exit_code) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIHandlePendingAutoModeSwitchRequest: @@ -12460,134 +14733,11 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class MCPAppsHostContext: - """Current host context advertised to MCP App guests.""" - - context: MCPAppsHostContextDetails - """Current host context""" - - @staticmethod - def from_dict(obj: Any) -> 'MCPAppsHostContext': - assert isinstance(obj, dict) - context = MCPAppsHostContextDetails.from_dict(obj.get("context")) - return MCPAppsHostContext(context) - - def to_dict(self) -> dict: - result: dict = {} - result["context"] = to_class(MCPAppsHostContextDetails, self.context) - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class MCPAppsSetHostContextRequest: - """Host context to advertise to MCP App guests.""" - - context: MCPAppsSetHostContextDetails - """Host context advertised to MCP App guests""" - - @staticmethod - def from_dict(obj: Any) -> 'MCPAppsSetHostContextRequest': - assert isinstance(obj, dict) - context = MCPAppsSetHostContextDetails.from_dict(obj.get("context")) - return MCPAppsSetHostContextRequest(context) - - def to_dict(self) -> dict: - result: dict = {} - result["context"] = to_class(MCPAppsSetHostContextDetails, self.context) - return result - -@dataclass -class MCPConfigAddRequest: - """MCP server name and configuration to add to user configuration.""" - - config: MCPServerConfig - """MCP server configuration (stdio process or remote HTTP/SSE)""" - - name: str - """Unique name for the MCP server""" - - @staticmethod - def from_dict(obj: Any) -> 'MCPConfigAddRequest': - assert isinstance(obj, dict) - config = MCPServerConfig.from_dict(obj.get("config")) - name = from_str(obj.get("name")) - return MCPConfigAddRequest(config, name) - - def to_dict(self) -> dict: - result: dict = {} - result["config"] = to_class(MCPServerConfig, self.config) - result["name"] = from_str(self.name) - return result - -@dataclass -class MCPConfigList: - """User-configured MCP servers, keyed by server name.""" - - servers: dict[str, MCPServerConfig] - """All MCP servers from user config, keyed by name""" - - @staticmethod - def from_dict(obj: Any) -> 'MCPConfigList': - assert isinstance(obj, dict) - servers = from_dict(MCPServerConfig.from_dict, obj.get("servers")) - return MCPConfigList(servers) - - def to_dict(self) -> dict: - result: dict = {} - result["servers"] = from_dict(lambda x: to_class(MCPServerConfig, x), self.servers) - return result - -@dataclass -class MCPConfigUpdateRequest: - """MCP server name and replacement configuration to write to user configuration.""" - - config: MCPServerConfig - """MCP server configuration (stdio process or remote HTTP/SSE)""" - - name: str - """Name of the MCP server to update""" - - @staticmethod - def from_dict(obj: Any) -> 'MCPConfigUpdateRequest': - assert isinstance(obj, dict) - config = MCPServerConfig.from_dict(obj.get("config")) - name = from_str(obj.get("name")) - return MCPConfigUpdateRequest(config, name) - - def to_dict(self) -> dict: - result: dict = {} - result["config"] = to_class(MCPServerConfig, self.config) - result["name"] = from_str(self.name) - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class MetadataRecordContextChangeRequest: - """Updated working-directory/git context to record on the session.""" - - context: SessionWorkingDirectoryContext - """Updated working directory and git context. Emitted as the new payload of - `session.context_changed`. - """ - - @staticmethod - def from_dict(obj: Any) -> 'MetadataRecordContextChangeRequest': - assert isinstance(obj, dict) - context = SessionWorkingDirectoryContext.from_dict(obj.get("context")) - return MetadataRecordContextChangeRequest(context) - - def to_dict(self) -> dict: - result: dict = {} - result["context"] = to_class(SessionWorkingDirectoryContext, self.context) - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class SessionMetadata: - """Schema for the `SessionMetadata` type.""" +class LocalSessionMetadataValue: + """Schema for the `LocalSessionMetadataValue` type.""" is_remote: bool - """True for remote (GitHub) sessions; false for local""" + """Always false for local sessions.""" modified_time: str """Last-modified time of the session's persisted state, as ISO 8601""" @@ -12602,7 +14752,7 @@ class SessionMetadata: """Runtime client name that created/last resumed this session""" context: SessionContext | None = None - """Schema for the `SessionContext` type.""" + """Pre-resolved working-directory context for session startup.""" is_detached: bool | None = None """True for detached maintenance sessions that should be hidden from normal resume lists.""" @@ -12618,7 +14768,7 @@ class SessionMetadata: """Short summary of the session, when one has been derived""" @staticmethod - def from_dict(obj: Any) -> 'SessionMetadata': + def from_dict(obj: Any) -> 'LocalSessionMetadataValue': assert isinstance(obj, dict) is_remote = from_bool(obj.get("isRemote")) modified_time = from_str(obj.get("modifiedTime")) @@ -12630,7 +14780,7 @@ def from_dict(obj: Any) -> 'SessionMetadata': mc_task_id = from_union([from_str, from_none], obj.get("mcTaskId")) name = from_union([from_str, from_none], obj.get("name")) summary = from_union([from_str, from_none], obj.get("summary")) - return SessionMetadata(is_remote, modified_time, session_id, start_time, client_name, context, is_detached, mc_task_id, name, summary) + return LocalSessionMetadataValue(is_remote, modified_time, session_id, start_time, client_name, context, is_detached, mc_task_id, name, summary) def to_dict(self) -> dict: result: dict = {} @@ -12652,6 +14802,104 @@ def to_dict(self) -> dict: result["summary"] = from_union([from_str, from_none], self.summary) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class RemoteSessionMetadataValue: + """Remote session metadata for the session to hand off (typically obtained from + `sessions.list` with `source: "remote"`). + + Full remote-session metadata in wire-portable form. + + Remote session metadata, present when status is `connected`. + """ + is_remote: bool + """Always true for remote sessions.""" + + modified_time: str + """Last-modified time as an ISO 8601 timestamp.""" + + remote_session_ids: list[str] + """Backing remote session IDs (most recent first).""" + + repository: RemoteSessionMetadataRepository + """GitHub repository the remote session belongs to.""" + + session_id: str + """Stable session identifier.""" + + start_time: str + """Session creation time as an ISO 8601 timestamp.""" + + context: SessionContext | None = None + """Most recent working directory context.""" + + name: str | None = None + """Optional human-friendly name set via /rename.""" + + pull_request_number: int | None = None + """Pull request number associated with the session.""" + + resource_id: str | None = None + """Original remote resource identifier (task ID or PR node ID).""" + + stale_at: str | None = None + """Deadline (ISO 8601) at which a CLI remote session becomes stale without further + heartbeats. + """ + state: str | None = None + """Server-side task state returned by GitHub.""" + + summary: str | None = None + """Short summary of the session, when one has been derived.""" + + task_type: TaskType | None = None + """Whether the remote task originated from CCA or CLI `--remote`.""" + + @staticmethod + def from_dict(obj: Any) -> 'RemoteSessionMetadataValue': + assert isinstance(obj, dict) + is_remote = from_bool(obj.get("isRemote")) + modified_time = from_str(obj.get("modifiedTime")) + remote_session_ids = from_list(from_str, obj.get("remoteSessionIds")) + repository = RemoteSessionMetadataRepository.from_dict(obj.get("repository")) + session_id = from_str(obj.get("sessionId")) + start_time = from_str(obj.get("startTime")) + context = from_union([SessionContext.from_dict, from_none], obj.get("context")) + name = from_union([from_str, from_none], obj.get("name")) + pull_request_number = from_union([from_int, from_none], obj.get("pullRequestNumber")) + resource_id = from_union([from_str, from_none], obj.get("resourceId")) + stale_at = from_union([from_str, from_none], obj.get("staleAt")) + state = from_union([from_str, from_none], obj.get("state")) + summary = from_union([from_str, from_none], obj.get("summary")) + task_type = from_union([TaskType, from_none], obj.get("taskType")) + return RemoteSessionMetadataValue(is_remote, modified_time, remote_session_ids, repository, session_id, start_time, context, name, pull_request_number, resource_id, stale_at, state, summary, task_type) + + def to_dict(self) -> dict: + result: dict = {} + result["isRemote"] = from_bool(self.is_remote) + result["modifiedTime"] = from_str(self.modified_time) + result["remoteSessionIds"] = from_list(from_str, self.remote_session_ids) + result["repository"] = to_class(RemoteSessionMetadataRepository, self.repository) + result["sessionId"] = from_str(self.session_id) + result["startTime"] = from_str(self.start_time) + if self.context is not None: + result["context"] = from_union([lambda x: to_class(SessionContext, x), from_none], self.context) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.pull_request_number is not None: + result["pullRequestNumber"] = from_union([from_int, from_none], self.pull_request_number) + if self.resource_id is not None: + result["resourceId"] = from_union([from_str, from_none], self.resource_id) + if self.stale_at is not None: + result["staleAt"] = from_union([from_str, from_none], self.stale_at) + if self.state is not None: + result["state"] = from_union([from_str, from_none], self.state) + if self.summary is not None: + result["summary"] = from_union([from_str, from_none], self.summary) + if self.task_type is not None: + result["taskType"] = from_union([lambda x: to_enum(TaskType, x), from_none], self.task_type) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionsGetLastForContextRequest: @@ -12674,6 +14922,27 @@ def to_dict(self) -> dict: result["context"] = from_union([lambda x: to_class(SessionContext, x), from_none], self.context) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MetadataRecordContextChangeRequest: + """Updated working-directory/git context to record on the session.""" + + context: SessionWorkingDirectoryContext + """Updated working directory and git context. Emitted as the new payload of + `session.context_changed`. + """ + + @staticmethod + def from_dict(obj: Any) -> 'MetadataRecordContextChangeRequest': + assert isinstance(obj, dict) + context = SessionWorkingDirectoryContext.from_dict(obj.get("context")) + return MetadataRecordContextChangeRequest(context) + + def to_dict(self) -> dict: + result: dict = {} + result["context"] = to_class(SessionWorkingDirectoryContext, self.context) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionPathsConfig: @@ -12753,6 +15022,9 @@ class WorkspaceSummary: updated_at: datetime | None = None """ISO 8601 timestamp when the workspace was last updated""" + user_named: bool | None = None + """Whether the display name was explicitly set by the user""" + @staticmethod def from_dict(obj: Any) -> 'WorkspaceSummary': assert isinstance(obj, dict) @@ -12765,7 +15037,8 @@ def from_dict(obj: Any) -> 'WorkspaceSummary': name = from_union([from_str, from_none], obj.get("name")) repository = from_union([from_str, from_none], obj.get("repository")) updated_at = from_union([from_datetime, from_none], obj.get("updated_at")) - return WorkspaceSummary(id, branch, created_at, cwd, git_root, host_type, name, repository, updated_at) + user_named = from_union([from_bool, from_none], obj.get("user_named")) + return WorkspaceSummary(id, branch, created_at, cwd, git_root, host_type, name, repository, updated_at, user_named) def to_dict(self) -> dict: result: dict = {} @@ -12786,6 +15059,8 @@ def to_dict(self) -> dict: result["repository"] = from_union([from_str, from_none], self.repository) if self.updated_at is not None: result["updated_at"] = from_union([lambda x: x.isoformat(), from_none], self.updated_at) + if self.user_named is not None: + result["user_named"] = from_union([from_bool, from_none], self.user_named) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -12834,6 +15109,185 @@ def to_dict(self) -> dict: result["checkpoints"] = from_list(lambda x: to_class(WorkspacesCheckpoints, x), self.checkpoints) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPAppsHostContext: + """Current host context advertised to MCP App guests.""" + + context: MCPAppsHostContextDetails + """Current host context""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPAppsHostContext': + assert isinstance(obj, dict) + context = MCPAppsHostContextDetails.from_dict(obj.get("context")) + return MCPAppsHostContext(context) + + def to_dict(self) -> dict: + result: dict = {} + result["context"] = to_class(MCPAppsHostContextDetails, self.context) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPAppsSetHostContextRequest: + """Host context to advertise to MCP App guests.""" + + context: MCPAppsSetHostContextDetails + """Host context advertised to MCP App guests""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPAppsSetHostContextRequest': + assert isinstance(obj, dict) + context = MCPAppsSetHostContextDetails.from_dict(obj.get("context")) + return MCPAppsSetHostContextRequest(context) + + def to_dict(self) -> dict: + result: dict = {} + result["context"] = to_class(MCPAppsSetHostContextDetails, self.context) + return result + +@dataclass +class MCPConfigAddRequest: + """MCP server name and configuration to add to user configuration.""" + + config: MCPServerConfig + """MCP server configuration (stdio process or remote HTTP/SSE)""" + + name: str + """Unique name for the MCP server""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPConfigAddRequest': + assert isinstance(obj, dict) + config = MCPServerConfig.from_dict(obj.get("config")) + name = from_str(obj.get("name")) + return MCPConfigAddRequest(config, name) + + def to_dict(self) -> dict: + result: dict = {} + result["config"] = to_class(MCPServerConfig, self.config) + result["name"] = from_str(self.name) + return result + +@dataclass +class MCPConfigList: + """User-configured MCP servers, keyed by server name.""" + + servers: dict[str, MCPServerConfig] + """All MCP servers from user config, keyed by name""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPConfigList': + assert isinstance(obj, dict) + servers = from_dict(MCPServerConfig.from_dict, obj.get("servers")) + return MCPConfigList(servers) + + def to_dict(self) -> dict: + result: dict = {} + result["servers"] = from_dict(lambda x: to_class(MCPServerConfig, x), self.servers) + return result + +@dataclass +class MCPConfigUpdateRequest: + """MCP server name and replacement configuration to write to user configuration.""" + + config: MCPServerConfig + """MCP server configuration (stdio process or remote HTTP/SSE)""" + + name: str + """Name of the MCP server to update""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPConfigUpdateRequest': + assert isinstance(obj, dict) + config = MCPServerConfig.from_dict(obj.get("config")) + name = from_str(obj.get("name")) + return MCPConfigUpdateRequest(config, name) + + def to_dict(self) -> dict: + result: dict = {} + result["config"] = to_class(MCPServerConfig, self.config) + result["name"] = from_str(self.name) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +# Internal: this type is an internal SDK API and is not part of the public surface. +@dataclass +class MCPRestartServerRequest: + """Server name and opaque configuration for an individual MCP server restart.""" + + config: Any = None + """Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime + shape supplied only by in-process CLI callers. + """ + server_name: str + """Name of the MCP server to restart""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPRestartServerRequest': + assert isinstance(obj, dict) + config = obj.get("config") + server_name = from_str(obj.get("serverName")) + return MCPRestartServerRequest(config, server_name) + + def to_dict(self) -> dict: + result: dict = {} + result["config"] = self.config + result["serverName"] = from_str(self.server_name) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +# Internal: this type is an internal SDK API and is not part of the public surface. +@dataclass +class MCPStartServerRequest: + """Server name and opaque configuration for an individual MCP server start.""" + + config: Any = None + """Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime + shape supplied only by in-process CLI callers. + """ + server_name: str + """Name of the MCP server to start""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPStartServerRequest': + assert isinstance(obj, dict) + config = obj.get("config") + server_name = from_str(obj.get("serverName")) + return MCPStartServerRequest(config, server_name) + + def to_dict(self) -> dict: + result: dict = {} + result["config"] = self.config + result["serverName"] = from_str(self.server_name) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPServerList: + """MCP servers configured for the session, with their connection status and host-level state.""" + + servers: list[MCPServer] + """Configured MCP servers""" + + host: MCPHostState | None = None + """Host-level state, omitted when no MCP host is initialized.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPServerList': + assert isinstance(obj, dict) + servers = from_list(MCPServer.from_dict, obj.get("servers")) + host = from_union([MCPHostState.from_dict, from_none], obj.get("host")) + return MCPServerList(servers, host) + + def to_dict(self) -> dict: + result: dict = {} + result["servers"] = from_list(lambda x: to_class(MCPServer, x), self.servers) + if self.host is not None: + result["host"] = from_union([lambda x: to_class(MCPHostState, x), from_none], self.host) + return result + @dataclass class ModelBilling: """Billing information""" @@ -12862,8 +15316,12 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ModelCapabilitiesOverride: - """Override individual model capabilities resolved by the runtime""" + """Initial model capability overrides. + + Override individual model capabilities resolved by the runtime + Per-property model capability overrides for the selected model. + """ limits: ModelCapabilitiesOverrideLimits | None = None """Token limits for prompts, outputs, and context window""" @@ -12885,6 +15343,31 @@ def to_dict(self) -> dict: result["supports"] = from_union([lambda x: to_class(ModelCapabilitiesOverrideSupports, x), from_none], self.supports) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class OptionsUpdateAdditionalContentExclusionPolicy: + """Schema for the `OptionsUpdateAdditionalContentExclusionPolicy` type.""" + + last_updated_at: float | str + rules: list[OptionsUpdateAdditionalContentExclusionPolicyRule] + scope: AdditionalContentExclusionPolicyScope + """Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration.""" + + @staticmethod + def from_dict(obj: Any) -> 'OptionsUpdateAdditionalContentExclusionPolicy': + assert isinstance(obj, dict) + last_updated_at = from_union([from_float, from_str], obj.get("last_updated_at")) + rules = from_list(OptionsUpdateAdditionalContentExclusionPolicyRule.from_dict, obj.get("rules")) + scope = AdditionalContentExclusionPolicyScope(obj.get("scope")) + return OptionsUpdateAdditionalContentExclusionPolicy(last_updated_at, rules, scope) + + def to_dict(self) -> dict: + result: dict = {} + result["last_updated_at"] = from_union([to_float, from_str], self.last_updated_at) + result["rules"] = from_list(lambda x: to_class(OptionsUpdateAdditionalContentExclusionPolicyRule, x), self.rules) + result["scope"] = to_enum(AdditionalContentExclusionPolicyScope, self.scope) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsConfigureAdditionalContentExclusionPolicy: @@ -12892,24 +15375,118 @@ class PermissionsConfigureAdditionalContentExclusionPolicy: last_updated_at: float | str rules: list[PermissionsConfigureAdditionalContentExclusionPolicyRule] - scope: PermissionsConfigureAdditionalContentExclusionPolicyScope + scope: AdditionalContentExclusionPolicyScope """Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` enumeration. """ @staticmethod - def from_dict(obj: Any) -> 'PermissionsConfigureAdditionalContentExclusionPolicy': + def from_dict(obj: Any) -> 'PermissionsConfigureAdditionalContentExclusionPolicy': + assert isinstance(obj, dict) + last_updated_at = from_union([from_float, from_str], obj.get("last_updated_at")) + rules = from_list(PermissionsConfigureAdditionalContentExclusionPolicyRule.from_dict, obj.get("rules")) + scope = AdditionalContentExclusionPolicyScope(obj.get("scope")) + return PermissionsConfigureAdditionalContentExclusionPolicy(last_updated_at, rules, scope) + + def to_dict(self) -> dict: + result: dict = {} + result["last_updated_at"] = from_union([to_float, from_str], self.last_updated_at) + result["rules"] = from_list(lambda x: to_class(PermissionsConfigureAdditionalContentExclusionPolicyRule, x), self.rules) + result["scope"] = to_enum(AdditionalContentExclusionPolicyScope, self.scope) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PluginInstallResult: + """Result of installing a plugin.""" + + plugin: InstalledPluginInfo + """The newly installed plugin's metadata""" + + skills_installed: int + """Number of skills discovered and installed from the plugin""" + + deprecation_warning: str | None = None + """Set when the install path is deprecated (e.g. direct repo / URL / local installs). + Callers should surface this to end users. + """ + post_install_message: str | None = None + """Optional post-install message provided by the plugin (e.g. setup instructions)""" + + @staticmethod + def from_dict(obj: Any) -> 'PluginInstallResult': + assert isinstance(obj, dict) + plugin = InstalledPluginInfo.from_dict(obj.get("plugin")) + skills_installed = from_int(obj.get("skillsInstalled")) + deprecation_warning = from_union([from_str, from_none], obj.get("deprecationWarning")) + post_install_message = from_union([from_str, from_none], obj.get("postInstallMessage")) + return PluginInstallResult(plugin, skills_installed, deprecation_warning, post_install_message) + + def to_dict(self) -> dict: + result: dict = {} + result["plugin"] = to_class(InstalledPluginInfo, self.plugin) + result["skillsInstalled"] = from_int(self.skills_installed) + if self.deprecation_warning is not None: + result["deprecationWarning"] = from_union([from_str, from_none], self.deprecation_warning) + if self.post_install_message is not None: + result["postInstallMessage"] = from_union([from_str, from_none], self.post_install_message) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PluginListResult: + """Plugins installed in user/global state.""" + + plugins: list[InstalledPluginInfo] + """Installed plugins""" + + @staticmethod + def from_dict(obj: Any) -> 'PluginListResult': + assert isinstance(obj, dict) + plugins = from_list(InstalledPluginInfo.from_dict, obj.get("plugins")) + return PluginListResult(plugins) + + def to_dict(self) -> dict: + result: dict = {} + result["plugins"] = from_list(lambda x: to_class(InstalledPluginInfo, x), self.plugins) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MarketplaceBrowseResult: + """Plugins advertised by the marketplace.""" + + plugins: list[MarketplacePluginInfo] + """Plugins advertised by the marketplace""" + + @staticmethod + def from_dict(obj: Any) -> 'MarketplaceBrowseResult': + assert isinstance(obj, dict) + plugins = from_list(MarketplacePluginInfo.from_dict, obj.get("plugins")) + return MarketplaceBrowseResult(plugins) + + def to_dict(self) -> dict: + result: dict = {} + result["plugins"] = from_list(lambda x: to_class(MarketplacePluginInfo, x), self.plugins) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PluginUpdateAllResult: + """Result of updating all installed plugins.""" + + results: list[PluginUpdateAllEntry] + """Per-plugin update results in deterministic order.""" + + @staticmethod + def from_dict(obj: Any) -> 'PluginUpdateAllResult': assert isinstance(obj, dict) - last_updated_at = from_union([from_float, from_str], obj.get("last_updated_at")) - rules = from_list(PermissionsConfigureAdditionalContentExclusionPolicyRule.from_dict, obj.get("rules")) - scope = PermissionsConfigureAdditionalContentExclusionPolicyScope(obj.get("scope")) - return PermissionsConfigureAdditionalContentExclusionPolicy(last_updated_at, rules, scope) + results = from_list(PluginUpdateAllEntry.from_dict, obj.get("results")) + return PluginUpdateAllResult(results) def to_dict(self) -> dict: result: dict = {} - result["last_updated_at"] = from_union([to_float, from_str], self.last_updated_at) - result["rules"] = from_list(lambda x: to_class(PermissionsConfigureAdditionalContentExclusionPolicyRule, x), self.rules) - result["scope"] = to_enum(PermissionsConfigureAdditionalContentExclusionPolicyScope, self.scope) + result["results"] = from_list(lambda x: to_class(PluginUpdateAllEntry, x), self.results) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -12977,6 +15554,62 @@ def to_dict(self) -> dict: result["steeringMessages"] = from_list(from_str, self.steering_messages) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsStartRemoteControlRequest: + """Parameters for attaching the remote-control singleton to a session.""" + + config: RemoteControlConfig + """Configuration for the runtime-managed remote-control singleton.""" + + session_id: str + """Local session id to attach remote control to.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionsStartRemoteControlRequest': + assert isinstance(obj, dict) + config = RemoteControlConfig.from_dict(obj.get("config")) + session_id = from_str(obj.get("sessionId")) + return SessionsStartRemoteControlRequest(config, session_id) + + def to_dict(self) -> dict: + result: dict = {} + result["config"] = to_class(RemoteControlConfig, self.config) + result["sessionId"] = from_str(self.session_id) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SandboxConfigUserPolicy: + """User-managed sandbox policy fragment merged into the auto-discovered base policy.""" + + experimental: SandboxConfigUserPolicyExperimental | None = None + """Platform-specific experimental policy fields.""" + + filesystem: SandboxConfigUserPolicyFilesystem | None = None + """Filesystem rules to merge into the base policy.""" + + network: SandboxConfigUserPolicyNetwork | None = None + """Network rules to merge into the base policy.""" + + @staticmethod + def from_dict(obj: Any) -> 'SandboxConfigUserPolicy': + assert isinstance(obj, dict) + experimental = from_union([SandboxConfigUserPolicyExperimental.from_dict, from_none], obj.get("experimental")) + filesystem = from_union([SandboxConfigUserPolicyFilesystem.from_dict, from_none], obj.get("filesystem")) + network = from_union([SandboxConfigUserPolicyNetwork.from_dict, from_none], obj.get("network")) + return SandboxConfigUserPolicy(experimental, filesystem, network) + + def to_dict(self) -> dict: + result: dict = {} + if self.experimental is not None: + result["experimental"] = from_union([lambda x: to_class(SandboxConfigUserPolicyExperimental, x), from_none], self.experimental) + if self.filesystem is not None: + result["filesystem"] = from_union([lambda x: to_class(SandboxConfigUserPolicyFilesystem, x), from_none], self.filesystem) + if self.network is not None: + result["network"] = from_union([lambda x: to_class(SandboxConfigUserPolicyNetwork, x), from_none], self.network) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionFSReadFileResult: @@ -13140,6 +15773,33 @@ def to_dict(self) -> dict: result["error"] = from_union([lambda x: to_class(SessionFSError, x), from_none], self.error) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionOpenOptionsAdditionalContentExclusionPolicy: + """Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicy` type.""" + + last_updated_at: float | str + rules: list[SessionOpenOptionsAdditionalContentExclusionPolicyRule] + scope: AdditionalContentExclusionPolicyScope + """Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` + enumeration. + """ + + @staticmethod + def from_dict(obj: Any) -> 'SessionOpenOptionsAdditionalContentExclusionPolicy': + assert isinstance(obj, dict) + last_updated_at = from_union([from_float, from_str], obj.get("last_updated_at")) + rules = from_list(SessionOpenOptionsAdditionalContentExclusionPolicyRule.from_dict, obj.get("rules")) + scope = AdditionalContentExclusionPolicyScope(obj.get("scope")) + return SessionOpenOptionsAdditionalContentExclusionPolicy(last_updated_at, rules, scope) + + def to_dict(self) -> dict: + result: dict = {} + result["last_updated_at"] = from_union([to_float, from_str], self.last_updated_at) + result["rules"] = from_list(lambda x: to_class(SessionOpenOptionsAdditionalContentExclusionPolicyRule, x), self.rules) + result["scope"] = to_enum(AdditionalContentExclusionPolicyScope, self.scope) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AgentGetCurrentResult: @@ -13262,6 +15922,25 @@ def to_dict(self) -> dict: result["recentOutput"] = from_union([from_str, from_none], self.recent_output) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPListToolsResult: + """Tools exposed by the connected MCP server. Throws when the server is not connected.""" + + tools: list[MCPTools] + """Tools exposed by the server.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPListToolsResult': + assert isinstance(obj, dict) + tools = from_list(MCPTools.from_dict, obj.get("tools")) + return MCPListToolsResult(tools) + + def to_dict(self) -> dict: + result: dict = {} + result["tools"] = from_list(lambda x: to_class(MCPTools, x), self.tools) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIElicitationArrayAnyOfField: @@ -14368,7 +17047,7 @@ class SessionEnrichMetadataResult: """The enriched metadata records, with summary and context fields backfilled where available. Sessions confirmed empty and unnamed are omitted. """ - sessions: list[SessionMetadata] + sessions: list[LocalSessionMetadataValue] """Enriched records, with summary and context backfilled. Sessions confirmed empty and unnamed may be omitted. """ @@ -14376,52 +17055,93 @@ class SessionEnrichMetadataResult: @staticmethod def from_dict(obj: Any) -> 'SessionEnrichMetadataResult': assert isinstance(obj, dict) - sessions = from_list(SessionMetadata.from_dict, obj.get("sessions")) + sessions = from_list(LocalSessionMetadataValue.from_dict, obj.get("sessions")) return SessionEnrichMetadataResult(sessions) def to_dict(self) -> dict: result: dict = {} - result["sessions"] = from_list(lambda x: to_class(SessionMetadata, x), self.sessions) + result["sessions"] = from_list(lambda x: to_class(LocalSessionMetadataValue, x), self.sessions) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class SessionList: - """Persisted sessions matching the filter, ordered most-recently-modified first.""" +class SessionsEnrichMetadataRequest: + """Session metadata records to enrich with summary and context information.""" - sessions: list[SessionMetadata] - """Sessions ordered most-recently-modified first""" + sessions: list[LocalSessionMetadataValue] + """Session metadata records to enrich. Records that already have summary and context are + returned unchanged. + """ @staticmethod - def from_dict(obj: Any) -> 'SessionList': + def from_dict(obj: Any) -> 'SessionsEnrichMetadataRequest': assert isinstance(obj, dict) - sessions = from_list(SessionMetadata.from_dict, obj.get("sessions")) - return SessionList(sessions) + sessions = from_list(LocalSessionMetadataValue.from_dict, obj.get("sessions")) + return SessionsEnrichMetadataRequest(sessions) def to_dict(self) -> dict: result: dict = {} - result["sessions"] = from_list(lambda x: to_class(SessionMetadata, x), self.sessions) + result["sessions"] = from_list(lambda x: to_class(LocalSessionMetadataValue, x), self.sessions) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class SessionsEnrichMetadataRequest: - """Session metadata records to enrich with summary and context information.""" +class SessionOpenResult: + """Result of opening a session.""" - sessions: list[SessionMetadata] - """Session metadata records to enrich. Records that already have summary and context are - returned unchanged. + status: SessionsOpenStatus + """Outcome of the open request.""" + + metadata: RemoteSessionMetadataValue | None = None + """Remote session metadata, present when status is `connected`.""" + + progress: list[SessionsOpenProgress] | None = None + """Handoff progress steps, present when status is `handed_off`.""" + + remote_session_id: str | None = None + """Remote session ID, present when status is `connected`.""" + + # Internal: this field is an internal SDK API and is not part of the public surface. + session_api: Any = None + """In-process SessionClientApi handle for the opened session, returned to CLI callers as a + transitional shortcut. Marked internal so the public SDK surface does not expose it; SDK + consumers should construct per-session clients from `sessionId` instead. + """ + session_id: str | None = None + """Opened session ID. Omitted when status is `not_found`.""" + + startup_prompts: list[str] | None = None + """Startup prompts queued by user-level hook configs at session creation. Only populated + when status is `created`; resumed sessions return an empty array. """ @staticmethod - def from_dict(obj: Any) -> 'SessionsEnrichMetadataRequest': + def from_dict(obj: Any) -> 'SessionOpenResult': assert isinstance(obj, dict) - sessions = from_list(SessionMetadata.from_dict, obj.get("sessions")) - return SessionsEnrichMetadataRequest(sessions) + status = SessionsOpenStatus(obj.get("status")) + metadata = from_union([RemoteSessionMetadataValue.from_dict, from_none], obj.get("metadata")) + progress = from_union([lambda x: from_list(SessionsOpenProgress.from_dict, x), from_none], obj.get("progress")) + remote_session_id = from_union([from_str, from_none], obj.get("remoteSessionId")) + session_api = obj.get("sessionApi") + session_id = from_union([from_str, from_none], obj.get("sessionId")) + startup_prompts = from_union([lambda x: from_list(from_str, x), from_none], obj.get("startupPrompts")) + return SessionOpenResult(status, metadata, progress, remote_session_id, session_api, session_id, startup_prompts) def to_dict(self) -> dict: result: dict = {} - result["sessions"] = from_list(lambda x: to_class(SessionMetadata, x), self.sessions) + result["status"] = to_enum(SessionsOpenStatus, self.status) + if self.metadata is not None: + result["metadata"] = from_union([lambda x: to_class(RemoteSessionMetadataValue, x), from_none], self.metadata) + if self.progress is not None: + result["progress"] = from_union([lambda x: from_list(lambda x: to_class(SessionsOpenProgress, x), x), from_none], self.progress) + if self.remote_session_id is not None: + result["remoteSessionId"] = from_union([from_str, from_none], self.remote_session_id) + if self.session_api is not None: + result["sessionApi"] = self.session_api + if self.session_id is not None: + result["sessionId"] = from_union([from_str, from_none], self.session_id) + if self.startup_prompts is not None: + result["startupPrompts"] = from_union([lambda x: from_list(from_str, x), from_none], self.startup_prompts) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -14586,77 +17306,425 @@ def to_dict(self) -> dict: result["urls"] = from_union([lambda x: to_class(PermissionUrlsConfig, x), from_none], self.urls) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class TasksGetProgressResult: - """Progress information for the task, or null when no task with that ID is tracked.""" +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SandboxConfig: + """Resolved sandbox configuration.""" + + enabled: bool + """Whether sandboxing is enabled for the session.""" + + add_current_working_directory: bool | None = None + """Whether to auto-add the current working directory to readwritePaths. Default: true.""" + + config: dict[str, Any] | None = None + """Raw `ContainerConfig` (per `@microsoft/mxc-sdk`) passed directly to + `spawnSandboxFromConfig`, bypassing policy merging. + """ + user_policy: SandboxConfigUserPolicy | None = None + """User-managed sandbox policy fragment merged into the auto-discovered base policy.""" + + @staticmethod + def from_dict(obj: Any) -> 'SandboxConfig': + assert isinstance(obj, dict) + enabled = from_bool(obj.get("enabled")) + add_current_working_directory = from_union([from_bool, from_none], obj.get("addCurrentWorkingDirectory")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + user_policy = from_union([SandboxConfigUserPolicy.from_dict, from_none], obj.get("userPolicy")) + return SandboxConfig(enabled, add_current_working_directory, config, user_policy) + + def to_dict(self) -> dict: + result: dict = {} + result["enabled"] = from_bool(self.enabled) + if self.add_current_working_directory is not None: + result["addCurrentWorkingDirectory"] = from_union([from_bool, from_none], self.add_current_working_directory) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + if self.user_policy is not None: + result["userPolicy"] = from_union([lambda x: to_class(SandboxConfigUserPolicy, x), from_none], self.user_policy) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class TasksGetProgressResult: + """Progress information for the task, or null when no task with that ID is tracked.""" + + progress: TaskProgress | None = None + """Progress information for the task, discriminated by type. Returns null when no task with + this ID is currently tracked. + """ + + @staticmethod + def from_dict(obj: Any) -> 'TasksGetProgressResult': + assert isinstance(obj, dict) + progress = from_union([TaskProgress.from_dict, from_none], obj.get("progress")) + return TasksGetProgressResult(progress) + + def to_dict(self) -> dict: + result: dict = {} + if self.progress is not None: + result["progress"] = from_union([lambda x: to_class(TaskProgress, x), from_none], self.progress) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class UIElicitationSchema: + """JSON Schema describing the form fields to present to the user""" + + properties: dict[str, UIElicitationSchemaProperty] + """Form field definitions, keyed by field name""" + + type: UIElicitationSchemaType + """Schema type indicator (always 'object')""" + + required: list[str] | None = None + """List of required field names""" + + @staticmethod + def from_dict(obj: Any) -> 'UIElicitationSchema': + assert isinstance(obj, dict) + properties = from_dict(UIElicitationSchemaProperty.from_dict, obj.get("properties")) + type = UIElicitationSchemaType(obj.get("type")) + required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) + return UIElicitationSchema(properties, type, required) + + def to_dict(self) -> dict: + result: dict = {} + result["properties"] = from_dict(lambda x: to_class(UIElicitationSchemaProperty, x), self.properties) + result["type"] = to_enum(UIElicitationSchemaType, self.type) + if self.required is not None: + result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsSetAdditionalPluginsRequest: + """Manager-wide additional plugins to register; replaces any previously-configured set.""" + + plugins: list[InstalledPlugin] + """Manager-wide additional plugins to register. Replaces any previously-configured set. Pass + an empty array to clear. + """ + + @staticmethod + def from_dict(obj: Any) -> 'SessionsSetAdditionalPluginsRequest': + assert isinstance(obj, dict) + plugins = from_list(InstalledPlugin.from_dict, obj.get("plugins")) + return SessionsSetAdditionalPluginsRequest(plugins) + + def to_dict(self) -> dict: + result: dict = {} + result["plugins"] = from_list(lambda x: to_class(InstalledPlugin, x), self.plugins) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionOpenOptions: + """Session construction options. + + Session resume options. + + Session options for the connection. + + Session options for cloud session creation. + + Session construction options for the new local session. + """ + additional_content_exclusion_policies: list[SessionOpenOptionsAdditionalContentExclusionPolicy] | None = None + """Additional content-exclusion policies to merge into the session policy set.""" + + agent_context: str | None = None + """Runtime context discriminator for agent filtering.""" + + ask_user_disabled: bool | None = None + """Whether ask_user is explicitly disabled.""" + + auth_info: AuthInfo | None = None + """Initial authentication info for the session.""" + + available_tools: list[str] | None = None + """Allowlist of available tool names.""" + + client_kind: str | None = None + """Structured client kind used for runtime behavior gates.""" + + client_name: str | None = None + """Identifier of the client driving the session.""" + + coauthor_enabled: bool | None = None + """Whether commit-message coauthor trailers are enabled.""" + + config_dir: str | None = None + """Override Copilot configuration directory.""" + + continue_on_auto_mode: bool | None = None + """Whether auto-mode continuation is enabled.""" + + copilot_url: str | None = None + """Override URL for the Copilot API endpoint.""" + + custom_agents_local_only: bool | None = None + """Whether custom agents default to local-only execution.""" + + detached_from_spawning_parent_engagement_id: str | None = None + """Parent engagement ID for detached child telemetry rollup.""" + + detached_from_spawning_parent_session_id: str | None = None + """Parent session ID for detached child telemetry rollup.""" + + disabled_instruction_sources: list[str] | None = None + """Instruction source IDs disabled for this session.""" + + disabled_skills: list[str] | None = None + """Skill IDs disabled for this session.""" + + enable_on_demand_instruction_discovery: bool | None = None + """Whether on-demand custom instruction discovery is enabled.""" + + enable_script_safety: bool | None = None + """Whether shell-script safety heuristics are enabled.""" + + enable_streaming: bool | None = None + """Whether model responses stream as delta events.""" + + env_value_mode: MCPSetEnvValueModeDetails | None = None + """How MCP server environment values are interpreted.""" + + events_log_directory: str | None = None + """Override directory for session event logs.""" + + excluded_tools: list[str] | None = None + """Denylist of tool names.""" + + feature_flags: dict[str, bool] | None = None + """Feature-flag values resolved by the host.""" + + installed_plugins: list[InstalledPlugin] | None = None + """Installed plugins visible to the session.""" + + integration_id: str | None = None + """Stable integration identifier for analytics.""" + + is_experimental_mode: bool | None = None + """Whether experimental behavior is enabled.""" + + log_interactive_shells: bool | None = None + """Whether interactive shell sessions are logged.""" + + lsp_client_name: str | None = None + """Identifier sent to LSP-style integrations.""" + + model: str | None = None + """Initial model identifier.""" + + model_capabilities_overrides: ModelCapabilitiesOverride | None = None + """Initial model capability overrides.""" + + name: str | None = None + """Optional human-friendly session name.""" + + provider: ProviderConfig | None = None + """Custom model-provider configuration (BYOK).""" + + reasoning_effort: str | None = None + """Initial reasoning effort level.""" + + reasoning_summary: ReasoningSummary | None = None + """Initial reasoning summary mode for supported model clients.""" + + remote_defaulted_on: bool | None = None + """Telemetry-only remote-defaulted flag.""" + + remote_exporting: bool | None = None + """Telemetry-only remote exporting flag.""" - progress: TaskProgress | None = None - """Progress information for the task, discriminated by type. Returns null when no task with - this ID is currently tracked. - """ + remote_steerable: bool | None = None + """Whether this session supports remote steering.""" - @staticmethod - def from_dict(obj: Any) -> 'TasksGetProgressResult': - assert isinstance(obj, dict) - progress = from_union([TaskProgress.from_dict, from_none], obj.get("progress")) - return TasksGetProgressResult(progress) + running_in_interactive_mode: bool | None = None + """Whether the host is an interactive UI.""" - def to_dict(self) -> dict: - result: dict = {} - if self.progress is not None: - result["progress"] = from_union([lambda x: to_class(TaskProgress, x), from_none], self.progress) - return result + sandbox_config: SandboxConfig | None = None + """Resolved sandbox configuration.""" -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class UIElicitationSchema: - """JSON Schema describing the form fields to present to the user""" + session_capabilities: list[SessionCapability] | None = None + """Capabilities enabled for this session.""" - properties: dict[str, UIElicitationSchemaProperty] - """Form field definitions, keyed by field name""" + session_id: str | None = None + """Optional stable session identifier to use for a new session.""" - type: UIElicitationSchemaType - """Schema type indicator (always 'object')""" + shell_init_profile: str | None = None + """Shell init profile.""" - required: list[str] | None = None - """List of required field names""" + shell_process_flags: list[str] | None = None + """Per-shell process flags.""" - @staticmethod - def from_dict(obj: Any) -> 'UIElicitationSchema': - assert isinstance(obj, dict) - properties = from_dict(UIElicitationSchemaProperty.from_dict, obj.get("properties")) - type = UIElicitationSchemaType(obj.get("type")) - required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) - return UIElicitationSchema(properties, type, required) + skill_directories: list[str] | None = None + """Additional directories to search for skills.""" - def to_dict(self) -> dict: - result: dict = {} - result["properties"] = from_dict(lambda x: to_class(UIElicitationSchemaProperty, x), self.properties) - result["type"] = to_enum(UIElicitationSchemaType, self.type) - if self.required is not None: - result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) - return result + skip_custom_instructions: bool | None = None + """Whether to skip custom instruction sources.""" -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class SessionsSetAdditionalPluginsRequest: - """Manager-wide additional plugins to register; replaces any previously-configured set.""" + trajectory_file: str | None = None + """Optional trajectory output file path.""" - plugins: list[InstalledPlugin] - """Manager-wide additional plugins to register. Replaces any previously-configured set. Pass - an empty array to clear. - """ + working_directory: str | None = None + """Working directory to anchor the session.""" + + working_directory_context: SessionContext | None = None + """Pre-resolved working-directory context for session startup.""" @staticmethod - def from_dict(obj: Any) -> 'SessionsSetAdditionalPluginsRequest': + def from_dict(obj: Any) -> 'SessionOpenOptions': assert isinstance(obj, dict) - plugins = from_list(InstalledPlugin.from_dict, obj.get("plugins")) - return SessionsSetAdditionalPluginsRequest(plugins) + additional_content_exclusion_policies = from_union([lambda x: from_list(SessionOpenOptionsAdditionalContentExclusionPolicy.from_dict, x), from_none], obj.get("additionalContentExclusionPolicies")) + agent_context = from_union([from_str, from_none], obj.get("agentContext")) + ask_user_disabled = from_union([from_bool, from_none], obj.get("askUserDisabled")) + auth_info = from_union([_load_AuthInfo, from_none], obj.get("authInfo")) + available_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("availableTools")) + client_kind = from_union([from_str, from_none], obj.get("clientKind")) + client_name = from_union([from_str, from_none], obj.get("clientName")) + coauthor_enabled = from_union([from_bool, from_none], obj.get("coauthorEnabled")) + config_dir = from_union([from_str, from_none], obj.get("configDir")) + continue_on_auto_mode = from_union([from_bool, from_none], obj.get("continueOnAutoMode")) + copilot_url = from_union([from_str, from_none], obj.get("copilotUrl")) + custom_agents_local_only = from_union([from_bool, from_none], obj.get("customAgentsLocalOnly")) + detached_from_spawning_parent_engagement_id = from_union([from_str, from_none], obj.get("detachedFromSpawningParentEngagementId")) + detached_from_spawning_parent_session_id = from_union([from_str, from_none], obj.get("detachedFromSpawningParentSessionId")) + disabled_instruction_sources = from_union([lambda x: from_list(from_str, x), from_none], obj.get("disabledInstructionSources")) + disabled_skills = from_union([lambda x: from_list(from_str, x), from_none], obj.get("disabledSkills")) + enable_on_demand_instruction_discovery = from_union([from_bool, from_none], obj.get("enableOnDemandInstructionDiscovery")) + enable_script_safety = from_union([from_bool, from_none], obj.get("enableScriptSafety")) + enable_streaming = from_union([from_bool, from_none], obj.get("enableStreaming")) + env_value_mode = from_union([MCPSetEnvValueModeDetails, from_none], obj.get("envValueMode")) + events_log_directory = from_union([from_str, from_none], obj.get("eventsLogDirectory")) + excluded_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("excludedTools")) + feature_flags = from_union([lambda x: from_dict(from_bool, x), from_none], obj.get("featureFlags")) + installed_plugins = from_union([lambda x: from_list(InstalledPlugin.from_dict, x), from_none], obj.get("installedPlugins")) + integration_id = from_union([from_str, from_none], obj.get("integrationId")) + is_experimental_mode = from_union([from_bool, from_none], obj.get("isExperimentalMode")) + log_interactive_shells = from_union([from_bool, from_none], obj.get("logInteractiveShells")) + lsp_client_name = from_union([from_str, from_none], obj.get("lspClientName")) + model = from_union([from_str, from_none], obj.get("model")) + model_capabilities_overrides = from_union([ModelCapabilitiesOverride.from_dict, from_none], obj.get("modelCapabilitiesOverrides")) + name = from_union([from_str, from_none], obj.get("name")) + provider = from_union([ProviderConfig.from_dict, from_none], obj.get("provider")) + reasoning_effort = from_union([from_str, from_none], obj.get("reasoningEffort")) + reasoning_summary = from_union([ReasoningSummary, from_none], obj.get("reasoningSummary")) + remote_defaulted_on = from_union([from_bool, from_none], obj.get("remoteDefaultedOn")) + remote_exporting = from_union([from_bool, from_none], obj.get("remoteExporting")) + remote_steerable = from_union([from_bool, from_none], obj.get("remoteSteerable")) + running_in_interactive_mode = from_union([from_bool, from_none], obj.get("runningInInteractiveMode")) + sandbox_config = from_union([SandboxConfig.from_dict, from_none], obj.get("sandboxConfig")) + session_capabilities = from_union([lambda x: from_list(SessionCapability, x), from_none], obj.get("sessionCapabilities")) + session_id = from_union([from_str, from_none], obj.get("sessionId")) + shell_init_profile = from_union([from_str, from_none], obj.get("shellInitProfile")) + shell_process_flags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("shellProcessFlags")) + skill_directories = from_union([lambda x: from_list(from_str, x), from_none], obj.get("skillDirectories")) + skip_custom_instructions = from_union([from_bool, from_none], obj.get("skipCustomInstructions")) + trajectory_file = from_union([from_str, from_none], obj.get("trajectoryFile")) + working_directory = from_union([from_str, from_none], obj.get("workingDirectory")) + working_directory_context = from_union([SessionContext.from_dict, from_none], obj.get("workingDirectoryContext")) + return SessionOpenOptions(additional_content_exclusion_policies, agent_context, ask_user_disabled, auth_info, available_tools, client_kind, client_name, coauthor_enabled, config_dir, continue_on_auto_mode, copilot_url, custom_agents_local_only, detached_from_spawning_parent_engagement_id, detached_from_spawning_parent_session_id, disabled_instruction_sources, disabled_skills, enable_on_demand_instruction_discovery, enable_script_safety, enable_streaming, env_value_mode, events_log_directory, excluded_tools, feature_flags, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, model, model_capabilities_overrides, name, provider, reasoning_effort, reasoning_summary, remote_defaulted_on, remote_exporting, remote_steerable, running_in_interactive_mode, sandbox_config, session_capabilities, session_id, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, trajectory_file, working_directory, working_directory_context) def to_dict(self) -> dict: result: dict = {} - result["plugins"] = from_list(lambda x: to_class(InstalledPlugin, x), self.plugins) + if self.additional_content_exclusion_policies is not None: + result["additionalContentExclusionPolicies"] = from_union([lambda x: from_list(lambda x: to_class(SessionOpenOptionsAdditionalContentExclusionPolicy, x), x), from_none], self.additional_content_exclusion_policies) + if self.agent_context is not None: + result["agentContext"] = from_union([from_str, from_none], self.agent_context) + if self.ask_user_disabled is not None: + result["askUserDisabled"] = from_union([from_bool, from_none], self.ask_user_disabled) + if self.auth_info is not None: + result["authInfo"] = from_union([lambda x: (x).to_dict(), from_none], self.auth_info) + if self.available_tools is not None: + result["availableTools"] = from_union([lambda x: from_list(from_str, x), from_none], self.available_tools) + if self.client_kind is not None: + result["clientKind"] = from_union([from_str, from_none], self.client_kind) + if self.client_name is not None: + result["clientName"] = from_union([from_str, from_none], self.client_name) + if self.coauthor_enabled is not None: + result["coauthorEnabled"] = from_union([from_bool, from_none], self.coauthor_enabled) + if self.config_dir is not None: + result["configDir"] = from_union([from_str, from_none], self.config_dir) + if self.continue_on_auto_mode is not None: + result["continueOnAutoMode"] = from_union([from_bool, from_none], self.continue_on_auto_mode) + if self.copilot_url is not None: + result["copilotUrl"] = from_union([from_str, from_none], self.copilot_url) + if self.custom_agents_local_only is not None: + result["customAgentsLocalOnly"] = from_union([from_bool, from_none], self.custom_agents_local_only) + if self.detached_from_spawning_parent_engagement_id is not None: + result["detachedFromSpawningParentEngagementId"] = from_union([from_str, from_none], self.detached_from_spawning_parent_engagement_id) + if self.detached_from_spawning_parent_session_id is not None: + result["detachedFromSpawningParentSessionId"] = from_union([from_str, from_none], self.detached_from_spawning_parent_session_id) + if self.disabled_instruction_sources is not None: + result["disabledInstructionSources"] = from_union([lambda x: from_list(from_str, x), from_none], self.disabled_instruction_sources) + if self.disabled_skills is not None: + result["disabledSkills"] = from_union([lambda x: from_list(from_str, x), from_none], self.disabled_skills) + if self.enable_on_demand_instruction_discovery is not None: + result["enableOnDemandInstructionDiscovery"] = from_union([from_bool, from_none], self.enable_on_demand_instruction_discovery) + if self.enable_script_safety is not None: + result["enableScriptSafety"] = from_union([from_bool, from_none], self.enable_script_safety) + if self.enable_streaming is not None: + result["enableStreaming"] = from_union([from_bool, from_none], self.enable_streaming) + if self.env_value_mode is not None: + result["envValueMode"] = from_union([lambda x: to_enum(MCPSetEnvValueModeDetails, x), from_none], self.env_value_mode) + if self.events_log_directory is not None: + result["eventsLogDirectory"] = from_union([from_str, from_none], self.events_log_directory) + if self.excluded_tools is not None: + result["excludedTools"] = from_union([lambda x: from_list(from_str, x), from_none], self.excluded_tools) + if self.feature_flags is not None: + result["featureFlags"] = from_union([lambda x: from_dict(from_bool, x), from_none], self.feature_flags) + if self.installed_plugins is not None: + result["installedPlugins"] = from_union([lambda x: from_list(lambda x: to_class(InstalledPlugin, x), x), from_none], self.installed_plugins) + if self.integration_id is not None: + result["integrationId"] = from_union([from_str, from_none], self.integration_id) + if self.is_experimental_mode is not None: + result["isExperimentalMode"] = from_union([from_bool, from_none], self.is_experimental_mode) + if self.log_interactive_shells is not None: + result["logInteractiveShells"] = from_union([from_bool, from_none], self.log_interactive_shells) + if self.lsp_client_name is not None: + result["lspClientName"] = from_union([from_str, from_none], self.lsp_client_name) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.model_capabilities_overrides is not None: + result["modelCapabilitiesOverrides"] = from_union([lambda x: to_class(ModelCapabilitiesOverride, x), from_none], self.model_capabilities_overrides) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.provider is not None: + result["provider"] = from_union([lambda x: to_class(ProviderConfig, x), from_none], self.provider) + 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) + if self.remote_defaulted_on is not None: + result["remoteDefaultedOn"] = from_union([from_bool, from_none], self.remote_defaulted_on) + if self.remote_exporting is not None: + result["remoteExporting"] = from_union([from_bool, from_none], self.remote_exporting) + if self.remote_steerable is not None: + result["remoteSteerable"] = from_union([from_bool, from_none], self.remote_steerable) + if self.running_in_interactive_mode is not None: + result["runningInInteractiveMode"] = from_union([from_bool, from_none], self.running_in_interactive_mode) + if self.sandbox_config is not None: + result["sandboxConfig"] = from_union([lambda x: to_class(SandboxConfig, x), from_none], self.sandbox_config) + if self.session_capabilities is not None: + result["sessionCapabilities"] = from_union([lambda x: from_list(lambda x: to_enum(SessionCapability, x), x), from_none], self.session_capabilities) + if self.session_id is not None: + result["sessionId"] = from_union([from_str, from_none], self.session_id) + if self.shell_init_profile is not None: + result["shellInitProfile"] = from_union([from_str, from_none], self.shell_init_profile) + if self.shell_process_flags is not None: + result["shellProcessFlags"] = from_union([lambda x: from_list(from_str, x), from_none], self.shell_process_flags) + if self.skill_directories is not None: + result["skillDirectories"] = from_union([lambda x: from_list(from_str, x), from_none], self.skill_directories) + if self.skip_custom_instructions is not None: + result["skipCustomInstructions"] = from_union([from_bool, from_none], self.skip_custom_instructions) + if self.trajectory_file is not None: + result["trajectoryFile"] = from_union([from_str, from_none], self.trajectory_file) + if self.working_directory is not None: + result["workingDirectory"] = from_union([from_str, from_none], self.working_directory) + if self.working_directory_context is not None: + result["workingDirectoryContext"] = from_union([lambda x: to_class(SessionContext, x), from_none], self.working_directory_context) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -14664,10 +17732,9 @@ def to_dict(self) -> dict: class SessionUpdateOptionsParams: """Patch of mutable session options to apply to the running session.""" - additional_content_exclusion_policies: list[Any] | None = None - """Additional content-exclusion policies to merge into the session's policy set. Opaque - shape; see `ContentExclusionApiResponse` in the runtime. - """ + additional_content_exclusion_policies: list[OptionsUpdateAdditionalContentExclusionPolicy] | None = None + """Additional content-exclusion policies to merge into the session's policy set.""" + agent_context: str | None = None """Runtime context discriminator (e.g., `cli`, `actions`).""" @@ -14683,6 +17750,11 @@ class SessionUpdateOptionsParams: coauthor_enabled: bool | None = None """Whether to include the `Co-authored-by` trailer in commit messages.""" + context_tier: OptionsUpdateContextTier | None = None + """Context tier for models with tiered pricing. The session uses this to derive effective + `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits + honor the selected tier. + """ continue_on_auto_mode: bool | None = None """Whether to allow auto-mode continuation across turns.""" @@ -14765,22 +17837,32 @@ class SessionUpdateOptionsParams: model: str | None = None """The model ID to use for assistant turns.""" + model_capabilities_overrides: ModelCapabilitiesOverride | None = None + """Per-property model capability overrides for the selected model.""" + organization_custom_instructions: str | None = None """Organization-level custom instructions to inject into the system prompt.""" - provider: Any = None - """Custom model-provider configuration (BYOK). Opaque shape; see `ProviderConfig` in the - runtime. - """ + provider: ProviderConfig | None = None + """Custom model-provider configuration (BYOK).""" + reasoning_effort: str | None = None """Reasoning effort for the selected model (model-defined enum).""" + reasoning_summary: ReasoningSummary | None = None + """Reasoning summary mode for supported model clients.""" + running_in_interactive_mode: bool | None = None """Whether the session is running in an interactive UI.""" - sandbox_config: Any = None - """Sandbox configuration shape; opaque to SDK consumers. See `SandboxConfig` in the runtime.""" + sandbox_config: SandboxConfig | None = None + """Resolved sandbox configuration.""" + session_capabilities: list[SessionCapability] | None = None + """Replaces the session's capability set with the given list. Use to enable or disable + capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the + field to leave the existing capability set unchanged. + """ shell_init_profile: str | None = None """Shell init profile (`None` or `NonInteractive`).""" @@ -14814,12 +17896,13 @@ class SessionUpdateOptionsParams: @staticmethod def from_dict(obj: Any) -> 'SessionUpdateOptionsParams': assert isinstance(obj, dict) - additional_content_exclusion_policies = from_union([lambda x: from_list(lambda x: x, x), from_none], obj.get("additionalContentExclusionPolicies")) + additional_content_exclusion_policies = from_union([lambda x: from_list(OptionsUpdateAdditionalContentExclusionPolicy.from_dict, x), from_none], obj.get("additionalContentExclusionPolicies")) agent_context = from_union([from_str, from_none], obj.get("agentContext")) ask_user_disabled = from_union([from_bool, from_none], obj.get("askUserDisabled")) available_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("availableTools")) client_name = from_union([from_str, from_none], obj.get("clientName")) coauthor_enabled = from_union([from_bool, from_none], obj.get("coauthorEnabled")) + context_tier = from_union([OptionsUpdateContextTier, from_none], obj.get("contextTier")) continue_on_auto_mode = from_union([from_bool, from_none], obj.get("continueOnAutoMode")) copilot_url = from_union([from_str, from_none], obj.get("copilotUrl")) custom_agents_local_only = from_union([from_bool, from_none], obj.get("customAgentsLocalOnly")) @@ -14844,11 +17927,14 @@ def from_dict(obj: Any) -> 'SessionUpdateOptionsParams': lsp_client_name = from_union([from_str, from_none], obj.get("lspClientName")) manage_schedule_enabled = from_union([from_bool, from_none], obj.get("manageScheduleEnabled")) model = from_union([from_str, from_none], obj.get("model")) + model_capabilities_overrides = from_union([ModelCapabilitiesOverride.from_dict, from_none], obj.get("modelCapabilitiesOverrides")) organization_custom_instructions = from_union([from_str, from_none], obj.get("organizationCustomInstructions")) - provider = obj.get("provider") + provider = from_union([ProviderConfig.from_dict, from_none], obj.get("provider")) reasoning_effort = from_union([from_str, from_none], obj.get("reasoningEffort")) + reasoning_summary = from_union([ReasoningSummary, from_none], obj.get("reasoningSummary")) running_in_interactive_mode = from_union([from_bool, from_none], obj.get("runningInInteractiveMode")) - sandbox_config = obj.get("sandboxConfig") + sandbox_config = from_union([SandboxConfig.from_dict, from_none], obj.get("sandboxConfig")) + session_capabilities = from_union([lambda x: from_list(SessionCapability, x), from_none], obj.get("sessionCapabilities")) shell_init_profile = from_union([from_str, from_none], obj.get("shellInitProfile")) shell_process_flags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("shellProcessFlags")) skill_directories = from_union([lambda x: from_list(from_str, x), from_none], obj.get("skillDirectories")) @@ -14858,12 +17944,12 @@ def from_dict(obj: Any) -> 'SessionUpdateOptionsParams': tool_filter_precedence = from_union([OptionsUpdateToolFilterPrecedence, from_none], obj.get("toolFilterPrecedence")) trajectory_file = from_union([from_str, from_none], obj.get("trajectoryFile")) working_directory = from_union([from_str, from_none], obj.get("workingDirectory")) - return SessionUpdateOptionsParams(additional_content_exclusion_policies, agent_context, ask_user_disabled, available_tools, client_name, coauthor_enabled, continue_on_auto_mode, copilot_url, custom_agents_local_only, disabled_instruction_sources, disabled_skills, enable_file_hooks, enable_host_git_operations, enable_on_demand_instruction_discovery, enable_reasoning_summaries, enable_script_safety, enable_session_store, enable_skills, enable_streaming, env_value_mode, events_log_directory, excluded_tools, feature_flags, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, manage_schedule_enabled, model, organization_custom_instructions, provider, reasoning_effort, running_in_interactive_mode, sandbox_config, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, skip_embedding_retrieval, suppress_custom_agent_prompt, tool_filter_precedence, trajectory_file, working_directory) + return SessionUpdateOptionsParams(additional_content_exclusion_policies, agent_context, ask_user_disabled, available_tools, client_name, coauthor_enabled, context_tier, continue_on_auto_mode, copilot_url, custom_agents_local_only, disabled_instruction_sources, disabled_skills, enable_file_hooks, enable_host_git_operations, enable_on_demand_instruction_discovery, enable_reasoning_summaries, enable_script_safety, enable_session_store, enable_skills, enable_streaming, env_value_mode, events_log_directory, excluded_tools, feature_flags, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, manage_schedule_enabled, model, model_capabilities_overrides, organization_custom_instructions, provider, reasoning_effort, reasoning_summary, running_in_interactive_mode, sandbox_config, session_capabilities, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, skip_embedding_retrieval, suppress_custom_agent_prompt, tool_filter_precedence, trajectory_file, working_directory) def to_dict(self) -> dict: result: dict = {} if self.additional_content_exclusion_policies is not None: - result["additionalContentExclusionPolicies"] = from_union([lambda x: from_list(lambda x: x, x), from_none], self.additional_content_exclusion_policies) + result["additionalContentExclusionPolicies"] = from_union([lambda x: from_list(lambda x: to_class(OptionsUpdateAdditionalContentExclusionPolicy, x), x), from_none], self.additional_content_exclusion_policies) if self.agent_context is not None: result["agentContext"] = from_union([from_str, from_none], self.agent_context) if self.ask_user_disabled is not None: @@ -14874,6 +17960,8 @@ def to_dict(self) -> dict: result["clientName"] = from_union([from_str, from_none], self.client_name) if self.coauthor_enabled is not None: result["coauthorEnabled"] = from_union([from_bool, from_none], self.coauthor_enabled) + if self.context_tier is not None: + result["contextTier"] = from_union([lambda x: to_enum(OptionsUpdateContextTier, x), from_none], self.context_tier) if self.continue_on_auto_mode is not None: result["continueOnAutoMode"] = from_union([from_bool, from_none], self.continue_on_auto_mode) if self.copilot_url is not None: @@ -14922,16 +18010,22 @@ def to_dict(self) -> dict: result["manageScheduleEnabled"] = from_union([from_bool, from_none], self.manage_schedule_enabled) if self.model is not None: result["model"] = from_union([from_str, from_none], self.model) + if self.model_capabilities_overrides is not None: + result["modelCapabilitiesOverrides"] = from_union([lambda x: to_class(ModelCapabilitiesOverride, x), from_none], self.model_capabilities_overrides) if self.organization_custom_instructions is not None: result["organizationCustomInstructions"] = from_union([from_str, from_none], self.organization_custom_instructions) if self.provider is not None: - result["provider"] = self.provider + result["provider"] = from_union([lambda x: to_class(ProviderConfig, x), from_none], self.provider) 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) if self.running_in_interactive_mode is not None: result["runningInInteractiveMode"] = from_union([from_bool, from_none], self.running_in_interactive_mode) if self.sandbox_config is not None: - result["sandboxConfig"] = self.sandbox_config + result["sandboxConfig"] = from_union([lambda x: to_class(SandboxConfig, x), from_none], self.sandbox_config) + if self.session_capabilities is not None: + result["sessionCapabilities"] = from_union([lambda x: from_list(lambda x: to_enum(SessionCapability, x), x), from_none], self.session_capabilities) if self.shell_init_profile is not None: result["shellInitProfile"] = from_union([from_str, from_none], self.shell_init_profile) if self.shell_process_flags is not None: @@ -14954,26 +18048,168 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class UIElicitationRequest: - """Prompt message and JSON schema describing the form fields to elicit from the user.""" +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""" + + requested_schema: UIElicitationSchema + """JSON Schema describing the form fields to present to the user""" + + @staticmethod + def from_dict(obj: Any) -> 'UIElicitationRequest': + assert isinstance(obj, dict) + message = from_str(obj.get("message")) + requested_schema = UIElicitationSchema.from_dict(obj.get("requestedSchema")) + return UIElicitationRequest(message, requested_schema) + + def to_dict(self) -> dict: + result: dict = {} + result["message"] = from_str(self.message) + result["requestedSchema"] = to_class(UIElicitationSchema, self.requested_schema) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsOpenCreate: + """Parameters for creating a new local session.""" + + kind: ClassVar[str] = "create" + """Create a new local session.""" + + emit_start: bool | None = None + """Whether to emit session.start during creation. Defaults to true.""" + + options: SessionOpenOptions | None = None + """Session construction options.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionsOpenCreate': + assert isinstance(obj, dict) + emit_start = from_union([from_bool, from_none], obj.get("emitStart")) + options = from_union([SessionOpenOptions.from_dict, from_none], obj.get("options")) + return SessionsOpenCreate(emit_start, options) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = self.kind + if self.emit_start is not None: + result["emitStart"] = from_union([from_bool, from_none], self.emit_start) + if self.options is not None: + result["options"] = from_union([lambda x: to_class(SessionOpenOptions, x), from_none], self.options) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsOpenRemote: + """Parameters for connecting to a live remote session.""" + + kind: ClassVar[str] = "remote" + """Connect to a live remote session.""" + + remote_session_id: str + """Remote session identifier to connect to.""" + + options: SessionOpenOptions | None = None + """Session options for the connection.""" + + repository: RemoteSessionRepository | None = None + """Repository context for the remote session.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionsOpenRemote': + assert isinstance(obj, dict) + remote_session_id = from_str(obj.get("remoteSessionId")) + options = from_union([SessionOpenOptions.from_dict, from_none], obj.get("options")) + repository = from_union([RemoteSessionRepository.from_dict, from_none], obj.get("repository")) + return SessionsOpenRemote(remote_session_id, options, repository) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = self.kind + result["remoteSessionId"] = from_str(self.remote_session_id) + if self.options is not None: + result["options"] = from_union([lambda x: to_class(SessionOpenOptions, x), from_none], self.options) + if self.repository is not None: + result["repository"] = from_union([lambda x: to_class(RemoteSessionRepository, x), from_none], self.repository) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsOpenResume: + """Parameters for resuming a specific local session.""" + + kind: ClassVar[str] = "resume" + """Resume a specific local session by ID or prefix.""" + + session_id: str + """Session ID or unique prefix to resume.""" + + options: SessionOpenOptions | None = None + """Session resume options.""" + + resume: bool | None = None + """Whether to emit session.resume after loading. Defaults to true.""" + + suppress_resume_workspace_metadata_writeback: bool | None = None + """Suppress workspace.yaml metadata writeback when resuming from an incidental cwd.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionsOpenResume': + assert isinstance(obj, dict) + session_id = from_str(obj.get("sessionId")) + options = from_union([SessionOpenOptions.from_dict, from_none], obj.get("options")) + resume = from_union([from_bool, from_none], obj.get("resume")) + suppress_resume_workspace_metadata_writeback = from_union([from_bool, from_none], obj.get("suppressResumeWorkspaceMetadataWriteback")) + return SessionsOpenResume(session_id, options, resume, suppress_resume_workspace_metadata_writeback) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = self.kind + result["sessionId"] = from_str(self.session_id) + if self.options is not None: + result["options"] = from_union([lambda x: to_class(SessionOpenOptions, x), from_none], self.options) + if self.resume is not None: + result["resume"] = from_union([from_bool, from_none], self.resume) + if self.suppress_resume_workspace_metadata_writeback is not None: + result["suppressResumeWorkspaceMetadataWriteback"] = from_union([from_bool, from_none], self.suppress_resume_workspace_metadata_writeback) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsOpenResumeLast: + """Parameters for resuming the most relevant local session.""" - message: str - """Message describing what information is needed from the user""" + kind: ClassVar[str] = "resumeLast" + """Resume the most relevant existing local session.""" - requested_schema: UIElicitationSchema - """JSON Schema describing the form fields to present to the user""" + context: SessionContext | None = None + """Working-directory context used to choose the most relevant session.""" + + options: SessionOpenOptions | None = None + """Session resume options.""" + + suppress_resume_workspace_metadata_writeback: bool | None = None + """Suppress workspace.yaml metadata writeback when resuming from an incidental cwd.""" @staticmethod - def from_dict(obj: Any) -> 'UIElicitationRequest': + def from_dict(obj: Any) -> 'SessionsOpenResumeLast': assert isinstance(obj, dict) - message = from_str(obj.get("message")) - requested_schema = UIElicitationSchema.from_dict(obj.get("requestedSchema")) - return UIElicitationRequest(message, requested_schema) + context = from_union([SessionContext.from_dict, from_none], obj.get("context")) + options = from_union([SessionOpenOptions.from_dict, from_none], obj.get("options")) + suppress_resume_workspace_metadata_writeback = from_union([from_bool, from_none], obj.get("suppressResumeWorkspaceMetadataWriteback")) + return SessionsOpenResumeLast(context, options, suppress_resume_workspace_metadata_writeback) def to_dict(self) -> dict: result: dict = {} - result["message"] = from_str(self.message) - result["requestedSchema"] = to_class(UIElicitationSchema, self.requested_schema) + result["kind"] = self.kind + if self.context is not None: + result["context"] = from_union([lambda x: to_class(SessionContext, x), from_none], self.context) + if self.options is not None: + result["options"] = from_union([lambda x: to_class(SessionOpenOptions, x), from_none], self.options) + if self.suppress_resume_workspace_metadata_writeback is not None: + result["suppressResumeWorkspaceMetadataWriteback"] = from_union([from_bool, from_none], self.suppress_resume_workspace_metadata_writeback) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -15290,6 +18526,73 @@ def to_dict(self) -> dict: result["serverName"] = from_str(self.server_name) return result +# Experimental: this type is part of an experimental API and may change or be removed. +# Internal: this type is an internal SDK API and is not part of the public surface. +@dataclass +class MCPOauthRespondRequest: + """MCP OAuth request id and optional provider response.""" + + request_id: str + """OAuth request identifier from mcp.oauth_required""" + + provider: Any = None + """In-process OAuthClientProvider instance, or omitted to deny. Marked internal: cannot be + serialized across the JSON-RPC boundary. + """ + + @staticmethod + def from_dict(obj: Any) -> 'MCPOauthRespondRequest': + assert isinstance(obj, dict) + request_id = from_str(obj.get("requestId")) + provider = obj.get("provider") + return MCPOauthRespondRequest(request_id, provider) + + def to_dict(self) -> dict: + result: dict = {} + result["requestId"] = from_str(self.request_id) + if self.provider is not None: + result["provider"] = self.provider + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +# Internal: this type is an internal SDK API and is not part of the public surface. +@dataclass +class MCPRegisterExternalClientRequest: + """Registration parameters for an external MCP client.""" + + client: Any = None + """In-process MCP Client instance. Marked internal: cannot be serialized across the JSON-RPC + boundary. + """ + config: Any = None + """In-process server config (MCPServerConfig) paired with the in-process client/transport. + Marked internal alongside its companions. + """ + server_name: str + """Logical server name for the external client""" + + transport: Any = None + """In-process MCP Transport instance. Marked internal: cannot be serialized across the + JSON-RPC boundary. + """ + + @staticmethod + def from_dict(obj: Any) -> 'MCPRegisterExternalClientRequest': + assert isinstance(obj, dict) + client = obj.get("client") + config = obj.get("config") + server_name = from_str(obj.get("serverName")) + transport = obj.get("transport") + return MCPRegisterExternalClientRequest(client, config, server_name, transport) + + def to_dict(self) -> dict: + result: dict = {} + result["client"] = self.client + result["config"] = self.config + result["serverName"] = from_str(self.server_name) + result["transport"] = self.transport + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MetadataContextInfoRequest: @@ -15562,6 +18865,126 @@ def to_dict(self) -> dict: result["source"] = from_union([lambda x: to_enum(PermissionsSetAAllSource, x), from_none], self.source) return result +# Experimental: this type is part of an experimental API and may change or be removed. +# Internal: this type is an internal SDK API and is not part of the public surface. +@dataclass +class _RegisterExtensionToolsResult: + """Handle for releasing the extension tool registration.""" + + unsubscribe: Any + """In-process unsubscribe function (CLI-only optimization). Marked internal: replaced by an + explicit `extensions.unregister` RPC in the SDK migration. + """ + + @staticmethod + def from_dict(obj: Any) -> '_RegisterExtensionToolsResult': + assert isinstance(obj, dict) + unsubscribe = obj.get("unsubscribe") + return _RegisterExtensionToolsResult(unsubscribe) + + def to_dict(self) -> dict: + result: dict = {} + result["unsubscribe"] = self.unsubscribe + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsOpenCloud: + """Parameters for creating a new cloud session.""" + + kind: ClassVar[str] = "cloud" + """Create a new cloud (coding-agent) session.""" + + # Internal: this field is an internal SDK API and is not part of the public surface. + on_task_created: Any = None + """In-process callback invoked when the cloud task is created (before connection). Marked + internal because a function reference cannot cross the JSON-RPC boundary. Disappears in + the SDK migration: the field is purely cosmetic (it flips a single CLI phase label from + 'creating' to 'connecting') and the wire-clean version just drops the intermediate phase. + """ + options: SessionOpenOptions | None = None + """Session options for cloud session creation.""" + + owner: str | None = None + """Optional owner (user or organization login) to associate with the cloud session when no + repository is provided. Ignored when `repository` is set (the repo's owner takes + precedence). + """ + repository: RemoteSessionRepository | None = None + """Repository for the cloud session.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionsOpenCloud': + assert isinstance(obj, dict) + on_task_created = obj.get("onTaskCreated") + options = from_union([SessionOpenOptions.from_dict, from_none], obj.get("options")) + owner = from_union([from_str, from_none], obj.get("owner")) + repository = from_union([RemoteSessionRepository.from_dict, from_none], obj.get("repository")) + return SessionsOpenCloud(on_task_created, options, owner, repository) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = self.kind + if self.on_task_created is not None: + result["onTaskCreated"] = self.on_task_created + if self.options is not None: + result["options"] = from_union([lambda x: to_class(SessionOpenOptions, x), from_none], self.options) + if self.owner is not None: + result["owner"] = from_union([from_str, from_none], self.owner) + if self.repository is not None: + result["repository"] = from_union([lambda x: to_class(RemoteSessionRepository, x), from_none], self.repository) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionsOpenHandoff: + """Parameters for fetching a remote session and handing it off to a new local session.""" + + kind: ClassVar[str] = "handoff" + """Fetch a remote session and hand it off to a new local session.""" + + metadata: RemoteSessionMetadataValue + """Remote session metadata for the session to hand off (typically obtained from + `sessions.list` with `source: "remote"`). + """ + # Internal: this field is an internal SDK API and is not part of the public surface. + on_progress: Any = None + """In-process progress callback `(update) => void` invoked for each handoff step. Marked + internal because a function reference cannot cross the JSON-RPC boundary. The host-side + `handoffSession` is already declared as `AsyncGenerator`; + the schema layer flattens it because it does not yet support streaming methods. The + wire-clean replacement is to expose the AsyncGenerator directly (or use vscode-jsonrpc + `$/progress` notifications) once the schema/transport layer supports it. + """ + options: SessionOpenOptions | None = None + """Session construction options for the new local session.""" + + task_type: TaskType | None = None + """Task type determines the handoff strategy (CCA fetches events; CLI prepares a transient + session). + """ + + @staticmethod + def from_dict(obj: Any) -> 'SessionsOpenHandoff': + assert isinstance(obj, dict) + metadata = RemoteSessionMetadataValue.from_dict(obj.get("metadata")) + on_progress = obj.get("onProgress") + options = from_union([SessionOpenOptions.from_dict, from_none], obj.get("options")) + task_type = from_union([TaskType, from_none], obj.get("taskType")) + return SessionsOpenHandoff(metadata, on_progress, options, task_type) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = self.kind + result["metadata"] = to_class(RemoteSessionMetadataValue, self.metadata) + if self.on_progress is not None: + result["onProgress"] = self.on_progress + if self.options is not None: + result["options"] = from_union([lambda x: to_class(SessionOpenOptions, x), from_none], self.options) + if self.task_type is not None: + result["taskType"] = from_union([lambda x: to_enum(TaskType, x), from_none], self.task_type) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TaskAgentInfo: @@ -15577,8 +19000,9 @@ class TaskAgentInfo: """Unique task identifier""" prompt: str - """Prompt passed to the agent""" - + """Most recent prompt delivered to the agent. Updated whenever the agent receives a + follow-up message. + """ started_at: datetime """ISO 8601 timestamp when the task was started""" @@ -15696,6 +19120,44 @@ def to_dict(self) -> dict: result["tools"] = from_union([lambda x: from_list(lambda x: to_class(CurrentToolMetadata, x), x), from_none], self.tools) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class UIEphemeralQueryRequest: + """Transient question to answer without adding it to conversation history.""" + + question: str + """Question to answer from the current conversation context.""" + + # Internal: this field is an internal SDK API and is not part of the public surface. + abort_signal: Any = None + """In-process `AbortSignal` forwarded to the model client to cancel an in-flight request. + Marked internal: excluded from the public SDK surface. Replaced by an explicit + cancellation token + cancel RPC in the SDK migration. + """ + # Internal: this field is an internal SDK API and is not part of the public surface. + on_chunk: Any = None + """In-process streaming callback `(text) => void` invoked with each token as the model emits + it. Marked internal: excluded from the public SDK surface. In a process-separated SDK + this is replaced by a streaming RPC that yields chunks and a final answer. + """ + + @staticmethod + def from_dict(obj: Any) -> 'UIEphemeralQueryRequest': + assert isinstance(obj, dict) + question = from_str(obj.get("question")) + abort_signal = obj.get("abortSignal") + on_chunk = obj.get("onChunk") + return UIEphemeralQueryRequest(question, abort_signal, on_chunk) + + def to_dict(self) -> dict: + result: dict = {} + result["question"] = from_str(self.question) + if self.abort_signal is not None: + result["abortSignal"] = self.abort_signal + if self.on_chunk is not None: + result["onChunk"] = self.on_chunk + return result + @dataclass class RPC: abort_request: AbortRequest @@ -15731,6 +19193,7 @@ class RPC: api_key_auth_info: APIKeyAuthInfo auth_info: AuthInfo auth_info_type: AuthInfoType + cancel_user_requested_shell_command_result: CancelUserRequestedShellCommandResult canvas_action: CanvasAction canvas_action_invoke_request: CanvasActionInvokeRequest canvas_action_invoke_result: Any @@ -15754,6 +19217,7 @@ class RPC: commands_list_request: CommandsListRequest commands_respond_to_queued_command_request: CommandsRespondToQueuedCommandRequest commands_respond_to_queued_command_result: CommandsRespondToQueuedCommandResult + configure_session_extensions_params: _ConfigureSessionExtensionsParams connected_remote_session_metadata: ConnectedRemoteSessionMetadata connected_remote_session_metadata_kind: ConnectedRemoteSessionMetadataKind connected_remote_session_metadata_repository: ConnectedRemoteSessionMetadataRepository @@ -15825,6 +19289,7 @@ class RPC: history_truncate_result: HistoryTruncateResult hmac_auth_info: HMACAuthInfo installed_plugin: InstalledPlugin + installed_plugin_info: InstalledPluginInfo installed_plugin_source: InstalledPluginSource | str installed_plugin_source_git_hub: InstalledPluginSourceGitHub installed_plugin_source_local: InstalledPluginSourceLocal @@ -15833,9 +19298,19 @@ class RPC: instructions_sources: InstructionsSources instructions_sources_location: InstructionsSourcesLocation instructions_sources_type: InstructionsSourcesType + local_session_metadata_value: LocalSessionMetadataValue log_request: LogRequest log_result: LogResult lsp_initialize_request: LspInitializeRequest + marketplace_add_result: MarketplaceAddResult + marketplace_browse_result: MarketplaceBrowseResult + marketplace_info: MarketplaceInfo + marketplace_list_result: MarketplaceListResult + marketplace_plugin_info: MarketplacePluginInfo + marketplace_refresh_entry: MarketplaceRefreshEntry + marketplace_refresh_result: MarketplaceRefreshResult + marketplace_remove_result: MarketplaceRemoveResult + mcp_allowed_server: MCPAllowedServer mcp_apps_call_tool_request: MCPAppsCallToolRequest mcp_apps_diagnose_capability: MCPAppsDiagnoseCapability mcp_apps_diagnose_request: MCPAppsDiagnoseRequest @@ -15866,6 +19341,8 @@ class RPC: mcp_config_list: MCPConfigList mcp_config_remove_request: MCPConfigRemoveRequest mcp_config_update_request: MCPConfigUpdateRequest + mcp_configure_git_hub_request: MCPConfigureGitHubRequest + mcp_configure_git_hub_result: MCPConfigureGitHubResult mcp_disable_request: MCPDisableRequest mcp_discover_request: MCPDiscoverRequest mcp_discover_result: MCPDiscoverResult @@ -15873,9 +19350,20 @@ class RPC: mcp_execute_sampling_params: MCPExecuteSamplingParams mcp_execute_sampling_request: dict[str, Any] mcp_execute_sampling_result: dict[str, Any] + mcp_filtered_server: MCPFilteredServer + mcp_host_state: MCPHostState + mcp_is_server_running_request: MCPIsServerRunningRequest + mcp_is_server_running_result: MCPIsServerRunningResult + mcp_list_tools_request: MCPListToolsRequest + mcp_list_tools_result: MCPListToolsResult mcp_oauth_login_request: MCPOauthLoginRequest mcp_oauth_login_result: MCPOauthLoginResult + mcp_oauth_respond_request: MCPOauthRespondRequest + mcp_oauth_respond_result: MCPOauthRespondResult + mcp_register_external_client_request: MCPRegisterExternalClientRequest + mcp_reload_with_config_request: MCPReloadWithConfigRequest mcp_remove_git_hub_result: MCPRemoveGitHubResult + mcp_restart_server_request: MCPRestartServerRequest mcp_sampling_execution_action: MCPSamplingExecutionAction mcp_sampling_execution_result: MCPSamplingExecutionResult mcp_server: MCPServer @@ -15886,10 +19374,17 @@ class RPC: mcp_server_config_http_oauth_grant_type: MCPServerConfigHTTPOauthGrantType mcp_server_config_http_type: MCPServerConfigHTTPType mcp_server_config_stdio: MCPServerConfigStdio + mcp_server_failure_info: MCPServerFailureInfo mcp_server_list: MCPServerList + mcp_server_needs_auth_info: MCPServerNeedsAuthInfo mcp_set_env_value_mode_details: MCPSetEnvValueModeDetails mcp_set_env_value_mode_params: MCPSetEnvValueModeParams mcp_set_env_value_mode_result: MCPSetEnvValueModeResult + mcp_start_server_request: MCPStartServerRequest + mcp_start_servers_result: MCPStartServersResult + mcp_stop_server_request: MCPStopServerRequest + mcp_tools: MCPTools + mcp_unregister_external_client_request: MCPUnregisterExternalClientRequest metadata_context_info_request: MetadataContextInfoRequest metadata_context_info_result: MetadataContextInfoResult metadata_is_processing_result: MetadataIsProcessingResult @@ -15902,7 +19397,7 @@ class RPC: metadata_snapshot_current_mode: MetadataSnapshotCurrentMode metadata_snapshot_remote_metadata: MetadataSnapshotRemoteMetadata metadata_snapshot_remote_metadata_repository: MetadataSnapshotRemoteMetadataRepository - metadata_snapshot_remote_metadata_task_type: MetadataSnapshotRemoteMetadataTaskType + metadata_snapshot_remote_metadata_task_type: TaskType model: Model model_billing: ModelBilling model_billing_token_prices: ModelBillingTokenPrices @@ -15932,7 +19427,13 @@ class RPC: name_set_auto_result: NameSetAutoResult name_set_request: NameSetRequest open_canvas_instance: OpenCanvasInstance + options_update_additional_content_exclusion_policy: OptionsUpdateAdditionalContentExclusionPolicy + options_update_additional_content_exclusion_policy_rule: OptionsUpdateAdditionalContentExclusionPolicyRule + options_update_additional_content_exclusion_policy_rule_source: OptionsUpdateAdditionalContentExclusionPolicyRuleSource + options_update_additional_content_exclusion_policy_scope: AdditionalContentExclusionPolicyScope + options_update_context_tier: OptionsUpdateContextTier options_update_env_value_mode: MCPSetEnvValueModeDetails + options_update_reasoning_summary: ReasoningSummary options_update_tool_filter_precedence: OptionsUpdateToolFilterPrecedence pending_permission_request: PendingPermissionRequest pending_permission_request_list: PendingPermissionRequestList @@ -15993,7 +19494,7 @@ class RPC: permissions_configure_additional_content_exclusion_policy: PermissionsConfigureAdditionalContentExclusionPolicy permissions_configure_additional_content_exclusion_policy_rule: PermissionsConfigureAdditionalContentExclusionPolicyRule permissions_configure_additional_content_exclusion_policy_rule_source: PermissionsConfigureAdditionalContentExclusionPolicyRuleSource - permissions_configure_additional_content_exclusion_policy_scope: PermissionsConfigureAdditionalContentExclusionPolicyScope + permissions_configure_additional_content_exclusion_policy_scope: AdditionalContentExclusionPolicyScope permissions_configure_params: PermissionsConfigureParams permissions_configure_result: PermissionsConfigureResult permissions_folder_trust_add_trusted_result: PermissionsFolderTrustAddTrustedResult @@ -16032,9 +19533,31 @@ class RPC: ping_request: PingRequest ping_result: PingResult plan_read_result: PlanReadResult + plan_read_sql_todos_result: PlanReadSQLTodosResult + plan_sql_todos_row: PlanSQLTodosRow plan_update_request: PlanUpdateRequest plugin: Plugin + plugin_install_result: PluginInstallResult plugin_list: PluginList + plugin_list_result: PluginListResult + plugins_disable_request: PluginsDisableRequest + plugins_enable_request: PluginsEnableRequest + plugins_install_request: PluginsInstallRequest + plugins_marketplaces_add_request: PluginsMarketplacesAddRequest + plugins_marketplaces_browse_request: PluginsMarketplacesBrowseRequest + plugins_marketplaces_refresh_request: PluginsMarketplacesRefreshRequest + plugins_marketplaces_remove_request: PluginsMarketplacesRemoveRequest + plugins_reload_request: PluginsReloadRequest + plugins_uninstall_request: PluginsUninstallRequest + plugins_update_request: PluginsUpdateRequest + plugin_update_all_entry: PluginUpdateAllEntry + plugin_update_all_result: PluginUpdateAllResult + plugin_update_result: PluginUpdateResult + poll_spawned_sessions_result: PollSpawnedSessionsResult + provider_config: ProviderConfig + provider_config_azure: ProviderConfigAzure + provider_config_type: ProviderConfigType + provider_config_wire_api: ProviderConfigWireAPI push_attachment: PushAttachment push_attachment_blob: PushAttachmentBlob push_attachment_directory: PushAttachmentDirectory @@ -16055,13 +19578,35 @@ class RPC: queue_remove_most_recent_result: QueueRemoveMostRecentResult register_event_interest_params: RegisterEventInterestParams register_event_interest_result: RegisterEventInterestResult + register_extension_tools_params: _RegisterExtensionToolsParams + register_extension_tools_result: _RegisterExtensionToolsResult release_event_interest_params: ReleaseEventInterestParams + remote_control_config: RemoteControlConfig + remote_control_config_existing_mc_session: RemoteControlConfigExistingMcSession + remote_control_status: RemoteControlStatus + remote_control_status_active: RemoteControlStatusActive + remote_control_status_connecting: RemoteControlStatusConnecting + remote_control_status_error: RemoteControlStatusError + remote_control_status_off: RemoteControlStatusOff + remote_control_status_result: RemoteControlStatusResult + remote_control_stop_result: RemoteControlStopResult + remote_control_transfer_result: RemoteControlTransferResult remote_enable_request: RemoteEnableRequest remote_enable_result: RemoteEnableResult remote_notify_steerable_changed_request: RemoteNotifySteerableChangedRequest remote_notify_steerable_changed_result: RemoteNotifySteerableChangedResult remote_session_connection_result: RemoteSessionConnectionResult + remote_session_metadata_repository: RemoteSessionMetadataRepository + remote_session_metadata_task_type: TaskType + remote_session_metadata_value: RemoteSessionMetadataValue remote_session_mode: RemoteSessionMode + remote_session_repository: RemoteSessionRepository + sandbox_config: SandboxConfig + sandbox_config_user_policy: SandboxConfigUserPolicy + sandbox_config_user_policy_experimental: SandboxConfigUserPolicyExperimental + sandbox_config_user_policy_experimental_seatbelt: SandboxConfigUserPolicyExperimentalSeatbelt + sandbox_config_user_policy_filesystem: SandboxConfigUserPolicyFilesystem + sandbox_config_user_policy_network: SandboxConfigUserPolicyNetwork schedule_entry: ScheduleEntry schedule_list: ScheduleList schedule_stop_request: ScheduleStopRequest @@ -16075,8 +19620,10 @@ class RPC: send_result: SendResult server_skill: ServerSkill server_skill_list: ServerSkillList + session_activity: SessionActivity session_auth_status: SessionAuthStatus session_bulk_delete_result: SessionBulkDeleteResult + session_capability: SessionCapability session_context: SessionContext session_context_host_type: HostType session_enrich_metadata_result: SessionEnrichMetadataResult @@ -16114,14 +19661,23 @@ class RPC: session_installed_plugin_source_local: SessionInstalledPluginSourceLocal session_installed_plugin_source_url: SessionInstalledPluginSourceURL session_list: SessionList + session_list_entry: SessionListEntry session_list_filter: SessionListFilter session_load_deferred_repo_hooks_result: SessionLoadDeferredRepoHooksResult session_log_level: SessionLogLevel session_mcp_apps_call_tool_result: dict[str, Any] - session_metadata: SessionMetadata session_metadata_snapshot: SessionMetadataSnapshot session_mode: SessionMode session_model_list: SessionModelList + session_open_options: SessionOpenOptions + session_open_options_additional_content_exclusion_policy: SessionOpenOptionsAdditionalContentExclusionPolicy + session_open_options_additional_content_exclusion_policy_rule: SessionOpenOptionsAdditionalContentExclusionPolicyRule + session_open_options_additional_content_exclusion_policy_rule_source: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource + session_open_options_additional_content_exclusion_policy_scope: AdditionalContentExclusionPolicyScope + session_open_options_env_value_mode: MCPSetEnvValueModeDetails + session_open_options_reasoning_summary: ReasoningSummary + session_open_params: SessionOpenParams + session_open_result: SessionOpenResult session_prune_result: SessionPruneResult sessions_bulk_delete_request: SessionsBulkDeleteRequest sessions_check_in_use_request: SessionsCheckInUseRequest @@ -16137,6 +19693,8 @@ class RPC: sessions_find_by_task_id_result: SessionsFindByTaskIDResult sessions_fork_request: SessionsForkRequest sessions_fork_result: SessionsForkResult + sessions_get_board_entry_count_request: SessionsGetBoardEntryCountRequest + sessions_get_board_entry_count_result: SessionsGetBoardEntryCountResult sessions_get_event_file_path_request: SessionsGetEventFilePathRequest sessions_get_event_file_path_result: SessionsGetEventFilePathResult sessions_get_last_for_context_request: SessionsGetLastForContextRequest @@ -16146,7 +19704,23 @@ class RPC: session_sizes: SessionSizes sessions_list_request: SessionsListRequest sessions_load_deferred_repo_hooks_request: SessionsLoadDeferredRepoHooksRequest + sessions_open_attach: SessionsOpenAttach + sessions_open_cloud: SessionsOpenCloud + sessions_open_create: SessionsOpenCreate + sessions_open_handoff: SessionsOpenHandoff + sessions_open_handoff_task_type: TaskType + sessions_open_progress: SessionsOpenProgress + sessions_open_progress_status: SessionsOpenProgressStatus + sessions_open_progress_step: SessionsOpenProgressStep + sessions_open_remote: SessionsOpenRemote + sessions_open_resume: SessionsOpenResume + sessions_open_resume_last: SessionsOpenResumeLast + sessions_open_status: SessionsOpenStatus + session_source: SessionSource + sessions_poll_spawned_sessions_event: SessionsPollSpawnedSessionsEvent + sessions_poll_spawned_sessions_request: SessionsPollSpawnedSessionsRequest sessions_prune_old_request: SessionsPruneOldRequest + sessions_register_extension_tools_on_session_options: SessionsRegisterExtensionToolsOnSessionOptions sessions_release_lock_request: SessionsReleaseLockRequest sessions_release_lock_result: SessionsReleaseLockResult sessions_reload_plugin_hooks_request: SessionsReloadPluginHooksRequest @@ -16155,12 +19729,19 @@ class RPC: sessions_save_result: SessionsSaveResult sessions_set_additional_plugins_request: SessionsSetAdditionalPluginsRequest sessions_set_additional_plugins_result: SessionsSetAdditionalPluginsResult + sessions_set_remote_control_steering_request: SessionsSetRemoteControlSteeringRequest + sessions_start_remote_control_request: SessionsStartRemoteControlRequest + sessions_stop_remote_control_request: SessionsStopRemoteControlRequest + sessions_transfer_remote_control_request: SessionsTransferRemoteControlRequest + session_telemetry_engagement: SessionTelemetryEngagement session_update_options_params: SessionUpdateOptionsParams session_update_options_result: SessionUpdateOptionsResult session_working_directory_context: SessionWorkingDirectoryContext session_working_directory_context_host_type: HostType + shell_cancel_user_requested_request: ShellCancelUserRequestedRequest shell_exec_request: ShellExecRequest shell_exec_result: ShellExecResult + shell_execute_user_requested_request: ShellExecuteUserRequestedRequest shell_kill_request: ShellKillRequest shell_kill_result: ShellKillResult shell_kill_signal: ShellKillSignal @@ -16239,6 +19820,8 @@ class RPC: ui_elicitation_string_enum_field: UIElicitationStringEnumField ui_elicitation_string_one_of_field: UIElicitationStringOneOfField ui_elicitation_string_one_of_field_one_of: UIElicitationStringOneOfFieldOneOf + ui_ephemeral_query_request: UIEphemeralQueryRequest + ui_ephemeral_query_result: UIEphemeralQueryResult ui_exit_plan_mode_action: UIExitPlanModeAction ui_exit_plan_mode_response: UIExitPlanModeResponse ui_handle_pending_auto_mode_switch_request: UIHandlePendingAutoModeSwitchRequest @@ -16260,6 +19843,7 @@ class RPC: usage_metrics_model_metric_usage: UsageMetricsModelMetricUsage usage_metrics_token_detail: UsageMetricsTokenDetail user_auth_info: UserAuthInfo + user_requested_shell_command_result: UserRequestedShellCommandResult workspace_diff_file_change: WorkspaceDiffFileChange workspace_diff_file_change_type: WorkspaceDiffFileChangeType workspace_diff_mode: WorkspaceDiffMode @@ -16318,6 +19902,7 @@ def from_dict(obj: Any) -> 'RPC': api_key_auth_info = APIKeyAuthInfo.from_dict(obj.get("ApiKeyAuthInfo")) auth_info = _load_AuthInfo(obj.get("AuthInfo")) auth_info_type = AuthInfoType(obj.get("AuthInfoType")) + cancel_user_requested_shell_command_result = CancelUserRequestedShellCommandResult.from_dict(obj.get("CancelUserRequestedShellCommandResult")) canvas_action = CanvasAction.from_dict(obj.get("CanvasAction")) canvas_action_invoke_request = CanvasActionInvokeRequest.from_dict(obj.get("CanvasActionInvokeRequest")) canvas_action_invoke_result = obj.get("CanvasActionInvokeResult") @@ -16341,6 +19926,7 @@ def from_dict(obj: Any) -> 'RPC': commands_list_request = CommandsListRequest.from_dict(obj.get("CommandsListRequest")) commands_respond_to_queued_command_request = CommandsRespondToQueuedCommandRequest.from_dict(obj.get("CommandsRespondToQueuedCommandRequest")) commands_respond_to_queued_command_result = CommandsRespondToQueuedCommandResult.from_dict(obj.get("CommandsRespondToQueuedCommandResult")) + configure_session_extensions_params = _ConfigureSessionExtensionsParams.from_dict(obj.get("ConfigureSessionExtensionsParams")) connected_remote_session_metadata = ConnectedRemoteSessionMetadata.from_dict(obj.get("ConnectedRemoteSessionMetadata")) connected_remote_session_metadata_kind = ConnectedRemoteSessionMetadataKind(obj.get("ConnectedRemoteSessionMetadataKind")) connected_remote_session_metadata_repository = ConnectedRemoteSessionMetadataRepository.from_dict(obj.get("ConnectedRemoteSessionMetadataRepository")) @@ -16412,6 +19998,7 @@ def from_dict(obj: Any) -> 'RPC': history_truncate_result = HistoryTruncateResult.from_dict(obj.get("HistoryTruncateResult")) hmac_auth_info = HMACAuthInfo.from_dict(obj.get("HMACAuthInfo")) installed_plugin = InstalledPlugin.from_dict(obj.get("InstalledPlugin")) + installed_plugin_info = InstalledPluginInfo.from_dict(obj.get("InstalledPluginInfo")) installed_plugin_source = from_union([InstalledPluginSource.from_dict, from_str], obj.get("InstalledPluginSource")) installed_plugin_source_git_hub = InstalledPluginSourceGitHub.from_dict(obj.get("InstalledPluginSourceGitHub")) installed_plugin_source_local = InstalledPluginSourceLocal.from_dict(obj.get("InstalledPluginSourceLocal")) @@ -16420,9 +20007,19 @@ def from_dict(obj: Any) -> 'RPC': instructions_sources = InstructionsSources.from_dict(obj.get("InstructionsSources")) instructions_sources_location = InstructionsSourcesLocation(obj.get("InstructionsSourcesLocation")) instructions_sources_type = InstructionsSourcesType(obj.get("InstructionsSourcesType")) + local_session_metadata_value = LocalSessionMetadataValue.from_dict(obj.get("LocalSessionMetadataValue")) log_request = LogRequest.from_dict(obj.get("LogRequest")) log_result = LogResult.from_dict(obj.get("LogResult")) lsp_initialize_request = LspInitializeRequest.from_dict(obj.get("LspInitializeRequest")) + marketplace_add_result = MarketplaceAddResult.from_dict(obj.get("MarketplaceAddResult")) + marketplace_browse_result = MarketplaceBrowseResult.from_dict(obj.get("MarketplaceBrowseResult")) + marketplace_info = MarketplaceInfo.from_dict(obj.get("MarketplaceInfo")) + marketplace_list_result = MarketplaceListResult.from_dict(obj.get("MarketplaceListResult")) + marketplace_plugin_info = MarketplacePluginInfo.from_dict(obj.get("MarketplacePluginInfo")) + marketplace_refresh_entry = MarketplaceRefreshEntry.from_dict(obj.get("MarketplaceRefreshEntry")) + marketplace_refresh_result = MarketplaceRefreshResult.from_dict(obj.get("MarketplaceRefreshResult")) + marketplace_remove_result = MarketplaceRemoveResult.from_dict(obj.get("MarketplaceRemoveResult")) + mcp_allowed_server = MCPAllowedServer.from_dict(obj.get("McpAllowedServer")) mcp_apps_call_tool_request = MCPAppsCallToolRequest.from_dict(obj.get("McpAppsCallToolRequest")) mcp_apps_diagnose_capability = MCPAppsDiagnoseCapability.from_dict(obj.get("McpAppsDiagnoseCapability")) mcp_apps_diagnose_request = MCPAppsDiagnoseRequest.from_dict(obj.get("McpAppsDiagnoseRequest")) @@ -16453,6 +20050,8 @@ def from_dict(obj: Any) -> 'RPC': mcp_config_list = MCPConfigList.from_dict(obj.get("McpConfigList")) mcp_config_remove_request = MCPConfigRemoveRequest.from_dict(obj.get("McpConfigRemoveRequest")) mcp_config_update_request = MCPConfigUpdateRequest.from_dict(obj.get("McpConfigUpdateRequest")) + mcp_configure_git_hub_request = MCPConfigureGitHubRequest.from_dict(obj.get("McpConfigureGitHubRequest")) + mcp_configure_git_hub_result = MCPConfigureGitHubResult.from_dict(obj.get("McpConfigureGitHubResult")) mcp_disable_request = MCPDisableRequest.from_dict(obj.get("McpDisableRequest")) mcp_discover_request = MCPDiscoverRequest.from_dict(obj.get("McpDiscoverRequest")) mcp_discover_result = MCPDiscoverResult.from_dict(obj.get("McpDiscoverResult")) @@ -16460,9 +20059,20 @@ def from_dict(obj: Any) -> 'RPC': mcp_execute_sampling_params = MCPExecuteSamplingParams.from_dict(obj.get("McpExecuteSamplingParams")) mcp_execute_sampling_request = from_dict(lambda x: x, obj.get("McpExecuteSamplingRequest")) mcp_execute_sampling_result = from_dict(lambda x: x, obj.get("McpExecuteSamplingResult")) + mcp_filtered_server = MCPFilteredServer.from_dict(obj.get("McpFilteredServer")) + mcp_host_state = MCPHostState.from_dict(obj.get("McpHostState")) + mcp_is_server_running_request = MCPIsServerRunningRequest.from_dict(obj.get("McpIsServerRunningRequest")) + mcp_is_server_running_result = MCPIsServerRunningResult.from_dict(obj.get("McpIsServerRunningResult")) + mcp_list_tools_request = MCPListToolsRequest.from_dict(obj.get("McpListToolsRequest")) + mcp_list_tools_result = MCPListToolsResult.from_dict(obj.get("McpListToolsResult")) mcp_oauth_login_request = MCPOauthLoginRequest.from_dict(obj.get("McpOauthLoginRequest")) mcp_oauth_login_result = MCPOauthLoginResult.from_dict(obj.get("McpOauthLoginResult")) + mcp_oauth_respond_request = MCPOauthRespondRequest.from_dict(obj.get("McpOauthRespondRequest")) + mcp_oauth_respond_result = MCPOauthRespondResult.from_dict(obj.get("McpOauthRespondResult")) + mcp_register_external_client_request = MCPRegisterExternalClientRequest.from_dict(obj.get("McpRegisterExternalClientRequest")) + mcp_reload_with_config_request = MCPReloadWithConfigRequest.from_dict(obj.get("McpReloadWithConfigRequest")) mcp_remove_git_hub_result = MCPRemoveGitHubResult.from_dict(obj.get("McpRemoveGitHubResult")) + mcp_restart_server_request = MCPRestartServerRequest.from_dict(obj.get("McpRestartServerRequest")) mcp_sampling_execution_action = MCPSamplingExecutionAction(obj.get("McpSamplingExecutionAction")) mcp_sampling_execution_result = MCPSamplingExecutionResult.from_dict(obj.get("McpSamplingExecutionResult")) mcp_server = MCPServer.from_dict(obj.get("McpServer")) @@ -16473,10 +20083,17 @@ def from_dict(obj: Any) -> 'RPC': mcp_server_config_http_oauth_grant_type = MCPServerConfigHTTPOauthGrantType(obj.get("McpServerConfigHttpOauthGrantType")) mcp_server_config_http_type = MCPServerConfigHTTPType(obj.get("McpServerConfigHttpType")) mcp_server_config_stdio = MCPServerConfigStdio.from_dict(obj.get("McpServerConfigStdio")) + mcp_server_failure_info = MCPServerFailureInfo.from_dict(obj.get("McpServerFailureInfo")) mcp_server_list = MCPServerList.from_dict(obj.get("McpServerList")) + mcp_server_needs_auth_info = MCPServerNeedsAuthInfo.from_dict(obj.get("McpServerNeedsAuthInfo")) mcp_set_env_value_mode_details = MCPSetEnvValueModeDetails(obj.get("McpSetEnvValueModeDetails")) mcp_set_env_value_mode_params = MCPSetEnvValueModeParams.from_dict(obj.get("McpSetEnvValueModeParams")) mcp_set_env_value_mode_result = MCPSetEnvValueModeResult.from_dict(obj.get("McpSetEnvValueModeResult")) + mcp_start_server_request = MCPStartServerRequest.from_dict(obj.get("McpStartServerRequest")) + mcp_start_servers_result = MCPStartServersResult.from_dict(obj.get("McpStartServersResult")) + mcp_stop_server_request = MCPStopServerRequest.from_dict(obj.get("McpStopServerRequest")) + mcp_tools = MCPTools.from_dict(obj.get("McpTools")) + mcp_unregister_external_client_request = MCPUnregisterExternalClientRequest.from_dict(obj.get("McpUnregisterExternalClientRequest")) metadata_context_info_request = MetadataContextInfoRequest.from_dict(obj.get("MetadataContextInfoRequest")) metadata_context_info_result = MetadataContextInfoResult.from_dict(obj.get("MetadataContextInfoResult")) metadata_is_processing_result = MetadataIsProcessingResult.from_dict(obj.get("MetadataIsProcessingResult")) @@ -16489,7 +20106,7 @@ def from_dict(obj: Any) -> 'RPC': metadata_snapshot_current_mode = MetadataSnapshotCurrentMode(obj.get("MetadataSnapshotCurrentMode")) metadata_snapshot_remote_metadata = MetadataSnapshotRemoteMetadata.from_dict(obj.get("MetadataSnapshotRemoteMetadata")) metadata_snapshot_remote_metadata_repository = MetadataSnapshotRemoteMetadataRepository.from_dict(obj.get("MetadataSnapshotRemoteMetadataRepository")) - metadata_snapshot_remote_metadata_task_type = MetadataSnapshotRemoteMetadataTaskType(obj.get("MetadataSnapshotRemoteMetadataTaskType")) + metadata_snapshot_remote_metadata_task_type = TaskType(obj.get("MetadataSnapshotRemoteMetadataTaskType")) model = Model.from_dict(obj.get("Model")) model_billing = ModelBilling.from_dict(obj.get("ModelBilling")) model_billing_token_prices = ModelBillingTokenPrices.from_dict(obj.get("ModelBillingTokenPrices")) @@ -16519,7 +20136,13 @@ def from_dict(obj: Any) -> 'RPC': name_set_auto_result = NameSetAutoResult.from_dict(obj.get("NameSetAutoResult")) name_set_request = NameSetRequest.from_dict(obj.get("NameSetRequest")) open_canvas_instance = OpenCanvasInstance.from_dict(obj.get("OpenCanvasInstance")) + options_update_additional_content_exclusion_policy = OptionsUpdateAdditionalContentExclusionPolicy.from_dict(obj.get("OptionsUpdateAdditionalContentExclusionPolicy")) + options_update_additional_content_exclusion_policy_rule = OptionsUpdateAdditionalContentExclusionPolicyRule.from_dict(obj.get("OptionsUpdateAdditionalContentExclusionPolicyRule")) + options_update_additional_content_exclusion_policy_rule_source = OptionsUpdateAdditionalContentExclusionPolicyRuleSource.from_dict(obj.get("OptionsUpdateAdditionalContentExclusionPolicyRuleSource")) + options_update_additional_content_exclusion_policy_scope = AdditionalContentExclusionPolicyScope(obj.get("OptionsUpdateAdditionalContentExclusionPolicyScope")) + options_update_context_tier = OptionsUpdateContextTier(obj.get("OptionsUpdateContextTier")) options_update_env_value_mode = MCPSetEnvValueModeDetails(obj.get("OptionsUpdateEnvValueMode")) + options_update_reasoning_summary = ReasoningSummary(obj.get("OptionsUpdateReasoningSummary")) options_update_tool_filter_precedence = OptionsUpdateToolFilterPrecedence(obj.get("OptionsUpdateToolFilterPrecedence")) pending_permission_request = PendingPermissionRequest.from_dict(obj.get("PendingPermissionRequest")) pending_permission_request_list = PendingPermissionRequestList.from_dict(obj.get("PendingPermissionRequestList")) @@ -16580,7 +20203,7 @@ def from_dict(obj: Any) -> 'RPC': permissions_configure_additional_content_exclusion_policy = PermissionsConfigureAdditionalContentExclusionPolicy.from_dict(obj.get("PermissionsConfigureAdditionalContentExclusionPolicy")) permissions_configure_additional_content_exclusion_policy_rule = PermissionsConfigureAdditionalContentExclusionPolicyRule.from_dict(obj.get("PermissionsConfigureAdditionalContentExclusionPolicyRule")) permissions_configure_additional_content_exclusion_policy_rule_source = PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.from_dict(obj.get("PermissionsConfigureAdditionalContentExclusionPolicyRuleSource")) - permissions_configure_additional_content_exclusion_policy_scope = PermissionsConfigureAdditionalContentExclusionPolicyScope(obj.get("PermissionsConfigureAdditionalContentExclusionPolicyScope")) + permissions_configure_additional_content_exclusion_policy_scope = AdditionalContentExclusionPolicyScope(obj.get("PermissionsConfigureAdditionalContentExclusionPolicyScope")) permissions_configure_params = PermissionsConfigureParams.from_dict(obj.get("PermissionsConfigureParams")) permissions_configure_result = PermissionsConfigureResult.from_dict(obj.get("PermissionsConfigureResult")) permissions_folder_trust_add_trusted_result = PermissionsFolderTrustAddTrustedResult.from_dict(obj.get("PermissionsFolderTrustAddTrustedResult")) @@ -16619,9 +20242,31 @@ def from_dict(obj: Any) -> 'RPC': ping_request = PingRequest.from_dict(obj.get("PingRequest")) ping_result = PingResult.from_dict(obj.get("PingResult")) plan_read_result = PlanReadResult.from_dict(obj.get("PlanReadResult")) + plan_read_sql_todos_result = PlanReadSQLTodosResult.from_dict(obj.get("PlanReadSqlTodosResult")) + plan_sql_todos_row = PlanSQLTodosRow.from_dict(obj.get("PlanSqlTodosRow")) plan_update_request = PlanUpdateRequest.from_dict(obj.get("PlanUpdateRequest")) plugin = Plugin.from_dict(obj.get("Plugin")) + plugin_install_result = PluginInstallResult.from_dict(obj.get("PluginInstallResult")) plugin_list = PluginList.from_dict(obj.get("PluginList")) + plugin_list_result = PluginListResult.from_dict(obj.get("PluginListResult")) + plugins_disable_request = PluginsDisableRequest.from_dict(obj.get("PluginsDisableRequest")) + plugins_enable_request = PluginsEnableRequest.from_dict(obj.get("PluginsEnableRequest")) + plugins_install_request = PluginsInstallRequest.from_dict(obj.get("PluginsInstallRequest")) + plugins_marketplaces_add_request = PluginsMarketplacesAddRequest.from_dict(obj.get("PluginsMarketplacesAddRequest")) + plugins_marketplaces_browse_request = PluginsMarketplacesBrowseRequest.from_dict(obj.get("PluginsMarketplacesBrowseRequest")) + plugins_marketplaces_refresh_request = PluginsMarketplacesRefreshRequest.from_dict(obj.get("PluginsMarketplacesRefreshRequest")) + plugins_marketplaces_remove_request = PluginsMarketplacesRemoveRequest.from_dict(obj.get("PluginsMarketplacesRemoveRequest")) + plugins_reload_request = PluginsReloadRequest.from_dict(obj.get("PluginsReloadRequest")) + plugins_uninstall_request = PluginsUninstallRequest.from_dict(obj.get("PluginsUninstallRequest")) + plugins_update_request = PluginsUpdateRequest.from_dict(obj.get("PluginsUpdateRequest")) + plugin_update_all_entry = PluginUpdateAllEntry.from_dict(obj.get("PluginUpdateAllEntry")) + plugin_update_all_result = PluginUpdateAllResult.from_dict(obj.get("PluginUpdateAllResult")) + plugin_update_result = PluginUpdateResult.from_dict(obj.get("PluginUpdateResult")) + poll_spawned_sessions_result = PollSpawnedSessionsResult.from_dict(obj.get("PollSpawnedSessionsResult")) + provider_config = ProviderConfig.from_dict(obj.get("ProviderConfig")) + provider_config_azure = ProviderConfigAzure.from_dict(obj.get("ProviderConfigAzure")) + provider_config_type = ProviderConfigType(obj.get("ProviderConfigType")) + provider_config_wire_api = ProviderConfigWireAPI(obj.get("ProviderConfigWireApi")) push_attachment = _load_PushAttachment(obj.get("PushAttachment")) push_attachment_blob = PushAttachmentBlob.from_dict(obj.get("PushAttachmentBlob")) push_attachment_directory = PushAttachmentDirectory.from_dict(obj.get("PushAttachmentDirectory")) @@ -16642,13 +20287,35 @@ def from_dict(obj: Any) -> 'RPC': queue_remove_most_recent_result = QueueRemoveMostRecentResult.from_dict(obj.get("QueueRemoveMostRecentResult")) register_event_interest_params = RegisterEventInterestParams.from_dict(obj.get("RegisterEventInterestParams")) register_event_interest_result = RegisterEventInterestResult.from_dict(obj.get("RegisterEventInterestResult")) + register_extension_tools_params = _RegisterExtensionToolsParams.from_dict(obj.get("RegisterExtensionToolsParams")) + register_extension_tools_result = _RegisterExtensionToolsResult.from_dict(obj.get("RegisterExtensionToolsResult")) release_event_interest_params = ReleaseEventInterestParams.from_dict(obj.get("ReleaseEventInterestParams")) + remote_control_config = RemoteControlConfig.from_dict(obj.get("RemoteControlConfig")) + remote_control_config_existing_mc_session = RemoteControlConfigExistingMcSession.from_dict(obj.get("RemoteControlConfigExistingMcSession")) + remote_control_status = _load_RemoteControlStatus(obj.get("RemoteControlStatus")) + remote_control_status_active = RemoteControlStatusActive.from_dict(obj.get("RemoteControlStatusActive")) + remote_control_status_connecting = RemoteControlStatusConnecting.from_dict(obj.get("RemoteControlStatusConnecting")) + remote_control_status_error = RemoteControlStatusError.from_dict(obj.get("RemoteControlStatusError")) + remote_control_status_off = RemoteControlStatusOff.from_dict(obj.get("RemoteControlStatusOff")) + remote_control_status_result = RemoteControlStatusResult.from_dict(obj.get("RemoteControlStatusResult")) + remote_control_stop_result = RemoteControlStopResult.from_dict(obj.get("RemoteControlStopResult")) + remote_control_transfer_result = RemoteControlTransferResult.from_dict(obj.get("RemoteControlTransferResult")) remote_enable_request = RemoteEnableRequest.from_dict(obj.get("RemoteEnableRequest")) remote_enable_result = RemoteEnableResult.from_dict(obj.get("RemoteEnableResult")) remote_notify_steerable_changed_request = RemoteNotifySteerableChangedRequest.from_dict(obj.get("RemoteNotifySteerableChangedRequest")) remote_notify_steerable_changed_result = RemoteNotifySteerableChangedResult.from_dict(obj.get("RemoteNotifySteerableChangedResult")) remote_session_connection_result = RemoteSessionConnectionResult.from_dict(obj.get("RemoteSessionConnectionResult")) + remote_session_metadata_repository = RemoteSessionMetadataRepository.from_dict(obj.get("RemoteSessionMetadataRepository")) + remote_session_metadata_task_type = TaskType(obj.get("RemoteSessionMetadataTaskType")) + remote_session_metadata_value = RemoteSessionMetadataValue.from_dict(obj.get("RemoteSessionMetadataValue")) remote_session_mode = RemoteSessionMode(obj.get("RemoteSessionMode")) + remote_session_repository = RemoteSessionRepository.from_dict(obj.get("RemoteSessionRepository")) + sandbox_config = SandboxConfig.from_dict(obj.get("SandboxConfig")) + sandbox_config_user_policy = SandboxConfigUserPolicy.from_dict(obj.get("SandboxConfigUserPolicy")) + sandbox_config_user_policy_experimental = SandboxConfigUserPolicyExperimental.from_dict(obj.get("SandboxConfigUserPolicyExperimental")) + sandbox_config_user_policy_experimental_seatbelt = SandboxConfigUserPolicyExperimentalSeatbelt.from_dict(obj.get("SandboxConfigUserPolicyExperimentalSeatbelt")) + sandbox_config_user_policy_filesystem = SandboxConfigUserPolicyFilesystem.from_dict(obj.get("SandboxConfigUserPolicyFilesystem")) + sandbox_config_user_policy_network = SandboxConfigUserPolicyNetwork.from_dict(obj.get("SandboxConfigUserPolicyNetwork")) schedule_entry = ScheduleEntry.from_dict(obj.get("ScheduleEntry")) schedule_list = ScheduleList.from_dict(obj.get("ScheduleList")) schedule_stop_request = ScheduleStopRequest.from_dict(obj.get("ScheduleStopRequest")) @@ -16662,8 +20329,10 @@ def from_dict(obj: Any) -> 'RPC': send_result = SendResult.from_dict(obj.get("SendResult")) server_skill = ServerSkill.from_dict(obj.get("ServerSkill")) server_skill_list = ServerSkillList.from_dict(obj.get("ServerSkillList")) + session_activity = SessionActivity.from_dict(obj.get("SessionActivity")) session_auth_status = SessionAuthStatus.from_dict(obj.get("SessionAuthStatus")) session_bulk_delete_result = SessionBulkDeleteResult.from_dict(obj.get("SessionBulkDeleteResult")) + session_capability = SessionCapability(obj.get("SessionCapability")) session_context = SessionContext.from_dict(obj.get("SessionContext")) session_context_host_type = HostType(obj.get("SessionContextHostType")) session_enrich_metadata_result = SessionEnrichMetadataResult.from_dict(obj.get("SessionEnrichMetadataResult")) @@ -16701,14 +20370,23 @@ def from_dict(obj: Any) -> 'RPC': session_installed_plugin_source_local = SessionInstalledPluginSourceLocal.from_dict(obj.get("SessionInstalledPluginSourceLocal")) session_installed_plugin_source_url = SessionInstalledPluginSourceURL.from_dict(obj.get("SessionInstalledPluginSourceUrl")) session_list = SessionList.from_dict(obj.get("SessionList")) + session_list_entry = _load_SessionListEntry(obj.get("SessionListEntry")) session_list_filter = SessionListFilter.from_dict(obj.get("SessionListFilter")) session_load_deferred_repo_hooks_result = SessionLoadDeferredRepoHooksResult.from_dict(obj.get("SessionLoadDeferredRepoHooksResult")) session_log_level = SessionLogLevel(obj.get("SessionLogLevel")) session_mcp_apps_call_tool_result = from_dict(lambda x: x, obj.get("SessionMcpAppsCallToolResult")) - session_metadata = SessionMetadata.from_dict(obj.get("SessionMetadata")) session_metadata_snapshot = SessionMetadataSnapshot.from_dict(obj.get("SessionMetadataSnapshot")) session_mode = SessionMode(obj.get("SessionMode")) session_model_list = SessionModelList.from_dict(obj.get("SessionModelList")) + session_open_options = SessionOpenOptions.from_dict(obj.get("SessionOpenOptions")) + session_open_options_additional_content_exclusion_policy = SessionOpenOptionsAdditionalContentExclusionPolicy.from_dict(obj.get("SessionOpenOptionsAdditionalContentExclusionPolicy")) + session_open_options_additional_content_exclusion_policy_rule = SessionOpenOptionsAdditionalContentExclusionPolicyRule.from_dict(obj.get("SessionOpenOptionsAdditionalContentExclusionPolicyRule")) + session_open_options_additional_content_exclusion_policy_rule_source = SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource.from_dict(obj.get("SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource")) + session_open_options_additional_content_exclusion_policy_scope = AdditionalContentExclusionPolicyScope(obj.get("SessionOpenOptionsAdditionalContentExclusionPolicyScope")) + session_open_options_env_value_mode = MCPSetEnvValueModeDetails(obj.get("SessionOpenOptionsEnvValueMode")) + session_open_options_reasoning_summary = ReasoningSummary(obj.get("SessionOpenOptionsReasoningSummary")) + session_open_params = _load_SessionOpenParams(obj.get("SessionOpenParams")) + session_open_result = SessionOpenResult.from_dict(obj.get("SessionOpenResult")) session_prune_result = SessionPruneResult.from_dict(obj.get("SessionPruneResult")) sessions_bulk_delete_request = SessionsBulkDeleteRequest.from_dict(obj.get("SessionsBulkDeleteRequest")) sessions_check_in_use_request = SessionsCheckInUseRequest.from_dict(obj.get("SessionsCheckInUseRequest")) @@ -16724,6 +20402,8 @@ def from_dict(obj: Any) -> 'RPC': sessions_find_by_task_id_result = SessionsFindByTaskIDResult.from_dict(obj.get("SessionsFindByTaskIDResult")) sessions_fork_request = SessionsForkRequest.from_dict(obj.get("SessionsForkRequest")) sessions_fork_result = SessionsForkResult.from_dict(obj.get("SessionsForkResult")) + sessions_get_board_entry_count_request = SessionsGetBoardEntryCountRequest.from_dict(obj.get("SessionsGetBoardEntryCountRequest")) + sessions_get_board_entry_count_result = SessionsGetBoardEntryCountResult.from_dict(obj.get("SessionsGetBoardEntryCountResult")) sessions_get_event_file_path_request = SessionsGetEventFilePathRequest.from_dict(obj.get("SessionsGetEventFilePathRequest")) sessions_get_event_file_path_result = SessionsGetEventFilePathResult.from_dict(obj.get("SessionsGetEventFilePathResult")) sessions_get_last_for_context_request = SessionsGetLastForContextRequest.from_dict(obj.get("SessionsGetLastForContextRequest")) @@ -16733,7 +20413,23 @@ def from_dict(obj: Any) -> 'RPC': session_sizes = SessionSizes.from_dict(obj.get("SessionSizes")) sessions_list_request = SessionsListRequest.from_dict(obj.get("SessionsListRequest")) sessions_load_deferred_repo_hooks_request = SessionsLoadDeferredRepoHooksRequest.from_dict(obj.get("SessionsLoadDeferredRepoHooksRequest")) + sessions_open_attach = SessionsOpenAttach.from_dict(obj.get("SessionsOpenAttach")) + sessions_open_cloud = SessionsOpenCloud.from_dict(obj.get("SessionsOpenCloud")) + sessions_open_create = SessionsOpenCreate.from_dict(obj.get("SessionsOpenCreate")) + sessions_open_handoff = SessionsOpenHandoff.from_dict(obj.get("SessionsOpenHandoff")) + sessions_open_handoff_task_type = TaskType(obj.get("SessionsOpenHandoffTaskType")) + sessions_open_progress = SessionsOpenProgress.from_dict(obj.get("SessionsOpenProgress")) + sessions_open_progress_status = SessionsOpenProgressStatus(obj.get("SessionsOpenProgressStatus")) + sessions_open_progress_step = SessionsOpenProgressStep(obj.get("SessionsOpenProgressStep")) + sessions_open_remote = SessionsOpenRemote.from_dict(obj.get("SessionsOpenRemote")) + sessions_open_resume = SessionsOpenResume.from_dict(obj.get("SessionsOpenResume")) + sessions_open_resume_last = SessionsOpenResumeLast.from_dict(obj.get("SessionsOpenResumeLast")) + sessions_open_status = SessionsOpenStatus(obj.get("SessionsOpenStatus")) + session_source = SessionSource(obj.get("SessionSource")) + sessions_poll_spawned_sessions_event = SessionsPollSpawnedSessionsEvent.from_dict(obj.get("SessionsPollSpawnedSessionsEvent")) + sessions_poll_spawned_sessions_request = SessionsPollSpawnedSessionsRequest.from_dict(obj.get("SessionsPollSpawnedSessionsRequest")) sessions_prune_old_request = SessionsPruneOldRequest.from_dict(obj.get("SessionsPruneOldRequest")) + sessions_register_extension_tools_on_session_options = SessionsRegisterExtensionToolsOnSessionOptions.from_dict(obj.get("SessionsRegisterExtensionToolsOnSessionOptions")) sessions_release_lock_request = SessionsReleaseLockRequest.from_dict(obj.get("SessionsReleaseLockRequest")) sessions_release_lock_result = SessionsReleaseLockResult.from_dict(obj.get("SessionsReleaseLockResult")) sessions_reload_plugin_hooks_request = SessionsReloadPluginHooksRequest.from_dict(obj.get("SessionsReloadPluginHooksRequest")) @@ -16742,12 +20438,19 @@ def from_dict(obj: Any) -> 'RPC': sessions_save_result = SessionsSaveResult.from_dict(obj.get("SessionsSaveResult")) sessions_set_additional_plugins_request = SessionsSetAdditionalPluginsRequest.from_dict(obj.get("SessionsSetAdditionalPluginsRequest")) sessions_set_additional_plugins_result = SessionsSetAdditionalPluginsResult.from_dict(obj.get("SessionsSetAdditionalPluginsResult")) + sessions_set_remote_control_steering_request = SessionsSetRemoteControlSteeringRequest.from_dict(obj.get("SessionsSetRemoteControlSteeringRequest")) + sessions_start_remote_control_request = SessionsStartRemoteControlRequest.from_dict(obj.get("SessionsStartRemoteControlRequest")) + sessions_stop_remote_control_request = SessionsStopRemoteControlRequest.from_dict(obj.get("SessionsStopRemoteControlRequest")) + sessions_transfer_remote_control_request = SessionsTransferRemoteControlRequest.from_dict(obj.get("SessionsTransferRemoteControlRequest")) + session_telemetry_engagement = SessionTelemetryEngagement.from_dict(obj.get("SessionTelemetryEngagement")) session_update_options_params = SessionUpdateOptionsParams.from_dict(obj.get("SessionUpdateOptionsParams")) session_update_options_result = SessionUpdateOptionsResult.from_dict(obj.get("SessionUpdateOptionsResult")) session_working_directory_context = SessionWorkingDirectoryContext.from_dict(obj.get("SessionWorkingDirectoryContext")) session_working_directory_context_host_type = HostType(obj.get("SessionWorkingDirectoryContextHostType")) + shell_cancel_user_requested_request = ShellCancelUserRequestedRequest.from_dict(obj.get("ShellCancelUserRequestedRequest")) shell_exec_request = ShellExecRequest.from_dict(obj.get("ShellExecRequest")) shell_exec_result = ShellExecResult.from_dict(obj.get("ShellExecResult")) + shell_execute_user_requested_request = ShellExecuteUserRequestedRequest.from_dict(obj.get("ShellExecuteUserRequestedRequest")) shell_kill_request = ShellKillRequest.from_dict(obj.get("ShellKillRequest")) shell_kill_result = ShellKillResult.from_dict(obj.get("ShellKillResult")) shell_kill_signal = ShellKillSignal(obj.get("ShellKillSignal")) @@ -16826,6 +20529,8 @@ def from_dict(obj: Any) -> 'RPC': ui_elicitation_string_enum_field = UIElicitationStringEnumField.from_dict(obj.get("UIElicitationStringEnumField")) ui_elicitation_string_one_of_field = UIElicitationStringOneOfField.from_dict(obj.get("UIElicitationStringOneOfField")) ui_elicitation_string_one_of_field_one_of = UIElicitationStringOneOfFieldOneOf.from_dict(obj.get("UIElicitationStringOneOfFieldOneOf")) + ui_ephemeral_query_request = UIEphemeralQueryRequest.from_dict(obj.get("UIEphemeralQueryRequest")) + ui_ephemeral_query_result = UIEphemeralQueryResult.from_dict(obj.get("UIEphemeralQueryResult")) ui_exit_plan_mode_action = UIExitPlanModeAction(obj.get("UIExitPlanModeAction")) ui_exit_plan_mode_response = UIExitPlanModeResponse.from_dict(obj.get("UIExitPlanModeResponse")) ui_handle_pending_auto_mode_switch_request = UIHandlePendingAutoModeSwitchRequest.from_dict(obj.get("UIHandlePendingAutoModeSwitchRequest")) @@ -16847,6 +20552,7 @@ def from_dict(obj: Any) -> 'RPC': usage_metrics_model_metric_usage = UsageMetricsModelMetricUsage.from_dict(obj.get("UsageMetricsModelMetricUsage")) usage_metrics_token_detail = UsageMetricsTokenDetail.from_dict(obj.get("UsageMetricsTokenDetail")) user_auth_info = UserAuthInfo.from_dict(obj.get("UserAuthInfo")) + user_requested_shell_command_result = UserRequestedShellCommandResult.from_dict(obj.get("UserRequestedShellCommandResult")) workspace_diff_file_change = WorkspaceDiffFileChange.from_dict(obj.get("WorkspaceDiffFileChange")) workspace_diff_file_change_type = WorkspaceDiffFileChangeType(obj.get("WorkspaceDiffFileChangeType")) workspace_diff_mode = WorkspaceDiffMode(obj.get("WorkspaceDiffMode")) @@ -16868,7 +20574,7 @@ def from_dict(obj: Any) -> 'RPC': session_context_info = from_union([SessionContextInfo.from_dict, from_none], obj.get("SessionContextInfo")) task_progress = from_union([TaskProgress.from_dict, from_none], obj.get("TaskProgress")) workspace_summary = from_union([WorkspaceSummary.from_dict, from_none], obj.get("WorkspaceSummary")) - return RPC(abort_request, abort_result, account_get_quota_request, account_get_quota_result, account_quota_snapshot, agent_get_current_result, agent_info, agent_info_source, agent_list, agent_registry_live_target_entry, agent_registry_live_target_entry_attention_kind, agent_registry_live_target_entry_kind, agent_registry_live_target_entry_last_terminal_event, agent_registry_live_target_entry_status, agent_registry_log_capture, agent_registry_log_capture_open_error_reason, agent_registry_spawn_error, agent_registry_spawn_permission_mode, agent_registry_spawn_registry_timeout, agent_registry_spawn_request, agent_registry_spawn_result, agent_registry_spawn_spawned, agent_registry_spawn_validation_error, agent_registry_spawn_validation_error_field, agent_registry_spawn_validation_error_reason, agent_reload_result, agent_select_request, agent_select_result, allow_all_permission_set_result, allow_all_permission_state, api_key_auth_info, auth_info, auth_info_type, canvas_action, canvas_action_invoke_request, canvas_action_invoke_result, canvas_close_request, canvas_host_context, canvas_host_context_capabilities, canvas_instance_availability, canvas_json_schema, canvas_list, canvas_list_open_result, canvas_open_request, canvas_provider_close_request, canvas_provider_invoke_action_request, canvas_provider_open_request, canvas_provider_open_result, canvas_session_context, 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, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_filter_mode, copilot_api_token_auth_info, copilot_user_response, copilot_user_response_endpoints, copilot_user_response_quota_snapshots, copilot_user_response_quota_snapshots_chat, copilot_user_response_quota_snapshots_completions, copilot_user_response_quota_snapshots_premium_interactions, current_model, current_tool_metadata, discovered_canvas, discovered_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_result, execute_command_params, execute_command_result, extension, extension_context_push_input, 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_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, 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, fleet_start_request, fleet_start_result, folder_trust_add_params, folder_trust_check_params, folder_trust_check_result, gh_cli_auth_info, handle_pending_tool_call_request, handle_pending_tool_call_result, history_abort_manual_compaction_result, history_cancel_background_compaction_result, history_compact_context_window, history_compact_request, history_compact_result, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, installed_plugin, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, instructions_get_sources_result, instructions_sources, instructions_sources_location, instructions_sources_type, log_request, log_result, lsp_initialize_request, mcp_apps_call_tool_request, mcp_apps_diagnose_capability, mcp_apps_diagnose_request, mcp_apps_diagnose_result, mcp_apps_diagnose_server, mcp_apps_host_context, mcp_apps_host_context_details, mcp_apps_host_context_details_available_display_mode, mcp_apps_host_context_details_display_mode, mcp_apps_host_context_details_platform, mcp_apps_host_context_details_theme, mcp_apps_list_tools_request, mcp_apps_list_tools_result, mcp_apps_read_resource_request, mcp_apps_read_resource_result, mcp_apps_resource_content, mcp_apps_set_host_context_details, mcp_apps_set_host_context_details_available_display_mode, mcp_apps_set_host_context_details_display_mode, mcp_apps_set_host_context_details_platform, mcp_apps_set_host_context_details_theme, mcp_apps_set_host_context_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_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_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_oauth_login_request, mcp_oauth_login_result, mcp_remove_git_hub_result, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_auth_config, mcp_server_auth_config_redirect_port, mcp_server_config, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_list, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_billing, model_billing_token_prices, model_billing_token_prices_long_context, 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_list_request, model_picker_category, model_picker_price_category, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, open_canvas_instance, options_update_env_value_mode, options_update_tool_filter_precedence, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, 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_cancelled, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_reject, permission_decision_request, permission_decision_user_not_available, permission_location_add_tool_approval_params, permission_location_apply_params, permission_location_apply_result, permission_location_resolve_params, permission_location_resolve_result, permission_location_type, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_rules_set, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_folder_trust_add_trusted_result, permissions_get_allow_all_request, permissions_locations_add_tool_approval_details, permissions_locations_add_tool_approval_details_commands, permissions_locations_add_tool_approval_details_custom_tool, permissions_locations_add_tool_approval_details_extension_management, permissions_locations_add_tool_approval_details_extension_permission_access, permissions_locations_add_tool_approval_details_mcp, permissions_locations_add_tool_approval_details_mcp_sampling, permissions_locations_add_tool_approval_details_memory, permissions_locations_add_tool_approval_details_read, permissions_locations_add_tool_approval_details_write, permissions_locations_add_tool_approval_result, permissions_modify_rules_params, permissions_modify_rules_result, permissions_modify_rules_scope, permissions_notify_prompt_shown_result, permissions_paths_add_result, permissions_paths_list_request, permissions_paths_update_primary_result, permissions_pending_requests_request, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_allow_all_request, permissions_set_allow_all_source, permissions_set_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_update_request, plugin, plugin_list, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, queued_command_handled, queued_command_not_handled, queued_command_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_most_recent_result, register_event_interest_params, register_event_interest_result, release_event_interest_params, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_mode, schedule_entry, schedule_list, schedule_stop_request, schedule_stop_result, secrets_add_filter_values_request, secrets_add_filter_values_result, send_agent_mode, send_attachments_to_message_params, send_mode, send_request, send_result, server_skill, server_skill_list, session_auth_status, session_bulk_delete_result, session_context, session_context_host_type, session_enrich_metadata_result, 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_capabilities, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_sqlite_exists_request, session_fs_sqlite_exists_result, session_fs_sqlite_query_request, session_fs_sqlite_query_result, session_fs_sqlite_query_type, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_git_hub, session_installed_plugin_source_local, session_installed_plugin_source_url, session_list, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_mcp_apps_call_tool_result, session_metadata, session_metadata_snapshot, session_mode, session_model_list, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, sessions_find_by_prefix_request, sessions_find_by_prefix_result, sessions_find_by_task_id_request, sessions_find_by_task_id_result, sessions_fork_request, sessions_fork_result, sessions_get_event_file_path_request, sessions_get_event_file_path_result, sessions_get_last_for_context_request, sessions_get_last_for_context_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_prune_old_request, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, session_update_options_params, session_update_options_result, session_working_directory_context, session_working_directory_context_host_type, shell_exec_request, shell_exec_result, shell_kill_request, shell_kill_result, shell_kill_signal, shutdown_request, skill, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, 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_select_subcommand_option, slash_command_select_subcommand_result, slash_command_text_result, task_agent_info, task_agent_progress, task_execution_mode, task_info, task_list, task_progress_line, tasks_cancel_request, tasks_cancel_result, tasks_get_current_promotable_result, tasks_get_progress_request, tasks_get_progress_result, task_shell_info, task_shell_info_attachment_mode, task_shell_progress, tasks_promote_current_to_background_result, tasks_promote_to_background_request, tasks_promote_to_background_result, tasks_refresh_result, tasks_remove_request, tasks_remove_result, tasks_send_message_request, tasks_send_message_result, tasks_start_agent_request, tasks_start_agent_result, task_status, tasks_wait_for_pending_result, telemetry_set_feature_overrides_request, token_auth_info, tool, tool_list, tools_get_current_metadata_result, tools_initialize_and_validate_result, tools_list_request, ui_auto_mode_switch_response, 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_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, 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, user_auth_info, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_diff_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, workspace_summary_host_type, workspaces_workspace_details_host_type, session_context_info, task_progress, workspace_summary) + return RPC(abort_request, abort_result, account_get_quota_request, account_get_quota_result, account_quota_snapshot, agent_get_current_result, agent_info, agent_info_source, agent_list, agent_registry_live_target_entry, agent_registry_live_target_entry_attention_kind, agent_registry_live_target_entry_kind, agent_registry_live_target_entry_last_terminal_event, agent_registry_live_target_entry_status, agent_registry_log_capture, agent_registry_log_capture_open_error_reason, agent_registry_spawn_error, agent_registry_spawn_permission_mode, agent_registry_spawn_registry_timeout, agent_registry_spawn_request, agent_registry_spawn_result, agent_registry_spawn_spawned, agent_registry_spawn_validation_error, agent_registry_spawn_validation_error_field, agent_registry_spawn_validation_error_reason, agent_reload_result, agent_select_request, agent_select_result, allow_all_permission_set_result, allow_all_permission_state, api_key_auth_info, auth_info, auth_info_type, cancel_user_requested_shell_command_result, canvas_action, canvas_action_invoke_request, canvas_action_invoke_result, canvas_close_request, canvas_host_context, canvas_host_context_capabilities, canvas_instance_availability, canvas_json_schema, canvas_list, canvas_list_open_result, canvas_open_request, canvas_provider_close_request, canvas_provider_invoke_action_request, canvas_provider_open_request, canvas_provider_open_result, canvas_session_context, 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, configure_session_extensions_params, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_filter_mode, copilot_api_token_auth_info, copilot_user_response, copilot_user_response_endpoints, copilot_user_response_quota_snapshots, copilot_user_response_quota_snapshots_chat, copilot_user_response_quota_snapshots_completions, copilot_user_response_quota_snapshots_premium_interactions, current_model, current_tool_metadata, discovered_canvas, discovered_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_result, execute_command_params, execute_command_result, extension, extension_context_push_input, 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_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, 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, fleet_start_request, fleet_start_result, folder_trust_add_params, folder_trust_check_params, folder_trust_check_result, gh_cli_auth_info, handle_pending_tool_call_request, handle_pending_tool_call_result, history_abort_manual_compaction_result, history_cancel_background_compaction_result, history_compact_context_window, history_compact_request, history_compact_result, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, installed_plugin, installed_plugin_info, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, instructions_get_sources_result, instructions_sources, instructions_sources_location, instructions_sources_type, local_session_metadata_value, log_request, log_result, lsp_initialize_request, marketplace_add_result, marketplace_browse_result, marketplace_info, marketplace_list_result, marketplace_plugin_info, marketplace_refresh_entry, marketplace_refresh_result, marketplace_remove_result, mcp_allowed_server, mcp_apps_call_tool_request, mcp_apps_diagnose_capability, mcp_apps_diagnose_request, mcp_apps_diagnose_result, mcp_apps_diagnose_server, mcp_apps_host_context, mcp_apps_host_context_details, mcp_apps_host_context_details_available_display_mode, mcp_apps_host_context_details_display_mode, mcp_apps_host_context_details_platform, mcp_apps_host_context_details_theme, mcp_apps_list_tools_request, mcp_apps_list_tools_result, mcp_apps_read_resource_request, mcp_apps_read_resource_result, mcp_apps_resource_content, mcp_apps_set_host_context_details, mcp_apps_set_host_context_details_available_display_mode, mcp_apps_set_host_context_details_display_mode, mcp_apps_set_host_context_details_platform, mcp_apps_set_host_context_details_theme, mcp_apps_set_host_context_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_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_configure_git_hub_request, mcp_configure_git_hub_result, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_filtered_server, mcp_host_state, mcp_is_server_running_request, mcp_is_server_running_result, mcp_list_tools_request, mcp_list_tools_result, mcp_oauth_login_request, mcp_oauth_login_result, mcp_oauth_respond_request, mcp_oauth_respond_result, mcp_register_external_client_request, mcp_reload_with_config_request, mcp_remove_git_hub_result, mcp_restart_server_request, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_auth_config, mcp_server_auth_config_redirect_port, mcp_server_config, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_failure_info, mcp_server_list, mcp_server_needs_auth_info, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, mcp_start_server_request, mcp_start_servers_result, mcp_stop_server_request, mcp_tools, mcp_unregister_external_client_request, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_billing, model_billing_token_prices, model_billing_token_prices_long_context, 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_list_request, model_picker_category, model_picker_price_category, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, open_canvas_instance, options_update_additional_content_exclusion_policy, options_update_additional_content_exclusion_policy_rule, options_update_additional_content_exclusion_policy_rule_source, options_update_additional_content_exclusion_policy_scope, options_update_context_tier, options_update_env_value_mode, options_update_reasoning_summary, options_update_tool_filter_precedence, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, 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_cancelled, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_reject, permission_decision_request, permission_decision_user_not_available, permission_location_add_tool_approval_params, permission_location_apply_params, permission_location_apply_result, permission_location_resolve_params, permission_location_resolve_result, permission_location_type, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_rules_set, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_folder_trust_add_trusted_result, permissions_get_allow_all_request, permissions_locations_add_tool_approval_details, permissions_locations_add_tool_approval_details_commands, permissions_locations_add_tool_approval_details_custom_tool, permissions_locations_add_tool_approval_details_extension_management, permissions_locations_add_tool_approval_details_extension_permission_access, permissions_locations_add_tool_approval_details_mcp, permissions_locations_add_tool_approval_details_mcp_sampling, permissions_locations_add_tool_approval_details_memory, permissions_locations_add_tool_approval_details_read, permissions_locations_add_tool_approval_details_write, permissions_locations_add_tool_approval_result, permissions_modify_rules_params, permissions_modify_rules_result, permissions_modify_rules_scope, permissions_notify_prompt_shown_result, permissions_paths_add_result, permissions_paths_list_request, permissions_paths_update_primary_result, permissions_pending_requests_request, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_allow_all_request, permissions_set_allow_all_source, permissions_set_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_read_sql_todos_result, plan_sql_todos_row, plan_update_request, plugin, plugin_install_result, plugin_list, plugin_list_result, plugins_disable_request, plugins_enable_request, plugins_install_request, plugins_marketplaces_add_request, plugins_marketplaces_browse_request, plugins_marketplaces_refresh_request, plugins_marketplaces_remove_request, plugins_reload_request, plugins_uninstall_request, plugins_update_request, plugin_update_all_entry, plugin_update_all_result, plugin_update_result, poll_spawned_sessions_result, provider_config, provider_config_azure, provider_config_type, provider_config_wire_api, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, queued_command_handled, queued_command_not_handled, queued_command_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_most_recent_result, register_event_interest_params, register_event_interest_result, register_extension_tools_params, register_extension_tools_result, release_event_interest_params, remote_control_config, remote_control_config_existing_mc_session, remote_control_status, remote_control_status_active, remote_control_status_connecting, remote_control_status_error, remote_control_status_off, remote_control_status_result, remote_control_stop_result, remote_control_transfer_result, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_metadata_repository, remote_session_metadata_task_type, remote_session_metadata_value, remote_session_mode, remote_session_repository, sandbox_config, sandbox_config_user_policy, sandbox_config_user_policy_experimental, sandbox_config_user_policy_experimental_seatbelt, sandbox_config_user_policy_filesystem, sandbox_config_user_policy_network, schedule_entry, schedule_list, schedule_stop_request, schedule_stop_result, secrets_add_filter_values_request, secrets_add_filter_values_result, send_agent_mode, send_attachments_to_message_params, send_mode, send_request, send_result, server_skill, server_skill_list, session_activity, session_auth_status, session_bulk_delete_result, session_capability, session_context, session_context_host_type, session_enrich_metadata_result, 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_capabilities, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_sqlite_exists_request, session_fs_sqlite_exists_result, session_fs_sqlite_query_request, session_fs_sqlite_query_result, session_fs_sqlite_query_type, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_git_hub, session_installed_plugin_source_local, session_installed_plugin_source_url, session_list, session_list_entry, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_mcp_apps_call_tool_result, session_metadata_snapshot, session_mode, session_model_list, session_open_options, session_open_options_additional_content_exclusion_policy, session_open_options_additional_content_exclusion_policy_rule, session_open_options_additional_content_exclusion_policy_rule_source, session_open_options_additional_content_exclusion_policy_scope, session_open_options_env_value_mode, session_open_options_reasoning_summary, session_open_params, session_open_result, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, sessions_find_by_prefix_request, sessions_find_by_prefix_result, sessions_find_by_task_id_request, sessions_find_by_task_id_result, sessions_fork_request, sessions_fork_result, sessions_get_board_entry_count_request, sessions_get_board_entry_count_result, sessions_get_event_file_path_request, sessions_get_event_file_path_result, sessions_get_last_for_context_request, sessions_get_last_for_context_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_open_attach, sessions_open_cloud, sessions_open_create, sessions_open_handoff, sessions_open_handoff_task_type, sessions_open_progress, sessions_open_progress_status, sessions_open_progress_step, sessions_open_remote, sessions_open_resume, sessions_open_resume_last, sessions_open_status, session_source, sessions_poll_spawned_sessions_event, sessions_poll_spawned_sessions_request, sessions_prune_old_request, sessions_register_extension_tools_on_session_options, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, sessions_set_remote_control_steering_request, sessions_start_remote_control_request, sessions_stop_remote_control_request, sessions_transfer_remote_control_request, session_telemetry_engagement, session_update_options_params, session_update_options_result, session_working_directory_context, session_working_directory_context_host_type, shell_cancel_user_requested_request, shell_exec_request, shell_exec_result, shell_execute_user_requested_request, shell_kill_request, shell_kill_result, shell_kill_signal, shutdown_request, skill, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, 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_select_subcommand_option, slash_command_select_subcommand_result, slash_command_text_result, task_agent_info, task_agent_progress, task_execution_mode, task_info, task_list, task_progress_line, tasks_cancel_request, tasks_cancel_result, tasks_get_current_promotable_result, tasks_get_progress_request, tasks_get_progress_result, task_shell_info, task_shell_info_attachment_mode, task_shell_progress, tasks_promote_current_to_background_result, tasks_promote_to_background_request, tasks_promote_to_background_result, tasks_refresh_result, tasks_remove_request, tasks_remove_result, tasks_send_message_request, tasks_send_message_result, tasks_start_agent_request, tasks_start_agent_result, task_status, tasks_wait_for_pending_result, telemetry_set_feature_overrides_request, token_auth_info, tool, tool_list, tools_get_current_metadata_result, tools_initialize_and_validate_result, tools_list_request, ui_auto_mode_switch_response, 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_ephemeral_query_request, ui_ephemeral_query_result, ui_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, 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, user_auth_info, user_requested_shell_command_result, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_diff_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, workspace_summary_host_type, workspaces_workspace_details_host_type, session_context_info, task_progress, workspace_summary) def to_dict(self) -> dict: result: dict = {} @@ -16905,6 +20611,7 @@ def to_dict(self) -> dict: result["ApiKeyAuthInfo"] = to_class(APIKeyAuthInfo, self.api_key_auth_info) result["AuthInfo"] = (self.auth_info).to_dict() result["AuthInfoType"] = to_enum(AuthInfoType, self.auth_info_type) + result["CancelUserRequestedShellCommandResult"] = to_class(CancelUserRequestedShellCommandResult, self.cancel_user_requested_shell_command_result) result["CanvasAction"] = to_class(CanvasAction, self.canvas_action) result["CanvasActionInvokeRequest"] = to_class(CanvasActionInvokeRequest, self.canvas_action_invoke_request) result["CanvasActionInvokeResult"] = self.canvas_action_invoke_result @@ -16928,6 +20635,7 @@ def to_dict(self) -> dict: result["CommandsListRequest"] = to_class(CommandsListRequest, self.commands_list_request) result["CommandsRespondToQueuedCommandRequest"] = to_class(CommandsRespondToQueuedCommandRequest, self.commands_respond_to_queued_command_request) result["CommandsRespondToQueuedCommandResult"] = to_class(CommandsRespondToQueuedCommandResult, self.commands_respond_to_queued_command_result) + result["ConfigureSessionExtensionsParams"] = to_class(_ConfigureSessionExtensionsParams, self.configure_session_extensions_params) result["ConnectedRemoteSessionMetadata"] = to_class(ConnectedRemoteSessionMetadata, self.connected_remote_session_metadata) result["ConnectedRemoteSessionMetadataKind"] = to_enum(ConnectedRemoteSessionMetadataKind, self.connected_remote_session_metadata_kind) result["ConnectedRemoteSessionMetadataRepository"] = to_class(ConnectedRemoteSessionMetadataRepository, self.connected_remote_session_metadata_repository) @@ -16999,6 +20707,7 @@ def to_dict(self) -> dict: result["HistoryTruncateResult"] = to_class(HistoryTruncateResult, self.history_truncate_result) result["HMACAuthInfo"] = to_class(HMACAuthInfo, self.hmac_auth_info) result["InstalledPlugin"] = to_class(InstalledPlugin, self.installed_plugin) + result["InstalledPluginInfo"] = to_class(InstalledPluginInfo, self.installed_plugin_info) result["InstalledPluginSource"] = from_union([lambda x: to_class(InstalledPluginSource, x), from_str], self.installed_plugin_source) result["InstalledPluginSourceGitHub"] = to_class(InstalledPluginSourceGitHub, self.installed_plugin_source_git_hub) result["InstalledPluginSourceLocal"] = to_class(InstalledPluginSourceLocal, self.installed_plugin_source_local) @@ -17007,9 +20716,19 @@ def to_dict(self) -> dict: result["InstructionsSources"] = to_class(InstructionsSources, self.instructions_sources) result["InstructionsSourcesLocation"] = to_enum(InstructionsSourcesLocation, self.instructions_sources_location) result["InstructionsSourcesType"] = to_enum(InstructionsSourcesType, self.instructions_sources_type) + result["LocalSessionMetadataValue"] = to_class(LocalSessionMetadataValue, self.local_session_metadata_value) result["LogRequest"] = to_class(LogRequest, self.log_request) result["LogResult"] = to_class(LogResult, self.log_result) result["LspInitializeRequest"] = to_class(LspInitializeRequest, self.lsp_initialize_request) + result["MarketplaceAddResult"] = to_class(MarketplaceAddResult, self.marketplace_add_result) + result["MarketplaceBrowseResult"] = to_class(MarketplaceBrowseResult, self.marketplace_browse_result) + result["MarketplaceInfo"] = to_class(MarketplaceInfo, self.marketplace_info) + result["MarketplaceListResult"] = to_class(MarketplaceListResult, self.marketplace_list_result) + result["MarketplacePluginInfo"] = to_class(MarketplacePluginInfo, self.marketplace_plugin_info) + result["MarketplaceRefreshEntry"] = to_class(MarketplaceRefreshEntry, self.marketplace_refresh_entry) + result["MarketplaceRefreshResult"] = to_class(MarketplaceRefreshResult, self.marketplace_refresh_result) + result["MarketplaceRemoveResult"] = to_class(MarketplaceRemoveResult, self.marketplace_remove_result) + result["McpAllowedServer"] = to_class(MCPAllowedServer, self.mcp_allowed_server) result["McpAppsCallToolRequest"] = to_class(MCPAppsCallToolRequest, self.mcp_apps_call_tool_request) result["McpAppsDiagnoseCapability"] = to_class(MCPAppsDiagnoseCapability, self.mcp_apps_diagnose_capability) result["McpAppsDiagnoseRequest"] = to_class(MCPAppsDiagnoseRequest, self.mcp_apps_diagnose_request) @@ -17040,6 +20759,8 @@ def to_dict(self) -> dict: result["McpConfigList"] = to_class(MCPConfigList, self.mcp_config_list) result["McpConfigRemoveRequest"] = to_class(MCPConfigRemoveRequest, self.mcp_config_remove_request) result["McpConfigUpdateRequest"] = to_class(MCPConfigUpdateRequest, self.mcp_config_update_request) + result["McpConfigureGitHubRequest"] = to_class(MCPConfigureGitHubRequest, self.mcp_configure_git_hub_request) + result["McpConfigureGitHubResult"] = to_class(MCPConfigureGitHubResult, self.mcp_configure_git_hub_result) result["McpDisableRequest"] = to_class(MCPDisableRequest, self.mcp_disable_request) result["McpDiscoverRequest"] = to_class(MCPDiscoverRequest, self.mcp_discover_request) result["McpDiscoverResult"] = to_class(MCPDiscoverResult, self.mcp_discover_result) @@ -17047,9 +20768,20 @@ def to_dict(self) -> dict: result["McpExecuteSamplingParams"] = to_class(MCPExecuteSamplingParams, self.mcp_execute_sampling_params) result["McpExecuteSamplingRequest"] = from_dict(lambda x: x, self.mcp_execute_sampling_request) result["McpExecuteSamplingResult"] = from_dict(lambda x: x, self.mcp_execute_sampling_result) + result["McpFilteredServer"] = to_class(MCPFilteredServer, self.mcp_filtered_server) + result["McpHostState"] = to_class(MCPHostState, self.mcp_host_state) + result["McpIsServerRunningRequest"] = to_class(MCPIsServerRunningRequest, self.mcp_is_server_running_request) + result["McpIsServerRunningResult"] = to_class(MCPIsServerRunningResult, self.mcp_is_server_running_result) + result["McpListToolsRequest"] = to_class(MCPListToolsRequest, self.mcp_list_tools_request) + result["McpListToolsResult"] = to_class(MCPListToolsResult, self.mcp_list_tools_result) result["McpOauthLoginRequest"] = to_class(MCPOauthLoginRequest, self.mcp_oauth_login_request) result["McpOauthLoginResult"] = to_class(MCPOauthLoginResult, self.mcp_oauth_login_result) + result["McpOauthRespondRequest"] = to_class(MCPOauthRespondRequest, self.mcp_oauth_respond_request) + result["McpOauthRespondResult"] = to_class(MCPOauthRespondResult, self.mcp_oauth_respond_result) + result["McpRegisterExternalClientRequest"] = to_class(MCPRegisterExternalClientRequest, self.mcp_register_external_client_request) + result["McpReloadWithConfigRequest"] = to_class(MCPReloadWithConfigRequest, self.mcp_reload_with_config_request) result["McpRemoveGitHubResult"] = to_class(MCPRemoveGitHubResult, self.mcp_remove_git_hub_result) + result["McpRestartServerRequest"] = to_class(MCPRestartServerRequest, self.mcp_restart_server_request) result["McpSamplingExecutionAction"] = to_enum(MCPSamplingExecutionAction, self.mcp_sampling_execution_action) result["McpSamplingExecutionResult"] = to_class(MCPSamplingExecutionResult, self.mcp_sampling_execution_result) result["McpServer"] = to_class(MCPServer, self.mcp_server) @@ -17060,10 +20792,17 @@ def to_dict(self) -> dict: result["McpServerConfigHttpOauthGrantType"] = to_enum(MCPServerConfigHTTPOauthGrantType, self.mcp_server_config_http_oauth_grant_type) result["McpServerConfigHttpType"] = to_enum(MCPServerConfigHTTPType, self.mcp_server_config_http_type) result["McpServerConfigStdio"] = to_class(MCPServerConfigStdio, self.mcp_server_config_stdio) + result["McpServerFailureInfo"] = to_class(MCPServerFailureInfo, self.mcp_server_failure_info) result["McpServerList"] = to_class(MCPServerList, self.mcp_server_list) + result["McpServerNeedsAuthInfo"] = to_class(MCPServerNeedsAuthInfo, self.mcp_server_needs_auth_info) result["McpSetEnvValueModeDetails"] = to_enum(MCPSetEnvValueModeDetails, self.mcp_set_env_value_mode_details) result["McpSetEnvValueModeParams"] = to_class(MCPSetEnvValueModeParams, self.mcp_set_env_value_mode_params) result["McpSetEnvValueModeResult"] = to_class(MCPSetEnvValueModeResult, self.mcp_set_env_value_mode_result) + result["McpStartServerRequest"] = to_class(MCPStartServerRequest, self.mcp_start_server_request) + result["McpStartServersResult"] = to_class(MCPStartServersResult, self.mcp_start_servers_result) + result["McpStopServerRequest"] = to_class(MCPStopServerRequest, self.mcp_stop_server_request) + result["McpTools"] = to_class(MCPTools, self.mcp_tools) + result["McpUnregisterExternalClientRequest"] = to_class(MCPUnregisterExternalClientRequest, self.mcp_unregister_external_client_request) result["MetadataContextInfoRequest"] = to_class(MetadataContextInfoRequest, self.metadata_context_info_request) result["MetadataContextInfoResult"] = to_class(MetadataContextInfoResult, self.metadata_context_info_result) result["MetadataIsProcessingResult"] = to_class(MetadataIsProcessingResult, self.metadata_is_processing_result) @@ -17076,7 +20815,7 @@ def to_dict(self) -> dict: result["MetadataSnapshotCurrentMode"] = to_enum(MetadataSnapshotCurrentMode, self.metadata_snapshot_current_mode) result["MetadataSnapshotRemoteMetadata"] = to_class(MetadataSnapshotRemoteMetadata, self.metadata_snapshot_remote_metadata) result["MetadataSnapshotRemoteMetadataRepository"] = to_class(MetadataSnapshotRemoteMetadataRepository, self.metadata_snapshot_remote_metadata_repository) - result["MetadataSnapshotRemoteMetadataTaskType"] = to_enum(MetadataSnapshotRemoteMetadataTaskType, self.metadata_snapshot_remote_metadata_task_type) + result["MetadataSnapshotRemoteMetadataTaskType"] = to_enum(TaskType, self.metadata_snapshot_remote_metadata_task_type) result["Model"] = to_class(Model, self.model) result["ModelBilling"] = to_class(ModelBilling, self.model_billing) result["ModelBillingTokenPrices"] = to_class(ModelBillingTokenPrices, self.model_billing_token_prices) @@ -17106,7 +20845,13 @@ def to_dict(self) -> dict: result["NameSetAutoResult"] = to_class(NameSetAutoResult, self.name_set_auto_result) result["NameSetRequest"] = to_class(NameSetRequest, self.name_set_request) result["OpenCanvasInstance"] = to_class(OpenCanvasInstance, self.open_canvas_instance) + result["OptionsUpdateAdditionalContentExclusionPolicy"] = to_class(OptionsUpdateAdditionalContentExclusionPolicy, self.options_update_additional_content_exclusion_policy) + result["OptionsUpdateAdditionalContentExclusionPolicyRule"] = to_class(OptionsUpdateAdditionalContentExclusionPolicyRule, self.options_update_additional_content_exclusion_policy_rule) + result["OptionsUpdateAdditionalContentExclusionPolicyRuleSource"] = to_class(OptionsUpdateAdditionalContentExclusionPolicyRuleSource, self.options_update_additional_content_exclusion_policy_rule_source) + result["OptionsUpdateAdditionalContentExclusionPolicyScope"] = to_enum(AdditionalContentExclusionPolicyScope, self.options_update_additional_content_exclusion_policy_scope) + result["OptionsUpdateContextTier"] = to_enum(OptionsUpdateContextTier, self.options_update_context_tier) result["OptionsUpdateEnvValueMode"] = to_enum(MCPSetEnvValueModeDetails, self.options_update_env_value_mode) + result["OptionsUpdateReasoningSummary"] = to_enum(ReasoningSummary, self.options_update_reasoning_summary) result["OptionsUpdateToolFilterPrecedence"] = to_enum(OptionsUpdateToolFilterPrecedence, self.options_update_tool_filter_precedence) result["PendingPermissionRequest"] = to_class(PendingPermissionRequest, self.pending_permission_request) result["PendingPermissionRequestList"] = to_class(PendingPermissionRequestList, self.pending_permission_request_list) @@ -17167,7 +20912,7 @@ def to_dict(self) -> dict: result["PermissionsConfigureAdditionalContentExclusionPolicy"] = to_class(PermissionsConfigureAdditionalContentExclusionPolicy, self.permissions_configure_additional_content_exclusion_policy) result["PermissionsConfigureAdditionalContentExclusionPolicyRule"] = to_class(PermissionsConfigureAdditionalContentExclusionPolicyRule, self.permissions_configure_additional_content_exclusion_policy_rule) result["PermissionsConfigureAdditionalContentExclusionPolicyRuleSource"] = to_class(PermissionsConfigureAdditionalContentExclusionPolicyRuleSource, self.permissions_configure_additional_content_exclusion_policy_rule_source) - result["PermissionsConfigureAdditionalContentExclusionPolicyScope"] = to_enum(PermissionsConfigureAdditionalContentExclusionPolicyScope, self.permissions_configure_additional_content_exclusion_policy_scope) + result["PermissionsConfigureAdditionalContentExclusionPolicyScope"] = to_enum(AdditionalContentExclusionPolicyScope, self.permissions_configure_additional_content_exclusion_policy_scope) result["PermissionsConfigureParams"] = to_class(PermissionsConfigureParams, self.permissions_configure_params) result["PermissionsConfigureResult"] = to_class(PermissionsConfigureResult, self.permissions_configure_result) result["PermissionsFolderTrustAddTrustedResult"] = to_class(PermissionsFolderTrustAddTrustedResult, self.permissions_folder_trust_add_trusted_result) @@ -17206,9 +20951,31 @@ def to_dict(self) -> dict: result["PingRequest"] = to_class(PingRequest, self.ping_request) result["PingResult"] = to_class(PingResult, self.ping_result) result["PlanReadResult"] = to_class(PlanReadResult, self.plan_read_result) + result["PlanReadSqlTodosResult"] = to_class(PlanReadSQLTodosResult, self.plan_read_sql_todos_result) + result["PlanSqlTodosRow"] = to_class(PlanSQLTodosRow, self.plan_sql_todos_row) result["PlanUpdateRequest"] = to_class(PlanUpdateRequest, self.plan_update_request) result["Plugin"] = to_class(Plugin, self.plugin) + result["PluginInstallResult"] = to_class(PluginInstallResult, self.plugin_install_result) result["PluginList"] = to_class(PluginList, self.plugin_list) + result["PluginListResult"] = to_class(PluginListResult, self.plugin_list_result) + result["PluginsDisableRequest"] = to_class(PluginsDisableRequest, self.plugins_disable_request) + result["PluginsEnableRequest"] = to_class(PluginsEnableRequest, self.plugins_enable_request) + result["PluginsInstallRequest"] = to_class(PluginsInstallRequest, self.plugins_install_request) + result["PluginsMarketplacesAddRequest"] = to_class(PluginsMarketplacesAddRequest, self.plugins_marketplaces_add_request) + result["PluginsMarketplacesBrowseRequest"] = to_class(PluginsMarketplacesBrowseRequest, self.plugins_marketplaces_browse_request) + result["PluginsMarketplacesRefreshRequest"] = to_class(PluginsMarketplacesRefreshRequest, self.plugins_marketplaces_refresh_request) + result["PluginsMarketplacesRemoveRequest"] = to_class(PluginsMarketplacesRemoveRequest, self.plugins_marketplaces_remove_request) + result["PluginsReloadRequest"] = to_class(PluginsReloadRequest, self.plugins_reload_request) + result["PluginsUninstallRequest"] = to_class(PluginsUninstallRequest, self.plugins_uninstall_request) + result["PluginsUpdateRequest"] = to_class(PluginsUpdateRequest, self.plugins_update_request) + result["PluginUpdateAllEntry"] = to_class(PluginUpdateAllEntry, self.plugin_update_all_entry) + result["PluginUpdateAllResult"] = to_class(PluginUpdateAllResult, self.plugin_update_all_result) + result["PluginUpdateResult"] = to_class(PluginUpdateResult, self.plugin_update_result) + result["PollSpawnedSessionsResult"] = to_class(PollSpawnedSessionsResult, self.poll_spawned_sessions_result) + result["ProviderConfig"] = to_class(ProviderConfig, self.provider_config) + result["ProviderConfigAzure"] = to_class(ProviderConfigAzure, self.provider_config_azure) + result["ProviderConfigType"] = to_enum(ProviderConfigType, self.provider_config_type) + result["ProviderConfigWireApi"] = to_enum(ProviderConfigWireAPI, self.provider_config_wire_api) result["PushAttachment"] = (self.push_attachment).to_dict() result["PushAttachmentBlob"] = to_class(PushAttachmentBlob, self.push_attachment_blob) result["PushAttachmentDirectory"] = to_class(PushAttachmentDirectory, self.push_attachment_directory) @@ -17229,13 +20996,35 @@ def to_dict(self) -> dict: result["QueueRemoveMostRecentResult"] = to_class(QueueRemoveMostRecentResult, self.queue_remove_most_recent_result) result["RegisterEventInterestParams"] = to_class(RegisterEventInterestParams, self.register_event_interest_params) result["RegisterEventInterestResult"] = to_class(RegisterEventInterestResult, self.register_event_interest_result) + result["RegisterExtensionToolsParams"] = to_class(_RegisterExtensionToolsParams, self.register_extension_tools_params) + result["RegisterExtensionToolsResult"] = to_class(_RegisterExtensionToolsResult, self.register_extension_tools_result) result["ReleaseEventInterestParams"] = to_class(ReleaseEventInterestParams, self.release_event_interest_params) + result["RemoteControlConfig"] = to_class(RemoteControlConfig, self.remote_control_config) + result["RemoteControlConfigExistingMcSession"] = to_class(RemoteControlConfigExistingMcSession, self.remote_control_config_existing_mc_session) + result["RemoteControlStatus"] = (self.remote_control_status).to_dict() + result["RemoteControlStatusActive"] = to_class(RemoteControlStatusActive, self.remote_control_status_active) + result["RemoteControlStatusConnecting"] = to_class(RemoteControlStatusConnecting, self.remote_control_status_connecting) + result["RemoteControlStatusError"] = to_class(RemoteControlStatusError, self.remote_control_status_error) + result["RemoteControlStatusOff"] = to_class(RemoteControlStatusOff, self.remote_control_status_off) + result["RemoteControlStatusResult"] = to_class(RemoteControlStatusResult, self.remote_control_status_result) + result["RemoteControlStopResult"] = to_class(RemoteControlStopResult, self.remote_control_stop_result) + result["RemoteControlTransferResult"] = to_class(RemoteControlTransferResult, self.remote_control_transfer_result) result["RemoteEnableRequest"] = to_class(RemoteEnableRequest, self.remote_enable_request) result["RemoteEnableResult"] = to_class(RemoteEnableResult, self.remote_enable_result) result["RemoteNotifySteerableChangedRequest"] = to_class(RemoteNotifySteerableChangedRequest, self.remote_notify_steerable_changed_request) result["RemoteNotifySteerableChangedResult"] = to_class(RemoteNotifySteerableChangedResult, self.remote_notify_steerable_changed_result) result["RemoteSessionConnectionResult"] = to_class(RemoteSessionConnectionResult, self.remote_session_connection_result) + result["RemoteSessionMetadataRepository"] = to_class(RemoteSessionMetadataRepository, self.remote_session_metadata_repository) + result["RemoteSessionMetadataTaskType"] = to_enum(TaskType, self.remote_session_metadata_task_type) + result["RemoteSessionMetadataValue"] = to_class(RemoteSessionMetadataValue, self.remote_session_metadata_value) result["RemoteSessionMode"] = to_enum(RemoteSessionMode, self.remote_session_mode) + result["RemoteSessionRepository"] = to_class(RemoteSessionRepository, self.remote_session_repository) + result["SandboxConfig"] = to_class(SandboxConfig, self.sandbox_config) + result["SandboxConfigUserPolicy"] = to_class(SandboxConfigUserPolicy, self.sandbox_config_user_policy) + result["SandboxConfigUserPolicyExperimental"] = to_class(SandboxConfigUserPolicyExperimental, self.sandbox_config_user_policy_experimental) + result["SandboxConfigUserPolicyExperimentalSeatbelt"] = to_class(SandboxConfigUserPolicyExperimentalSeatbelt, self.sandbox_config_user_policy_experimental_seatbelt) + result["SandboxConfigUserPolicyFilesystem"] = to_class(SandboxConfigUserPolicyFilesystem, self.sandbox_config_user_policy_filesystem) + result["SandboxConfigUserPolicyNetwork"] = to_class(SandboxConfigUserPolicyNetwork, self.sandbox_config_user_policy_network) result["ScheduleEntry"] = to_class(ScheduleEntry, self.schedule_entry) result["ScheduleList"] = to_class(ScheduleList, self.schedule_list) result["ScheduleStopRequest"] = to_class(ScheduleStopRequest, self.schedule_stop_request) @@ -17249,8 +21038,10 @@ def to_dict(self) -> dict: result["SendResult"] = to_class(SendResult, self.send_result) result["ServerSkill"] = to_class(ServerSkill, self.server_skill) result["ServerSkillList"] = to_class(ServerSkillList, self.server_skill_list) + result["SessionActivity"] = to_class(SessionActivity, self.session_activity) result["SessionAuthStatus"] = to_class(SessionAuthStatus, self.session_auth_status) result["SessionBulkDeleteResult"] = to_class(SessionBulkDeleteResult, self.session_bulk_delete_result) + result["SessionCapability"] = to_enum(SessionCapability, self.session_capability) result["SessionContext"] = to_class(SessionContext, self.session_context) result["SessionContextHostType"] = to_enum(HostType, self.session_context_host_type) result["SessionEnrichMetadataResult"] = to_class(SessionEnrichMetadataResult, self.session_enrich_metadata_result) @@ -17288,14 +21079,23 @@ def to_dict(self) -> dict: result["SessionInstalledPluginSourceLocal"] = to_class(SessionInstalledPluginSourceLocal, self.session_installed_plugin_source_local) result["SessionInstalledPluginSourceUrl"] = to_class(SessionInstalledPluginSourceURL, self.session_installed_plugin_source_url) result["SessionList"] = to_class(SessionList, self.session_list) + result["SessionListEntry"] = (self.session_list_entry).to_dict() result["SessionListFilter"] = to_class(SessionListFilter, self.session_list_filter) result["SessionLoadDeferredRepoHooksResult"] = to_class(SessionLoadDeferredRepoHooksResult, self.session_load_deferred_repo_hooks_result) result["SessionLogLevel"] = to_enum(SessionLogLevel, self.session_log_level) result["SessionMcpAppsCallToolResult"] = from_dict(lambda x: x, self.session_mcp_apps_call_tool_result) - result["SessionMetadata"] = to_class(SessionMetadata, self.session_metadata) result["SessionMetadataSnapshot"] = to_class(SessionMetadataSnapshot, self.session_metadata_snapshot) result["SessionMode"] = to_enum(SessionMode, self.session_mode) result["SessionModelList"] = to_class(SessionModelList, self.session_model_list) + result["SessionOpenOptions"] = to_class(SessionOpenOptions, self.session_open_options) + result["SessionOpenOptionsAdditionalContentExclusionPolicy"] = to_class(SessionOpenOptionsAdditionalContentExclusionPolicy, self.session_open_options_additional_content_exclusion_policy) + result["SessionOpenOptionsAdditionalContentExclusionPolicyRule"] = to_class(SessionOpenOptionsAdditionalContentExclusionPolicyRule, self.session_open_options_additional_content_exclusion_policy_rule) + result["SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource"] = to_class(SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource, self.session_open_options_additional_content_exclusion_policy_rule_source) + result["SessionOpenOptionsAdditionalContentExclusionPolicyScope"] = to_enum(AdditionalContentExclusionPolicyScope, self.session_open_options_additional_content_exclusion_policy_scope) + result["SessionOpenOptionsEnvValueMode"] = to_enum(MCPSetEnvValueModeDetails, self.session_open_options_env_value_mode) + result["SessionOpenOptionsReasoningSummary"] = to_enum(ReasoningSummary, self.session_open_options_reasoning_summary) + result["SessionOpenParams"] = (self.session_open_params).to_dict() + result["SessionOpenResult"] = to_class(SessionOpenResult, self.session_open_result) result["SessionPruneResult"] = to_class(SessionPruneResult, self.session_prune_result) result["SessionsBulkDeleteRequest"] = to_class(SessionsBulkDeleteRequest, self.sessions_bulk_delete_request) result["SessionsCheckInUseRequest"] = to_class(SessionsCheckInUseRequest, self.sessions_check_in_use_request) @@ -17311,6 +21111,8 @@ def to_dict(self) -> dict: result["SessionsFindByTaskIDResult"] = to_class(SessionsFindByTaskIDResult, self.sessions_find_by_task_id_result) result["SessionsForkRequest"] = to_class(SessionsForkRequest, self.sessions_fork_request) result["SessionsForkResult"] = to_class(SessionsForkResult, self.sessions_fork_result) + result["SessionsGetBoardEntryCountRequest"] = to_class(SessionsGetBoardEntryCountRequest, self.sessions_get_board_entry_count_request) + result["SessionsGetBoardEntryCountResult"] = to_class(SessionsGetBoardEntryCountResult, self.sessions_get_board_entry_count_result) result["SessionsGetEventFilePathRequest"] = to_class(SessionsGetEventFilePathRequest, self.sessions_get_event_file_path_request) result["SessionsGetEventFilePathResult"] = to_class(SessionsGetEventFilePathResult, self.sessions_get_event_file_path_result) result["SessionsGetLastForContextRequest"] = to_class(SessionsGetLastForContextRequest, self.sessions_get_last_for_context_request) @@ -17320,7 +21122,23 @@ def to_dict(self) -> dict: result["SessionSizes"] = to_class(SessionSizes, self.session_sizes) result["SessionsListRequest"] = to_class(SessionsListRequest, self.sessions_list_request) result["SessionsLoadDeferredRepoHooksRequest"] = to_class(SessionsLoadDeferredRepoHooksRequest, self.sessions_load_deferred_repo_hooks_request) + result["SessionsOpenAttach"] = to_class(SessionsOpenAttach, self.sessions_open_attach) + result["SessionsOpenCloud"] = to_class(SessionsOpenCloud, self.sessions_open_cloud) + result["SessionsOpenCreate"] = to_class(SessionsOpenCreate, self.sessions_open_create) + result["SessionsOpenHandoff"] = to_class(SessionsOpenHandoff, self.sessions_open_handoff) + result["SessionsOpenHandoffTaskType"] = to_enum(TaskType, self.sessions_open_handoff_task_type) + result["SessionsOpenProgress"] = to_class(SessionsOpenProgress, self.sessions_open_progress) + result["SessionsOpenProgressStatus"] = to_enum(SessionsOpenProgressStatus, self.sessions_open_progress_status) + result["SessionsOpenProgressStep"] = to_enum(SessionsOpenProgressStep, self.sessions_open_progress_step) + result["SessionsOpenRemote"] = to_class(SessionsOpenRemote, self.sessions_open_remote) + result["SessionsOpenResume"] = to_class(SessionsOpenResume, self.sessions_open_resume) + result["SessionsOpenResumeLast"] = to_class(SessionsOpenResumeLast, self.sessions_open_resume_last) + result["SessionsOpenStatus"] = to_enum(SessionsOpenStatus, self.sessions_open_status) + result["SessionSource"] = to_enum(SessionSource, self.session_source) + result["SessionsPollSpawnedSessionsEvent"] = to_class(SessionsPollSpawnedSessionsEvent, self.sessions_poll_spawned_sessions_event) + result["SessionsPollSpawnedSessionsRequest"] = to_class(SessionsPollSpawnedSessionsRequest, self.sessions_poll_spawned_sessions_request) result["SessionsPruneOldRequest"] = to_class(SessionsPruneOldRequest, self.sessions_prune_old_request) + result["SessionsRegisterExtensionToolsOnSessionOptions"] = to_class(SessionsRegisterExtensionToolsOnSessionOptions, self.sessions_register_extension_tools_on_session_options) result["SessionsReleaseLockRequest"] = to_class(SessionsReleaseLockRequest, self.sessions_release_lock_request) result["SessionsReleaseLockResult"] = to_class(SessionsReleaseLockResult, self.sessions_release_lock_result) result["SessionsReloadPluginHooksRequest"] = to_class(SessionsReloadPluginHooksRequest, self.sessions_reload_plugin_hooks_request) @@ -17329,12 +21147,19 @@ def to_dict(self) -> dict: result["SessionsSaveResult"] = to_class(SessionsSaveResult, self.sessions_save_result) result["SessionsSetAdditionalPluginsRequest"] = to_class(SessionsSetAdditionalPluginsRequest, self.sessions_set_additional_plugins_request) result["SessionsSetAdditionalPluginsResult"] = to_class(SessionsSetAdditionalPluginsResult, self.sessions_set_additional_plugins_result) + result["SessionsSetRemoteControlSteeringRequest"] = to_class(SessionsSetRemoteControlSteeringRequest, self.sessions_set_remote_control_steering_request) + result["SessionsStartRemoteControlRequest"] = to_class(SessionsStartRemoteControlRequest, self.sessions_start_remote_control_request) + result["SessionsStopRemoteControlRequest"] = to_class(SessionsStopRemoteControlRequest, self.sessions_stop_remote_control_request) + result["SessionsTransferRemoteControlRequest"] = to_class(SessionsTransferRemoteControlRequest, self.sessions_transfer_remote_control_request) + result["SessionTelemetryEngagement"] = to_class(SessionTelemetryEngagement, self.session_telemetry_engagement) result["SessionUpdateOptionsParams"] = to_class(SessionUpdateOptionsParams, self.session_update_options_params) result["SessionUpdateOptionsResult"] = to_class(SessionUpdateOptionsResult, self.session_update_options_result) result["SessionWorkingDirectoryContext"] = to_class(SessionWorkingDirectoryContext, self.session_working_directory_context) result["SessionWorkingDirectoryContextHostType"] = to_enum(HostType, self.session_working_directory_context_host_type) + result["ShellCancelUserRequestedRequest"] = to_class(ShellCancelUserRequestedRequest, self.shell_cancel_user_requested_request) result["ShellExecRequest"] = to_class(ShellExecRequest, self.shell_exec_request) result["ShellExecResult"] = to_class(ShellExecResult, self.shell_exec_result) + result["ShellExecuteUserRequestedRequest"] = to_class(ShellExecuteUserRequestedRequest, self.shell_execute_user_requested_request) result["ShellKillRequest"] = to_class(ShellKillRequest, self.shell_kill_request) result["ShellKillResult"] = to_class(ShellKillResult, self.shell_kill_result) result["ShellKillSignal"] = to_enum(ShellKillSignal, self.shell_kill_signal) @@ -17413,6 +21238,8 @@ def to_dict(self) -> dict: result["UIElicitationStringEnumField"] = to_class(UIElicitationStringEnumField, self.ui_elicitation_string_enum_field) result["UIElicitationStringOneOfField"] = to_class(UIElicitationStringOneOfField, self.ui_elicitation_string_one_of_field) result["UIElicitationStringOneOfFieldOneOf"] = to_class(UIElicitationStringOneOfFieldOneOf, self.ui_elicitation_string_one_of_field_one_of) + result["UIEphemeralQueryRequest"] = to_class(UIEphemeralQueryRequest, self.ui_ephemeral_query_request) + result["UIEphemeralQueryResult"] = to_class(UIEphemeralQueryResult, self.ui_ephemeral_query_result) result["UIExitPlanModeAction"] = to_enum(UIExitPlanModeAction, self.ui_exit_plan_mode_action) result["UIExitPlanModeResponse"] = to_class(UIExitPlanModeResponse, self.ui_exit_plan_mode_response) result["UIHandlePendingAutoModeSwitchRequest"] = to_class(UIHandlePendingAutoModeSwitchRequest, self.ui_handle_pending_auto_mode_switch_request) @@ -17434,6 +21261,7 @@ def to_dict(self) -> dict: result["UsageMetricsModelMetricUsage"] = to_class(UsageMetricsModelMetricUsage, self.usage_metrics_model_metric_usage) result["UsageMetricsTokenDetail"] = to_class(UsageMetricsTokenDetail, self.usage_metrics_token_detail) result["UserAuthInfo"] = to_class(UserAuthInfo, self.user_auth_info) + result["UserRequestedShellCommandResult"] = to_class(UserRequestedShellCommandResult, self.user_requested_shell_command_result) result["WorkspaceDiffFileChange"] = to_class(WorkspaceDiffFileChange, self.workspace_diff_file_change) result["WorkspaceDiffFileChangeType"] = to_enum(WorkspaceDiffFileChangeType, self.workspace_diff_file_change_type) result["WorkspaceDiffMode"] = to_enum(WorkspaceDiffMode, self.workspace_diff_mode) @@ -17476,7 +21304,7 @@ def _load_AgentRegistrySpawnResult(obj: Any) -> "AgentRegistrySpawnResult": case "validation-error": return AgentRegistrySpawnValidationError.from_dict(obj) case _: raise ValueError(f"Unknown AgentRegistrySpawnResult kind: {kind!r}") -# The new auth credentials to install on the session. When omitted or `undefined`, the call is a no-op and the session's existing credentials are preserved. The runtime stores the value verbatim and uses it for outbound model/API requests; it does NOT re-validate or re-fetch the associated Copilot user response. Several variants carry secret material; treat this method's params as containing secrets at rest and in transit. +# Initial authentication info for the session. AuthInfo = HMACAuthInfo | EnvAuthInfo | TokenAuthInfo | CopilotAPITokenAuthInfo | UserAuthInfo | GhCLIAuthInfo | APIKeyAuthInfo def _load_AuthInfo(obj: Any) -> "AuthInfo": @@ -17611,6 +21439,46 @@ def _load_QueuedCommandResult(obj: Any) -> "QueuedCommandResult": case "false": return QueuedCommandNotHandled.from_dict(obj) case _: raise ValueError(f"Unknown QueuedCommandResult handled: {kind!r}") +# State of the runtime-managed remote-control singleton. +RemoteControlStatus = RemoteControlStatusOff | RemoteControlStatusConnecting | RemoteControlStatusActive | RemoteControlStatusError + +def _load_RemoteControlStatus(obj: Any) -> "RemoteControlStatus": + assert isinstance(obj, dict) + kind = obj.get("state") + match kind: + case "off": return RemoteControlStatusOff.from_dict(obj) + case "connecting": return RemoteControlStatusConnecting.from_dict(obj) + case "active": return RemoteControlStatusActive.from_dict(obj) + case "error": return RemoteControlStatusError.from_dict(obj) + case _: raise ValueError(f"Unknown RemoteControlStatus state: {kind!r}") + +# Local or remote session metadata entry. Narrow on `isRemote` to access source-specific fields. +SessionListEntry = LocalSessionMetadataValue | RemoteSessionMetadataValue + +def _load_SessionListEntry(obj: Any) -> "SessionListEntry": + assert isinstance(obj, dict) + kind = obj.get("isRemote") + match kind: + case "false": return LocalSessionMetadataValue.from_dict(obj) + case "true": return RemoteSessionMetadataValue.from_dict(obj) + case _: raise ValueError(f"Unknown SessionListEntry isRemote: {kind!r}") + +# Open a session by creating, resuming, attaching, connecting to a remote, or handing off. +SessionOpenParams = SessionsOpenCreate | SessionsOpenResume | SessionsOpenResumeLast | SessionsOpenAttach | SessionsOpenRemote | SessionsOpenCloud | SessionsOpenHandoff + +def _load_SessionOpenParams(obj: Any) -> "SessionOpenParams": + assert isinstance(obj, dict) + kind = obj.get("kind") + match kind: + case "create": return SessionsOpenCreate.from_dict(obj) + case "resume": return SessionsOpenResume.from_dict(obj) + case "resumeLast": return SessionsOpenResumeLast.from_dict(obj) + case "attach": return SessionsOpenAttach.from_dict(obj) + case "remote": return SessionsOpenRemote.from_dict(obj) + case "cloud": return SessionsOpenCloud.from_dict(obj) + case "handoff": return SessionsOpenHandoff.from_dict(obj) + case _: raise ValueError(f"Unknown SessionOpenParams kind: {kind!r}") + # Result of invoking the slash command (text output, prompt to send to the agent, or completion). SlashCommandInvocationResult = SlashCommandTextResult | SlashCommandAgentPromptResult | SlashCommandCompletedResult | SlashCommandSelectSubcommandResult @@ -17651,11 +21519,20 @@ def _load_TaskInfo(obj: Any) -> "TaskInfo": McpExecuteSamplingRequest = dict McpExecuteSamplingResult = dict McpServerAuthConfig = bool +MetadataSnapshotRemoteMetadataTaskType = TaskType +OptionsUpdateAdditionalContentExclusionPolicyScope = AdditionalContentExclusionPolicyScope OptionsUpdateEnvValueMode = MCPSetEnvValueModeDetails +OptionsUpdateReasoningSummary = ReasoningSummary +PermissionsConfigureAdditionalContentExclusionPolicyScope = AdditionalContentExclusionPolicyScope PermissionsSetAllowAllSource = PermissionsSetAAllSource PermissionsSetApproveAllSource = PermissionsSetAAllSource +RemoteSessionMetadataTaskType = TaskType SessionContextHostType = HostType SessionMcpAppsCallToolResult = dict +SessionOpenOptionsAdditionalContentExclusionPolicyScope = AdditionalContentExclusionPolicyScope +SessionOpenOptionsEnvValueMode = MCPSetEnvValueModeDetails +SessionOpenOptionsReasoningSummary = ReasoningSummary +SessionsOpenHandoffTaskType = TaskType SessionWorkingDirectoryContextHostType = HostType TaskInfoExecutionMode = TaskExecutionMode TaskInfoStatus = TaskStatus @@ -17779,6 +21656,76 @@ async def discover(self, params: MCPDiscoverRequest, *, timeout: float | None = return MCPDiscoverResult.from_dict(await self._client.request("mcp.discover", params_dict, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. +class ServerPluginsMarketplacesApi: + def __init__(self, client: "JsonRpcClient"): + self._client = client + + async def list(self, *, timeout: float | None = None) -> MarketplaceListResult: + "Lists all registered marketplaces (defaults + user-added).\n\nReturns:\n All registered marketplaces, including built-in defaults." + return MarketplaceListResult.from_dict(await self._client.request("plugins.marketplaces.list", {}, **_timeout_kwargs(timeout))) + + async def add(self, params: PluginsMarketplacesAddRequest, *, timeout: float | None = None) -> MarketplaceAddResult: + "Registers a new marketplace from a source (owner/repo, URL, or local path).\n\nArgs:\n params: Marketplace source to register.\n\nReturns:\n Result of registering a new marketplace." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return MarketplaceAddResult.from_dict(await self._client.request("plugins.marketplaces.add", params_dict, **_timeout_kwargs(timeout))) + + async def remove(self, params: PluginsMarketplacesRemoveRequest, *, timeout: float | None = None) -> MarketplaceRemoveResult: + "Removes a previously-registered marketplace. When the marketplace has dependent plugins and `force` is not set, the marketplace is left intact and the result lists the dependents so the caller can decide whether to retry with `force=true`.\n\nArgs:\n params: Name of the marketplace to remove and an optional force flag.\n\nReturns:\n Outcome of the remove attempt, including dependent-plugin info when applicable." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return MarketplaceRemoveResult.from_dict(await self._client.request("plugins.marketplaces.remove", params_dict, **_timeout_kwargs(timeout))) + + async def browse(self, params: PluginsMarketplacesBrowseRequest, *, timeout: float | None = None) -> MarketplaceBrowseResult: + "Lists plugins advertised by a registered marketplace.\n\nArgs:\n params: Name of the marketplace whose plugin catalog to fetch.\n\nReturns:\n Plugins advertised by the marketplace." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return MarketplaceBrowseResult.from_dict(await self._client.request("plugins.marketplaces.browse", params_dict, **_timeout_kwargs(timeout))) + + async def refresh(self, params: PluginsMarketplacesRefreshRequest, *, timeout: float | None = None) -> MarketplaceRefreshResult: + "Re-fetches one or all registered marketplace catalogs.\n\nArgs:\n params: Optional marketplace name; omit to refresh all.\n\nReturns:\n Result of refreshing one or more marketplace catalogs." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return MarketplaceRefreshResult.from_dict(await self._client.request("plugins.marketplaces.refresh", params_dict, **_timeout_kwargs(timeout))) + + +# Experimental: this API group is experimental and may change or be removed. +class ServerPluginsApi: + def __init__(self, client: "JsonRpcClient"): + self._client = client + self.marketplaces = ServerPluginsMarketplacesApi(client) + + async def list(self, *, timeout: float | None = None) -> PluginListResult: + "Lists plugins installed in user/global state.\n\nReturns:\n Plugins installed in user/global state." + return PluginListResult.from_dict(await self._client.request("plugins.list", {}, **_timeout_kwargs(timeout))) + + async def install(self, params: PluginsInstallRequest, *, timeout: float | None = None) -> PluginInstallResult: + "Installs a plugin from a marketplace, GitHub repo, URL, or local path.\n\nArgs:\n params: Plugin source and optional working directory for relative-path resolution.\n\nReturns:\n Result of installing a plugin." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return PluginInstallResult.from_dict(await self._client.request("plugins.install", params_dict, **_timeout_kwargs(timeout))) + + async def uninstall(self, params: PluginsUninstallRequest, *, timeout: float | None = None) -> None: + "Uninstalls an installed plugin.\n\nArgs:\n params: Name (or spec) of the plugin to uninstall." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + await self._client.request("plugins.uninstall", params_dict, **_timeout_kwargs(timeout)) + + async def update(self, params: PluginsUpdateRequest, *, timeout: float | None = None) -> PluginUpdateResult: + "Updates an installed plugin to its latest published version.\n\nArgs:\n params: Name (or spec) of the plugin to update.\n\nReturns:\n Result of updating a single plugin." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return PluginUpdateResult.from_dict(await self._client.request("plugins.update", params_dict, **_timeout_kwargs(timeout))) + + async def update_all(self, *, timeout: float | None = None) -> PluginUpdateAllResult: + "Updates every installed plugin to its latest published version.\n\nReturns:\n Result of updating all installed plugins." + return PluginUpdateAllResult.from_dict(await self._client.request("plugins.updateAll", {}, **_timeout_kwargs(timeout))) + + async def enable(self, params: PluginsEnableRequest, *, timeout: float | None = None) -> None: + "Enables installed plugins for new sessions.\n\nArgs:\n params: Plugin names (or specs) to enable." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + await self._client.request("plugins.enable", params_dict, **_timeout_kwargs(timeout)) + + async def disable(self, params: PluginsDisableRequest, *, timeout: float | None = None) -> None: + "Disables installed plugins for new sessions.\n\nArgs:\n params: Plugin names (or specs) to disable." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + await self._client.request("plugins.disable", params_dict, **_timeout_kwargs(timeout)) + + class ServerSkillsConfigApi: def __init__(self, client: "JsonRpcClient"): self._client = client @@ -17839,6 +21786,11 @@ class ServerSessionsApi: def __init__(self, client: "JsonRpcClient"): self._client = client + async def open(self, params: SessionOpenParams, *, timeout: float | None = None) -> SessionOpenResult: + "Creates or resumes a local session and returns the opened session ID.\n\nArgs:\n params: Open a session by creating, resuming, attaching, connecting to a remote, or handing off.\n\nReturns:\n Result of opening a session." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return SessionOpenResult.from_dict(await self._client.request("sessions.open", params_dict, **_timeout_kwargs(timeout))) + async def fork(self, params: SessionsForkRequest, *, timeout: float | None = None) -> SessionsForkResult: "Creates a new session by forking persisted history from an existing session.\n\nArgs:\n params: Source session identifier to fork from, optional event-ID boundary, and optional friendly name for the new session.\n\nReturns:\n Identifier and optional friendly name assigned to the newly forked session." params_dict = {k: v for k, v in params.to_dict().items() if v is not None} @@ -17850,7 +21802,7 @@ async def connect(self, params: ConnectRemoteSessionParams, *, timeout: float | return RemoteSessionConnectionResult.from_dict(await self._client.request("sessions.connect", params_dict, **_timeout_kwargs(timeout))) async def list(self, params: SessionsListRequest, *, timeout: float | None = None) -> SessionList: - "Lists persisted sessions, optionally filtered by working-directory context.\n\nArgs:\n params: Optional metadata-load limit and filters applied to the returned sessions.\n\nReturns:\n Persisted sessions matching the filter, ordered most-recently-modified first." + "Lists sessions, optionally filtered by source and working-directory context. Returned entries are discriminated by `isRemote`: local entries carry only the lightweight `LocalSessionMetadataValue` shape; remote entries carry the full `RemoteSessionMetadataValue` shape (repository, PR number, taskType, etc.).\n\nArgs:\n params: Optional source filter, metadata-load limit, and context filter applied to the returned sessions.\n\nReturns:\n Sessions matching the filter, ordered most-recently-modified first." params_dict = {k: v for k, v in params.to_dict().items() if v is not None} return SessionList.from_dict(await self._client.request("sessions.list", params_dict, **_timeout_kwargs(timeout))) @@ -17869,11 +21821,6 @@ async def get_last_for_context(self, params: SessionsGetLastForContextRequest, * params_dict = {k: v for k, v in params.to_dict().items() if v is not None} return SessionsGetLastForContextResult.from_dict(await self._client.request("sessions.getLastForContext", params_dict, **_timeout_kwargs(timeout))) - async def get_event_file_path(self, params: SessionsGetEventFilePathRequest, *, timeout: float | None = None) -> SessionsGetEventFilePathResult: - "Computes the absolute path to a session's persisted events.jsonl file.\n\nArgs:\n params: Session ID whose event-log file path to compute.\n\nReturns:\n Absolute path to the session's events.jsonl file on disk." - params_dict = {k: v for k, v in params.to_dict().items() if v is not None} - return SessionsGetEventFilePathResult.from_dict(await self._client.request("sessions.getEventFilePath", params_dict, **_timeout_kwargs(timeout))) - async def get_sizes(self, *, timeout: float | None = None) -> SessionSizes: "Returns the on-disk byte size of each session's workspace directory.\n\nReturns:\n Map of sessionId -> on-disk size in bytes for each session's workspace directory." return SessionSizes.from_dict(await self._client.request("sessions.getSizes", {}, **_timeout_kwargs(timeout))) @@ -17883,11 +21830,6 @@ async def check_in_use(self, params: SessionsCheckInUseRequest, *, timeout: floa params_dict = {k: v for k, v in params.to_dict().items() if v is not None} return SessionsCheckInUseResult.from_dict(await self._client.request("sessions.checkInUse", params_dict, **_timeout_kwargs(timeout))) - async def get_persisted_remote_steerable(self, params: SessionsGetPersistedRemoteSteerableRequest, *, timeout: float | None = None) -> SessionsGetPersistedRemoteSteerableResult: - "Returns a session's persisted remote-steerable flag, if any has been recorded.\n\nArgs:\n params: Session ID to look up the persisted remote-steerable flag for.\n\nReturns:\n The session's persisted remote-steerable flag, or omitted when no value has been persisted." - params_dict = {k: v for k, v in params.to_dict().items() if v is not None} - return SessionsGetPersistedRemoteSteerableResult.from_dict(await self._client.request("sessions.getPersistedRemoteSteerable", params_dict, **_timeout_kwargs(timeout))) - async def close(self, params: SessionsCloseRequest, *, timeout: float | None = None) -> SessionsCloseResult: "Closes a session: emits shutdown, flushes pending events, releases the in-use lock, and disposes the active session.\n\nArgs:\n params: Session ID to close.\n\nReturns:\n Closes a session: emits shutdown, flushes pending events to disk, releases the in-use lock, disposes the active session. Idempotent: succeeds even if the session is not currently active." params_dict = {k: v for k, v in params.to_dict().items() if v is not None} @@ -17933,6 +21875,30 @@ async def set_additional_plugins(self, params: SessionsSetAdditionalPluginsReque params_dict = {k: v for k, v in params.to_dict().items() if v is not None} return SessionsSetAdditionalPluginsResult.from_dict(await self._client.request("sessions.setAdditionalPlugins", params_dict, **_timeout_kwargs(timeout))) + async def start_remote_control(self, params: SessionsStartRemoteControlRequest, *, timeout: float | None = None) -> RemoteControlStatusResult: + "Attaches the runtime-managed remote-control singleton to a session, awaiting initial setup. If remote control is already attached to a different session, the singleton is transferred (preserving the underlying Mission Control connection). Returns the final status.\n\nArgs:\n params: Parameters for attaching the remote-control singleton to a session.\n\nReturns:\n Wrapper for the singleton's current status." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return RemoteControlStatusResult.from_dict(await self._client.request("sessions.startRemoteControl", params_dict, **_timeout_kwargs(timeout))) + + async def transfer_remote_control(self, params: SessionsTransferRemoteControlRequest, *, timeout: float | None = None) -> RemoteControlTransferResult: + "Atomically rebinds the remote-control singleton to a different session, preserving the underlying Mission Control connection. When `expectedFromSessionId` is provided and does not match the singleton's current `attachedSessionId`, the transfer is rejected with `transferred: false` and the current status is returned unchanged.\n\nArgs:\n params: Parameters for atomically rebinding the remote-control singleton.\n\nReturns:\n Outcome of a transferRemoteControl call." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return RemoteControlTransferResult.from_dict(await self._client.request("sessions.transferRemoteControl", params_dict, **_timeout_kwargs(timeout))) + + async def set_remote_control_steering(self, params: SessionsSetRemoteControlSteeringRequest, *, timeout: float | None = None) -> RemoteControlStatusResult: + "Patches the steering state of the active remote-control singleton. When remote control is off, this is a no-op and the off status is returned. Today only `enabled: true` is actionable on the underlying exporter; passing `false` is reserved for future use.\n\nArgs:\n params: Patch for the singleton's steering state.\n\nReturns:\n Wrapper for the singleton's current status." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return RemoteControlStatusResult.from_dict(await self._client.request("sessions.setRemoteControlSteering", params_dict, **_timeout_kwargs(timeout))) + + async def stop_remote_control(self, params: SessionsStopRemoteControlRequest, *, timeout: float | None = None) -> RemoteControlStopResult: + "Stops the remote-control singleton. When `expectedSessionId` is provided and does not match the singleton's current `attachedSessionId`, the stop is rejected with `stopped: false` and the current status is returned unchanged (unless `force` is set, in which case the singleton is unconditionally torn down).\n\nArgs:\n params: Parameters for stopping the remote-control singleton.\n\nReturns:\n Outcome of a stopRemoteControl call." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return RemoteControlStopResult.from_dict(await self._client.request("sessions.stopRemoteControl", params_dict, **_timeout_kwargs(timeout))) + + async def get_remote_control_status(self, *, timeout: float | None = None) -> RemoteControlStatusResult: + "Returns the current state of the remote-control singleton, including the attached session id and frontend URL when active.\n\nReturns:\n Wrapper for the singleton's current status." + return RemoteControlStatusResult.from_dict(await self._client.request("sessions.getRemoteControlStatus", {}, **_timeout_kwargs(timeout))) + # Experimental: this API group is experimental and may change or be removed. class ServerAgentRegistryApi: @@ -17954,6 +21920,7 @@ def __init__(self, client: "JsonRpcClient"): self.account = ServerAccountApi(client) self.secrets = ServerSecretsApi(client) self.mcp = ServerMcpApi(client) + self.plugins = ServerPluginsApi(client) self.skills = ServerSkillsApi(client) self.user = ServerUserApi(client) self.runtime = ServerRuntimeApi(client) @@ -17967,13 +21934,50 @@ async def ping(self, params: PingRequest, *, timeout: float | None = None) -> Pi return PingResult.from_dict(await self._client.request("ping", params_dict, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. +class _InternalServerSessionsApi: + def __init__(self, client: "JsonRpcClient"): + self._client = client + + async def _get_event_file_path(self, params: SessionsGetEventFilePathRequest, *, timeout: float | None = None) -> SessionsGetEventFilePathResult: + "Computes the absolute path to a session's persisted events.jsonl file. Internal: filesystem paths are only meaningful in-process (CLI and runtime share a filesystem). Currently used by the CLI's contribution-graph feature to read historical events directly. Remote SDK consumers must not depend on this; a proper event-query API would replace it if the contribution graph ever needed to work over the wire.\n\nArgs:\n params: Session ID whose event-log file path to compute.\n\nReturns:\n Absolute path to the session's events.jsonl file on disk.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return SessionsGetEventFilePathResult.from_dict(await self._client.request("sessions.getEventFilePath", params_dict, **_timeout_kwargs(timeout))) + + async def _get_persisted_remote_steerable(self, params: SessionsGetPersistedRemoteSteerableRequest, *, timeout: float | None = None) -> SessionsGetPersistedRemoteSteerableResult: + "Returns a session's persisted remote-steerable flag, if any has been recorded. Internal: this is CLI-specific book-keeping used by `--continue` / `--resume` to inherit the prior session's remote-steerable preference. SDK consumers that want similar behavior should manage their own persistence around start/stop calls rather than relying on this runtime-side flag.\n\nArgs:\n params: Session ID to look up the persisted remote-steerable flag for.\n\nReturns:\n The session's persisted remote-steerable flag, or omitted when no value has been persisted.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return SessionsGetPersistedRemoteSteerableResult.from_dict(await self._client.request("sessions.getPersistedRemoteSteerable", params_dict, **_timeout_kwargs(timeout))) + + async def _get_board_entry_count(self, params: SessionsGetBoardEntryCountRequest, *, timeout: float | None = None) -> SessionsGetBoardEntryCountResult: + "Gets the dynamic-context board entry count associated with a session, when available. Internal: this exists solely so CLI telemetry events (`rem_spawn_gate`, `rem_consolidation_complete`) can pair START / END board counts around the detached rem-agent spawn. \"Dynamic context board\" is a runtime-internal concept that is not part of the public SDK contract; the long-term plan is to relocate the telemetry emission into the runtime so this method can be deleted entirely.\n\nArgs:\n params: Session ID whose board entry count should be returned.\n\nReturns:\n Dynamic-context board entry count, when available.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return SessionsGetBoardEntryCountResult.from_dict(await self._client.request("sessions.getBoardEntryCount", params_dict, **_timeout_kwargs(timeout))) + + async def _poll_spawned_sessions(self, params: SessionsPollSpawnedSessionsRequest, *, timeout: float | None = None) -> PollSpawnedSessionsResult: + "Cursor-based long-poll for sessions spawned by the runtime (e.g. in response to a Mission Control `start_session` command). The cursor is an opaque token; pass it back to receive only spawn events that occurred AFTER the cursor was issued. Omit the cursor on the first call to receive any events buffered since the runtime started. Internal: this is a CLI background-daemon plumbing primitive. SDK consumers that need to react to runtime-spawned sessions should subscribe to a higher-level event stream rather than driving a long-poll loop.\n\nArgs:\n params: Cursor and optional long-poll wait for polling runtime-spawned sessions.\n\nReturns:\n Batch of spawn events plus a cursor for follow-up polls.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return PollSpawnedSessionsResult.from_dict(await self._client.request("sessions.pollSpawnedSessions", params_dict, **_timeout_kwargs(timeout))) + + async def _register_extension_tools_on_session(self, params: _RegisterExtensionToolsParams, *, timeout: float | None = None) -> _RegisterExtensionToolsResult: + "Registers extension-provided tools on the given session, gated by an optional `enabled` callback. Returns an opaque unsubscribe function the caller must invoke to deregister the tools when the extension is torn down. Marked internal because `loader`, `enabled`, and the returned `unsubscribe` are in-process handles that cannot cross the JSON-RPC boundary. Disappears once extension discovery / launch / tool registration are owned by the runtime: SDK consumers will pass pure config (search paths, disabled ids) via `SessionOptions` and the runtime will resolve, launch, register, and tear down extensions itself.\n\nArgs:\n params: Params to attach an extension loader's tools to a session.\n\nReturns:\n Handle for releasing the extension tool registration.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + return _RegisterExtensionToolsResult.from_dict(await self._client.request("sessions.registerExtensionToolsOnSession", params_dict, **_timeout_kwargs(timeout))) + + async def _configure_session_extensions(self, params: _ConfigureSessionExtensionsParams, *, timeout: float | None = None) -> None: + "Attaches (or detaches) an in-process ExtensionController delegate for the given session, used by shared-API surfaces that need to query or modify the session's extension state. Pass `controller: undefined` to detach. Marked internal because the controller is an in-process object that cannot cross the JSON-RPC boundary. Disappears alongside `registerExtensionToolsOnSession`: once the runtime owns extension management, the public surface exposes list/enable/disable/reload as dedicated RPCs served by the runtime.\n\nArgs:\n params: Params to attach or detach an in-process ExtensionController delegate.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + await self._client.request("sessions.configureSessionExtensions", params_dict, **_timeout_kwargs(timeout)) + + class _InternalServerRpc: """Internal SDK server-scoped RPC methods. Not part of the public API.""" def __init__(self, client: "JsonRpcClient"): self._client = client + self.sessions = _InternalServerSessionsApi(client) async def _connect(self, params: _ConnectRequest, *, timeout: float | None = None) -> _ConnectResult: - "Performs the SDK server connection handshake and validates the optional connection token.\n\nArgs:\n params: Optional connection token presented by the SDK client during the handshake.\n\nReturns:\n Handshake result reporting the server's protocol version and package version on success.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + "Performs the SDK server connection handshake and validates the optional connection token. Marked internal because this is JSON-RPC transport plumbing invoked automatically by an SDK client's own `connect()` wrapper, not a user-facing method. Stays internal as long as the SDK client owns the handshake; would only become public if the SDK ever exposed the raw schema surface to consumers without a connection wrapper.\n\nArgs:\n params: Optional connection token presented by the SDK client during the handshake.\n\nReturns:\n Handshake result reporting the server's protocol version and package version on success.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." params_dict = {k: v for k, v in params.to_dict().items() if v is not None} return _ConnectResult.from_dict(await self._client.request("connect", params_dict, **_timeout_kwargs(timeout))) @@ -18125,6 +22129,10 @@ async def delete(self, *, timeout: float | None = None) -> None: "Deletes the session plan file from the workspace." await self._client.request("session.plan.delete", {"sessionId": self._session_id}, **_timeout_kwargs(timeout)) + async def read_sql_todos(self, *, timeout: float | None = None) -> PlanReadSQLTodosResult: + "Reads todo rows from the session SQL database for plan rendering.\n\nReturns:\n Todo rows read from the session SQL database. Empty when no session database is available." + return PlanReadSQLTodosResult.from_dict(await self._client.request("session.plan.readSqlTodos", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + # Experimental: this API group is experimental and may change or be removed. class WorkspacesApi: @@ -18332,6 +22340,12 @@ def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client self._session_id = session_id + async def respond(self, params: MCPOauthRespondRequest, *, timeout: float | None = None) -> MCPOauthRespondResult: + "Responds to a pending MCP OAuth provider request. Marked internal because the `provider` argument is an in-process OAuthClientProvider instance that cannot be carried over the wire; the public OAuth surface will route the response through a wire-clean handshake once the CLI moves on top of the SDK.\n\nArgs:\n params: MCP OAuth request id and optional provider response.\n\nReturns:\n Empty result after recording the MCP OAuth response." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + return MCPOauthRespondResult.from_dict(await self._client.request("session.mcp.oauth.respond", params_dict, **_timeout_kwargs(timeout))) + async def login(self, params: MCPOauthLoginRequest, *, timeout: float | None = None) -> MCPOauthLoginResult: "Starts OAuth authentication for a remote MCP server.\n\nArgs:\n params: Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, and the callback success-page copy.\n\nReturns:\n OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server." params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} @@ -18389,9 +22403,15 @@ def __init__(self, client: "JsonRpcClient", session_id: str): self.apps = McpAppsApi(client, session_id) async def list(self, *, timeout: float | None = None) -> MCPServerList: - "Lists MCP servers configured for the session and their connection status.\n\nReturns:\n MCP servers configured for the session, with their connection status." + "Lists MCP servers configured for the session, their connection status, and host-level state. The host-level state (disabled/filtered servers, failed/needs-auth/pending connections, mcp3p policy, full config) is empty/zero when no MCP host has been initialized for the session.\n\nReturns:\n MCP servers configured for the session, with their connection status and host-level state." return MCPServerList.from_dict(await self._client.request("session.mcp.list", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + async def list_tools(self, params: MCPListToolsRequest, *, timeout: float | None = None) -> MCPListToolsResult: + "Lists the tools exposed by a connected MCP server on this session's host.\n\nArgs:\n params: Server name whose tool list should be returned.\n\nReturns:\n Tools exposed by the connected MCP server. Throws when the server is not connected." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + return MCPListToolsResult.from_dict(await self._client.request("session.mcp.listTools", params_dict, **_timeout_kwargs(timeout))) + async def enable(self, params: MCPEnableRequest, *, timeout: float | None = None) -> None: "Enables an MCP server for the session.\n\nArgs:\n params: Name of the MCP server to enable for the session." params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} @@ -18408,6 +22428,12 @@ async def reload(self, *, timeout: float | None = None) -> None: "Reloads MCP server connections for the session." await self._client.request("session.mcp.reload", {"sessionId": self._session_id}, **_timeout_kwargs(timeout)) + async def reload_with_config(self, params: MCPReloadWithConfigRequest, *, timeout: float | None = None) -> MCPStartServersResult: + "Reloads MCP server connections for the session with an explicit host-provided configuration.\n\nArgs:\n params: Opaque MCP reload configuration.\n\nReturns:\n MCP server startup filtering result." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + return MCPStartServersResult.from_dict(await self._client.request("session.mcp.reloadWithConfig", params_dict, **_timeout_kwargs(timeout))) + async def execute_sampling(self, params: MCPExecuteSamplingParams, *, timeout: float | None = None) -> MCPSamplingExecutionResult: "Runs an MCP sampling inference on behalf of an MCP server.\n\nArgs:\n params: Identifiers and raw MCP CreateMessageRequest params used to run a sampling inference.\n\nReturns:\n Outcome of an MCP sampling execution: success result, failure error, or cancellation." params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} @@ -18430,6 +22456,48 @@ async def remove_git_hub(self, *, timeout: float | None = None) -> MCPRemoveGitH "Removes the auto-managed `github` MCP server when present.\n\nReturns:\n Indicates whether the auto-managed `github` MCP server was removed (false when nothing to remove)." return MCPRemoveGitHubResult.from_dict(await self._client.request("session.mcp.removeGitHub", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + async def configure_git_hub(self, params: MCPConfigureGitHubRequest, *, timeout: float | None = None) -> MCPConfigureGitHubResult: + "Configures the built-in GitHub MCP server for the session's current auth context.\n\nArgs:\n params: Opaque auth info used to configure GitHub MCP.\n\nReturns:\n Result of configuring GitHub MCP." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + return MCPConfigureGitHubResult.from_dict(await self._client.request("session.mcp.configureGitHub", params_dict, **_timeout_kwargs(timeout))) + + async def start_server(self, params: MCPStartServerRequest, *, timeout: float | None = None) -> None: + "Starts an individual MCP server on the session's host.\n\nArgs:\n params: Server name and opaque configuration for an individual MCP server start." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + await self._client.request("session.mcp.startServer", params_dict, **_timeout_kwargs(timeout)) + + async def restart_server(self, params: MCPRestartServerRequest, *, timeout: float | None = None) -> None: + "Restarts an individual MCP server on the session's host (stops then starts).\n\nArgs:\n params: Server name and opaque configuration for an individual MCP server restart." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + await self._client.request("session.mcp.restartServer", params_dict, **_timeout_kwargs(timeout)) + + async def stop_server(self, params: MCPStopServerRequest, *, timeout: float | None = None) -> None: + "Stops an individual MCP server on the session's host.\n\nArgs:\n params: Server name for an individual MCP server stop." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + await self._client.request("session.mcp.stopServer", params_dict, **_timeout_kwargs(timeout)) + + async def register_external_client(self, params: MCPRegisterExternalClientRequest, *, timeout: float | None = None) -> None: + "Registers a pre-connected external MCP client (e.g. IDE) on the session's host. The caller retains lifecycle ownership of the client and transport. Marked internal because the `client` and `transport` arguments are in-process MCP SDK instances that cannot be serialized across the JSON-RPC boundary; once the CLI moves on top of the SDK, external clients will be expressed as transport configs the runtime can construct itself.\n\nArgs:\n params: Registration parameters for an external MCP client." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + await self._client.request("session.mcp.registerExternalClient", params_dict, **_timeout_kwargs(timeout)) + + async def unregister_external_client(self, params: MCPUnregisterExternalClientRequest, *, timeout: float | None = None) -> None: + "Unregisters a previously registered external MCP client by server name. Marked internal as the paired companion of `registerExternalClient`: only in-process callers that registered a client this way can meaningfully unregister it. Disappears alongside `registerExternalClient`: once external clients are described to the runtime as config rather than handed in as instances, lifecycle (including deregistration) is owned entirely by the runtime.\n\nArgs:\n params: Server name identifying the external client to remove." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + await self._client.request("session.mcp.unregisterExternalClient", params_dict, **_timeout_kwargs(timeout)) + + async def is_server_running(self, params: MCPIsServerRunningRequest, *, timeout: float | None = None) -> MCPIsServerRunningResult: + "Checks whether a named MCP server is currently running on the session's host.\n\nArgs:\n params: Server name to check running status for.\n\nReturns:\n Whether the named MCP server is running." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + return MCPIsServerRunningResult.from_dict(await self._client.request("session.mcp.isServerRunning", params_dict, **_timeout_kwargs(timeout))) + # Experimental: this API group is experimental and may change or be removed. class PluginsApi: @@ -18441,6 +22509,12 @@ async def list(self, *, timeout: float | None = None) -> PluginList: "Lists plugins installed for the session.\n\nReturns:\n Plugins installed for the session, with their enabled state and version metadata." return PluginList.from_dict(await self._client.request("session.plugins.list", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + async def reload(self, params: PluginsReloadRequest | None = None, *, timeout: float | None = None) -> None: + "Reloads the session's plugin set, refreshing MCP servers, custom agents, hooks, and skills cache so SDK-driven changes via `server.plugins.*` take effect immediately.\n\nArgs:\n params: Optional flags controlling which side effects the reload performs." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} if params is not None else {} + params_dict["sessionId"] = self._session_id + await self._client.request("session.plugins.reload", params_dict, **_timeout_kwargs(timeout)) + # Experimental: this API group is experimental and may change or be removed. class OptionsApi: @@ -18571,6 +22645,10 @@ def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client self._session_id = session_id + async def get_engagement_id(self, *, timeout: float | None = None) -> SessionTelemetryEngagement: + "Gets the telemetry engagement ID currently associated with the session, when available.\n\nReturns:\n Telemetry engagement ID for the session, when available." + return SessionTelemetryEngagement.from_dict(await self._client.request("session.telemetry.getEngagementId", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + async def set_feature_overrides(self, params: TelemetrySetFeatureOverridesRequest, *, timeout: float | None = None) -> None: "Sets feature override key/value pairs to attach to subsequent telemetry events for the session.\n\nArgs:\n params: Feature override key/value pairs to attach to subsequent telemetry events from this session." params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} @@ -18584,6 +22662,12 @@ def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client self._session_id = session_id + async def ephemeral_query(self, params: UIEphemeralQueryRequest, *, timeout: float | None = None) -> UIEphemeralQueryResult: + "Runs a transient no-tools model query against the current conversation context.\n\nArgs:\n params: Transient question to answer without adding it to conversation history.\n\nReturns:\n Transient answer generated from current conversation context." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + return UIEphemeralQueryResult.from_dict(await self._client.request("session.ui.ephemeralQuery", params_dict, **_timeout_kwargs(timeout))) + async def elicitation(self, params: UIElicitationRequest, *, timeout: float | None = None) -> UIElicitationResponse: "Requests structured input from a UI-capable client.\n\nArgs:\n params: Prompt message and JSON schema describing the form fields to elicit from the user.\n\nReturns:\n The elicitation response (accept with form values, decline, or cancel)" params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} @@ -18802,6 +22886,10 @@ async def is_processing(self, *, timeout: float | None = None) -> MetadataIsProc "Reports whether the local session is currently processing user/agent messages.\n\nReturns:\n Indicates whether the local session is currently processing a turn or background continuation." return MetadataIsProcessingResult.from_dict(await self._client.request("session.metadata.isProcessing", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + async def activity(self, *, timeout: float | None = None) -> SessionActivity: + "Returns a snapshot of activity flags for the session.\n\nReturns:\n Current activity flags for the session." + return SessionActivity.from_dict(await self._client.request("session.metadata.activity", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + async def context_info(self, params: MetadataContextInfoRequest, *, timeout: float | None = None) -> MetadataContextInfoResult: "Returns the token breakdown for the session's current context window for a given model.\n\nArgs:\n params: Model identifier and token limits used to compute the context-info breakdown.\n\nReturns:\n Token breakdown for the session's current context window, or null if uninitialized." params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} @@ -18845,6 +22933,18 @@ async def kill(self, params: ShellKillRequest, *, timeout: float | None = None) params_dict["sessionId"] = self._session_id return ShellKillResult.from_dict(await self._client.request("session.shell.kill", params_dict, **_timeout_kwargs(timeout))) + async def execute_user_requested(self, params: ShellExecuteUserRequestedRequest, *, timeout: float | None = None) -> UserRequestedShellCommandResult: + "Executes a user-requested shell command through the session runtime.\n\nArgs:\n params: User-requested shell command and cancellation handle.\n\nReturns:\n Result of a user-requested shell command." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + return UserRequestedShellCommandResult.from_dict(await self._client.request("session.shell.executeUserRequested", params_dict, **_timeout_kwargs(timeout))) + + async def cancel_user_requested(self, params: ShellCancelUserRequestedRequest, *, timeout: float | None = None) -> CancelUserRequestedShellCommandResult: + "Cancels a user-requested shell command by request ID.\n\nArgs:\n params: User-requested shell execution cancellation handle.\n\nReturns:\n Cancellation result for a user-requested shell command." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + return CancelUserRequestedShellCommandResult.from_dict(await self._client.request("session.shell.cancelUserRequested", params_dict, **_timeout_kwargs(timeout))) + # Experimental: this API group is experimental and may change or be removed. class HistoryApi: @@ -19216,6 +23316,7 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "AccountGetQuotaRequest", "AccountGetQuotaResult", "AccountQuotaSnapshot", + "AdditionalContentExclusionPolicyScope", "AgentApi", "AgentGetCurrentResult", "AgentInfo", @@ -19251,6 +23352,7 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "AuthApi", "AuthInfo", "AuthInfoType", + "CancelUserRequestedShellCommandResult", "CanvasAction", "CanvasActionApi", "CanvasActionInvokeRequest", @@ -19366,6 +23468,7 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "Host", "HostType", "InstalledPlugin", + "InstalledPluginInfo", "InstalledPluginSource", "InstalledPluginSourceGitHub", "InstalledPluginSourceLocal", @@ -19376,10 +23479,12 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "InstructionsSourcesLocation", "InstructionsSourcesType", "KindEnum", + "LocalSessionMetadataValue", "LogRequest", "LogResult", "LspApi", "LspInitializeRequest", + "MCPAllowedServer", "MCPAppsCallToolRequest", "MCPAppsDiagnoseCapability", "MCPAppsDiagnoseRequest", @@ -19404,14 +23509,27 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "MCPConfigList", "MCPConfigRemoveRequest", "MCPConfigUpdateRequest", + "MCPConfigureGitHubRequest", + "MCPConfigureGitHubResult", "MCPDisableRequest", "MCPDiscoverRequest", "MCPDiscoverResult", "MCPEnableRequest", "MCPExecuteSamplingParams", + "MCPFilteredServer", + "MCPHostState", + "MCPIsServerRunningRequest", + "MCPIsServerRunningResult", + "MCPListToolsRequest", + "MCPListToolsResult", "MCPOauthLoginRequest", "MCPOauthLoginResult", + "MCPOauthRespondRequest", + "MCPOauthRespondResult", + "MCPRegisterExternalClientRequest", + "MCPReloadWithConfigRequest", "MCPRemoveGitHubResult", + "MCPRestartServerRequest", "MCPSamplingExecutionAction", "MCPSamplingExecutionResult", "MCPServer", @@ -19421,10 +23539,25 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "MCPServerConfigHTTPOauthGrantType", "MCPServerConfigHTTPType", "MCPServerConfigStdio", + "MCPServerFailureInfo", "MCPServerList", + "MCPServerNeedsAuthInfo", "MCPSetEnvValueModeDetails", "MCPSetEnvValueModeParams", "MCPSetEnvValueModeResult", + "MCPStartServerRequest", + "MCPStartServersResult", + "MCPStopServerRequest", + "MCPTools", + "MCPUnregisterExternalClientRequest", + "MarketplaceAddResult", + "MarketplaceBrowseResult", + "MarketplaceInfo", + "MarketplaceListResult", + "MarketplacePluginInfo", + "MarketplaceRefreshEntry", + "MarketplaceRefreshResult", + "MarketplaceRemoveResult", "McpApi", "McpAppsApi", "McpAppsHostContextDetailsAvailableDisplayMode", @@ -19485,7 +23618,13 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "NameSetRequest", "OpenCanvasInstance", "OptionsApi", + "OptionsUpdateAdditionalContentExclusionPolicy", + "OptionsUpdateAdditionalContentExclusionPolicyRule", + "OptionsUpdateAdditionalContentExclusionPolicyRuleSource", + "OptionsUpdateAdditionalContentExclusionPolicyScope", + "OptionsUpdateContextTier", "OptionsUpdateEnvValueMode", + "OptionsUpdateReasoningSummary", "OptionsUpdateToolFilterPrecedence", "PendingPermissionRequest", "PendingPermissionRequestList", @@ -19618,10 +23757,32 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "PingResult", "PlanApi", "PlanReadResult", + "PlanReadSQLTodosResult", + "PlanSQLTodosRow", "PlanUpdateRequest", "Plugin", + "PluginInstallResult", "PluginList", + "PluginListResult", + "PluginUpdateAllEntry", + "PluginUpdateAllResult", + "PluginUpdateResult", "PluginsApi", + "PluginsDisableRequest", + "PluginsEnableRequest", + "PluginsInstallRequest", + "PluginsMarketplacesAddRequest", + "PluginsMarketplacesBrowseRequest", + "PluginsMarketplacesRefreshRequest", + "PluginsMarketplacesRemoveRequest", + "PluginsReloadRequest", + "PluginsUninstallRequest", + "PluginsUpdateRequest", + "PollSpawnedSessionsResult", + "ProviderConfig", + "ProviderConfigAzure", + "ProviderConfigType", + "ProviderConfigWireAPI", "PurpleSource", "PushAttachment", "PushAttachmentBlob", @@ -19648,16 +23809,42 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "QueuedCommandNotHandled", "QueuedCommandResult", "RPC", + "ReasoningSummary", "RegisterEventInterestParams", "RegisterEventInterestResult", "ReleaseEventInterestParams", "RemoteApi", + "RemoteControlConfig", + "RemoteControlConfigExistingMcSession", + "RemoteControlStatus", + "RemoteControlStatusActive", + "RemoteControlStatusActiveState", + "RemoteControlStatusConnecting", + "RemoteControlStatusConnectingState", + "RemoteControlStatusError", + "RemoteControlStatusErrorState", + "RemoteControlStatusOff", + "RemoteControlStatusOffState", + "RemoteControlStatusResult", + "RemoteControlStatusState", + "RemoteControlStopResult", + "RemoteControlTransferResult", "RemoteEnableRequest", "RemoteEnableResult", "RemoteNotifySteerableChangedRequest", "RemoteNotifySteerableChangedResult", "RemoteSessionConnectionResult", + "RemoteSessionMetadataRepository", + "RemoteSessionMetadataTaskType", + "RemoteSessionMetadataValue", "RemoteSessionMode", + "RemoteSessionRepository", + "SandboxConfig", + "SandboxConfigUserPolicy", + "SandboxConfigUserPolicyExperimental", + "SandboxConfigUserPolicyExperimentalSeatbelt", + "SandboxConfigUserPolicyFilesystem", + "SandboxConfigUserPolicyNetwork", "Saved", "ScheduleApi", "ScheduleEntry", @@ -19676,6 +23863,8 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "ServerMcpApi", "ServerMcpConfigApi", "ServerModelsApi", + "ServerPluginsApi", + "ServerPluginsMarketplacesApi", "ServerRpc", "ServerRuntimeApi", "ServerSecretsApi", @@ -19688,8 +23877,10 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "ServerToolsApi", "ServerUserApi", "ServerUserSettingsApi", + "SessionActivity", "SessionAuthStatus", "SessionBulkDeleteResult", + "SessionCapability", "SessionContext", "SessionContextHostType", "SessionContextInfo", @@ -19729,18 +23920,30 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "SessionInstalledPluginSourceLocal", "SessionInstalledPluginSourceURL", "SessionList", + "SessionListEntry", "SessionListFilter", "SessionLoadDeferredRepoHooksResult", "SessionLogLevel", "SessionMcpAppsCallToolResult", - "SessionMetadata", "SessionMetadataSnapshot", "SessionModelList", + "SessionOpenOptions", + "SessionOpenOptionsAdditionalContentExclusionPolicy", + "SessionOpenOptionsAdditionalContentExclusionPolicyRule", + "SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource", + "SessionOpenOptionsAdditionalContentExclusionPolicyScope", + "SessionOpenOptionsEnvValueMode", + "SessionOpenOptionsReasoningSummary", + "SessionOpenParams", + "SessionOpenParamsKind", + "SessionOpenResult", "SessionPruneResult", "SessionRpc", "SessionSetCredentialsParams", "SessionSetCredentialsResult", "SessionSizes", + "SessionSource", + "SessionTelemetryEngagement", "SessionUpdateOptionsParams", "SessionUpdateOptionsResult", "SessionWorkingDirectoryContext", @@ -19757,6 +23960,8 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "SessionsFindByTaskIDResult", "SessionsForkRequest", "SessionsForkResult", + "SessionsGetBoardEntryCountRequest", + "SessionsGetBoardEntryCountResult", "SessionsGetEventFilePathRequest", "SessionsGetEventFilePathResult", "SessionsGetLastForContextRequest", @@ -19765,7 +23970,29 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "SessionsGetPersistedRemoteSteerableResult", "SessionsListRequest", "SessionsLoadDeferredRepoHooksRequest", + "SessionsOpenAttach", + "SessionsOpenAttachKind", + "SessionsOpenCloud", + "SessionsOpenCloudKind", + "SessionsOpenCreate", + "SessionsOpenCreateKind", + "SessionsOpenHandoff", + "SessionsOpenHandoffKind", + "SessionsOpenHandoffTaskType", + "SessionsOpenProgress", + "SessionsOpenProgressStatus", + "SessionsOpenProgressStep", + "SessionsOpenRemote", + "SessionsOpenRemoteKind", + "SessionsOpenResume", + "SessionsOpenResumeKind", + "SessionsOpenResumeLast", + "SessionsOpenResumeLastKind", + "SessionsOpenStatus", + "SessionsPollSpawnedSessionsEvent", + "SessionsPollSpawnedSessionsRequest", "SessionsPruneOldRequest", + "SessionsRegisterExtensionToolsOnSessionOptions", "SessionsReleaseLockRequest", "SessionsReleaseLockResult", "SessionsReloadPluginHooksRequest", @@ -19774,9 +24001,15 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "SessionsSaveResult", "SessionsSetAdditionalPluginsRequest", "SessionsSetAdditionalPluginsResult", + "SessionsSetRemoteControlSteeringRequest", + "SessionsStartRemoteControlRequest", + "SessionsStopRemoteControlRequest", + "SessionsTransferRemoteControlRequest", "ShellApi", + "ShellCancelUserRequestedRequest", "ShellExecRequest", "ShellExecResult", + "ShellExecuteUserRequestedRequest", "ShellKillRequest", "ShellKillResult", "ShellKillSignal", @@ -19822,6 +24055,7 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "TaskShellInfoType", "TaskShellProgress", "TaskStatus", + "TaskType", "TasksApi", "TasksCancelRequest", "TasksCancelResult", @@ -19877,6 +24111,8 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "UIElicitationStringEnumField", "UIElicitationStringOneOfField", "UIElicitationStringOneOfFieldOneOf", + "UIEphemeralQueryRequest", + "UIEphemeralQueryResult", "UIExitPlanModeAction", "UIExitPlanModeResponse", "UIHandlePendingAutoModeSwitchRequest", @@ -19900,6 +24136,7 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "UsageMetricsTokenDetail", "UserAuthInfo", "UserAuthInfoType", + "UserRequestedShellCommandResult", "Workspace", "WorkspaceDiffFileChange", "WorkspaceDiffFileChangeType", diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py index e92f83bd4..332ac3769 100644 --- a/python/copilot/generated/session_events.py +++ b/python/copilot/generated/session_events.py @@ -207,6 +207,7 @@ class SessionEventType(Enum): SESSION_EXTENSIONS_LOADED = "session.extensions_loaded" SESSION_CANVAS_OPENED = "session.canvas.opened" SESSION_CANVAS_REGISTRY_CHANGED = "session.canvas.registry_changed" + SESSION_CANVAS_CLOSED = "session.canvas.closed" SESSION_EXTENSIONS_ATTACHMENTS_PUSHED = "session.extensions.attachments_pushed" MCP_APP_TOOL_CALL_COMPLETE = "mcp_app.tool_call_complete" UNKNOWN = "unknown" @@ -331,6 +332,7 @@ class AssistantMessageData: anthropic_advisor_blocks: list[Any] | None = None # Experimental: this field is part of an experimental API and may change or be removed. anthropic_advisor_model: str | None = None + api_call_id: str | None = None encrypted_content: str | None = None interaction_id: str | None = None model: str | None = None @@ -352,6 +354,7 @@ def from_dict(obj: Any) -> "AssistantMessageData": 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")) + api_call_id = from_union([from_none, from_str], obj.get("apiCallId")) 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")) @@ -369,6 +372,7 @@ def from_dict(obj: Any) -> "AssistantMessageData": message_id=message_id, anthropic_advisor_blocks=anthropic_advisor_blocks, anthropic_advisor_model=anthropic_advisor_model, + api_call_id=api_call_id, encrypted_content=encrypted_content, interaction_id=interaction_id, model=model, @@ -391,6 +395,8 @@ def to_dict(self) -> dict: 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.api_call_id is not None: + result["apiCallId"] = from_union([from_none, from_str], self.api_call_id) 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: @@ -1997,21 +2003,26 @@ def to_dict(self) -> dict: class HookEndError: "Error details when the hook failed" message: str + source: str | None = None stack: str | None = None @staticmethod def from_dict(obj: Any) -> "HookEndError": assert isinstance(obj, dict) message = from_str(obj.get("message")) + source = from_union([from_none, from_str], obj.get("source")) stack = from_union([from_none, from_str], obj.get("stack")) return HookEndError( message=message, + source=source, stack=stack, ) def to_dict(self) -> dict: result: dict = {} result["message"] = from_str(self.message) + if self.source is not None: + result["source"] = from_union([from_none, from_str], self.source) if self.stack is not None: result["stack"] = from_union([from_none, from_str], self.stack) return result @@ -3575,6 +3586,33 @@ def to_dict(self) -> dict: return {} +@dataclass +class SessionCanvasClosedData: + "Schema for the `CanvasClosedData` type." + canvas_id: str + extension_id: str + instance_id: str + + @staticmethod + def from_dict(obj: Any) -> "SessionCanvasClosedData": + assert isinstance(obj, dict) + canvas_id = from_str(obj.get("canvasId")) + extension_id = from_str(obj.get("extensionId")) + instance_id = from_str(obj.get("instanceId")) + return SessionCanvasClosedData( + canvas_id=canvas_id, + extension_id=extension_id, + instance_id=instance_id, + ) + + def to_dict(self) -> dict: + result: dict = {} + result["canvasId"] = from_str(self.canvas_id) + result["extensionId"] = from_str(self.extension_id) + result["instanceId"] = from_str(self.instance_id) + return result + + @dataclass class SessionCanvasOpenedData: "Schema for the `CanvasOpenedData` type." @@ -4047,7 +4085,7 @@ def to_dict(self) -> dict: @dataclass class SessionIdleData: - "Payload indicating the session is idle with no background agents in flight" + "Payload indicating the session is idle with no background agents or attached shell commands in flight" aborted: bool | None = None @staticmethod @@ -7108,7 +7146,7 @@ class WorkspaceFileChangedOperation(Enum): UPDATE = "update" -SessionEventData = SessionStartData | SessionResumeData | SessionRemoteSteerableChangedData | SessionErrorData | SessionIdleData | SessionTitleChangedData | SessionScheduleCreatedData | SessionScheduleCancelledData | SessionAutopilotObjectiveChangedData | SessionInfoData | SessionWarningData | SessionModelChangeData | SessionModeChangedData | SessionPermissionsChangedData | SessionPlanChangedData | SessionWorkspaceFileChangedData | SessionHandoffData | SessionTruncationData | SessionSnapshotRewindData | SessionShutdownData | SessionContextChangedData | SessionUsageInfoData | SessionCompactionStartData | SessionCompactionCompleteData | SessionTaskCompleteData | UserMessageData | PendingMessagesModifiedData | AssistantTurnStartData | AssistantIntentData | AssistantReasoningData | AssistantReasoningDeltaData | AssistantStreamingDeltaData | AssistantMessageData | AssistantMessageStartData | AssistantMessageDeltaData | AssistantTurnEndData | AssistantUsageData | ModelCallFailureData | AbortData | ToolUserRequestedData | ToolExecutionStartData | ToolExecutionPartialResultData | ToolExecutionProgressData | ToolExecutionCompleteData | SkillInvokedData | SubagentStartedData | SubagentCompletedData | SubagentFailedData | SubagentSelectedData | SubagentDeselectedData | HookStartData | HookEndData | HookProgressData | SystemMessageData | SystemNotificationData | PermissionRequestedData | PermissionCompletedData | UserInputRequestedData | UserInputCompletedData | ElicitationRequestedData | ElicitationCompletedData | SamplingRequestedData | SamplingCompletedData | McpOauthRequiredData | McpOauthCompletedData | SessionCustomNotificationData | ExternalToolRequestedData | ExternalToolCompletedData | CommandQueuedData | CommandExecuteData | CommandCompletedData | AutoModeSwitchRequestedData | AutoModeSwitchCompletedData | CommandsChangedData | CapabilitiesChangedData | ExitPlanModeRequestedData | ExitPlanModeCompletedData | SessionToolsUpdatedData | SessionBackgroundTasksChangedData | SessionSkillsLoadedData | SessionCustomAgentsUpdatedData | SessionMcpServersLoadedData | SessionMcpServerStatusChangedData | SessionExtensionsLoadedData | SessionCanvasOpenedData | SessionCanvasRegistryChangedData | SessionExtensionsAttachmentsPushedData | McpAppToolCallCompleteData | RawSessionEventData | Data +SessionEventData = SessionStartData | SessionResumeData | SessionRemoteSteerableChangedData | SessionErrorData | SessionIdleData | SessionTitleChangedData | SessionScheduleCreatedData | SessionScheduleCancelledData | SessionAutopilotObjectiveChangedData | SessionInfoData | SessionWarningData | SessionModelChangeData | SessionModeChangedData | SessionPermissionsChangedData | SessionPlanChangedData | SessionWorkspaceFileChangedData | SessionHandoffData | SessionTruncationData | SessionSnapshotRewindData | SessionShutdownData | SessionContextChangedData | SessionUsageInfoData | SessionCompactionStartData | SessionCompactionCompleteData | SessionTaskCompleteData | UserMessageData | PendingMessagesModifiedData | AssistantTurnStartData | AssistantIntentData | AssistantReasoningData | AssistantReasoningDeltaData | AssistantStreamingDeltaData | AssistantMessageData | AssistantMessageStartData | AssistantMessageDeltaData | AssistantTurnEndData | AssistantUsageData | ModelCallFailureData | AbortData | ToolUserRequestedData | ToolExecutionStartData | ToolExecutionPartialResultData | ToolExecutionProgressData | ToolExecutionCompleteData | SkillInvokedData | SubagentStartedData | SubagentCompletedData | SubagentFailedData | SubagentSelectedData | SubagentDeselectedData | HookStartData | HookEndData | HookProgressData | SystemMessageData | SystemNotificationData | PermissionRequestedData | PermissionCompletedData | UserInputRequestedData | UserInputCompletedData | ElicitationRequestedData | ElicitationCompletedData | SamplingRequestedData | SamplingCompletedData | McpOauthRequiredData | McpOauthCompletedData | SessionCustomNotificationData | ExternalToolRequestedData | ExternalToolCompletedData | CommandQueuedData | CommandExecuteData | CommandCompletedData | AutoModeSwitchRequestedData | AutoModeSwitchCompletedData | CommandsChangedData | CapabilitiesChangedData | ExitPlanModeRequestedData | ExitPlanModeCompletedData | SessionToolsUpdatedData | SessionBackgroundTasksChangedData | SessionSkillsLoadedData | SessionCustomAgentsUpdatedData | SessionMcpServersLoadedData | SessionMcpServerStatusChangedData | SessionExtensionsLoadedData | SessionCanvasOpenedData | SessionCanvasRegistryChangedData | SessionCanvasClosedData | SessionExtensionsAttachmentsPushedData | McpAppToolCallCompleteData | RawSessionEventData | Data @dataclass @@ -7220,6 +7258,7 @@ def from_dict(obj: Any) -> "SessionEvent": case SessionEventType.SESSION_EXTENSIONS_LOADED: data = SessionExtensionsLoadedData.from_dict(data_obj) case SessionEventType.SESSION_CANVAS_OPENED: data = SessionCanvasOpenedData.from_dict(data_obj) case SessionEventType.SESSION_CANVAS_REGISTRY_CHANGED: data = SessionCanvasRegistryChangedData.from_dict(data_obj) + case SessionEventType.SESSION_CANVAS_CLOSED: data = SessionCanvasClosedData.from_dict(data_obj) case SessionEventType.SESSION_EXTENSIONS_ATTACHMENTS_PUSHED: data = SessionExtensionsAttachmentsPushedData.from_dict(data_obj) case SessionEventType.MCP_APP_TOOL_CALL_COMPLETE: data = McpAppToolCallCompleteData.from_dict(data_obj) case _: data = RawSessionEventData.from_dict(data_obj) @@ -7387,6 +7426,7 @@ def session_event_to_dict(x: SessionEvent) -> Any: "SamplingRequestedData", "SessionAutopilotObjectiveChangedData", "SessionBackgroundTasksChangedData", + "SessionCanvasClosedData", "SessionCanvasOpenedData", "SessionCanvasRegistryChangedData", "SessionCompactionCompleteData", diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs index ff83db15f..57aa9fcbd 100644 --- a/rust/src/generated/api_types.rs +++ b/rust/src/generated/api_types.rs @@ -44,6 +44,30 @@ pub mod rpc_methods { pub const MCP_CONFIG_RELOAD: &str = "mcp.config.reload"; /// `mcp.discover` pub const MCP_DISCOVER: &str = "mcp.discover"; + /// `plugins.list` + pub const PLUGINS_LIST: &str = "plugins.list"; + /// `plugins.install` + pub const PLUGINS_INSTALL: &str = "plugins.install"; + /// `plugins.uninstall` + pub const PLUGINS_UNINSTALL: &str = "plugins.uninstall"; + /// `plugins.update` + pub const PLUGINS_UPDATE: &str = "plugins.update"; + /// `plugins.updateAll` + pub const PLUGINS_UPDATEALL: &str = "plugins.updateAll"; + /// `plugins.enable` + pub const PLUGINS_ENABLE: &str = "plugins.enable"; + /// `plugins.disable` + pub const PLUGINS_DISABLE: &str = "plugins.disable"; + /// `plugins.marketplaces.list` + pub const PLUGINS_MARKETPLACES_LIST: &str = "plugins.marketplaces.list"; + /// `plugins.marketplaces.add` + pub const PLUGINS_MARKETPLACES_ADD: &str = "plugins.marketplaces.add"; + /// `plugins.marketplaces.remove` + pub const PLUGINS_MARKETPLACES_REMOVE: &str = "plugins.marketplaces.remove"; + /// `plugins.marketplaces.browse` + pub const PLUGINS_MARKETPLACES_BROWSE: &str = "plugins.marketplaces.browse"; + /// `plugins.marketplaces.refresh` + pub const PLUGINS_MARKETPLACES_REFRESH: &str = "plugins.marketplaces.refresh"; /// `skills.config.setDisabledSkills` pub const SKILLS_CONFIG_SETDISABLEDSKILLS: &str = "skills.config.setDisabledSkills"; /// `skills.discover` @@ -54,6 +78,8 @@ pub mod rpc_methods { pub const RUNTIME_SHUTDOWN: &str = "runtime.shutdown"; /// `sessionFs.setProvider` pub const SESSIONFS_SETPROVIDER: &str = "sessionFs.setProvider"; + /// `sessions.open` + pub const SESSIONS_OPEN: &str = "sessions.open"; /// `sessions.fork` pub const SESSIONS_FORK: &str = "sessions.fork"; /// `sessions.connect` @@ -92,6 +118,25 @@ pub mod rpc_methods { pub const SESSIONS_LOADDEFERREDREPOHOOKS: &str = "sessions.loadDeferredRepoHooks"; /// `sessions.setAdditionalPlugins` pub const SESSIONS_SETADDITIONALPLUGINS: &str = "sessions.setAdditionalPlugins"; + /// `sessions.getBoardEntryCount` + pub const SESSIONS_GETBOARDENTRYCOUNT: &str = "sessions.getBoardEntryCount"; + /// `sessions.startRemoteControl` + pub const SESSIONS_STARTREMOTECONTROL: &str = "sessions.startRemoteControl"; + /// `sessions.transferRemoteControl` + pub const SESSIONS_TRANSFERREMOTECONTROL: &str = "sessions.transferRemoteControl"; + /// `sessions.setRemoteControlSteering` + pub const SESSIONS_SETREMOTECONTROLSTEERING: &str = "sessions.setRemoteControlSteering"; + /// `sessions.stopRemoteControl` + pub const SESSIONS_STOPREMOTECONTROL: &str = "sessions.stopRemoteControl"; + /// `sessions.getRemoteControlStatus` + pub const SESSIONS_GETREMOTECONTROLSTATUS: &str = "sessions.getRemoteControlStatus"; + /// `sessions.pollSpawnedSessions` + pub const SESSIONS_POLLSPAWNEDSESSIONS: &str = "sessions.pollSpawnedSessions"; + /// `sessions.registerExtensionToolsOnSession` + pub const SESSIONS_REGISTEREXTENSIONTOOLSONSESSION: &str = + "sessions.registerExtensionToolsOnSession"; + /// `sessions.configureSessionExtensions` + pub const SESSIONS_CONFIGURESESSIONEXTENSIONS: &str = "sessions.configureSessionExtensions"; /// `agentRegistry.spawn` pub const AGENTREGISTRY_SPAWN: &str = "agentRegistry.spawn"; /// `session.suspend` @@ -140,6 +185,8 @@ pub mod rpc_methods { pub const SESSION_PLAN_UPDATE: &str = "session.plan.update"; /// `session.plan.delete` pub const SESSION_PLAN_DELETE: &str = "session.plan.delete"; + /// `session.plan.readSqlTodos` + pub const SESSION_PLAN_READSQLTODOS: &str = "session.plan.readSqlTodos"; /// `session.workspaces.getWorkspace` pub const SESSION_WORKSPACES_GETWORKSPACE: &str = "session.workspaces.getWorkspace"; /// `session.workspaces.listFiles` @@ -207,12 +254,16 @@ pub mod rpc_methods { pub const SESSION_SKILLS_ENSURELOADED: &str = "session.skills.ensureLoaded"; /// `session.mcp.list` pub const SESSION_MCP_LIST: &str = "session.mcp.list"; + /// `session.mcp.listTools` + pub const SESSION_MCP_LISTTOOLS: &str = "session.mcp.listTools"; /// `session.mcp.enable` pub const SESSION_MCP_ENABLE: &str = "session.mcp.enable"; /// `session.mcp.disable` pub const SESSION_MCP_DISABLE: &str = "session.mcp.disable"; /// `session.mcp.reload` pub const SESSION_MCP_RELOAD: &str = "session.mcp.reload"; + /// `session.mcp.reloadWithConfig` + pub const SESSION_MCP_RELOADWITHCONFIG: &str = "session.mcp.reloadWithConfig"; /// `session.mcp.executeSampling` pub const SESSION_MCP_EXECUTESAMPLING: &str = "session.mcp.executeSampling"; /// `session.mcp.cancelSamplingExecution` @@ -221,6 +272,22 @@ pub mod rpc_methods { pub const SESSION_MCP_SETENVVALUEMODE: &str = "session.mcp.setEnvValueMode"; /// `session.mcp.removeGitHub` pub const SESSION_MCP_REMOVEGITHUB: &str = "session.mcp.removeGitHub"; + /// `session.mcp.configureGitHub` + pub const SESSION_MCP_CONFIGUREGITHUB: &str = "session.mcp.configureGitHub"; + /// `session.mcp.startServer` + pub const SESSION_MCP_STARTSERVER: &str = "session.mcp.startServer"; + /// `session.mcp.restartServer` + pub const SESSION_MCP_RESTARTSERVER: &str = "session.mcp.restartServer"; + /// `session.mcp.stopServer` + pub const SESSION_MCP_STOPSERVER: &str = "session.mcp.stopServer"; + /// `session.mcp.registerExternalClient` + pub const SESSION_MCP_REGISTEREXTERNALCLIENT: &str = "session.mcp.registerExternalClient"; + /// `session.mcp.unregisterExternalClient` + pub const SESSION_MCP_UNREGISTEREXTERNALCLIENT: &str = "session.mcp.unregisterExternalClient"; + /// `session.mcp.isServerRunning` + pub const SESSION_MCP_ISSERVERRUNNING: &str = "session.mcp.isServerRunning"; + /// `session.mcp.oauth.respond` + pub const SESSION_MCP_OAUTH_RESPOND: &str = "session.mcp.oauth.respond"; /// `session.mcp.oauth.login` pub const SESSION_MCP_OAUTH_LOGIN: &str = "session.mcp.oauth.login"; /// `session.mcp.apps.readResource` @@ -237,6 +304,8 @@ pub mod rpc_methods { pub const SESSION_MCP_APPS_DIAGNOSE: &str = "session.mcp.apps.diagnose"; /// `session.plugins.list` pub const SESSION_PLUGINS_LIST: &str = "session.plugins.list"; + /// `session.plugins.reload` + pub const SESSION_PLUGINS_RELOAD: &str = "session.plugins.reload"; /// `session.options.update` pub const SESSION_OPTIONS_UPDATE: &str = "session.options.update"; /// `session.lsp.initialize` @@ -271,8 +340,12 @@ pub mod rpc_methods { /// `session.commands.respondToQueuedCommand` pub const SESSION_COMMANDS_RESPONDTOQUEUEDCOMMAND: &str = "session.commands.respondToQueuedCommand"; + /// `session.telemetry.getEngagementId` + pub const SESSION_TELEMETRY_GETENGAGEMENTID: &str = "session.telemetry.getEngagementId"; /// `session.telemetry.setFeatureOverrides` pub const SESSION_TELEMETRY_SETFEATUREOVERRIDES: &str = "session.telemetry.setFeatureOverrides"; + /// `session.ui.ephemeralQuery` + pub const SESSION_UI_EPHEMERALQUERY: &str = "session.ui.ephemeralQuery"; /// `session.ui.elicitation` pub const SESSION_UI_ELICITATION: &str = "session.ui.elicitation"; /// `session.ui.handlePendingElicitation` @@ -349,6 +422,8 @@ pub mod rpc_methods { pub const SESSION_METADATA_SNAPSHOT: &str = "session.metadata.snapshot"; /// `session.metadata.isProcessing` pub const SESSION_METADATA_ISPROCESSING: &str = "session.metadata.isProcessing"; + /// `session.metadata.activity` + pub const SESSION_METADATA_ACTIVITY: &str = "session.metadata.activity"; /// `session.metadata.contextInfo` pub const SESSION_METADATA_CONTEXTINFO: &str = "session.metadata.contextInfo"; /// `session.metadata.recordContextChange` @@ -362,6 +437,10 @@ pub mod rpc_methods { pub const SESSION_SHELL_EXEC: &str = "session.shell.exec"; /// `session.shell.kill` pub const SESSION_SHELL_KILL: &str = "session.shell.kill"; + /// `session.shell.executeUserRequested` + pub const SESSION_SHELL_EXECUTEUSERREQUESTED: &str = "session.shell.executeUserRequested"; + /// `session.shell.cancelUserRequested` + pub const SESSION_SHELL_CANCELUSERREQUESTED: &str = "session.shell.cancelUserRequested"; /// `session.history.compact` pub const SESSION_HISTORY_COMPACT: &str = "session.history.compact"; /// `session.history.truncate` @@ -1357,6 +1436,21 @@ pub struct AttachmentSelection { pub r#type: AttachmentSelectionType, } +/// Cancellation result for a user-requested shell command. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct CancelUserRequestedShellCommandResult { + /// Whether an in-flight execution was found and signalled to cancel + pub cancelled: bool, +} + /// Canvas action that the agent or host can invoke. To discover the input schema for a particular action, call the list_canvas_capabilities tool. /// ///
@@ -1883,6 +1977,25 @@ pub struct CommandsRespondToQueuedCommandResult { pub success: bool, } +/// Params to attach or detach an in-process ExtensionController delegate. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) struct ConfigureSessionExtensionsParams { + /// In-process ExtensionController delegate (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. The post-SDK extension surface exposes list/enable/disable/reload via dedicated RPCs served by the runtime. + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) controller: Option, + /// Session to attach the extension controller delegate to. + pub session_id: SessionId, +} + /// Repository associated with the connected remote session. /// ///
@@ -2869,6 +2982,28 @@ pub struct InstalledPlugin { pub version: Option, } +/// Information about an installed plugin tracked in global state. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct InstalledPluginInfo { + /// Whether the plugin is currently enabled for new sessions + pub enabled: bool, + /// Marketplace the plugin came from. Empty string ("") for direct repo / URL / local installs. + pub marketplace: String, + /// Plugin name + pub name: String, + /// Installed version (when reported by the plugin manifest) + #[serde(skip_serializing_if = "Option::is_none")] + pub version: Option, +} + /// Schema for the `InstalledPluginSourceGitHub` type. /// ///
@@ -2974,6 +3109,72 @@ pub struct InstructionsGetSourcesResult { pub sources: Vec, } +/// Pre-resolved working-directory context for session startup. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionContext { + /// Active git branch + #[serde(skip_serializing_if = "Option::is_none")] + pub branch: Option, + /// Most recent working directory for this session + pub cwd: String, + /// Git repository root, if the cwd was inside a git repo + #[serde(skip_serializing_if = "Option::is_none")] + pub git_root: Option, + /// Repository host type + #[serde(skip_serializing_if = "Option::is_none")] + pub host_type: Option, + /// Repository slug in `owner/name` form, when known + #[serde(skip_serializing_if = "Option::is_none")] + pub repository: Option, +} + +/// Schema for the `LocalSessionMetadataValue` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct LocalSessionMetadataValue { + /// Runtime client name that created/last resumed this session + #[serde(skip_serializing_if = "Option::is_none")] + pub client_name: Option, + /// Pre-resolved working-directory context for session startup. + #[serde(skip_serializing_if = "Option::is_none")] + pub context: Option, + /// True for detached maintenance sessions that should be hidden from normal resume lists. + #[serde(skip_serializing_if = "Option::is_none")] + pub is_detached: Option, + /// Always false for local sessions. + pub is_remote: bool, + /// GitHub task ID, when this local session is bound to one. Only present for local sessions exported to remote control. + #[serde(skip_serializing_if = "Option::is_none")] + pub mc_task_id: Option, + /// Last-modified time of the session's persisted state, as ISO 8601 + pub modified_time: String, + /// Optional human-friendly name set via /rename + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Stable session identifier + pub session_id: SessionId, + /// Session creation time as an ISO 8601 timestamp + pub start_time: String, + /// Short summary of the session, when one has been derived + #[serde(skip_serializing_if = "Option::is_none")] + pub summary: Option, +} + /// Message text, optional severity level, persistence flag, optional follow-up URL, and optional tip. /// ///
@@ -3041,6 +3242,160 @@ pub struct LspInitializeRequest { pub working_directory: Option, } +/// Result of registering a new marketplace. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct MarketplaceAddResult { + /// Final name of the marketplace as resolved from its manifest + pub name: String, +} + +/// Plugin entry advertised by a marketplace. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct MarketplacePluginInfo { + /// Short description from the marketplace catalog, when present + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + /// Plugin name as listed in the marketplace catalog + pub name: String, +} + +/// Plugins advertised by the marketplace. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct MarketplaceBrowseResult { + /// Plugins advertised by the marketplace + pub plugins: Vec, +} + +/// Registered marketplace summary. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct MarketplaceInfo { + /// True when this is a default marketplace shipped with the runtime. Defaults are not removable. + #[serde(skip_serializing_if = "Option::is_none")] + pub is_default: Option, + /// Marketplace name (matches the @marketplace suffix in plugin specs) + pub name: String, + /// Human-readable description of where the marketplace data is fetched from (e.g. "GitHub: owner/repo"). + pub source: String, +} + +/// All registered marketplaces, including built-in defaults. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct MarketplaceListResult { + /// Registered marketplaces + pub marketplaces: Vec, +} + +/// Schema for the `MarketplaceRefreshEntry` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct MarketplaceRefreshEntry { + /// Error message (failure only) + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, + /// Marketplace name that was refreshed + pub name: String, + /// Whether the refresh succeeded + pub success: bool, +} + +/// Result of refreshing one or more marketplace catalogs. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct MarketplaceRefreshResult { + /// Per-marketplace refresh results in deterministic order. + pub results: Vec, +} + +/// Outcome of the remove attempt, including dependent-plugin info when applicable. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct MarketplaceRemoveResult { + /// Names of installed plugins that prevented removal. Populated only when `removed=false`. + #[serde(skip_serializing_if = "Option::is_none")] + pub dependent_plugins: Option>, + /// True when the marketplace was actually removed. False when removal was skipped because the marketplace has dependent plugins and `force` was not set. + pub removed: bool, +} + +/// Schema for the `McpAllowedServer` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpAllowedServer { + /// Allowed server name + pub name: String, + /// PII-free note explaining why the server was allowed + #[serde(skip_serializing_if = "Option::is_none")] + pub redacted_note: Option, +} + /// MCP server, tool name, and arguments to invoke from an MCP App view. /// ///
@@ -3406,6 +3761,37 @@ pub struct McpConfigUpdateRequest { pub name: String, } +/// Opaque auth info used to configure GitHub MCP. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) struct McpConfigureGitHubRequest { + /// Opaque runtime auth info for GitHub MCP configuration. Marked internal: an in-process runtime shape (configureGitHubMcp is a no-op over the wire). + #[doc(hidden)] + pub(crate) auth_info: serde_json::Value, +} + +/// Result of configuring GitHub MCP. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpConfigureGitHubResult { + /// Whether GitHub MCP configuration changed. + pub changed: bool, +} + /// Name of the MCP server to disable for the session. /// ///
@@ -3486,7 +3872,7 @@ pub struct McpExecuteSamplingParams { pub server_name: String, } -/// Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, and the callback success-page copy. +/// Schema for the `McpFilteredServer` type. /// ///
/// @@ -3496,21 +3882,20 @@ pub struct McpExecuteSamplingParams { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct McpOauthLoginRequest { - /// 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. +pub struct McpFilteredServer { + /// Enterprise login associated with an allowlist policy #[serde(skip_serializing_if = "Option::is_none")] - pub callback_success_message: Option, - /// 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. - #[serde(skip_serializing_if = "Option::is_none")] - pub client_name: Option, - /// 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. + pub enterprise_name: Option, + /// Filtered server name + pub name: String, + /// Human-readable filter reason + pub reason: String, + /// PII-free filter reason #[serde(skip_serializing_if = "Option::is_none")] - pub force_reauth: Option, - /// Name of the remote MCP server to authenticate - pub server_name: String, + pub redacted_reason: Option, } -/// OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server. +/// Recorded MCP server connection failure. /// ///
/// @@ -3520,12 +3905,244 @@ pub struct McpOauthLoginRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct McpOauthLoginResult { - /// 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. +pub struct McpServerFailureInfo { + /// Failure message produced when the MCP server connection failed. + pub message: String, + /// epoch-ms timestamp at which the failure was recorded. + pub timestamp: i64, +} + +/// Recorded MCP server pending-auth state. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpServerNeedsAuthInfo { + /// epoch-ms timestamp at which the server signalled it needs authentication. + pub timestamp: i64, +} + +/// Host-level state, omitted when no MCP host is initialized. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpHostState { + /// Names of currently-connected MCP clients. + pub clients: Vec, + /// Configured servers that are explicitly disabled. + pub disabled_servers: Vec, + /// Map of server name to recorded connection failure. + pub failed_servers: HashMap, + /// Configured servers filtered out by enterprise allowlist policy. + pub filtered_servers: Vec, + /// Whether third-party MCP servers are policy-enabled for this session. + pub mcp3p_enabled: bool, + /// Map of server name to recorded pending-auth state. + pub needs_auth_servers: HashMap, + /// Names of servers with in-flight connection attempts. + pub pending_connections: Vec, +} + +/// Server name to check running status for. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpIsServerRunningRequest { + /// Name of the MCP server to check + pub server_name: String, +} + +/// Whether the named MCP server is running. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpIsServerRunningResult { + /// True if the server has an active client and transport. + pub running: bool, +} + +/// Server name whose tool list should be returned. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpListToolsRequest { + /// Name of the connected MCP server whose tools to list. + pub server_name: String, +} + +/// Schema for the `McpTools` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpTools { + /// Tool description, when provided. + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + /// Tool name. + pub name: String, +} + +/// Tools exposed by the connected MCP server. Throws when the server is not connected. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpListToolsResult { + /// Tools exposed by the server. + pub tools: Vec, +} + +/// Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, and the callback success-page copy. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpOauthLoginRequest { + /// 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. + #[serde(skip_serializing_if = "Option::is_none")] + pub callback_success_message: Option, + /// 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. + #[serde(skip_serializing_if = "Option::is_none")] + pub client_name: Option, + /// 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. + #[serde(skip_serializing_if = "Option::is_none")] + pub force_reauth: Option, + /// Name of the remote MCP server to authenticate + pub server_name: String, +} + +/// OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpOauthLoginResult { + /// 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. #[serde(skip_serializing_if = "Option::is_none")] pub authorization_url: Option, } +/// MCP OAuth request id and optional provider response. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) struct McpOauthRespondRequest { + /// In-process OAuthClientProvider instance, or omitted to deny. Marked internal: cannot be serialized across the JSON-RPC boundary. + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) provider: Option, + /// OAuth request identifier from mcp.oauth_required + pub request_id: RequestId, +} + +/// Empty result after recording the MCP OAuth response. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpOauthRespondResult {} + +/// Registration parameters for an external MCP client. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) struct McpRegisterExternalClientRequest { + /// In-process MCP Client instance. Marked internal: cannot be serialized across the JSON-RPC boundary. + #[doc(hidden)] + pub(crate) client: serde_json::Value, + /// In-process server config (MCPServerConfig) paired with the in-process client/transport. Marked internal alongside its companions. + #[doc(hidden)] + pub(crate) config: serde_json::Value, + /// Logical server name for the external client + pub server_name: String, + /// In-process MCP Transport instance. Marked internal: cannot be serialized across the JSON-RPC boundary. + #[doc(hidden)] + pub(crate) transport: serde_json::Value, +} + +/// Opaque MCP reload configuration. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) struct McpReloadWithConfigRequest { + /// Opaque runtime MCP reload configuration. Marked internal: an in-process runtime shape (reloadMcpServers throws over the wire). + #[doc(hidden)] + pub(crate) config: serde_json::Value, +} + /// Indicates whether the auto-managed `github` MCP server was removed (false when nothing to remove). /// ///
@@ -3541,6 +4158,24 @@ pub struct McpRemoveGitHubResult { pub removed: bool, } +/// Server name and opaque configuration for an individual MCP server restart. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) struct McpRestartServerRequest { + /// Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime shape supplied only by in-process CLI callers. + #[doc(hidden)] + pub(crate) config: serde_json::Value, + /// Name of the MCP server to restart + pub server_name: String, +} + /// Outcome of an MCP sampling execution: success result, failure error, or cancellation. /// ///
@@ -3670,7 +4305,7 @@ pub struct McpServerConfigStdio { pub tools: Option>, } -/// MCP servers configured for the session, with their connection status. +/// MCP servers configured for the session, with their connection status and host-level state. /// ///
/// @@ -3681,6 +4316,9 @@ pub struct McpServerConfigStdio { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpServerList { + /// Host-level state, omitted when no MCP host is initialized. + #[serde(skip_serializing_if = "Option::is_none")] + pub host: Option, /// Configured MCP servers pub servers: Vec, } @@ -3715,6 +4353,72 @@ pub struct McpSetEnvValueModeResult { pub mode: McpSetEnvValueModeDetails, } +/// Server name and opaque configuration for an individual MCP server start. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) struct McpStartServerRequest { + /// Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime shape supplied only by in-process CLI callers. + #[doc(hidden)] + pub(crate) config: serde_json::Value, + /// Name of the MCP server to start + pub server_name: String, +} + +/// MCP server startup filtering result. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpStartServersResult { + /// Non-default servers allowed by policy + #[serde(skip_serializing_if = "Option::is_none")] + pub allowed_servers: Option>, + /// Servers filtered out before startup + pub filtered_servers: Vec, +} + +/// Server name for an individual MCP server stop. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct McpStopServerRequest { + /// Name of the MCP server to stop + pub server_name: String, +} + +/// Server name identifying the external client to remove. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) struct McpUnregisterExternalClientRequest { + /// Server name of the external client to unregister + pub server_name: String, +} + /// Model identifier and token limits used to compute the context-info breakdown. /// ///
@@ -3745,7 +4449,7 @@ pub struct MetadataContextInfoResultContextInfo { pub compaction_threshold: i64, /// Tokens consumed by user/assistant/tool messages pub conversation_tokens: i64, - /// Total context limit for /context display: promptTokenLimit + outputTokenLimit (the model's full max_output_tokens reserved on top of the prompt budget). + /// Prompt token limit plus the model's full output token limit. pub limit: i64, /// Tokens consumed by MCP tool definitions (subset of toolDefinitionsTokens, excludes deferred tools) pub mcp_tools_tokens: i64, @@ -4191,7 +4895,7 @@ pub struct ModelCapabilitiesOverrideSupports { pub vision: Option, } -/// Override individual model capabilities resolved by the runtime +/// Initial model capability overrides. /// ///
/// @@ -4391,7 +5095,7 @@ pub struct NameSetRequest { pub name: String, } -/// Schema for the `PendingPermissionRequest` type. +/// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. /// ///
/// @@ -4399,16 +5103,14 @@ pub struct NameSetRequest { /// and may change or be removed in future SDK or CLI releases. /// ///
-#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PendingPermissionRequest { - /// The user-facing permission prompt details (commands, write, read, mcp, url, memory, custom-tool, path, hook) - pub request: PermissionPromptRequest, - /// Unique identifier for the pending permission request - pub request_id: RequestId, +pub struct OptionsUpdateAdditionalContentExclusionPolicyRuleSource { + pub name: String, + pub r#type: String, } -/// List of pending permission requests reconstructed from event history. +/// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRule` type. /// ///
/// @@ -4418,12 +5120,17 @@ pub struct PendingPermissionRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PendingPermissionRequestList { - /// Pending permission prompts reconstructed from the session's event history. Equivalent to the set of `permission.requested` events that have not yet been followed by a matching `permission.completed` event. Used by clients (e.g. the CLI) to hydrate UI for prompts that were emitted before the client attached to the session. - pub items: Vec, +pub struct OptionsUpdateAdditionalContentExclusionPolicyRule { + #[serde(skip_serializing_if = "Option::is_none")] + pub if_any_match: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub if_none_match: Option>, + pub paths: Vec, + /// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. + pub source: OptionsUpdateAdditionalContentExclusionPolicyRuleSource, } -/// Schema for the `PermissionDecisionApproveOnce` type. +/// Schema for the `OptionsUpdateAdditionalContentExclusionPolicy` type. /// ///
/// @@ -4433,7 +5140,57 @@ pub struct PendingPermissionRequestList { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PermissionDecisionApproveOnce { +pub struct OptionsUpdateAdditionalContentExclusionPolicy { + #[serde(rename = "last_updated_at")] + pub last_updated_at: serde_json::Value, + pub rules: Vec, + /// Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. + pub scope: OptionsUpdateAdditionalContentExclusionPolicyScope, +} + +/// Schema for the `PendingPermissionRequest` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PendingPermissionRequest { + /// The user-facing permission prompt details (commands, write, read, mcp, url, memory, custom-tool, path, hook) + pub request: PermissionPromptRequest, + /// Unique identifier for the pending permission request + pub request_id: RequestId, +} + +/// List of pending permission requests reconstructed from event history. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PendingPermissionRequestList { + /// Pending permission prompts reconstructed from the session's event history. Equivalent to the set of `permission.requested` events that have not yet been followed by a matching `permission.completed` event. Used by clients (e.g. the CLI) to hydrate UI for prompts that were emitted before the client attached to the session. + pub items: Vec, +} + +/// Schema for the `PermissionDecisionApproveOnce` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionDecisionApproveOnce { /// Approve this single request only pub kind: PermissionDecisionApproveOnceKind, } @@ -5872,6 +6629,46 @@ pub struct PlanReadResult { pub path: Option, } +/// Schema for the `PlanSqlTodosRow` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PlanSqlTodosRow { + /// Todo description. + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + /// Todo identifier. + #[serde(skip_serializing_if = "Option::is_none")] + pub id: Option, + /// Todo status. + #[serde(skip_serializing_if = "Option::is_none")] + pub status: Option, + /// Todo title. + #[serde(skip_serializing_if = "Option::is_none")] + pub title: Option, +} + +/// Todo rows read from the session SQL database. Empty when no session database is available. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PlanReadSqlTodosResult { + /// Rows from the session SQL todos table, ordered by creation time and id. + pub rows: Vec, +} + /// Replacement contents to write to the session plan file. /// ///
@@ -5909,6 +6706,29 @@ pub struct Plugin { pub version: Option, } +/// Result of installing a plugin. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PluginInstallResult { + /// Set when the install path is deprecated (e.g. direct repo / URL / local installs). Callers should surface this to end users. + #[serde(skip_serializing_if = "Option::is_none")] + pub deprecation_warning: Option, + /// The newly installed plugin's metadata + pub plugin: InstalledPluginInfo, + /// Optional post-install message provided by the plugin (e.g. setup instructions) + #[serde(skip_serializing_if = "Option::is_none")] + pub post_install_message: Option, + /// Number of skills discovered and installed from the plugin + pub skills_installed: i64, +} + /// Plugins installed for the session, with their enabled state and version metadata. /// ///
@@ -5924,7 +6744,7 @@ pub struct PluginList { pub plugins: Vec, } -/// Blob attachment with inline base64-encoded data +/// Plugins installed in user/global state. /// ///
/// @@ -5934,19 +6754,12 @@ pub struct PluginList { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PushAttachmentBlob { - /// Base64-encoded content - pub data: String, - /// User-facing display name for the attachment - #[serde(skip_serializing_if = "Option::is_none")] - pub display_name: Option, - /// MIME type of the inline data - pub mime_type: String, - /// Attachment type discriminator - pub r#type: PushAttachmentBlobType, +pub struct PluginListResult { + /// Installed plugins + pub plugins: Vec, } -/// Directory attachment +/// Plugin names (or specs) to disable. /// ///
/// @@ -5956,16 +6769,12 @@ pub struct PushAttachmentBlob { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PushAttachmentDirectory { - /// User-facing display name for the attachment - pub display_name: String, - /// Absolute directory path - pub path: String, - /// Attachment type discriminator - pub r#type: PushAttachmentDirectoryType, +pub struct PluginsDisableRequest { + /// Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins. + pub names: Vec, } -/// Optional line range to scope the attachment to a specific section of the file +/// Plugin names (or specs) to enable. /// ///
/// @@ -5975,14 +6784,12 @@ pub struct PushAttachmentDirectory { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PushAttachmentFileLineRange { - /// End line number (1-based, inclusive) - pub end: i64, - /// Start line number (1-based) - pub start: i64, +pub struct PluginsEnableRequest { + /// Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API. + pub names: Vec, } -/// File attachment +/// Plugin source and optional working directory for relative-path resolution. /// ///
/// @@ -5992,19 +6799,15 @@ pub struct PushAttachmentFileLineRange { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PushAttachmentFile { - /// User-facing display name for the attachment - pub display_name: String, - /// Optional line range to scope the attachment to a specific section of the file +pub struct PluginsInstallRequest { + /// Plugin install spec. Accepts the same forms as the CLI: "plugin@marketplace" (marketplace install), "owner/repo" or "owner/repo:subpath" (GitHub direct), an http/https/ssh URL, or a local path. Direct (non-marketplace) installs are deprecated and will produce a deprecationWarning in the result. + pub source: String, + /// Working directory used to resolve relative local paths in `source`. Defaults to the server's current working directory. #[serde(skip_serializing_if = "Option::is_none")] - pub line_range: Option, - /// Absolute file path - pub path: String, - /// Attachment type discriminator - pub r#type: PushAttachmentFileType, + pub working_directory: Option, } -/// GitHub issue, pull request, or discussion reference +/// Marketplace source to register. /// ///
/// @@ -6014,22 +6817,12 @@ pub struct PushAttachmentFile { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PushAttachmentGitHubReference { - /// Issue, pull request, or discussion number - pub number: i64, - /// Type of GitHub reference - pub reference_type: PushAttachmentGitHubReferenceType, - /// Current state of the referenced item (e.g., open, closed, merged) - pub state: String, - /// Title of the referenced item - pub title: String, - /// Attachment type discriminator - pub r#type: PushAttachmentGitHubReferenceType, - /// URL to the referenced item on GitHub - pub url: String, +pub struct PluginsMarketplacesAddRequest { + /// Marketplace source. Accepts the same forms as the CLI: "owner/repo" or "owner/repo#ref" (GitHub), an http/https/ssh URL (optionally with #ref), a git scp-style URL (user@host:path), or a local path. The marketplace's own name (from its manifest) is used as the registration key. + pub source: String, } -/// End position of the selection +/// Name of the marketplace whose plugin catalog to fetch. /// ///
/// @@ -6039,14 +6832,12 @@ pub struct PushAttachmentGitHubReference { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PushAttachmentSelectionDetailsEnd { - /// End character offset within the line (0-based) - pub character: i64, - /// End line number (0-based) - pub line: i64, +pub struct PluginsMarketplacesBrowseRequest { + /// Marketplace name to browse + pub name: String, } -/// Start position of the selection +/// Optional marketplace name; omit to refresh all. /// ///
/// @@ -6056,14 +6847,13 @@ pub struct PushAttachmentSelectionDetailsEnd { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PushAttachmentSelectionDetailsStart { - /// Start character offset within the line (0-based) - pub character: i64, - /// Start line number (0-based) - pub line: i64, +pub struct PluginsMarketplacesRefreshRequest { + /// Marketplace name to refresh. When omitted, every registered marketplace is refreshed. + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, } -/// Position range of the selection within the file +/// Name of the marketplace to remove and an optional force flag. /// ///
/// @@ -6073,14 +6863,15 @@ pub struct PushAttachmentSelectionDetailsStart { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PushAttachmentSelectionDetails { - /// End position of the selection - pub end: PushAttachmentSelectionDetailsEnd, - /// Start position of the selection - pub start: PushAttachmentSelectionDetailsStart, +pub struct PluginsMarketplacesRemoveRequest { + /// When true, also uninstall every plugin sourced from this marketplace. When false (default), removal is a no-op if any plugin from this marketplace is installed and the dependent plugin names are returned in the result. + #[serde(skip_serializing_if = "Option::is_none")] + pub force: Option, + /// Marketplace name to remove + pub name: String, } -/// Code selection attachment from an editor +/// Optional flags controlling which side effects the reload performs. /// ///
/// @@ -6090,20 +6881,22 @@ pub struct PushAttachmentSelectionDetails { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PushAttachmentSelection { - /// User-facing display name for the selection - pub display_name: String, - /// Absolute path to the file containing the selection - pub file_path: String, - /// Position range of the selection within the file - pub selection: PushAttachmentSelectionDetails, - /// The selected text content - pub text: String, - /// Attachment type discriminator - pub r#type: PushAttachmentSelectionType, +pub struct PluginsReloadRequest { + /// When true, skip repo-level hooks during the hook reload. Use before folder trust is confirmed; load them post-trust via `sessions.loadDeferredRepoHooks`. + #[serde(skip_serializing_if = "Option::is_none")] + pub defer_repo_hooks: Option, + /// Re-run custom-agent discovery after refreshing plugins. Defaults to true. + #[serde(skip_serializing_if = "Option::is_none")] + pub reload_custom_agents: Option, + /// Re-load user, plugin, and (subject to `deferRepoHooks`) repo hooks. Defaults to true. Has no effect when the host has not registered a hook reloader (e.g. remote sessions). + #[serde(skip_serializing_if = "Option::is_none")] + pub reload_hooks: Option, + /// Reload MCP server connections after refreshing plugins. Defaults to true. + #[serde(skip_serializing_if = "Option::is_none")] + pub reload_mcp: Option, } -/// Schema for the `QueuedCommandHandled` type. +/// Name (or spec) of the plugin to uninstall. /// ///
/// @@ -6113,15 +6906,12 @@ pub struct PushAttachmentSelection { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct QueuedCommandHandled { - /// The host actually executed the queued command. - pub handled: bool, - /// When true, the runtime will not process subsequent queued commands until a new request comes in. - #[serde(skip_serializing_if = "Option::is_none")] - pub stop_processing_queue: Option, +pub struct PluginsUninstallRequest { + /// Plugin name or "plugin@marketplace" spec to uninstall. When ambiguous, prefer the fully-qualified spec. + pub name: String, } -/// Schema for the `QueuedCommandNotHandled` type. +/// Name (or spec) of the plugin to update. /// ///
/// @@ -6131,12 +6921,12 @@ pub struct QueuedCommandHandled { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct QueuedCommandNotHandled { - /// The host did not execute the queued command. Unblocks the queue without claiming the command was processed (e.g. when the handler threw before completing). - pub handled: bool, +pub struct PluginsUpdateRequest { + /// Plugin name or "plugin@marketplace" spec to update. + pub name: String, } -/// Schema for the `QueuePendingItems` type. +/// Schema for the `PluginUpdateAllEntry` type. /// ///
/// @@ -6146,14 +6936,28 @@ pub struct QueuedCommandNotHandled { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct QueuePendingItems { - /// Human-readable text to display for this queue entry in the UI - pub display_text: String, - /// Whether this item is a queued user message or a queued slash command / model change - pub kind: QueuePendingItemsKind, +pub struct PluginUpdateAllEntry { + /// Error message (failure only) + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, + /// Marketplace the plugin came from. Empty string ("") for direct installs. + pub marketplace: String, + /// Plugin name that was updated + pub name: String, + /// Version after the update, when available + #[serde(skip_serializing_if = "Option::is_none")] + pub new_version: Option, + /// Previously installed version, when available + #[serde(skip_serializing_if = "Option::is_none")] + pub previous_version: Option, + /// Number of skills installed after the update (success only) + #[serde(skip_serializing_if = "Option::is_none")] + pub skills_installed: Option, + /// Whether the update succeeded for this plugin + pub success: bool, } -/// Snapshot of the session's pending queued items and immediate-steering messages. +/// Result of updating all installed plugins. /// ///
/// @@ -6163,14 +6967,12 @@ pub struct QueuePendingItems { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct QueuePendingItemsResult { - /// Pending queued items in submission order. Includes user messages, queued slash commands, and queued model changes; omits internal system items. - pub items: Vec, - /// Display text for messages currently in the immediate steering queue (interjections sent during a running turn). - pub steering_messages: Vec, +pub struct PluginUpdateAllResult { + /// Per-plugin update results in deterministic order. + pub results: Vec, } -/// Indicates whether a user-facing pending item was removed. +/// Result of updating a single plugin. /// ///
/// @@ -6180,12 +6982,18 @@ pub struct QueuePendingItemsResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct QueueRemoveMostRecentResult { - /// True if a user-facing pending item was removed (LIFO across both queues); false when no removable items remained. - pub removed: bool, +pub struct PluginUpdateResult { + /// Version after the update, when reported by the plugin manifest + #[serde(skip_serializing_if = "Option::is_none")] + pub new_version: Option, + /// Version that was previously installed, when available + #[serde(skip_serializing_if = "Option::is_none")] + pub previous_version: Option, + /// Number of skills discovered and installed after the update + pub skills_installed: i64, } -/// Event type to register consumer interest for, used by runtime gating logic. +/// Schema for the `SessionsPollSpawnedSessionsEvent` type. /// ///
/// @@ -6195,12 +7003,12 @@ pub struct QueueRemoveMostRecentResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct RegisterEventInterestParams { - /// The event type the consumer wants the runtime to treat as 'observed' for behavior-switching gating. Some runtime code paths inspect whether any consumer is interested in a specific event type and choose a different implementation accordingly (e.g. `mcp.oauth_required`: when interest is registered the runtime delegates the full interactive OAuth flow to the consumer; when no interest is registered the runtime installs a browserless fallback that silently reuses cached tokens). SDK clients that long-poll events do NOT automatically appear as listeners to these gating checks — they must explicitly call `registerInterest` for each event type they want the runtime to count as having a consumer. Multiple registrations for the same event type from the same or different consumers are tracked independently and must each be released. See: `mcp.oauth_required`, `sampling.requested`, `auto_mode_switch.requested`, `user_input.requested`, `elicitation.requested`, `command.queued`, `exit_plan_mode.requested`. - pub event_type: String, +pub struct SessionsPollSpawnedSessionsEvent { + /// Session id of the newly-spawned session. + pub session_id: SessionId, } -/// Opaque handle representing an event-type interest registration. +/// Batch of spawn events plus a cursor for follow-up polls. /// ///
/// @@ -6210,12 +7018,14 @@ pub struct RegisterEventInterestParams { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct RegisterEventInterestResult { - /// Opaque handle for this registration. Pass to releaseInterest to release. Each call to registerInterest produces a fresh handle, even when the same eventType is registered multiple times. - pub handle: String, +pub struct PollSpawnedSessionsResult { + /// Opaque cursor to pass back to receive only events after this batch. + pub cursor: String, + /// Spawn events emitted since the supplied cursor. + pub events: Vec, } -/// Opaque handle previously returned by `registerInterest` to release. +/// Azure-specific provider options. /// ///
/// @@ -6225,12 +7035,13 @@ pub struct RegisterEventInterestResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ReleaseEventInterestParams { - /// Handle returned by a previous `registerInterest` call. Idempotent: releasing an unknown or already-released handle is a no-op (returns success). When the last outstanding handle for an event type is released, the runtime reverts to its 'no consumer' code path for that event type. - pub handle: String, +pub struct ProviderConfigAzure { + /// API version. When set, uses the versioned deployment route. When omitted, uses the GA versionless v1 route. + #[serde(skip_serializing_if = "Option::is_none")] + pub api_version: Option, } -/// Optional remote session mode ("off", "export", or "on"); defaults to enabling both export and remote steering. +/// Custom model-provider configuration (BYOK). /// ///
/// @@ -6240,13 +7051,45 @@ pub struct ReleaseEventInterestParams { ///
#[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 GitHub without enabling remote steering, "on" enables both export and remote steering. +pub struct ProviderConfig { + /// API key. Optional for local providers like Ollama. #[serde(skip_serializing_if = "Option::is_none")] - pub mode: Option, + pub api_key: Option, + /// Azure-specific provider options. + #[serde(skip_serializing_if = "Option::is_none")] + pub azure: Option, + /// API endpoint URL. + pub base_url: String, + /// Bearer token for authentication. Sets the Authorization header directly. Takes precedence over apiKey when both are set. + #[serde(skip_serializing_if = "Option::is_none")] + pub bearer_token: Option, + /// Custom HTTP headers to include in all outbound requests to the provider. + #[serde(skip_serializing_if = "Option::is_none")] + pub headers: Option>, + /// Maximum context window tokens for the model. + #[serde(skip_serializing_if = "Option::is_none")] + pub max_context_window_tokens: Option, + /// Maximum output tokens for the model. + #[serde(skip_serializing_if = "Option::is_none")] + pub max_output_tokens: Option, + /// Maximum prompt/input tokens for the model. + #[serde(skip_serializing_if = "Option::is_none")] + pub max_prompt_tokens: Option, + /// Well-known model ID used for capability lookup. When set, agent behavior config and token limits are inferred from this model. + #[serde(skip_serializing_if = "Option::is_none")] + pub model_id: Option, + /// Provider type. Defaults to "openai" for generic OpenAI-compatible APIs. + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option, + /// Wire API format (openai/azure only). Defaults to "completions". + #[serde(skip_serializing_if = "Option::is_none")] + pub wire_api: Option, + /// The model identifier sent to the provider API for inference (the "wire" model), as opposed to modelId which is the well-known base. + #[serde(skip_serializing_if = "Option::is_none")] + pub wire_model: Option, } -/// GitHub URL for the session and a flag indicating whether remote steering is enabled. +/// Blob attachment with inline base64-encoded data /// ///
/// @@ -6256,15 +7099,19 @@ pub struct RemoteEnableRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct RemoteEnableResult { - /// Whether remote steering is enabled - pub remote_steerable: bool, - /// GitHub frontend URL for this session +pub struct PushAttachmentBlob { + /// Base64-encoded content + pub data: String, + /// User-facing display name for the attachment #[serde(skip_serializing_if = "Option::is_none")] - pub url: Option, + pub display_name: Option, + /// MIME type of the inline data + pub mime_type: String, + /// Attachment type discriminator + pub r#type: PushAttachmentBlobType, } -/// New remote-steerability state to persist as a `session.remote_steerable_changed` event. +/// Directory attachment /// ///
/// @@ -6274,12 +7121,16 @@ pub struct RemoteEnableResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct RemoteNotifySteerableChangedRequest { - /// Whether the session now supports remote steering via GitHub. The runtime persists this as a `session.remote_steerable_changed` event so resume/replay sees the up-to-date capability. - pub remote_steerable: bool, +pub struct PushAttachmentDirectory { + /// User-facing display name for the attachment + pub display_name: String, + /// Absolute directory path + pub path: String, + /// Attachment type discriminator + pub r#type: PushAttachmentDirectoryType, } -/// Persist a steerability change as a `session.remote_steerable_changed` event. Used by the host (CLI / SDK consumer) when it has just finished enabling or disabling steering on a remote exporter that the runtime does not directly own. +/// Optional line range to scope the attachment to a specific section of the file /// ///
/// @@ -6289,9 +7140,14 @@ pub struct RemoteNotifySteerableChangedRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct RemoteNotifySteerableChangedResult {} +pub struct PushAttachmentFileLineRange { + /// End line number (1-based, inclusive) + pub end: i64, + /// Start line number (1-based) + pub start: i64, +} -/// Remote session connection result. +/// File attachment /// ///
/// @@ -6301,14 +7157,19 @@ pub struct RemoteNotifySteerableChangedResult {} ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct RemoteSessionConnectionResult { - /// Metadata for a connected remote session. - pub metadata: ConnectedRemoteSessionMetadata, - /// SDK session ID for the connected remote session. - pub session_id: SessionId, +pub struct PushAttachmentFile { + /// User-facing display name for the attachment + pub display_name: String, + /// Optional line range to scope the attachment to a specific section of the file + #[serde(skip_serializing_if = "Option::is_none")] + pub line_range: Option, + /// Absolute file path + pub path: String, + /// Attachment type discriminator + pub r#type: PushAttachmentFileType, } -/// Schema for the `ScheduleEntry` type. +/// GitHub issue, pull request, or discussion reference /// ///
/// @@ -6318,23 +7179,22 @@ pub struct RemoteSessionConnectionResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ScheduleEntry { - /// Display-only label for the prompt as shown in the UI (e.g. `/skill-name` for a skill-invocation schedule). The actual enqueued prompt is `prompt`. - #[serde(skip_serializing_if = "Option::is_none")] - pub display_prompt: Option, - /// Sequential id assigned by the runtime within the session. Stable across resumes (rebuilt from the event log). - pub id: i64, - /// Interval between scheduled ticks, in milliseconds. - pub interval_ms: i64, - /// ISO 8601 timestamp when the next tick is scheduled to fire. - pub next_run_at: String, - /// Prompt text that gets enqueued on every tick. - pub prompt: String, - /// Whether the schedule re-arms after each tick (`/every`) or fires once (`/after`). - pub recurring: bool, +pub struct PushAttachmentGitHubReference { + /// Issue, pull request, or discussion number + pub number: i64, + /// Type of GitHub reference + pub reference_type: PushAttachmentGitHubReferenceType, + /// Current state of the referenced item (e.g., open, closed, merged) + pub state: String, + /// Title of the referenced item + pub title: String, + /// Attachment type discriminator + pub r#type: PushAttachmentGitHubReferenceType, + /// URL to the referenced item on GitHub + pub url: String, } -/// Snapshot of the currently active recurring prompts for this session. +/// End position of the selection /// ///
/// @@ -6344,12 +7204,14 @@ pub struct ScheduleEntry { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ScheduleList { - /// Active scheduled prompts, ordered by id. - pub entries: Vec, +pub struct PushAttachmentSelectionDetailsEnd { + /// End character offset within the line (0-based) + pub character: i64, + /// End line number (0-based) + pub line: i64, } -/// Identifier of the scheduled prompt to remove. +/// Start position of the selection /// ///
/// @@ -6359,12 +7221,14 @@ pub struct ScheduleList { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ScheduleStopRequest { - /// Id of the scheduled prompt to remove. - pub id: i64, +pub struct PushAttachmentSelectionDetailsStart { + /// Start character offset within the line (0-based) + pub character: i64, + /// Start line number (0-based) + pub line: i64, } -/// Remove a scheduled prompt by id. The result entry is omitted if the id was unknown. +/// Position range of the selection within the file /// ///
/// @@ -6374,29 +7238,37 @@ pub struct ScheduleStopRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ScheduleStopResult { - /// The removed entry, or omitted if no entry matched. - #[serde(skip_serializing_if = "Option::is_none")] - pub entry: Option, -} - -/// Secret values to add to the redaction filter. -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct SecretsAddFilterValuesRequest { - /// Raw secret values to register for redaction - pub values: Vec, +pub struct PushAttachmentSelectionDetails { + /// End position of the selection + pub end: PushAttachmentSelectionDetailsEnd, + /// Start position of the selection + pub start: PushAttachmentSelectionDetailsStart, } -/// Confirmation that the secret values were registered. +/// Code selection attachment from an editor +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SecretsAddFilterValuesResult { - /// Whether the values were successfully registered - pub ok: bool, +pub struct PushAttachmentSelection { + /// User-facing display name for the selection + pub display_name: String, + /// Absolute path to the file containing the selection + pub file_path: String, + /// Position range of the selection within the file + pub selection: PushAttachmentSelectionDetails, + /// The selected text content + pub text: String, + /// Attachment type discriminator + pub r#type: PushAttachmentSelectionType, } -/// Parameters for session.extensions.sendAttachmentsToMessage. +/// Schema for the `QueuedCommandHandled` type. /// ///
/// @@ -6406,15 +7278,15 @@ pub struct SecretsAddFilterValuesResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SendAttachmentsToMessageParams { - /// Attachments to push into the next user-message turn. extension_context entries take the slim shape; standard variants take their full AttachmentSchema shape. - pub attachments: Vec, - /// Optional canvas instance binding the push for provenance. When supplied, the runtime resolves the canvas, verifies it is owned by the calling extension, and stamps canvasId/instanceId onto each extension_context entry. When omitted, no resolution runs and those fields stay unset on the attachment. +pub struct QueuedCommandHandled { + /// The host actually executed the queued command. + pub handled: bool, + /// When true, the runtime will not process subsequent queued commands until a new request comes in. #[serde(skip_serializing_if = "Option::is_none")] - pub instance_id: Option, + pub stop_processing_queue: Option, } -/// Parameters for sending a user message to the session +/// Schema for the `QueuedCommandNotHandled` type. /// ///
/// @@ -6424,49 +7296,12 @@ pub struct SendAttachmentsToMessageParams { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SendRequest { - /// The UI mode the agent was in when this message was sent. Defaults to the session's current mode. - #[serde(skip_serializing_if = "Option::is_none")] - pub agent_mode: Option, - /// Optional attachments (files, directories, selections, blobs, GitHub references) to include with the message - #[serde(skip_serializing_if = "Option::is_none")] - pub attachments: Option>, - /// If false, this message will not trigger a Premium Request Unit charge. User messages default to billable. - #[serde(skip_serializing_if = "Option::is_none")] - pub billable: Option, - /// If provided, this is shown in the timeline instead of `prompt` - #[serde(skip_serializing_if = "Option::is_none")] - pub display_prompt: Option, - /// How to deliver the message. `enqueue` (default) appends to the message queue. `immediate` interjects during an in-progress turn. - #[serde(skip_serializing_if = "Option::is_none")] - pub mode: Option, - /// If true, adds the message to the front of the queue instead of the end - #[serde(skip_serializing_if = "Option::is_none")] - pub prepend: Option, - /// The user message text - pub prompt: String, - /// Custom HTTP headers to include in outbound model requests for this turn. Merged with session-level provider headers; per-turn headers augment and overwrite session-level headers with the same key. - #[serde(skip_serializing_if = "Option::is_none")] - pub request_headers: Option>, - /// If set, the request will fail if the named tool is not available when this message is among the user messages at the start of the current exchange - #[serde(skip_serializing_if = "Option::is_none")] - pub required_tool: Option, - /// Optional provenance tag copied to the resulting user.message event. Supported values are `system`, `command-*`, and `schedule-*`. - #[doc(hidden)] - #[serde(skip_serializing_if = "Option::is_none")] - pub(crate) source: Option, - /// W3C Trace Context traceparent header for distributed tracing of this agent turn - #[serde(skip_serializing_if = "Option::is_none")] - pub traceparent: Option, - /// W3C Trace Context tracestate header for distributed tracing - #[serde(skip_serializing_if = "Option::is_none")] - pub tracestate: Option, - /// If true, await completion of the agentic loop for this message before returning. Defaults to false (fire-and-forget). When true, the result still contains the same `messageId`; the caller can rely on the agent having processed the message before the call resolves. - #[serde(skip_serializing_if = "Option::is_none")] - pub wait: Option, +pub struct QueuedCommandNotHandled { + /// The host did not execute the queued command. Unblocks the queue without claiming the command was processed (e.g. when the handler threw before completing). + pub handled: bool, } -/// Result of sending a user message +/// Schema for the `QueuePendingItems` type. /// ///
/// @@ -6476,42 +7311,46 @@ pub struct SendRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SendResult { - /// Unique identifier assigned to the message - pub message_id: String, +pub struct QueuePendingItems { + /// Human-readable text to display for this queue entry in the UI + pub display_text: String, + /// Whether this item is a queued user message or a queued slash command / model change + pub kind: QueuePendingItemsKind, } -/// Schema for the `ServerSkill` type. +/// Snapshot of the session's pending queued items and immediate-steering messages. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ServerSkill { - /// Description of what the skill does - pub description: String, - /// Whether the skill is currently enabled (based on global config) - pub enabled: bool, - /// Unique identifier for the skill - pub name: String, - /// Absolute path to the skill file - #[serde(skip_serializing_if = "Option::is_none")] - pub path: Option, - /// The project path this skill belongs to (only for project/inherited skills) - #[serde(skip_serializing_if = "Option::is_none")] - pub project_path: Option, - /// Source location type (e.g., project, personal-copilot, plugin, builtin) - pub source: SkillSource, - /// Whether the skill can be invoked by the user as a slash command - pub user_invocable: bool, +pub struct QueuePendingItemsResult { + /// Pending queued items in submission order. Includes user messages, queued slash commands, and queued model changes; omits internal system items. + pub items: Vec, + /// Display text for messages currently in the immediate steering queue (interjections sent during a running turn). + pub steering_messages: Vec, } -/// Skills discovered across global and project sources. +/// Indicates whether a user-facing pending item was removed. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ServerSkillList { - /// All discovered skills across all sources - pub skills: Vec, +pub struct QueueRemoveMostRecentResult { + /// True if a user-facing pending item was removed (LIFO across both queues); false when no removable items remained. + pub removed: bool, } -/// Authentication status and account metadata for the session. +/// Event type to register consumer interest for, used by runtime gating logic. /// ///
/// @@ -6521,27 +7360,12 @@ pub struct ServerSkillList { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionAuthStatus { - /// Authentication type - #[serde(skip_serializing_if = "Option::is_none")] - pub auth_type: Option, - /// Copilot plan tier (e.g., individual_pro, business) - #[serde(skip_serializing_if = "Option::is_none")] - pub copilot_plan: Option, - /// Authentication host URL - #[serde(skip_serializing_if = "Option::is_none")] - pub host: Option, - /// Whether the session has resolved authentication - pub is_authenticated: bool, - /// Authenticated login/username, if available - #[serde(skip_serializing_if = "Option::is_none")] - pub login: Option, - /// Human-readable authentication status description - #[serde(skip_serializing_if = "Option::is_none")] - pub status_message: Option, +pub struct RegisterEventInterestParams { + /// The event type the consumer wants the runtime to treat as 'observed' for behavior-switching gating. Some runtime code paths inspect whether any consumer is interested in a specific event type and choose a different implementation accordingly (e.g. `mcp.oauth_required`: when interest is registered the runtime delegates the full interactive OAuth flow to the consumer; when no interest is registered the runtime installs a browserless fallback that silently reuses cached tokens). SDK clients that long-poll events do NOT automatically appear as listeners to these gating checks — they must explicitly call `registerInterest` for each event type they want the runtime to count as having a consumer. Multiple registrations for the same event type from the same or different consumers are tracked independently and must each be released. See: `mcp.oauth_required`, `sampling.requested`, `auto_mode_switch.requested`, `user_input.requested`, `elicitation.requested`, `command.queued`, `exit_plan_mode.requested`. + pub event_type: String, } -/// Map of sessionId -> bytes freed by removing the session's workspace directory. +/// Opaque handle representing an event-type interest registration. /// ///
/// @@ -6551,12 +7375,12 @@ pub struct SessionAuthStatus { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionBulkDeleteResult { - /// Map of sessionId -> bytes freed by removing the session's workspace directory. Sessions whose deletion failed are omitted from this map (failures are logged on the server but not surfaced per-id; check the map for absent IDs to detect them). - pub freed_bytes: HashMap, +pub struct RegisterEventInterestResult { + /// Opaque handle for this registration. Pass to releaseInterest to release. Each call to registerInterest produces a fresh handle, even when the same eventType is registered multiple times. + pub handle: String, } -/// Schema for the `SessionContext` type. +/// Optional registration options. /// ///
/// @@ -6566,24 +7390,14 @@ pub struct SessionBulkDeleteResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionContext { - /// Active git branch - #[serde(skip_serializing_if = "Option::is_none")] - pub branch: Option, - /// Most recent working directory for this session - pub cwd: String, - /// Git repository root, if the cwd was inside a git repo - #[serde(skip_serializing_if = "Option::is_none")] - pub git_root: Option, - /// Repository host type - #[serde(skip_serializing_if = "Option::is_none")] - pub host_type: Option, - /// Repository slug in `owner/name` form, when known +pub struct SessionsRegisterExtensionToolsOnSessionOptions { + /// In-process `() => boolean` gating callback (CLI-only optimization). Marked internal: replaced by runtime-side enable/disable RPCs in the SDK migration. + #[doc(hidden)] #[serde(skip_serializing_if = "Option::is_none")] - pub repository: Option, + pub(crate) enabled: Option, } -/// Token breakdown for the current context window, or null if the session has not yet been initialized (no system prompt or tool metadata cached). +/// Params to attach an extension loader's tools to a session. /// ///
/// @@ -6593,30 +7407,18 @@ pub struct SessionContext { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionContextInfo { - /// Output reserve plus tokens after the buffer-exhaustion blocking threshold (default 95%) - pub buffer_tokens: i64, - /// Token count at which background compaction starts (configurable percentage of promptTokenLimit) - pub compaction_threshold: i64, - /// Tokens consumed by user/assistant/tool messages - pub conversation_tokens: i64, - /// Total context limit for /context display: promptTokenLimit + outputTokenLimit (the model's full max_output_tokens reserved on top of the prompt budget). - pub limit: i64, - /// Tokens consumed by MCP tool definitions (subset of toolDefinitionsTokens, excludes deferred tools) - pub mcp_tools_tokens: i64, - /// The model used for token counting - pub model_name: String, - /// Maximum prompt tokens allowed by the model (or DEFAULT_TOKEN_LIMIT if unspecified) - pub prompt_token_limit: i64, - /// Tokens consumed by the system prompt - pub system_tokens: i64, - /// Tokens consumed by tool definitions sent to the model (excludes deferred tools) - pub tool_definitions_tokens: i64, - /// Sum of system, conversation and tool-definition tokens - pub total_tokens: i64, +pub(crate) struct RegisterExtensionToolsParams { + /// In-process ExtensionLoader handle (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, extension discovery/launch moves entirely into the runtime — the CLI passes pure config (search paths, disabled ids) via SessionOptions instead. + #[doc(hidden)] + pub(crate) loader: serde_json::Value, + /// Optional registration options. + #[serde(skip_serializing_if = "Option::is_none")] + pub options: Option, + /// Session to register extension tools on. + pub session_id: SessionId, } -/// Schema for the `SessionMetadata` type. +/// Handle for releasing the extension tool registration. /// ///
/// @@ -6626,36 +7428,13 @@ pub struct SessionContextInfo { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionMetadata { - /// Runtime client name that created/last resumed this session - #[serde(skip_serializing_if = "Option::is_none")] - pub client_name: Option, - /// Schema for the `SessionContext` type. - #[serde(skip_serializing_if = "Option::is_none")] - pub context: Option, - /// True for detached maintenance sessions that should be hidden from normal resume lists. - #[serde(skip_serializing_if = "Option::is_none")] - pub is_detached: Option, - /// True for remote (GitHub) sessions; false for local - pub is_remote: bool, - /// GitHub task ID, when this local session is bound to one. Only present for local sessions exported to remote control. - #[serde(skip_serializing_if = "Option::is_none")] - pub mc_task_id: Option, - /// Last-modified time of the session's persisted state, as ISO 8601 - pub modified_time: String, - /// Optional human-friendly name set via /rename - #[serde(skip_serializing_if = "Option::is_none")] - pub name: Option, - /// Stable session identifier - pub session_id: SessionId, - /// Session creation time as an ISO 8601 timestamp - pub start_time: String, - /// Short summary of the session, when one has been derived - #[serde(skip_serializing_if = "Option::is_none")] - pub summary: Option, +pub(crate) struct RegisterExtensionToolsResult { + /// In-process unsubscribe function (CLI-only optimization). Marked internal: replaced by an explicit `extensions.unregister` RPC in the SDK migration. + #[doc(hidden)] + pub(crate) unsubscribe: serde_json::Value, } -/// The enriched metadata records, with summary and context fields backfilled where available. Sessions confirmed empty and unnamed are omitted. +/// Opaque handle previously returned by `registerInterest` to release. /// ///
/// @@ -6665,12 +7444,12 @@ pub struct SessionMetadata { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionEnrichMetadataResult { - /// Enriched records, with summary and context backfilled. Sessions confirmed empty and unnamed may be omitted. - pub sessions: Vec, +pub struct ReleaseEventInterestParams { + /// Handle returned by a previous `registerInterest` call. Idempotent: releasing an unknown or already-released handle is a no-op (returns success). When the last outstanding handle for an event type is released, the runtime reverts to its 'no consumer' code path for that event type. + pub handle: String, } -/// File path, content to append, and optional mode for the client-provided session filesystem. +/// Reattach to an existing MC session without creating a new one. /// ///
/// @@ -6680,19 +7459,14 @@ pub struct SessionEnrichMetadataResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsAppendFileRequest { - /// Target session identifier - pub session_id: SessionId, - /// Path using SessionFs conventions - pub path: String, - /// Content to append - pub content: String, - /// Optional POSIX-style mode for newly created files - #[serde(skip_serializing_if = "Option::is_none")] - pub mode: Option, +pub struct RemoteControlConfigExistingMcSession { + /// Existing MC session ID to reattach to. + pub mc_session_id: String, + /// Existing MC task ID for the reattached session. + pub mc_task_id: String, } -/// Describes a filesystem error. +/// Configuration for the runtime-managed remote-control singleton. /// ///
/// @@ -6702,15 +7476,24 @@ pub struct SessionFsAppendFileRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsError { - /// Error classification - pub code: SessionFsErrorCode, - /// Free-form detail about the error, for logging/diagnostics +pub struct RemoteControlConfig { + /// Reattach to an existing MC session without creating a new one. #[serde(skip_serializing_if = "Option::is_none")] - pub message: Option, + pub existing_mc_session: Option, + /// Whether the user explicitly requested remote (vs. implicit session-sync). Controls warning surfacing for missing-repo cases. + pub explicit: bool, + /// Whether remote export should be enabled. + pub remote: bool, + /// When true, suppresses timeline messages on successful setup. + pub silent: bool, + /// Whether the MC session may steer the local session (write mode). + pub steerable: bool, + /// Existing Mission Control task ID to attach the exported session to. + #[serde(skip_serializing_if = "Option::is_none")] + pub task_id: Option, } -/// Path to test for existence in the client-provided session filesystem. +/// Remote control is connected to a local session. /// ///
/// @@ -6720,14 +7503,23 @@ pub struct SessionFsError { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsExistsRequest { - /// Target session identifier - pub session_id: SessionId, - /// Path using SessionFs conventions - pub path: String, +pub struct RemoteControlStatusActive { + /// Session id remote control is pointed at. + pub attached_session_id: String, + /// MC frontend URL for this session, when known. + #[serde(skip_serializing_if = "Option::is_none")] + pub frontend_url: Option, + /// Whether the MC session may steer this session. + pub is_steerable: bool, + /// In-process prompt-manager handle (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, the same bidirectional prompt-routing handshake is expressed via dedicated remote-control RPCs (register/resolve) rather than a shared in-process object. + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) prompt_manager: Option, + /// Remote control state tag: active. + pub state: RemoteControlStatusActiveState, } -/// Indicates whether the requested path exists in the client-provided session filesystem. +/// Remote control is in the middle of initial setup. /// ///
/// @@ -6737,12 +7529,14 @@ pub struct SessionFsExistsRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsExistsResult { - /// Whether the path exists - pub exists: bool, +pub struct RemoteControlStatusConnecting { + /// Session id the connection is attaching to. + pub attached_session_id: String, + /// Remote control state tag: connecting. + pub state: RemoteControlStatusConnectingState, } -/// Directory path to create in the client-provided session filesystem, with options for recursive creation and POSIX mode. +/// The last setup attempt failed. The singleton is otherwise off. /// ///
/// @@ -6752,20 +7546,17 @@ pub struct SessionFsExistsResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsMkdirRequest { - /// Target session identifier - pub session_id: SessionId, - /// Path using SessionFs conventions - pub path: String, - /// Create parent directories as needed - #[serde(skip_serializing_if = "Option::is_none")] - pub recursive: Option, - /// Optional POSIX-style mode for newly created directories +pub struct RemoteControlStatusError { + /// Session id the failing setup attempt targeted, when known. #[serde(skip_serializing_if = "Option::is_none")] - pub mode: Option, + pub attached_session_id: Option, + /// Human-readable error message from the last setup attempt. + pub error: String, + /// Remote control state tag: setup failed. + pub state: RemoteControlStatusErrorState, } -/// Directory path whose entries should be listed from the client-provided session filesystem. +/// Remote control is not connected. /// ///
/// @@ -6775,14 +7566,12 @@ pub struct SessionFsMkdirRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsReaddirRequest { - /// Target session identifier - pub session_id: SessionId, - /// Path using SessionFs conventions - pub path: String, +pub struct RemoteControlStatusOff { + /// Remote control state tag: not connected. + pub state: RemoteControlStatusOffState, } -/// Names of entries in the requested directory, or a filesystem error if the read failed. +/// Wrapper for the singleton's current status. /// ///
/// @@ -6792,15 +7581,12 @@ pub struct SessionFsReaddirRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsReaddirResult { - /// Entry names in the directory - pub entries: Vec, - /// Describes a filesystem error. - #[serde(skip_serializing_if = "Option::is_none")] - pub error: Option, +pub struct RemoteControlStatusResult { + /// State of the runtime-managed remote-control singleton. + pub status: serde_json::Value, } -/// Schema for the `SessionFsReaddirWithTypesEntry` type. +/// Outcome of a stopRemoteControl call. /// ///
/// @@ -6810,14 +7596,14 @@ pub struct SessionFsReaddirResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsReaddirWithTypesEntry { - /// Entry name - pub name: String, - /// Entry type - pub r#type: SessionFsReaddirWithTypesEntryType, +pub struct RemoteControlStopResult { + /// State of the runtime-managed remote-control singleton. + pub status: serde_json::Value, + /// Whether the singleton was actually torn down by this call. + pub stopped: bool, } -/// Directory path whose entries (with type information) should be listed from the client-provided session filesystem. +/// Outcome of a transferRemoteControl call. /// ///
/// @@ -6827,14 +7613,14 @@ pub struct SessionFsReaddirWithTypesEntry { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsReaddirWithTypesRequest { - /// Target session identifier - pub session_id: SessionId, - /// Path using SessionFs conventions - pub path: String, +pub struct RemoteControlTransferResult { + /// State of the runtime-managed remote-control singleton. + pub status: serde_json::Value, + /// Whether the rebinding actually happened. + pub transferred: bool, } -/// Entries in the requested directory paired with file/directory type information, or a filesystem error if the read failed. +/// Optional remote session mode ("off", "export", or "on"); defaults to enabling both export and remote steering. /// ///
/// @@ -6844,15 +7630,13 @@ pub struct SessionFsReaddirWithTypesRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsReaddirWithTypesResult { - /// Directory entries with type information - pub entries: Vec, - /// Describes a filesystem error. +pub struct RemoteEnableRequest { + /// 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 error: Option, + pub mode: Option, } -/// Path of the file to read from the client-provided session filesystem. +/// GitHub URL for the session and a flag indicating whether remote steering is enabled. /// ///
/// @@ -6862,14 +7646,15 @@ pub struct SessionFsReaddirWithTypesResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsReadFileRequest { - /// Target session identifier - pub session_id: SessionId, - /// Path using SessionFs conventions - pub path: String, +pub struct RemoteEnableResult { + /// Whether remote steering is enabled + pub remote_steerable: bool, + /// GitHub frontend URL for this session + #[serde(skip_serializing_if = "Option::is_none")] + pub url: Option, } -/// File content as a UTF-8 string, or a filesystem error if the read failed. +/// New remote-steerability state to persist as a `session.remote_steerable_changed` event. /// ///
/// @@ -6879,15 +7664,12 @@ pub struct SessionFsReadFileRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsReadFileResult { - /// File content as UTF-8 string - pub content: String, - /// Describes a filesystem error. - #[serde(skip_serializing_if = "Option::is_none")] - pub error: Option, +pub struct RemoteNotifySteerableChangedRequest { + /// Whether the session now supports remote steering via GitHub. The runtime persists this as a `session.remote_steerable_changed` event so resume/replay sees the up-to-date capability. + pub remote_steerable: bool, } -/// Source and destination paths for renaming or moving an entry in the client-provided session filesystem. +/// Persist a steerability change as a `session.remote_steerable_changed` event. Used by the host (CLI / SDK consumer) when it has just finished enabling or disabling steering on a remote exporter that the runtime does not directly own. /// ///
/// @@ -6897,16 +7679,9 @@ pub struct SessionFsReadFileResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsRenameRequest { - /// Target session identifier - pub session_id: SessionId, - /// Source path using SessionFs conventions - pub src: String, - /// Destination path using SessionFs conventions - pub dest: String, -} +pub struct RemoteNotifySteerableChangedResult {} -/// Path to remove from the client-provided session filesystem, with options for recursive removal and force. +/// Remote session connection result. /// ///
/// @@ -6916,52 +7691,102 @@ pub struct SessionFsRenameRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsRmRequest { - /// Target session identifier +pub struct RemoteSessionConnectionResult { + /// Metadata for a connected remote session. + pub metadata: ConnectedRemoteSessionMetadata, + /// SDK session ID for the connected remote session. pub session_id: SessionId, - /// Path using SessionFs conventions - pub path: String, - /// Remove directories and their contents recursively - #[serde(skip_serializing_if = "Option::is_none")] - pub recursive: Option, - /// Ignore errors if the path does not exist - #[serde(skip_serializing_if = "Option::is_none")] - pub force: Option, } -/// Optional capabilities declared by the provider +/// GitHub repository the remote session belongs to. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsSetProviderCapabilities { - /// Whether the provider supports SQLite query/exists operations - #[serde(skip_serializing_if = "Option::is_none")] - pub sqlite: Option, +pub struct RemoteSessionMetadataRepository { + /// Branch associated with the remote session. + pub branch: String, + /// Repository name. + pub name: String, + /// Repository owner. + pub owner: String, } -/// Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider. +/// Remote session metadata for the session to hand off (typically obtained from `sessions.list` with `source: "remote"`). +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsSetProviderRequest { - /// Optional capabilities declared by the provider +pub struct RemoteSessionMetadataValue { + /// Most recent working directory context. #[serde(skip_serializing_if = "Option::is_none")] - pub capabilities: Option, - /// Path conventions used by this filesystem - pub conventions: SessionFsSetProviderConventions, - /// Initial working directory for sessions - pub initial_cwd: String, - /// Path within each session's SessionFs where the runtime stores files for that session - pub session_state_path: String, + pub context: Option, + /// Always true for remote sessions. + pub is_remote: bool, + /// Last-modified time as an ISO 8601 timestamp. + pub modified_time: String, + /// Optional human-friendly name set via /rename. + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Pull request number associated with the session. + #[serde(skip_serializing_if = "Option::is_none")] + pub pull_request_number: Option, + /// Backing remote session IDs (most recent first). + pub remote_session_ids: Vec, + /// GitHub repository the remote session belongs to. + pub repository: RemoteSessionMetadataRepository, + /// Original remote resource identifier (task ID or PR node ID). + #[serde(skip_serializing_if = "Option::is_none")] + pub resource_id: Option, + /// Stable session identifier. + pub session_id: SessionId, + /// Deadline (ISO 8601) at which a CLI remote session becomes stale without further heartbeats. + #[serde(skip_serializing_if = "Option::is_none")] + pub stale_at: Option, + /// Session creation time as an ISO 8601 timestamp. + pub start_time: String, + /// Server-side task state returned by GitHub. + #[serde(skip_serializing_if = "Option::is_none")] + pub state: Option, + /// Short summary of the session, when one has been derived. + #[serde(skip_serializing_if = "Option::is_none")] + pub summary: Option, + /// Whether the remote task originated from CCA or CLI `--remote`. + #[serde(skip_serializing_if = "Option::is_none")] + pub task_type: Option, } -/// Indicates whether the calling client was registered as the session filesystem provider. +/// Repository context for the remote session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsSetProviderResult { - /// Whether the provider was set successfully - pub success: bool, +pub struct RemoteSessionRepository { + /// Optional branch associated with the remote session. + #[serde(skip_serializing_if = "Option::is_none")] + pub branch: Option, + /// Repository name. + pub name: String, + /// Repository owner or organization login. + pub owner: String, } -/// Indicates whether the per-session SQLite database already exists. +/// macOS seatbelt experimental options. /// ///
/// @@ -6971,12 +7796,13 @@ pub struct SessionFsSetProviderResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsSqliteExistsResult { - /// Whether the session database already exists - pub exists: bool, +pub struct SandboxConfigUserPolicyExperimentalSeatbelt { + /// Whether the macOS seatbelt profile may access the keychain. + #[serde(skip_serializing_if = "Option::is_none")] + pub keychain_access: Option, } -/// SQL query, query type, and optional bind parameters for executing a SQLite query against the per-session database. +/// Platform-specific experimental policy fields. /// ///
/// @@ -6986,19 +7812,13 @@ pub struct SessionFsSqliteExistsResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsSqliteQueryRequest { - /// Target session identifier - pub session_id: SessionId, - /// 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, - /// Optional named bind parameters +pub struct SandboxConfigUserPolicyExperimental { + /// macOS seatbelt experimental options. #[serde(skip_serializing_if = "Option::is_none")] - pub params: Option>, + pub seatbelt: Option, } -/// Query results including rows, columns, and rows affected, or a filesystem error if execution failed. +/// Filesystem rules to merge into the base policy. /// ///
/// @@ -7008,22 +7828,22 @@ pub struct SessionFsSqliteQueryRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsSqliteQueryResult { - /// Column names from the result set - pub columns: Vec, - /// Describes a filesystem error. +pub struct SandboxConfigUserPolicyFilesystem { + /// Whether to clear the policy when the session exits. #[serde(skip_serializing_if = "Option::is_none")] - pub error: Option, - /// SQLite last_insert_rowid() value for INSERT. + pub clear_policy_on_exit: Option, + /// Paths explicitly denied. #[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, + pub denied_paths: Option>, + /// Paths granted read-only access. + #[serde(skip_serializing_if = "Option::is_none")] + pub readonly_paths: Option>, + /// Paths granted read/write access. + #[serde(skip_serializing_if = "Option::is_none")] + pub readwrite_paths: Option>, } -/// Path whose metadata should be returned from the client-provided session filesystem. +/// Network rules to merge into the base policy. /// ///
/// @@ -7033,14 +7853,22 @@ pub struct SessionFsSqliteQueryResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsStatRequest { - /// Target session identifier - pub session_id: SessionId, - /// Path using SessionFs conventions - pub path: String, +pub struct SandboxConfigUserPolicyNetwork { + /// Hosts allowed in addition to the base policy. + #[serde(skip_serializing_if = "Option::is_none")] + pub allowed_hosts: Option>, + /// Whether traffic to local/loopback addresses is allowed. + #[serde(skip_serializing_if = "Option::is_none")] + pub allow_local_network: Option, + /// Whether outbound network traffic is allowed at all. + #[serde(skip_serializing_if = "Option::is_none")] + pub allow_outbound: Option, + /// Hosts explicitly blocked. + #[serde(skip_serializing_if = "Option::is_none")] + pub blocked_hosts: Option>, } -/// Filesystem metadata for the requested path, or a filesystem error if the stat failed. +/// User-managed sandbox policy fragment merged into the auto-discovered base policy. /// ///
/// @@ -7050,23 +7878,19 @@ pub struct SessionFsStatRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsStatResult { - /// ISO 8601 timestamp of creation - pub birthtime: String, - /// Describes a filesystem error. +pub struct SandboxConfigUserPolicy { + /// Platform-specific experimental policy fields. #[serde(skip_serializing_if = "Option::is_none")] - pub error: Option, - /// Whether the path is a directory - pub is_directory: bool, - /// Whether the path is a file - pub is_file: bool, - /// ISO 8601 timestamp of last modification - pub mtime: String, - /// File size in bytes - pub size: i64, + pub experimental: Option, + /// Filesystem rules to merge into the base policy. + #[serde(skip_serializing_if = "Option::is_none")] + pub filesystem: Option, + /// Network rules to merge into the base policy. + #[serde(skip_serializing_if = "Option::is_none")] + pub network: Option, } -/// File path, content to write, and optional mode for the client-provided session filesystem. +/// Resolved sandbox configuration. /// ///
/// @@ -7076,19 +7900,21 @@ pub struct SessionFsStatResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFsWriteFileRequest { - /// Target session identifier - pub session_id: SessionId, - /// Path using SessionFs conventions - pub path: String, - /// Content to write - pub content: String, - /// Optional POSIX-style mode for newly created files +pub struct SandboxConfig { + /// Whether to auto-add the current working directory to readwritePaths. Default: true. #[serde(skip_serializing_if = "Option::is_none")] - pub mode: Option, + pub add_current_working_directory: Option, + /// Raw `ContainerConfig` (per `@microsoft/mxc-sdk`) passed directly to `spawnSandboxFromConfig`, bypassing policy merging. + #[serde(skip_serializing_if = "Option::is_none")] + pub config: Option>, + /// Whether sandboxing is enabled for the session. + pub enabled: bool, + /// User-managed sandbox policy fragment merged into the auto-discovered base policy. + #[serde(skip_serializing_if = "Option::is_none")] + pub user_policy: Option, } -/// Schema for the `SessionInstalledPlugin` type. +/// Schema for the `ScheduleEntry` type. /// ///
/// @@ -7098,28 +7924,23 @@ pub struct SessionFsWriteFileRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionInstalledPlugin { - /// Path where the plugin is cached locally - #[serde(rename = "cache_path", skip_serializing_if = "Option::is_none")] - pub cache_path: Option, - /// Whether the plugin is currently enabled - pub enabled: bool, - /// Installation timestamp (ISO-8601) - #[serde(rename = "installed_at")] - pub installed_at: String, - /// Marketplace the plugin came from (empty string for direct repo installs) - pub marketplace: String, - /// Plugin name - pub name: String, - /// Source descriptor for direct repo installs (when marketplace is empty) - #[serde(skip_serializing_if = "Option::is_none")] - pub source: Option, - /// Installed version, if known +pub struct ScheduleEntry { + /// Display-only label for the prompt as shown in the UI (e.g. `/skill-name` for a skill-invocation schedule). The actual enqueued prompt is `prompt`. #[serde(skip_serializing_if = "Option::is_none")] - pub version: Option, + pub display_prompt: Option, + /// Sequential id assigned by the runtime within the session. Stable across resumes (rebuilt from the event log). + pub id: i64, + /// Interval between scheduled ticks, in milliseconds. + pub interval_ms: i64, + /// ISO 8601 timestamp when the next tick is scheduled to fire. + pub next_run_at: String, + /// Prompt text that gets enqueued on every tick. + pub prompt: String, + /// Whether the schedule re-arms after each tick (`/every`) or fires once (`/after`). + pub recurring: bool, } -/// Schema for the `SessionInstalledPluginSourceGitHub` type. +/// Snapshot of the currently active recurring prompts for this session. /// ///
/// @@ -7129,17 +7950,77 @@ pub struct SessionInstalledPlugin { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionInstalledPluginSourceGitHub { +pub struct ScheduleList { + /// Active scheduled prompts, ordered by id. + pub entries: Vec, +} + +/// Identifier of the scheduled prompt to remove. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ScheduleStopRequest { + /// Id of the scheduled prompt to remove. + pub id: i64, +} + +/// Remove a scheduled prompt by id. The result entry is omitted if the id was unknown. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ScheduleStopResult { + /// The removed entry, or omitted if no entry matched. #[serde(skip_serializing_if = "Option::is_none")] - pub path: Option, + pub entry: Option, +} + +/// Secret values to add to the redaction filter. +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SecretsAddFilterValuesRequest { + /// Raw secret values to register for redaction + pub values: Vec, +} + +/// Confirmation that the secret values were registered. +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SecretsAddFilterValuesResult { + /// Whether the values were successfully registered + pub ok: bool, +} + +/// Parameters for session.extensions.sendAttachmentsToMessage. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SendAttachmentsToMessageParams { + /// Attachments to push into the next user-message turn. extension_context entries take the slim shape; standard variants take their full AttachmentSchema shape. + pub attachments: Vec, + /// Optional canvas instance binding the push for provenance. When supplied, the runtime resolves the canvas, verifies it is owned by the calling extension, and stamps canvasId/instanceId onto each extension_context entry. When omitted, no resolution runs and those fields stay unset on the attachment. #[serde(skip_serializing_if = "Option::is_none")] - pub r#ref: Option, - pub repo: String, - /// Constant value. Always "github". - pub source: SessionInstalledPluginSourceGitHubSource, + pub instance_id: Option, } -/// Schema for the `SessionInstalledPluginSourceLocal` type. +/// Parameters for sending a user message to the session /// ///
/// @@ -7149,13 +8030,1154 @@ pub struct SessionInstalledPluginSourceGitHub { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionInstalledPluginSourceLocal { - pub path: String, - /// Constant value. Always "local". - pub source: SessionInstalledPluginSourceLocalSource, +pub struct SendRequest { + /// The UI mode the agent was in when this message was sent. Defaults to the session's current mode. + #[serde(skip_serializing_if = "Option::is_none")] + pub agent_mode: Option, + /// Optional attachments (files, directories, selections, blobs, GitHub references) to include with the message + #[serde(skip_serializing_if = "Option::is_none")] + pub attachments: Option>, + /// If false, this message will not trigger a Premium Request Unit charge. User messages default to billable. + #[serde(skip_serializing_if = "Option::is_none")] + pub billable: Option, + /// If provided, this is shown in the timeline instead of `prompt` + #[serde(skip_serializing_if = "Option::is_none")] + pub display_prompt: Option, + /// How to deliver the message. `enqueue` (default) appends to the message queue. `immediate` interjects during an in-progress turn. + #[serde(skip_serializing_if = "Option::is_none")] + pub mode: Option, + /// If true, adds the message to the front of the queue instead of the end + #[serde(skip_serializing_if = "Option::is_none")] + pub prepend: Option, + /// The user message text + pub prompt: String, + /// Custom HTTP headers to include in outbound model requests for this turn. Merged with session-level provider headers; per-turn headers augment and overwrite session-level headers with the same key. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_headers: Option>, + /// If set, the request will fail if the named tool is not available when this message is among the user messages at the start of the current exchange + #[serde(skip_serializing_if = "Option::is_none")] + pub required_tool: Option, + /// Optional provenance tag copied to the resulting user.message event. Must match one of three forms: the literal `system`, `command-` for messages originating from a command (e.g. slash command, Mission Control command), or `schedule-` for messages originating from a scheduled job. + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) source: Option, + /// W3C Trace Context traceparent header for distributed tracing of this agent turn + #[serde(skip_serializing_if = "Option::is_none")] + pub traceparent: Option, + /// W3C Trace Context tracestate header for distributed tracing + #[serde(skip_serializing_if = "Option::is_none")] + pub tracestate: Option, + /// If true, await completion of the agentic loop for this message before returning. Defaults to false (fire-and-forget). When true, the result still contains the same `messageId`; the caller can rely on the agent having processed the message before the call resolves. + #[serde(skip_serializing_if = "Option::is_none")] + pub wait: Option, +} + +/// Result of sending a user message +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SendResult { + /// Unique identifier assigned to the message + pub message_id: String, +} + +/// Schema for the `ServerSkill` type. +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ServerSkill { + /// Description of what the skill does + pub description: String, + /// Whether the skill is currently enabled (based on global config) + pub enabled: bool, + /// Unique identifier for the skill + pub name: String, + /// Absolute path to the skill file + #[serde(skip_serializing_if = "Option::is_none")] + pub path: Option, + /// The project path this skill belongs to (only for project/inherited skills) + #[serde(skip_serializing_if = "Option::is_none")] + pub project_path: Option, + /// Source location type (e.g., project, personal-copilot, plugin, builtin) + pub source: SkillSource, + /// Whether the skill can be invoked by the user as a slash command + pub user_invocable: bool, +} + +/// Skills discovered across global and project sources. +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ServerSkillList { + /// All discovered skills across all sources + pub skills: Vec, +} + +/// Current activity flags for the session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionActivity { + /// Whether an in-flight operation can currently be aborted. + pub abortable: bool, + /// Whether the session currently has active work, including running turns or tasks. + pub has_active_work: bool, +} + +/// Authentication status and account metadata for the session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionAuthStatus { + /// Authentication type + #[serde(skip_serializing_if = "Option::is_none")] + pub auth_type: Option, + /// Copilot plan tier (e.g., individual_pro, business) + #[serde(skip_serializing_if = "Option::is_none")] + pub copilot_plan: Option, + /// Authentication host URL + #[serde(skip_serializing_if = "Option::is_none")] + pub host: Option, + /// Whether the session has resolved authentication + pub is_authenticated: bool, + /// Authenticated login/username, if available + #[serde(skip_serializing_if = "Option::is_none")] + pub login: Option, + /// Human-readable authentication status description + #[serde(skip_serializing_if = "Option::is_none")] + pub status_message: Option, +} + +/// Map of sessionId -> bytes freed by removing the session's workspace directory. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionBulkDeleteResult { + /// Map of sessionId -> bytes freed by removing the session's workspace directory. Sessions whose deletion failed are omitted from this map (failures are logged on the server but not surfaced per-id; check the map for absent IDs to detect them). + pub freed_bytes: HashMap, +} + +/// Token breakdown for the current context window, or null if the session has not yet been initialized (no system prompt or tool metadata cached). +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionContextInfo { + /// Output reserve plus tokens after the buffer-exhaustion blocking threshold (default 95%) + pub buffer_tokens: i64, + /// Token count at which background compaction starts (configurable percentage of promptTokenLimit) + pub compaction_threshold: i64, + /// Tokens consumed by user/assistant/tool messages + pub conversation_tokens: i64, + /// Prompt token limit plus the model's full output token limit. + pub limit: i64, + /// Tokens consumed by MCP tool definitions (subset of toolDefinitionsTokens, excludes deferred tools) + pub mcp_tools_tokens: i64, + /// The model used for token counting + pub model_name: String, + /// Maximum prompt tokens allowed by the model (or DEFAULT_TOKEN_LIMIT if unspecified) + pub prompt_token_limit: i64, + /// Tokens consumed by the system prompt + pub system_tokens: i64, + /// Tokens consumed by tool definitions sent to the model (excludes deferred tools) + pub tool_definitions_tokens: i64, + /// Sum of system, conversation and tool-definition tokens + pub total_tokens: i64, +} + +/// The enriched metadata records, with summary and context fields backfilled where available. Sessions confirmed empty and unnamed are omitted. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionEnrichMetadataResult { + /// Enriched records, with summary and context backfilled. Sessions confirmed empty and unnamed may be omitted. + pub sessions: Vec, +} + +/// File path, content to append, and optional mode for the client-provided session filesystem. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsAppendFileRequest { + /// Target session identifier + pub session_id: SessionId, + /// Path using SessionFs conventions + pub path: String, + /// Content to append + pub content: String, + /// Optional POSIX-style mode for newly created files + #[serde(skip_serializing_if = "Option::is_none")] + pub mode: Option, +} + +/// Describes a filesystem error. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsError { + /// Error classification + pub code: SessionFsErrorCode, + /// Free-form detail about the error, for logging/diagnostics + #[serde(skip_serializing_if = "Option::is_none")] + pub message: Option, +} + +/// Path to test for existence in the client-provided session filesystem. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsExistsRequest { + /// Target session identifier + pub session_id: SessionId, + /// Path using SessionFs conventions + pub path: String, +} + +/// Indicates whether the requested path exists in the client-provided session filesystem. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsExistsResult { + /// Whether the path exists + pub exists: bool, +} + +/// Directory path to create in the client-provided session filesystem, with options for recursive creation and POSIX mode. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsMkdirRequest { + /// Target session identifier + pub session_id: SessionId, + /// Path using SessionFs conventions + pub path: String, + /// Create parent directories as needed + #[serde(skip_serializing_if = "Option::is_none")] + pub recursive: Option, + /// Optional POSIX-style mode for newly created directories + #[serde(skip_serializing_if = "Option::is_none")] + pub mode: Option, +} + +/// Directory path whose entries should be listed from the client-provided session filesystem. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsReaddirRequest { + /// Target session identifier + pub session_id: SessionId, + /// Path using SessionFs conventions + pub path: String, +} + +/// Names of entries in the requested directory, or a filesystem error if the read failed. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsReaddirResult { + /// Entry names in the directory + pub entries: Vec, + /// Describes a filesystem error. + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, +} + +/// Schema for the `SessionFsReaddirWithTypesEntry` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsReaddirWithTypesEntry { + /// Entry name + pub name: String, + /// Entry type + pub r#type: SessionFsReaddirWithTypesEntryType, +} + +/// Directory path whose entries (with type information) should be listed from the client-provided session filesystem. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsReaddirWithTypesRequest { + /// Target session identifier + pub session_id: SessionId, + /// Path using SessionFs conventions + pub path: String, +} + +/// Entries in the requested directory paired with file/directory type information, or a filesystem error if the read failed. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsReaddirWithTypesResult { + /// Directory entries with type information + pub entries: Vec, + /// Describes a filesystem error. + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, +} + +/// Path of the file to read from the client-provided session filesystem. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsReadFileRequest { + /// Target session identifier + pub session_id: SessionId, + /// Path using SessionFs conventions + pub path: String, +} + +/// File content as a UTF-8 string, or a filesystem error if the read failed. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsReadFileResult { + /// File content as UTF-8 string + pub content: String, + /// Describes a filesystem error. + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, +} + +/// Source and destination paths for renaming or moving an entry in the client-provided session filesystem. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsRenameRequest { + /// Target session identifier + pub session_id: SessionId, + /// Source path using SessionFs conventions + pub src: String, + /// Destination path using SessionFs conventions + pub dest: String, +} + +/// Path to remove from the client-provided session filesystem, with options for recursive removal and force. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsRmRequest { + /// Target session identifier + pub session_id: SessionId, + /// Path using SessionFs conventions + pub path: String, + /// Remove directories and their contents recursively + #[serde(skip_serializing_if = "Option::is_none")] + pub recursive: Option, + /// Ignore errors if the path does not exist + #[serde(skip_serializing_if = "Option::is_none")] + pub force: Option, +} + +/// Optional capabilities declared by the provider +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsSetProviderCapabilities { + /// Whether the provider supports SQLite query/exists operations + #[serde(skip_serializing_if = "Option::is_none")] + pub sqlite: 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 { + /// Optional capabilities declared by the provider + #[serde(skip_serializing_if = "Option::is_none")] + pub capabilities: Option, + /// Path conventions used by this filesystem + pub conventions: SessionFsSetProviderConventions, + /// Initial working directory for sessions + pub initial_cwd: String, + /// Path within each session's SessionFs where the runtime stores files for that session + 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 { + /// Whether the provider was set successfully + pub success: bool, +} + +/// Indicates whether the per-session SQLite database already exists. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsSqliteExistsResult { + /// Whether the session database already exists + pub exists: bool, +} + +/// SQL query, query type, and optional bind parameters for executing a SQLite query against the per-session database. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsSqliteQueryRequest { + /// Target session identifier + pub session_id: SessionId, + /// 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, + /// Optional named bind parameters + #[serde(skip_serializing_if = "Option::is_none")] + pub params: Option>, +} + +/// Query results including rows, columns, and rows affected, or a filesystem error if execution failed. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsSqliteQueryResult { + /// Column names from the result set + pub columns: Vec, + /// Describes a filesystem error. + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, + /// SQLite last_insert_rowid() value 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. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsStatRequest { + /// Target session identifier + pub session_id: SessionId, + /// Path using SessionFs conventions + pub path: String, +} + +/// Filesystem metadata for the requested path, or a filesystem error if the stat failed. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsStatResult { + /// ISO 8601 timestamp of creation + pub birthtime: String, + /// Describes a filesystem error. + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, + /// Whether the path is a directory + pub is_directory: bool, + /// Whether the path is a file + pub is_file: bool, + /// ISO 8601 timestamp of last modification + pub mtime: String, + /// File size in bytes + pub size: i64, +} + +/// File path, content to write, and optional mode for the client-provided session filesystem. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionFsWriteFileRequest { + /// Target session identifier + pub session_id: SessionId, + /// Path using SessionFs conventions + pub path: String, + /// Content to write + pub content: String, + /// Optional POSIX-style mode for newly created files + #[serde(skip_serializing_if = "Option::is_none")] + pub mode: Option, +} + +/// Schema for the `SessionInstalledPlugin` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionInstalledPlugin { + /// Path where the plugin is cached locally + #[serde(rename = "cache_path", skip_serializing_if = "Option::is_none")] + pub cache_path: Option, + /// Whether the plugin is currently enabled + pub enabled: bool, + /// Installation timestamp (ISO-8601) + #[serde(rename = "installed_at")] + pub installed_at: String, + /// Marketplace the plugin came from (empty string for direct repo installs) + pub marketplace: String, + /// Plugin name + pub name: String, + /// Source descriptor for direct repo installs (when marketplace is empty) + #[serde(skip_serializing_if = "Option::is_none")] + pub source: Option, + /// Installed version, if known + #[serde(skip_serializing_if = "Option::is_none")] + pub version: Option, +} + +/// Schema for the `SessionInstalledPluginSourceGitHub` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionInstalledPluginSourceGitHub { + #[serde(skip_serializing_if = "Option::is_none")] + pub path: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#ref: Option, + pub repo: String, + /// Constant value. Always "github". + pub source: SessionInstalledPluginSourceGitHubSource, +} + +/// Schema for the `SessionInstalledPluginSourceLocal` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionInstalledPluginSourceLocal { + pub path: String, + /// Constant value. Always "local". + pub source: SessionInstalledPluginSourceLocalSource, +} + +/// Schema for the `SessionInstalledPluginSourceUrl` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionInstalledPluginSourceUrl { + #[serde(skip_serializing_if = "Option::is_none")] + pub path: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#ref: Option, + /// Constant value. Always "url". + pub source: SessionInstalledPluginSourceUrlSource, + pub url: String, +} + +/// Sessions matching the filter, ordered most-recently-modified first. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionList { + /// Sessions ordered most-recently-modified first. Discriminated by `isRemote`. + pub sessions: Vec, +} + +/// Optional filter applied to the returned sessions +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionListFilter { + /// Match sessions whose context.branch equals this value + #[serde(skip_serializing_if = "Option::is_none")] + pub branch: Option, + /// Match sessions whose context.cwd equals this value + #[serde(skip_serializing_if = "Option::is_none")] + pub cwd: Option, + /// Match sessions whose context.gitRoot equals this value + #[serde(skip_serializing_if = "Option::is_none")] + pub git_root: Option, + /// Match sessions whose context.repository equals this value + #[serde(skip_serializing_if = "Option::is_none")] + pub repository: Option, +} + +/// Queued repo-level startup prompts and the total hook command count after loading. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionLoadDeferredRepoHooksResult { + /// Total hook command count (user + plugin + repo) loaded for the session by this call. Captured atomically with startupPrompts so callers don't need to read a separate counter. + pub hook_count: i64, + /// Repo-level startup prompts queued from repo hook configs. Empty on resume, when no repo configs were pending, or when disableAllHooks is set. + pub startup_prompts: Vec, +} + +/// Public-facing projection of workspace metadata for SDK / TUI consumers +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionMetadataSnapshotWorkspace { + /// Branch checked out at session start, if any + #[serde(skip_serializing_if = "Option::is_none")] + pub branch: Option, + /// ISO 8601 timestamp when the workspace was created + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + /// Current working directory at session start + #[serde(skip_serializing_if = "Option::is_none")] + pub cwd: Option, + /// Resolved git root for cwd, if any + #[serde(rename = "git_root", skip_serializing_if = "Option::is_none")] + pub git_root: Option, + /// Repository host type, if known + #[serde(rename = "host_type", skip_serializing_if = "Option::is_none")] + pub host_type: Option, + /// Workspace identifier (1:1 with sessionId) + pub id: String, + /// Display name for the session, if set + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Repository identifier in 'owner/repo' or 'org/project/repo' format, if any + #[serde(skip_serializing_if = "Option::is_none")] + pub repository: Option, + /// ISO 8601 timestamp when the workspace was last updated + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + /// Whether the display name was explicitly set by the user + #[serde(rename = "user_named", skip_serializing_if = "Option::is_none")] + pub user_named: Option, +} + +/// Point-in-time snapshot of slow-changing session identifier and state fields +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionMetadataSnapshot { + /// True when the session was detected to be in use by another process at construction time. Local consumers may surface a confirmation prompt before fully attaching. Always false for new sessions. + pub already_in_use: bool, + /// Runtime client name associated with the session (telemetry identifier). + #[serde(skip_serializing_if = "Option::is_none")] + pub client_name: Option, + /// The current agent mode for this session (e.g., 'interactive', 'plan', 'autopilot') + pub current_mode: MetadataSnapshotCurrentMode, + /// User-provided name supplied at session construction (via `--name`), if any. Immutable after construction. + #[serde(skip_serializing_if = "Option::is_none")] + pub initial_name: Option, + /// Whether this is a remote session (i.e., one whose runtime executes elsewhere and is steered through this process) + pub is_remote: bool, + /// ISO 8601 timestamp of when the session's persisted state was last modified on disk. For new sessions, equals startTime. For resumed sessions, reflects the previous modification time at construction. + pub modified_time: String, + /// Remote-session-specific metadata. Populated only when `isRemote` is true. Fields are immutable for the lifetime of the session. + #[serde(skip_serializing_if = "Option::is_none")] + pub remote_metadata: Option, + /// Currently selected model identifier, if any + #[serde(skip_serializing_if = "Option::is_none")] + pub selected_model: Option, + /// The unique identifier of the session + pub session_id: SessionId, + /// ISO 8601 timestamp of when the session started + pub start_time: String, + /// Short human-readable summary of the session, if known. Omitted when no summary has been generated. + #[serde(skip_serializing_if = "Option::is_none")] + pub summary: Option, + /// Absolute path to the session's current working directory + pub working_directory: String, + /// Public-facing workspace metadata for this session, or null if the session has no associated workspace. Excludes runtime-internal fields (GitHub IDs, summary count, internal flags). + pub workspace: Option, + /// Absolute path to the session's workspace directory on disk, or null if the session has no associated workspace + pub workspace_path: Option, +} + +/// The list of models available to this session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionModelList { + /// Available models, ordered with the most preferred default first. + pub list: Vec, + /// Per-quota snapshots returned alongside the model list, keyed by quota type. + #[serde(skip_serializing_if = "Option::is_none")] + pub quota_snapshots: Option>, +} + +/// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource { + pub name: String, + pub r#type: String, +} + +/// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRule` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionOpenOptionsAdditionalContentExclusionPolicyRule { + #[serde(skip_serializing_if = "Option::is_none")] + pub if_any_match: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub if_none_match: Option>, + pub paths: Vec, + /// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type. + pub source: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource, +} + +/// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicy` type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionOpenOptionsAdditionalContentExclusionPolicy { + #[serde(rename = "last_updated_at")] + pub last_updated_at: serde_json::Value, + pub rules: Vec, + /// Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` enumeration. + pub scope: SessionOpenOptionsAdditionalContentExclusionPolicyScope, +} + +/// Session construction options. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionOpenOptions { + /// Additional content-exclusion policies to merge into the session policy set. + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub additional_content_exclusion_policies: + Option>, + /// Runtime context discriminator for agent filtering. + #[serde(skip_serializing_if = "Option::is_none")] + pub agent_context: Option, + /// Whether ask_user is explicitly disabled. + #[serde(skip_serializing_if = "Option::is_none")] + pub ask_user_disabled: Option, + /// Initial authentication info for the session. + #[serde(skip_serializing_if = "Option::is_none")] + pub auth_info: Option, + /// Allowlist of available tool names. + #[serde(skip_serializing_if = "Option::is_none")] + pub available_tools: Option>, + /// Structured client kind used for runtime behavior gates. + #[serde(skip_serializing_if = "Option::is_none")] + pub client_kind: Option, + /// Identifier of the client driving the session. + #[serde(skip_serializing_if = "Option::is_none")] + pub client_name: Option, + /// Whether commit-message coauthor trailers are enabled. + #[serde(skip_serializing_if = "Option::is_none")] + pub coauthor_enabled: Option, + /// Override Copilot configuration directory. + #[serde(skip_serializing_if = "Option::is_none")] + pub config_dir: Option, + /// Whether auto-mode continuation is enabled. + #[serde(skip_serializing_if = "Option::is_none")] + pub continue_on_auto_mode: Option, + /// Override URL for the Copilot API endpoint. + #[serde(skip_serializing_if = "Option::is_none")] + pub copilot_url: Option, + /// Whether custom agents default to local-only execution. + #[serde(skip_serializing_if = "Option::is_none")] + pub custom_agents_local_only: Option, + /// Parent engagement ID for detached child telemetry rollup. + #[serde(skip_serializing_if = "Option::is_none")] + pub detached_from_spawning_parent_engagement_id: Option, + /// Parent session ID for detached child telemetry rollup. + #[serde(skip_serializing_if = "Option::is_none")] + pub detached_from_spawning_parent_session_id: Option, + /// Instruction source IDs disabled for this session. + #[serde(skip_serializing_if = "Option::is_none")] + pub disabled_instruction_sources: Option>, + /// Skill IDs disabled for this session. + #[serde(skip_serializing_if = "Option::is_none")] + pub disabled_skills: Option>, + /// Whether on-demand custom instruction discovery is enabled. + #[serde(skip_serializing_if = "Option::is_none")] + pub enable_on_demand_instruction_discovery: Option, + /// Whether shell-script safety heuristics are enabled. + #[serde(skip_serializing_if = "Option::is_none")] + pub enable_script_safety: Option, + /// Whether model responses stream as delta events. + #[serde(skip_serializing_if = "Option::is_none")] + pub enable_streaming: Option, + /// How MCP server environment values are interpreted. + #[serde(skip_serializing_if = "Option::is_none")] + pub env_value_mode: Option, + /// Override directory for session event logs. + #[serde(skip_serializing_if = "Option::is_none")] + pub events_log_directory: Option, + /// Denylist of tool names. + #[serde(skip_serializing_if = "Option::is_none")] + pub excluded_tools: Option>, + /// Feature-flag values resolved by the host. + #[serde(skip_serializing_if = "Option::is_none")] + pub feature_flags: Option>, + /// Installed plugins visible to the session. + #[serde(skip_serializing_if = "Option::is_none")] + pub installed_plugins: Option>, + /// Stable integration identifier for analytics. + #[serde(skip_serializing_if = "Option::is_none")] + pub integration_id: Option, + /// Whether experimental behavior is enabled. + #[serde(skip_serializing_if = "Option::is_none")] + pub is_experimental_mode: Option, + /// Whether interactive shell sessions are logged. + #[serde(skip_serializing_if = "Option::is_none")] + pub log_interactive_shells: Option, + /// Identifier sent to LSP-style integrations. + #[serde(skip_serializing_if = "Option::is_none")] + pub lsp_client_name: Option, + /// Initial model identifier. + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, + /// Initial model capability overrides. + #[serde(skip_serializing_if = "Option::is_none")] + pub model_capabilities_overrides: Option, + /// Optional human-friendly session name. + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Custom model-provider configuration (BYOK). + #[serde(skip_serializing_if = "Option::is_none")] + pub provider: Option, + /// Initial reasoning effort level. + #[serde(skip_serializing_if = "Option::is_none")] + pub reasoning_effort: Option, + /// Initial reasoning summary mode for supported model clients. + #[serde(skip_serializing_if = "Option::is_none")] + pub reasoning_summary: Option, + /// Telemetry-only remote-defaulted flag. + #[serde(skip_serializing_if = "Option::is_none")] + pub remote_defaulted_on: Option, + /// Telemetry-only remote exporting flag. + #[serde(skip_serializing_if = "Option::is_none")] + pub remote_exporting: Option, + /// Whether this session supports remote steering. + #[serde(skip_serializing_if = "Option::is_none")] + pub remote_steerable: Option, + /// Whether the host is an interactive UI. + #[serde(skip_serializing_if = "Option::is_none")] + pub running_in_interactive_mode: Option, + /// Resolved sandbox configuration. + #[serde(skip_serializing_if = "Option::is_none")] + pub sandbox_config: Option, + /// Capabilities enabled for this session. + #[serde(skip_serializing_if = "Option::is_none")] + pub session_capabilities: Option>, + /// Optional stable session identifier to use for a new session. + #[serde(skip_serializing_if = "Option::is_none")] + pub session_id: Option, + /// Shell init profile. + #[serde(skip_serializing_if = "Option::is_none")] + pub shell_init_profile: Option, + /// Per-shell process flags. + #[serde(skip_serializing_if = "Option::is_none")] + pub shell_process_flags: Option>, + /// Additional directories to search for skills. + #[serde(skip_serializing_if = "Option::is_none")] + pub skill_directories: Option>, + /// Whether to skip custom instruction sources. + #[serde(skip_serializing_if = "Option::is_none")] + pub skip_custom_instructions: Option, + /// Optional trajectory output file path. + #[serde(skip_serializing_if = "Option::is_none")] + pub trajectory_file: Option, + /// Working directory to anchor the session. + #[serde(skip_serializing_if = "Option::is_none")] + pub working_directory: Option, + /// Pre-resolved working-directory context for session startup. + #[serde(skip_serializing_if = "Option::is_none")] + pub working_directory_context: Option, +} + +/// Parameters for creating a new local session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsOpenCreate { + /// Whether to emit session.start during creation. Defaults to true. + #[serde(skip_serializing_if = "Option::is_none")] + pub emit_start: Option, + /// Create a new local session. + pub kind: SessionsOpenCreateKind, + /// Session construction options. + #[serde(skip_serializing_if = "Option::is_none")] + pub options: Option, +} + +/// Parameters for resuming a specific local session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsOpenResume { + /// Resume a specific local session by ID or prefix. + pub kind: SessionsOpenResumeKind, + /// Session resume options. + #[serde(skip_serializing_if = "Option::is_none")] + pub options: Option, + /// Whether to emit session.resume after loading. Defaults to true. + #[serde(skip_serializing_if = "Option::is_none")] + pub resume: Option, + /// Session ID or unique prefix to resume. + pub session_id: SessionId, + /// Suppress workspace.yaml metadata writeback when resuming from an incidental cwd. + #[serde(skip_serializing_if = "Option::is_none")] + pub suppress_resume_workspace_metadata_writeback: Option, +} + +/// Parameters for resuming the most relevant local session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsOpenResumeLast { + /// Working-directory context used to choose the most relevant session. + #[serde(skip_serializing_if = "Option::is_none")] + pub context: Option, + /// Resume the most relevant existing local session. + pub kind: SessionsOpenResumeLastKind, + /// Session resume options. + #[serde(skip_serializing_if = "Option::is_none")] + pub options: Option, + /// Suppress workspace.yaml metadata writeback when resuming from an incidental cwd. + #[serde(skip_serializing_if = "Option::is_none")] + pub suppress_resume_workspace_metadata_writeback: Option, } -/// Schema for the `SessionInstalledPluginSourceUrl` type. +/// Parameters for attaching to an already-active session by ID. /// ///
/// @@ -7165,17 +9187,14 @@ pub struct SessionInstalledPluginSourceLocal { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionInstalledPluginSourceUrl { - #[serde(skip_serializing_if = "Option::is_none")] - pub path: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#ref: Option, - /// Constant value. Always "url". - pub source: SessionInstalledPluginSourceUrlSource, - pub url: String, +pub struct SessionsOpenAttach { + /// Attach to an already-active in-process session by ID. Unlike `resume`, this does NOT re-load from disk; the session must already be loaded by an earlier `create`/`resume` call. Returns `status: 'not_found'` when no active session matches the id. Useful for in-process consumers that need a fresh API handle to a session opened elsewhere (e.g., a peer foreground-session switch). + pub kind: SessionsOpenAttachKind, + /// Session ID to attach to. + pub session_id: SessionId, } -/// Persisted sessions matching the filter, ordered most-recently-modified first. +/// Parameters for connecting to a live remote session. /// ///
/// @@ -7185,12 +9204,20 @@ pub struct SessionInstalledPluginSourceUrl { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionList { - /// Sessions ordered most-recently-modified first - pub sessions: Vec, +pub struct SessionsOpenRemote { + /// Connect to a live remote session. + pub kind: SessionsOpenRemoteKind, + /// Session options for the connection. + #[serde(skip_serializing_if = "Option::is_none")] + pub options: Option, + /// Remote session identifier to connect to. + pub remote_session_id: SessionId, + /// Repository context for the remote session. + #[serde(skip_serializing_if = "Option::is_none")] + pub repository: Option, } -/// Optional filter applied to the returned sessions +/// Parameters for creating a new cloud session. /// ///
/// @@ -7200,22 +9227,25 @@ pub struct SessionList { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionListFilter { - /// Match sessions whose context.branch equals this value +pub struct SessionsOpenCloud { + /// Create a new cloud (coding-agent) session. + pub kind: SessionsOpenCloudKind, + /// In-process callback invoked when the cloud task is created (before connection). Marked internal because a function reference cannot cross the JSON-RPC boundary. Disappears in the SDK migration: the field is purely cosmetic (it flips a single CLI phase label from 'creating' to 'connecting') and the wire-clean version just drops the intermediate phase. + #[doc(hidden)] #[serde(skip_serializing_if = "Option::is_none")] - pub branch: Option, - /// Match sessions whose context.cwd equals this value + pub(crate) on_task_created: Option, + /// Session options for cloud session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub cwd: Option, - /// Match sessions whose context.gitRoot equals this value + pub options: Option, + /// Optional owner (user or organization login) to associate with the cloud session when no repository is provided. Ignored when `repository` is set (the repo's owner takes precedence). #[serde(skip_serializing_if = "Option::is_none")] - pub git_root: Option, - /// Match sessions whose context.repository equals this value + pub owner: Option, + /// Repository for the cloud session. #[serde(skip_serializing_if = "Option::is_none")] - pub repository: Option, + pub repository: Option, } -/// Queued repo-level startup prompts and the total hook command count after loading. +/// Parameters for fetching a remote session and handing it off to a new local session. /// ///
/// @@ -7225,46 +9255,24 @@ pub struct SessionListFilter { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionLoadDeferredRepoHooksResult { - /// Total hook command count (user + plugin + repo) loaded for the session by this call. Captured atomically with startupPrompts so callers don't need to read a separate counter. - pub hook_count: i64, - /// Repo-level startup prompts queued from repo hook configs. Empty on resume, when no repo configs were pending, or when disableAllHooks is set. - pub startup_prompts: Vec, -} - -/// Public-facing projection of workspace metadata for SDK / TUI consumers -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct SessionMetadataSnapshotWorkspace { - /// Branch checked out at session start, if any - #[serde(skip_serializing_if = "Option::is_none")] - pub branch: Option, - /// ISO 8601 timestamp when the workspace was created - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - /// Current working directory at session start +pub struct SessionsOpenHandoff { + /// Fetch a remote session and hand it off to a new local session. + pub kind: SessionsOpenHandoffKind, + /// Remote session metadata for the session to hand off (typically obtained from `sessions.list` with `source: "remote"`). + pub metadata: RemoteSessionMetadataValue, + /// In-process progress callback `(update) => void` invoked for each handoff step. Marked internal because a function reference cannot cross the JSON-RPC boundary. The host-side `handoffSession` is already declared as `AsyncGenerator`; the schema layer flattens it because it does not yet support streaming methods. The wire-clean replacement is to expose the AsyncGenerator directly (or use vscode-jsonrpc `$/progress` notifications) once the schema/transport layer supports it. + #[doc(hidden)] #[serde(skip_serializing_if = "Option::is_none")] - pub cwd: Option, - /// Resolved git root for cwd, if any - #[serde(rename = "git_root", skip_serializing_if = "Option::is_none")] - pub git_root: Option, - /// Repository host type, if known - #[serde(rename = "host_type", skip_serializing_if = "Option::is_none")] - pub host_type: Option, - /// Workspace identifier (1:1 with sessionId) - pub id: String, - /// Display name for the session, if set + pub(crate) on_progress: Option, + /// Session construction options for the new local session. #[serde(skip_serializing_if = "Option::is_none")] - pub name: Option, - /// Repository identifier in 'owner/repo' or 'org/project/repo' format, if any + pub options: Option, + /// Task type determines the handoff strategy (CCA fetches events; CLI prepares a transient session). #[serde(skip_serializing_if = "Option::is_none")] - pub repository: Option, - /// ISO 8601 timestamp when the workspace was last updated - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, + pub task_type: Option, } -/// Point-in-time snapshot of slow-changing session identifier and state fields +/// Schema for the `SessionsOpenProgress` type. /// ///
/// @@ -7274,43 +9282,17 @@ pub struct SessionMetadataSnapshotWorkspace { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionMetadataSnapshot { - /// True when the session was detected to be in use by another process at construction time. Local consumers may surface a confirmation prompt before fully attaching. Always false for new sessions. - pub already_in_use: bool, - /// Runtime client name associated with the session (telemetry identifier). - #[serde(skip_serializing_if = "Option::is_none")] - pub client_name: Option, - /// The current agent mode for this session (e.g., 'interactive', 'plan', 'autopilot') - pub current_mode: MetadataSnapshotCurrentMode, - /// User-provided name supplied at session construction (via `--name`), if any. Immutable after construction. - #[serde(skip_serializing_if = "Option::is_none")] - pub initial_name: Option, - /// Whether this is a remote session (i.e., one whose runtime executes elsewhere and is steered through this process) - pub is_remote: bool, - /// ISO 8601 timestamp of when the session's persisted state was last modified on disk. For new sessions, equals startTime. For resumed sessions, reflects the previous modification time at construction. - pub modified_time: String, - /// Remote-session-specific metadata. Populated only when `isRemote` is true. Fields are immutable for the lifetime of the session. - #[serde(skip_serializing_if = "Option::is_none")] - pub remote_metadata: Option, - /// Currently selected model identifier, if any +pub struct SessionsOpenProgress { + /// Optional step message. #[serde(skip_serializing_if = "Option::is_none")] - pub selected_model: Option, - /// The unique identifier of the session - pub session_id: SessionId, - /// ISO 8601 timestamp of when the session started - pub start_time: String, - /// Short human-readable summary of the session, if known. Omitted when no summary has been generated. - #[serde(skip_serializing_if = "Option::is_none")] - pub summary: Option, - /// Absolute path to the session's current working directory - pub working_directory: String, - /// Public-facing workspace metadata for this session, or null if the session has no associated workspace. Excludes runtime-internal fields (GitHub IDs, summary count, internal flags). - pub workspace: Option, - /// Absolute path to the session's workspace directory on disk, or null if the session has no associated workspace - pub workspace_path: Option, + pub message: Option, + /// Step status. + pub status: SessionsOpenProgressStatus, + /// Handoff step. + pub step: SessionsOpenProgressStep, } -/// The list of models available to this session. +/// Result of opening a session. /// ///
/// @@ -7320,12 +9302,28 @@ pub struct SessionMetadataSnapshot { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionModelList { - /// Available models, ordered with the most preferred default first. - pub list: Vec, - /// Per-quota snapshots returned alongside the model list, keyed by quota type. +pub struct SessionOpenResult { + /// Remote session metadata, present when status is `connected`. #[serde(skip_serializing_if = "Option::is_none")] - pub quota_snapshots: Option>, + pub metadata: Option, + /// Handoff progress steps, present when status is `handed_off`. + #[serde(skip_serializing_if = "Option::is_none")] + pub progress: Option>, + /// Remote session ID, present when status is `connected`. + #[serde(skip_serializing_if = "Option::is_none")] + pub remote_session_id: Option, + /// In-process SessionClientApi handle for the opened session, returned to CLI callers as a transitional shortcut. Marked internal so the public SDK surface does not expose it; SDK consumers should construct per-session clients from `sessionId` instead. + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) session_api: Option, + /// Opened session ID. Omitted when status is `not_found`. + #[serde(skip_serializing_if = "Option::is_none")] + pub session_id: Option, + /// Startup prompts queued by user-level hook configs at session creation. Only populated when status is `created`; resumed sessions return an empty array. + #[serde(skip_serializing_if = "Option::is_none")] + pub startup_prompts: Option>, + /// Outcome of the open request. + pub status: SessionsOpenStatus, } /// Outcome of the prune operation: deleted IDs, dry-run candidates, skipped IDs, total bytes freed, and the dry-run flag. @@ -7435,7 +9433,7 @@ pub struct SessionsCloseResult {} #[serde(rename_all = "camelCase")] pub struct SessionsEnrichMetadataRequest { /// Session metadata records to enrich. Records that already have summary and context are returned unchanged. - pub sessions: Vec, + pub sessions: Vec, } /// New auth credentials to install on the session. Omit to leave credentials unchanged. @@ -7570,6 +9568,37 @@ pub struct SessionsForkResult { pub session_id: SessionId, } +/// Session ID whose board entry count should be returned. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsGetBoardEntryCountRequest { + /// Session ID whose board entry count should be returned. + pub session_id: SessionId, +} + +/// Dynamic-context board entry count, when available. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsGetBoardEntryCountResult { + /// Board entry count, when available. + #[serde(skip_serializing_if = "Option::is_none")] + pub count: Option, +} + /// Session ID whose event-log file path to compute. /// ///
@@ -7678,7 +9707,7 @@ pub struct SessionSizes { pub sizes: HashMap, } -/// Optional metadata-load limit and filters applied to the returned sessions. +/// Optional source filter, metadata-load limit, and context filter applied to the returned sessions. /// ///
/// @@ -7695,9 +9724,15 @@ pub struct SessionsListRequest { /// When true, include detached maintenance sessions. Defaults to false for user-facing session lists. #[serde(skip_serializing_if = "Option::is_none")] pub include_detached: Option, - /// When provided, only the first N sessions (sorted by modification time, newest first) load full metadata; remaining sessions return basic info only. Use 0 to return only basic info for every session. + /// When provided, only the first N local sessions (sorted by modification time, newest first) load full metadata; remaining sessions return basic info only. Use 0 to return only basic info for every local session. Has no effect on remote entries (which always carry their full shape). #[serde(skip_serializing_if = "Option::is_none")] pub metadata_limit: Option, + /// Which session sources to include. Defaults to `local` for backward compatibility. + #[serde(skip_serializing_if = "Option::is_none")] + pub source: Option, + /// Only meaningful when `source` includes remote. When true, propagates errors from the remote service instead of silently returning an empty remote list. Defaults to false. + #[serde(skip_serializing_if = "Option::is_none")] + pub throw_on_error: Option, } /// Active session ID whose deferred repo-level hooks should be loaded. @@ -7715,6 +9750,25 @@ pub struct SessionsLoadDeferredRepoHooksRequest { pub session_id: SessionId, } +/// Cursor and optional long-poll wait for polling runtime-spawned sessions. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsPollSpawnedSessionsRequest { + /// Opaque cursor returned by a previous poll. Omit on the first call to receive any spawn events buffered since the runtime started. + #[serde(skip_serializing_if = "Option::is_none")] + pub cursor: Option, + /// Milliseconds to wait for new spawn events when the cursor is at the tail. 0 (default) returns immediately even if no events are buffered. Capped at 60000ms. + #[serde(skip_serializing_if = "Option::is_none")] + pub wait_ms: Option, +} + /// Age threshold and optional flags controlling which old sessions are pruned (or simulated when dryRun is true). /// ///
@@ -7850,6 +9904,91 @@ pub struct SessionsSetAdditionalPluginsRequest { #[serde(rename_all = "camelCase")] pub struct SessionsSetAdditionalPluginsResult {} +/// Patch for the singleton's steering state. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsSetRemoteControlSteeringRequest { + /// Target steering state. Today only `true` is actionable on the underlying exporter; `false` is reserved for future use. + pub enabled: bool, +} + +/// Parameters for attaching the remote-control singleton to a session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsStartRemoteControlRequest { + /// Configuration for the runtime-managed remote-control singleton. + pub config: RemoteControlConfig, + /// Local session id to attach remote control to. + pub session_id: SessionId, +} + +/// Parameters for stopping the remote-control singleton. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsStopRemoteControlRequest { + /// When provided, the stop is rejected unless the singleton currently points at this session id (compare-and-swap semantics). + #[serde(skip_serializing_if = "Option::is_none")] + pub expected_session_id: Option, + /// When true, the singleton is unconditionally torn down regardless of `expectedSessionId`. Use during shutdown or explicit `/remote off`. + #[serde(skip_serializing_if = "Option::is_none")] + pub force: Option, +} + +/// Parameters for atomically rebinding the remote-control singleton. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsTransferRemoteControlRequest { + /// When provided, the transfer is rejected unless the singleton currently points at this session id (compare-and-swap semantics to avoid clobbering newer state). + #[serde(skip_serializing_if = "Option::is_none")] + pub expected_from_session_id: Option, + /// Local session id to point remote control at. + pub to_session_id: String, +} + +/// Telemetry engagement ID for the session, when available. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionTelemetryEngagement { + /// Current telemetry engagement ID, when available. + #[serde(skip_serializing_if = "Option::is_none")] + pub engagement_id: Option, +} + /// Patch of mutable session options to apply to the running session. /// ///
@@ -7861,7 +10000,7 @@ pub struct SessionsSetAdditionalPluginsResult {} #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionUpdateOptionsParams { - /// Additional content-exclusion policies to merge into the session's policy set. Opaque shape; see `ContentExclusionApiResponse` in the runtime. + /// Additional content-exclusion policies to merge into the session's policy set. /// ///
/// @@ -7870,7 +10009,8 @@ pub struct SessionUpdateOptionsParams { /// ///
#[serde(skip_serializing_if = "Option::is_none")] - pub additional_content_exclusion_policies: Option>, + pub additional_content_exclusion_policies: + Option>, /// Runtime context discriminator (e.g., `cli`, `actions`). #[serde(skip_serializing_if = "Option::is_none")] pub agent_context: Option, @@ -7886,6 +10026,9 @@ pub struct SessionUpdateOptionsParams { /// Whether to include the `Co-authored-by` trailer in commit messages. #[serde(skip_serializing_if = "Option::is_none")] pub coauthor_enabled: Option, + /// Context tier for models with tiered pricing. The session uses this to derive effective `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits honor the selected tier. + #[serde(skip_serializing_if = "Option::is_none")] + pub context_tier: Option, /// Whether to allow auto-mode continuation across turns. #[serde(skip_serializing_if = "Option::is_none")] pub continue_on_auto_mode: Option, @@ -7958,35 +10101,30 @@ pub struct SessionUpdateOptionsParams { /// The model ID to use for assistant turns. #[serde(skip_serializing_if = "Option::is_none")] pub model: Option, + /// Per-property model capability overrides for the selected model. + #[serde(skip_serializing_if = "Option::is_none")] + pub model_capabilities_overrides: Option, /// Organization-level custom instructions to inject into the system prompt. #[serde(skip_serializing_if = "Option::is_none")] pub organization_custom_instructions: Option, - /// Custom model-provider configuration (BYOK). Opaque shape; see `ProviderConfig` in the runtime. - /// - ///
- /// - /// **Experimental.** This type is part of an experimental wire-protocol surface - /// and may change or be removed in future SDK or CLI releases. - /// - ///
+ /// Custom model-provider configuration (BYOK). #[serde(skip_serializing_if = "Option::is_none")] - pub provider: Option, + pub provider: Option, /// Reasoning effort for the selected model (model-defined enum). #[serde(skip_serializing_if = "Option::is_none")] pub reasoning_effort: Option, + /// Reasoning summary mode for supported model clients. + #[serde(skip_serializing_if = "Option::is_none")] + pub reasoning_summary: Option, /// Whether the session is running in an interactive UI. #[serde(skip_serializing_if = "Option::is_none")] pub running_in_interactive_mode: Option, - /// Sandbox configuration shape; opaque to SDK consumers. See `SandboxConfig` in the runtime. - /// - ///
- /// - /// **Experimental.** This type is part of an experimental wire-protocol surface - /// and may change or be removed in future SDK or CLI releases. - /// - ///
+ /// Resolved sandbox configuration. + #[serde(skip_serializing_if = "Option::is_none")] + pub sandbox_config: Option, + /// Replaces the session's capability set with the given list. Use to enable or disable capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the field to leave the existing capability set unchanged. #[serde(skip_serializing_if = "Option::is_none")] - pub sandbox_config: Option, + pub session_capabilities: Option>, /// Shell init profile (`None` or `NonInteractive`). #[serde(skip_serializing_if = "Option::is_none")] pub shell_init_profile: Option, @@ -8031,6 +10169,21 @@ pub struct SessionUpdateOptionsResult { pub success: bool, } +/// User-requested shell execution cancellation handle. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ShellCancelUserRequestedRequest { + /// Request ID previously passed to executeUserRequested + pub request_id: RequestId, +} + /// Shell command to run, with optional working directory and timeout in milliseconds. /// ///
@@ -8067,6 +10220,23 @@ pub struct ShellExecResult { pub process_id: String, } +/// User-requested shell command and cancellation handle. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ShellExecuteUserRequestedRequest { + /// Shell command to execute + pub command: String, + /// Caller-provided cancellation handle for this execution + pub request_id: RequestId, +} + /// Identifier of a process previously returned by "shell.exec" and the signal to send. /// ///
@@ -8429,7 +10599,7 @@ pub struct TaskAgentInfo { /// Model used for the task when specified #[serde(skip_serializing_if = "Option::is_none")] pub model: Option, - /// Prompt passed to the agent + /// Most recent prompt delivered to the agent. Updated whenever the agent receives a follow-up message. pub prompt: String, /// Result text from the task when available #[serde(skip_serializing_if = "Option::is_none")] @@ -9254,6 +11424,44 @@ pub struct UIElicitationStringOneOfField { pub r#type: UIElicitationStringOneOfFieldType, } +/// Transient question to answer without adding it to conversation history. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct UIEphemeralQueryRequest { + /// In-process `AbortSignal` forwarded to the model client to cancel an in-flight request. Marked internal: excluded from the public SDK surface. Replaced by an explicit cancellation token + cancel RPC in the SDK migration. + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) abort_signal: Option, + /// In-process streaming callback `(text) => void` invoked with each token as the model emits it. Marked internal: excluded from the public SDK surface. In a process-separated SDK this is replaced by a streaming RPC that yields chunks and a final answer. + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) on_chunk: Option, + /// Question to answer from the current conversation context. + pub question: String, +} + +/// Transient answer generated from current conversation context. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct UIEphemeralQueryResult { + /// Full assistant response text. + pub answer: String, +} + /// Schema for the `UIExitPlanModeResponse` type. /// ///
@@ -9628,6 +11836,31 @@ pub struct UserAuthInfo { pub r#type: UserAuthInfoType, } +/// Result of a user-requested shell command. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct UserRequestedShellCommandResult { + /// Error output when the execution failed + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, + /// Process exit code, when available + #[serde(skip_serializing_if = "Option::is_none")] + pub exit_code: Option, + /// Captured command output + pub output: String, + /// Whether the command completed successfully + pub success: bool, + /// Tool call id emitted for the shell execution + pub tool_call_id: String, +} + /// A single changed file and its unified diff. /// ///
@@ -9956,6 +12189,9 @@ pub struct WorkspaceSummary { /// ISO 8601 timestamp when the workspace was last updated #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] pub updated_at: Option, + /// Whether the display name was explicitly set by the user + #[serde(rename = "user_named", skip_serializing_if = "Option::is_none")] + pub user_named: Option, } /// List of Copilot models available to the resolved user, including capabilities and billing metadata. @@ -9982,6 +12218,158 @@ pub struct McpConfigListResult { pub servers: HashMap, } +/// Plugins installed in user/global state. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PluginsListResult { + /// Installed plugins + pub plugins: Vec, +} + +/// Result of installing a plugin. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PluginsInstallResult { + /// Set when the install path is deprecated (e.g. direct repo / URL / local installs). Callers should surface this to end users. + #[serde(skip_serializing_if = "Option::is_none")] + pub deprecation_warning: Option, + /// The newly installed plugin's metadata + pub plugin: InstalledPluginInfo, + /// Optional post-install message provided by the plugin (e.g. setup instructions) + #[serde(skip_serializing_if = "Option::is_none")] + pub post_install_message: Option, + /// Number of skills discovered and installed from the plugin + pub skills_installed: i64, +} + +/// Result of updating a single plugin. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PluginsUpdateResult { + /// Version after the update, when reported by the plugin manifest + #[serde(skip_serializing_if = "Option::is_none")] + pub new_version: Option, + /// Version that was previously installed, when available + #[serde(skip_serializing_if = "Option::is_none")] + pub previous_version: Option, + /// Number of skills discovered and installed after the update + pub skills_installed: i64, +} + +/// Result of updating all installed plugins. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PluginsUpdateAllResult { + /// Per-plugin update results in deterministic order. + pub results: Vec, +} + +/// All registered marketplaces, including built-in defaults. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PluginsMarketplacesListResult { + /// Registered marketplaces + pub marketplaces: Vec, +} + +/// Result of registering a new marketplace. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PluginsMarketplacesAddResult { + /// Final name of the marketplace as resolved from its manifest + pub name: String, +} + +/// Outcome of the remove attempt, including dependent-plugin info when applicable. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PluginsMarketplacesRemoveResult { + /// Names of installed plugins that prevented removal. Populated only when `removed=false`. + #[serde(skip_serializing_if = "Option::is_none")] + pub dependent_plugins: Option>, + /// True when the marketplace was actually removed. False when removal was skipped because the marketplace has dependent plugins and `force` was not set. + pub removed: bool, +} + +/// Plugins advertised by the marketplace. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PluginsMarketplacesBrowseResult { + /// Plugins advertised by the marketplace + pub plugins: Vec, +} + +/// Result of refreshing one or more marketplace catalogs. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PluginsMarketplacesRefreshResult { + /// Per-marketplace refresh results in deterministic order. + pub results: Vec, +} + /// Skills discovered across global and project sources. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -9990,6 +12378,40 @@ pub struct SkillsDiscoverResult { pub skills: Vec, } +/// Result of opening a session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsOpenResult { + /// Remote session metadata, present when status is `connected`. + #[serde(skip_serializing_if = "Option::is_none")] + pub metadata: Option, + /// Handoff progress steps, present when status is `handed_off`. + #[serde(skip_serializing_if = "Option::is_none")] + pub progress: Option>, + /// Remote session ID, present when status is `connected`. + #[serde(skip_serializing_if = "Option::is_none")] + pub remote_session_id: Option, + /// In-process SessionClientApi handle for the opened session, returned to CLI callers as a transitional shortcut. Marked internal so the public SDK surface does not expose it; SDK consumers should construct per-session clients from `sessionId` instead. + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) session_api: Option, + /// Opened session ID. Omitted when status is `not_found`. + #[serde(skip_serializing_if = "Option::is_none")] + pub session_id: Option, + /// Startup prompts queued by user-level hook configs at session creation. Only populated when status is `created`; resumed sessions return an empty array. + #[serde(skip_serializing_if = "Option::is_none")] + pub startup_prompts: Option>, + /// Outcome of the open request. + pub status: SessionsOpenStatus, +} + /// Remote session connection result. /// ///
@@ -10007,7 +12429,7 @@ pub struct SessionsConnectResult { pub session_id: SessionId, } -/// Persisted sessions matching the filter, ordered most-recently-modified first. +/// Sessions matching the filter, ordered most-recently-modified first. /// ///
/// @@ -10018,8 +12440,8 @@ pub struct SessionsConnectResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionsListResult { - /// Sessions ordered most-recently-modified first - pub sessions: Vec, + /// Sessions ordered most-recently-modified first. Discriminated by `isRemote`. + pub sessions: Vec, } /// ID of the local session bound to the given GitHub task, or omitted when none. @@ -10103,10 +12525,123 @@ pub struct SessionsPruneOldResult { #[serde(rename_all = "camelCase")] pub struct SessionsEnrichMetadataResult { /// Enriched records, with summary and context backfilled. Sessions confirmed empty and unnamed may be omitted. - pub sessions: Vec, + pub sessions: Vec, +} + +/// Queued repo-level startup prompts and the total hook command count after loading. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsLoadDeferredRepoHooksResult { + /// Total hook command count (user + plugin + repo) loaded for the session by this call. Captured atomically with startupPrompts so callers don't need to read a separate counter. + pub hook_count: i64, + /// Repo-level startup prompts queued from repo hook configs. Empty on resume, when no repo configs were pending, or when disableAllHooks is set. + pub startup_prompts: Vec, +} + +/// Wrapper for the singleton's current status. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsStartRemoteControlResult { + /// State of the runtime-managed remote-control singleton. + pub status: serde_json::Value, +} + +/// Outcome of a transferRemoteControl call. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsTransferRemoteControlResult { + /// State of the runtime-managed remote-control singleton. + pub status: serde_json::Value, + /// Whether the rebinding actually happened. + pub transferred: bool, +} + +/// Wrapper for the singleton's current status. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsSetRemoteControlSteeringResult { + /// State of the runtime-managed remote-control singleton. + pub status: serde_json::Value, +} + +/// Outcome of a stopRemoteControl call. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsStopRemoteControlResult { + /// State of the runtime-managed remote-control singleton. + pub status: serde_json::Value, + /// Whether the singleton was actually torn down by this call. + pub stopped: bool, +} + +/// Wrapper for the singleton's current status. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsGetRemoteControlStatusResult { + /// State of the runtime-managed remote-control singleton. + pub status: serde_json::Value, +} + +/// Batch of spawn events plus a cursor for follow-up polls. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionsPollSpawnedSessionsResult { + /// Opaque cursor to pass back to receive only events after this batch. + pub cursor: String, + /// Spawn events emitted since the supplied cursor. + pub events: Vec, } -/// Queued repo-level startup prompts and the total hook command count after loading. +/// Handle for releasing the extension tool registration. /// ///
/// @@ -10116,11 +12651,10 @@ pub struct SessionsEnrichMetadataResult { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionsLoadDeferredRepoHooksResult { - /// Total hook command count (user + plugin + repo) loaded for the session by this call. Captured atomically with startupPrompts so callers don't need to read a separate counter. - pub hook_count: i64, - /// Repo-level startup prompts queued from repo hook configs. Empty on resume, when no repo configs were pending, or when disableAllHooks is set. - pub startup_prompts: Vec, +pub(crate) struct SessionsRegisterExtensionToolsOnSessionResult { + /// In-process unsubscribe function (CLI-only optimization). Marked internal: replaced by an explicit `extensions.unregister` RPC in the SDK migration. + #[doc(hidden)] + pub(crate) unsubscribe: serde_json::Value, } /// Identifies the target session. @@ -10540,6 +13074,36 @@ pub struct SessionPlanDeleteParams { pub session_id: SessionId, } +/// Identifies the target session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionPlanReadSqlTodosParams { + /// Target session identifier + pub session_id: SessionId, +} + +/// Todo rows read from the session SQL database. Empty when no session database is available. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionPlanReadSqlTodosResult { + /// Rows from the session SQL todos table, ordered by creation time and id. + pub rows: Vec, +} + /// Identifies the target session. /// ///
@@ -11281,7 +13845,7 @@ pub struct SessionMcpListParams { pub session_id: SessionId, } -/// MCP servers configured for the session, with their connection status. +/// MCP servers configured for the session, with their connection status and host-level state. /// ///
/// @@ -11292,10 +13856,28 @@ pub struct SessionMcpListParams { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionMcpListResult { + /// Host-level state, omitted when no MCP host is initialized. + #[serde(skip_serializing_if = "Option::is_none")] + pub host: Option, /// Configured MCP servers pub servers: Vec, } +/// Tools exposed by the connected MCP server. Throws when the server is not connected. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionMcpListToolsResult { + /// Tools exposed by the server. + pub tools: Vec, +} + /// Identifies the target session. /// ///
@@ -11311,6 +13893,24 @@ pub struct SessionMcpReloadParams { pub session_id: SessionId, } +/// MCP server startup filtering result. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionMcpReloadWithConfigResult { + /// Non-default servers allowed by policy + #[serde(skip_serializing_if = "Option::is_none")] + pub allowed_servers: Option>, + /// Servers filtered out before startup + pub filtered_servers: Vec, +} + /// Outcome of an MCP sampling execution: success result, failure error, or cancellation. /// ///
@@ -11392,6 +13992,48 @@ pub struct SessionMcpRemoveGitHubResult { pub removed: bool, } +/// Result of configuring GitHub MCP. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionMcpConfigureGitHubResult { + /// Whether GitHub MCP configuration changed. + pub changed: bool, +} + +/// Whether the named MCP server is running. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionMcpIsServerRunningResult { + /// True if the server has an active client and transport. + pub running: bool, +} + +/// Empty result after recording the MCP OAuth response. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionMcpOauthRespondResult {} + /// OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server. /// ///
@@ -11723,6 +14365,52 @@ pub struct SessionCommandsRespondToQueuedCommandResult { pub success: bool, } +/// Identifies the target session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionTelemetryGetEngagementIdParams { + /// Target session identifier + pub session_id: SessionId, +} + +/// Telemetry engagement ID for the session, when available. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionTelemetryGetEngagementIdResult { + /// Current telemetry engagement ID, when available. + #[serde(skip_serializing_if = "Option::is_none")] + pub engagement_id: Option, +} + +/// Transient answer generated from current conversation context. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionUiEphemeralQueryResult { + /// Full assistant response text. + pub answer: String, +} + /// The elicitation response (accept with form values, decline, or cancel) /// ///
@@ -12252,6 +14940,9 @@ pub struct SessionMetadataSnapshotResultWorkspace { /// ISO 8601 timestamp when the workspace was last updated #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] pub updated_at: Option, + /// Whether the display name was explicitly set by the user + #[serde(rename = "user_named", skip_serializing_if = "Option::is_none")] + pub user_named: Option, } /// Point-in-time snapshot of slow-changing session identifier and state fields @@ -12330,6 +15021,38 @@ pub struct SessionMetadataIsProcessingResult { pub processing: bool, } +/// Identifies the target session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionMetadataActivityParams { + /// Target session identifier + pub session_id: SessionId, +} + +/// Current activity flags for the session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionMetadataActivityResult { + /// Whether an in-flight operation can currently be aborted. + pub abortable: bool, + /// Whether the session currently has active work, including running turns or tasks. + pub has_active_work: bool, +} + /// Token-usage breakdown for the session's current context window #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -12340,7 +15063,7 @@ pub struct SessionMetadataContextInfoResultContextInfo { pub compaction_threshold: i64, /// Tokens consumed by user/assistant/tool messages pub conversation_tokens: i64, - /// Total context limit for /context display: promptTokenLimit + outputTokenLimit (the model's full max_output_tokens reserved on top of the prompt budget). + /// Prompt token limit plus the model's full output token limit. pub limit: i64, /// Tokens consumed by MCP tool definitions (subset of toolDefinitionsTokens, excludes deferred tools) pub mcp_tools_tokens: i64, @@ -12447,6 +15170,46 @@ pub struct SessionShellKillResult { pub killed: bool, } +/// Result of a user-requested shell command. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionShellExecuteUserRequestedResult { + /// Error output when the execution failed + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, + /// Process exit code, when available + #[serde(skip_serializing_if = "Option::is_none")] + pub exit_code: Option, + /// Captured command output + pub output: String, + /// Whether the command completed successfully + pub success: bool, + /// Tool call id emitted for the shell execution + pub tool_call_id: String, +} + +/// Cancellation result for a user-requested shell command. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionShellCancelUserRequestedResult { + /// Whether an in-flight execution was found and signalled to cancel + pub cancelled: bool, +} + /// Compaction outcome with the number of tokens and messages removed, summary text, and the resulting context window breakdown. /// ///
@@ -13812,6 +16575,28 @@ pub enum InstructionsSourcesType { Unknown, } +/// Repository host type +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionContextHostType { + /// Session repository is hosted on GitHub. + #[serde(rename = "github")] + GitHub, + /// Session repository is hosted on Azure DevOps. + #[serde(rename = "ado")] + Ado, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Log severity level. Determines how the message is displayed in the timeline. Defaults to "info". /// ///
@@ -14234,6 +17019,50 @@ pub enum ModelPolicyState { Unknown, } +/// Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum OptionsUpdateAdditionalContentExclusionPolicyScope { + /// The content exclusion policy applies to the current repository. + #[serde(rename = "repo")] + Repo, + /// The content exclusion policy applies across all repositories. + #[serde(rename = "all")] + All, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Context tier for models with tiered pricing. The session uses this to derive effective `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits honor the selected tier. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum OptionsUpdateContextTier { + /// Use the model's default context tier and its standard token limits / pricing. + #[serde(rename = "default")] + Default, + /// Use the model's long-context tier (when available) so larger inputs are accepted and tier-specific pricing applies. + #[serde(rename = "long_context")] + LongContext, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// How env values are passed to MCP servers (`direct` inlines literal values; `indirect` resolves at launch). /// ///
@@ -14256,6 +17085,31 @@ pub enum OptionsUpdateEnvValueMode { Unknown, } +/// Reasoning summary mode for supported model clients. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum OptionsUpdateReasoningSummary { + /// Do not request reasoning summaries from the model. + #[serde(rename = "none")] + None, + /// Request a concise summary of model reasoning. + #[serde(rename = "concise")] + Concise, + /// Request a detailed summary of model reasoning. + #[serde(rename = "detailed")] + Detailed, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Controls how availableTools (allowlist) and excludedTools (denylist) combine when both are set. /// ///
@@ -14834,6 +17688,53 @@ pub enum PermissionsSetApproveAllSource { Unknown, } +/// Provider type. Defaults to "openai" for generic OpenAI-compatible APIs. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum ProviderConfigType { + /// Generic OpenAI-compatible API. + #[serde(rename = "openai")] + Openai, + /// Azure OpenAI Service endpoint. + #[serde(rename = "azure")] + Azure, + /// Anthropic API endpoint. + #[serde(rename = "anthropic")] + Anthropic, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Wire API format (openai/azure only). Defaults to "completions". +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum ProviderConfigWireApi { + /// OpenAI Chat Completions wire format. + #[serde(rename = "completions")] + Completions, + /// OpenAI Responses API wire format. + #[serde(rename = "responses")] + Responses, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Attachment type discriminator #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PushAttachmentBlobType { @@ -14913,6 +17814,38 @@ pub enum QueuePendingItemsKind { Unknown, } +/// Remote control state tag: active. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum RemoteControlStatusActiveState { + #[serde(rename = "active")] + #[default] + Active, +} + +/// Remote control state tag: connecting. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum RemoteControlStatusConnectingState { + #[serde(rename = "connecting")] + #[default] + Connecting, +} + +/// Remote control state tag: setup failed. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum RemoteControlStatusErrorState { + #[serde(rename = "error")] + #[default] + Error, +} + +/// Remote control state tag: not connected. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum RemoteControlStatusOffState { + #[serde(rename = "off")] + #[default] + Off, +} + /// Per-session remote mode. "off" disables remote, "export" exports session events to GitHub without enabling remote steering, "on" enables both export and remote steering. /// ///
@@ -14938,6 +17871,28 @@ pub enum RemoteSessionMode { Unknown, } +/// Whether the remote task originated from CCA or CLI `--remote`. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum RemoteSessionMetadataTaskType { + /// GitHub Copilot coding agent task. + #[serde(rename = "cca")] + Cca, + /// CLI remote task. + #[serde(rename = "cli")] + Cli, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// The UI mode the agent was in when this message was sent. Defaults to the session's current mode. /// ///
@@ -14988,7 +17943,7 @@ pub enum SendMode { Unknown, } -/// Repository host type +/// Session capability enabled for this session /// ///
/// @@ -14997,13 +17952,40 @@ pub enum SendMode { /// ///
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum SessionContextHostType { - /// Session repository is hosted on GitHub. - #[serde(rename = "github")] - GitHub, - /// Session repository is hosted on Azure DevOps. - #[serde(rename = "ado")] - Ado, +pub enum SessionCapability { + /// TUI-specific prompt hints such as keyboard shortcuts. + #[serde(rename = "tui-hints")] + TuiHints, + /// Plan-mode handling and instructions. + #[serde(rename = "plan-mode")] + PlanMode, + /// Memory tool and memories prompt section. + #[serde(rename = "memory")] + Memory, + /// Copilot CLI documentation tool and prompt section. + #[serde(rename = "cli-documentation")] + CliDocumentation, + /// Interactive ask_user tool support. + #[serde(rename = "ask-user")] + AskUser, + /// Interactive CLI identity and behavior. + #[serde(rename = "interactive-mode")] + InteractiveMode, + /// Automatic hidden system notifications. + #[serde(rename = "system-notifications")] + SystemNotifications, + /// SDK elicitation support. + #[serde(rename = "elicitation")] + Elicitation, + /// Cross-session history tools and session-store SQL prompt/tool metadata. + #[serde(rename = "session-store")] + SessionStore, + /// MCP Apps UI passthrough. + #[serde(rename = "mcp-apps")] + McpApps, + /// Host-provided canvas rendering support. + #[serde(rename = "canvas-renderer")] + CanvasRenderer, /// Unknown variant for forward compatibility. #[default] #[serde(other)] @@ -15138,6 +18120,285 @@ pub enum WorkspaceSummaryHostType { Unknown, } +/// Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` enumeration. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionOpenOptionsAdditionalContentExclusionPolicyScope { + /// The content exclusion policy applies to the current repository. + #[serde(rename = "repo")] + Repo, + /// The content exclusion policy applies across all repositories. + #[serde(rename = "all")] + All, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// How MCP server environment values are interpreted. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionOpenOptionsEnvValueMode { + /// Pass MCP server environment values as literal strings. + #[serde(rename = "direct")] + Direct, + /// Resolve MCP server environment values from host-side references. + #[serde(rename = "indirect")] + Indirect, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Initial reasoning summary mode for supported model clients. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionOpenOptionsReasoningSummary { + /// Do not request reasoning summaries from the model. + #[serde(rename = "none")] + None, + /// Request a concise summary of model reasoning. + #[serde(rename = "concise")] + Concise, + /// Request a detailed summary of model reasoning. + #[serde(rename = "detailed")] + Detailed, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Create a new local session. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionsOpenCreateKind { + #[serde(rename = "create")] + #[default] + Create, +} + +/// Resume a specific local session by ID or prefix. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionsOpenResumeKind { + #[serde(rename = "resume")] + #[default] + Resume, +} + +/// Resume the most relevant existing local session. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionsOpenResumeLastKind { + #[serde(rename = "resumeLast")] + #[default] + ResumeLast, +} + +/// Attach to an already-active in-process session by ID. Unlike `resume`, this does NOT re-load from disk; the session must already be loaded by an earlier `create`/`resume` call. Returns `status: 'not_found'` when no active session matches the id. Useful for in-process consumers that need a fresh API handle to a session opened elsewhere (e.g., a peer foreground-session switch). +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionsOpenAttachKind { + #[serde(rename = "attach")] + #[default] + Attach, +} + +/// Connect to a live remote session. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionsOpenRemoteKind { + #[serde(rename = "remote")] + #[default] + Remote, +} + +/// Create a new cloud (coding-agent) session. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionsOpenCloudKind { + #[serde(rename = "cloud")] + #[default] + Cloud, +} + +/// Fetch a remote session and hand it off to a new local session. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionsOpenHandoffKind { + #[serde(rename = "handoff")] + #[default] + Handoff, +} + +/// Task type determines the handoff strategy (CCA fetches events; CLI prepares a transient session). +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionsOpenHandoffTaskType { + /// GitHub Copilot coding agent task. + #[serde(rename = "cca")] + Cca, + /// CLI remote task. + #[serde(rename = "cli")] + Cli, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Open a session by creating, resuming, attaching, connecting to a remote, or handing off. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SessionOpenParams { + Create(SessionsOpenCreate), + Resume(SessionsOpenResume), + ResumeLast(SessionsOpenResumeLast), + Attach(SessionsOpenAttach), + Remote(SessionsOpenRemote), + Cloud(SessionsOpenCloud), + Handoff(SessionsOpenHandoff), +} + +/// Step status. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionsOpenProgressStatus { + /// The step has started and has not yet finished. + #[serde(rename = "in-progress")] + InProgress, + /// The step has completed successfully. + #[serde(rename = "complete")] + Complete, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Handoff step. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionsOpenProgressStep { + /// Loading the source session's events from the remote service. + #[serde(rename = "load-session")] + LoadSession, + /// Validating that the local repository matches the remote session's repository. + #[serde(rename = "validate-repo")] + ValidateRepo, + /// Checking the local working tree for uncommitted changes that would block the handoff. + #[serde(rename = "check-changes")] + CheckChanges, + /// Checking out the branch associated with the remote session in the local working tree. + #[serde(rename = "checkout-branch")] + CheckoutBranch, + /// Creating the new local session and seeding it with the source session's events. + #[serde(rename = "create-session")] + CreateSession, + /// Persisting the newly-created local session to disk. + #[serde(rename = "save-session")] + SaveSession, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Outcome of the open request. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionsOpenStatus { + /// A new session was created. + #[serde(rename = "created")] + Created, + /// An existing session was loaded or reattached. + #[serde(rename = "resumed")] + Resumed, + /// No matching persisted session was found. + #[serde(rename = "not_found")] + NotFound, + /// Connected to an existing remote session. + #[serde(rename = "connected")] + Connected, + /// Remote session was handed off to a new local session. + #[serde(rename = "handed_off")] + HandedOff, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Which session sources to include. Defaults to `local` for backward compatibility. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SessionSource { + /// Return only local sessions. + #[serde(rename = "local")] + Local, + /// Return only remote sessions. + #[serde(rename = "remote")] + Remote, + /// Return both local and remote sessions. + #[serde(rename = "all")] + All, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Signal to send (default: SIGTERM) /// ///
diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs index b63dafc07..e42dde5fa 100644 --- a/rust/src/generated/rpc.rs +++ b/rust/src/generated/rpc.rs @@ -49,6 +49,13 @@ impl<'a> ClientRpc<'a> { } } + /// `plugins.*` sub-namespace. + pub fn plugins(&self) -> ClientRpcPlugins<'a> { + ClientRpcPlugins { + client: self.client, + } + } + /// `runtime.*` sub-namespace. pub fn runtime(&self) -> ClientRpcRuntime<'a> { ClientRpcRuntime { @@ -118,7 +125,7 @@ impl<'a> ClientRpc<'a> { Ok(serde_json::from_value(_value)?) } - /// Performs the SDK server connection handshake and validates the optional connection token. + /// Performs the SDK server connection handshake and validates the optional connection token. Marked internal because this is JSON-RPC transport plumbing invoked automatically by an SDK client's own `connect()` wrapper, not a user-facing method. Stays internal as long as the SDK client owns the handshake; would only become public if the SDK ever exposed the raw schema surface to consumers without a connection wrapper. /// /// Wire method: `connect`. /// @@ -420,106 +427,27 @@ impl<'a> ClientRpcModels<'a> { } } -/// `runtime.*` RPCs. -#[derive(Clone, Copy)] -pub struct ClientRpcRuntime<'a> { - pub(crate) client: &'a Client, -} - -impl<'a> ClientRpcRuntime<'a> { - /// Gracefully shuts down an SDK-owned runtime. The response is sent only after cleanup completes; callers may then terminate the owned runtime process. - /// - /// Wire method: `runtime.shutdown`. - pub async fn shutdown(&self) -> Result<(), Error> { - let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::RUNTIME_SHUTDOWN, Some(wire_params)) - .await?; - Ok(()) - } -} - -/// `secrets.*` RPCs. -#[derive(Clone, Copy)] -pub struct ClientRpcSecrets<'a> { - pub(crate) client: &'a Client, -} - -impl<'a> ClientRpcSecrets<'a> { - /// Registers secret values for redaction in session logs and exports. The SDK calls this to inject dynamically generated secret values (e.g., OIDC tokens). - /// - /// Wire method: `secrets.addFilterValues`. - /// - /// # Parameters - /// - /// * `params` - Secret values to add to the redaction filter. - /// - /// # Returns - /// - /// Confirmation that the secret values were registered. - pub async fn add_filter_values( - &self, - params: SecretsAddFilterValuesRequest, - ) -> Result { - let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SECRETS_ADDFILTERVALUES, Some(wire_params)) - .await?; - Ok(serde_json::from_value(_value)?) - } -} - -/// `sessionFs.*` RPCs. +/// `plugins.*` RPCs. #[derive(Clone, Copy)] -pub struct ClientRpcSessionFs<'a> { +pub struct ClientRpcPlugins<'a> { pub(crate) client: &'a Client, } -impl<'a> ClientRpcSessionFs<'a> { - /// Registers an SDK client as the session filesystem provider. - /// - /// Wire method: `sessionFs.setProvider`. - /// - /// # Parameters - /// - /// * `params` - Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider. - /// - /// # Returns - /// - /// Indicates whether the calling client was registered as the session filesystem provider. - pub async fn set_provider( - &self, - params: SessionFsSetProviderRequest, - ) -> Result { - let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONFS_SETPROVIDER, Some(wire_params)) - .await?; - Ok(serde_json::from_value(_value)?) +impl<'a> ClientRpcPlugins<'a> { + /// `plugins.marketplaces.*` sub-namespace. + pub fn marketplaces(&self) -> ClientRpcPluginsMarketplaces<'a> { + ClientRpcPluginsMarketplaces { + client: self.client, + } } -} - -/// `sessions.*` RPCs. -#[derive(Clone, Copy)] -pub struct ClientRpcSessions<'a> { - pub(crate) client: &'a Client, -} -impl<'a> ClientRpcSessions<'a> { - /// Creates a new session by forking persisted history from an existing session. - /// - /// Wire method: `sessions.fork`. + /// Lists plugins installed in user/global state. /// - /// # Parameters - /// - /// * `params` - Source session identifier to fork from, optional event-ID boundary, and optional friendly name for the new session. + /// Wire method: `plugins.list`. /// /// # Returns /// - /// Identifier and optional friendly name assigned to the newly forked session. + /// Plugins installed in user/global state. /// ///
/// @@ -528,26 +456,26 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn fork(&self, params: SessionsForkRequest) -> Result { - let wire_params = serde_json::to_value(params)?; + pub async fn list(&self) -> Result { + let wire_params = serde_json::json!({}); let _value = self .client - .call(rpc_methods::SESSIONS_FORK, Some(wire_params)) + .call(rpc_methods::PLUGINS_LIST, Some(wire_params)) .await?; Ok(serde_json::from_value(_value)?) } - /// Connects to an existing remote session and exposes it as an SDK session. + /// Installs a plugin from a marketplace, GitHub repo, URL, or local path. /// - /// Wire method: `sessions.connect`. + /// Wire method: `plugins.install`. /// /// # Parameters /// - /// * `params` - Remote session connection parameters. + /// * `params` - Plugin source and optional working directory for relative-path resolution. /// /// # Returns /// - /// Remote session connection result. + /// Result of installing a plugin. /// ///
/// @@ -556,53 +484,25 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn connect( + pub async fn install( &self, - params: ConnectRemoteSessionParams, - ) -> Result { + params: PluginsInstallRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; let _value = self .client - .call(rpc_methods::SESSIONS_CONNECT, Some(wire_params)) - .await?; - Ok(serde_json::from_value(_value)?) - } - - /// Lists persisted sessions, optionally filtered by working-directory context. - /// - /// Wire method: `sessions.list`. - /// - /// # Returns - /// - /// Persisted sessions matching the filter, ordered most-recently-modified first. - /// - ///
- /// - /// **Experimental.** This API is part of an experimental wire-protocol surface - /// and may change or be removed in future SDK or CLI releases. Pin both the - /// SDK and CLI versions if your code depends on it. - /// - ///
- pub async fn list(&self) -> Result { - let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::SESSIONS_LIST, Some(wire_params)) + .call(rpc_methods::PLUGINS_INSTALL, Some(wire_params)) .await?; Ok(serde_json::from_value(_value)?) } - /// Lists persisted sessions, optionally filtered by working-directory context. + /// Uninstalls an installed plugin. /// - /// Wire method: `sessions.list`. + /// Wire method: `plugins.uninstall`. /// /// # Parameters /// - /// * `params` - Optional metadata-load limit and filters applied to the returned sessions. - /// - /// # Returns - /// - /// Persisted sessions matching the filter, ordered most-recently-modified first. + /// * `params` - Name (or spec) of the plugin to uninstall. /// ///
/// @@ -611,29 +511,26 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn list_with_params( - &self, - params: SessionsListRequest, - ) -> Result { + pub async fn uninstall(&self, params: PluginsUninstallRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; let _value = self .client - .call(rpc_methods::SESSIONS_LIST, Some(wire_params)) + .call(rpc_methods::PLUGINS_UNINSTALL, Some(wire_params)) .await?; - Ok(serde_json::from_value(_value)?) + Ok(()) } - /// Finds the local session bound to a GitHub task ID, if any. + /// Updates an installed plugin to its latest published version. /// - /// Wire method: `sessions.findByTaskId`. + /// Wire method: `plugins.update`. /// /// # Parameters /// - /// * `params` - GitHub task ID to look up. + /// * `params` - Name (or spec) of the plugin to update. /// /// # Returns /// - /// ID of the local session bound to the given GitHub task, or omitted when none. + /// Result of updating a single plugin. /// ///
/// @@ -642,29 +539,22 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn find_by_task_id( - &self, - params: SessionsFindByTaskIDRequest, - ) -> Result { + pub async fn update(&self, params: PluginsUpdateRequest) -> Result { let wire_params = serde_json::to_value(params)?; let _value = self .client - .call(rpc_methods::SESSIONS_FINDBYTASKID, Some(wire_params)) + .call(rpc_methods::PLUGINS_UPDATE, Some(wire_params)) .await?; Ok(serde_json::from_value(_value)?) } - /// Resolves a UUID prefix to a unique session ID, if exactly one session matches. - /// - /// Wire method: `sessions.findByPrefix`. - /// - /// # Parameters + /// Updates every installed plugin to its latest published version. /// - /// * `params` - UUID prefix to resolve to a unique session ID. + /// Wire method: `plugins.updateAll`. /// /// # Returns /// - /// Session ID matching the prefix, omitted when no unique match exists. + /// Result of updating all installed plugins. /// ///
/// @@ -673,29 +563,22 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn find_by_prefix( - &self, - params: SessionsFindByPrefixRequest, - ) -> Result { - let wire_params = serde_json::to_value(params)?; + pub async fn update_all(&self) -> Result { + let wire_params = serde_json::json!({}); let _value = self .client - .call(rpc_methods::SESSIONS_FINDBYPREFIX, Some(wire_params)) + .call(rpc_methods::PLUGINS_UPDATEALL, Some(wire_params)) .await?; Ok(serde_json::from_value(_value)?) } - /// Returns the most-relevant prior session for a given working-directory context. + /// Enables installed plugins for new sessions. /// - /// Wire method: `sessions.getLastForContext`. + /// Wire method: `plugins.enable`. /// /// # Parameters /// - /// * `params` - Optional working-directory context used to score session relevance. - /// - /// # Returns - /// - /// Most-relevant session ID for the supplied context, or omitted when no sessions exist. + /// * `params` - Plugin names (or specs) to enable. /// ///
/// @@ -704,29 +587,22 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn get_last_for_context( - &self, - params: SessionsGetLastForContextRequest, - ) -> Result { + pub async fn enable(&self, params: PluginsEnableRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; let _value = self .client - .call(rpc_methods::SESSIONS_GETLASTFORCONTEXT, Some(wire_params)) + .call(rpc_methods::PLUGINS_ENABLE, Some(wire_params)) .await?; - Ok(serde_json::from_value(_value)?) + Ok(()) } - /// Computes the absolute path to a session's persisted events.jsonl file. + /// Disables installed plugins for new sessions. /// - /// Wire method: `sessions.getEventFilePath`. + /// Wire method: `plugins.disable`. /// /// # Parameters /// - /// * `params` - Session ID whose event-log file path to compute. - /// - /// # Returns - /// - /// Absolute path to the session's events.jsonl file on disk. + /// * `params` - Plugin names (or specs) to disable. /// ///
/// @@ -735,25 +611,30 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn get_event_file_path( - &self, - params: SessionsGetEventFilePathRequest, - ) -> Result { + pub async fn disable(&self, params: PluginsDisableRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; let _value = self .client - .call(rpc_methods::SESSIONS_GETEVENTFILEPATH, Some(wire_params)) + .call(rpc_methods::PLUGINS_DISABLE, Some(wire_params)) .await?; - Ok(serde_json::from_value(_value)?) + Ok(()) } +} - /// Returns the on-disk byte size of each session's workspace directory. +/// `plugins.marketplaces.*` RPCs. +#[derive(Clone, Copy)] +pub struct ClientRpcPluginsMarketplaces<'a> { + pub(crate) client: &'a Client, +} + +impl<'a> ClientRpcPluginsMarketplaces<'a> { + /// Lists all registered marketplaces (defaults + user-added). /// - /// Wire method: `sessions.getSizes`. + /// Wire method: `plugins.marketplaces.list`. /// /// # Returns /// - /// Map of sessionId -> on-disk size in bytes for each session's workspace directory. + /// All registered marketplaces, including built-in defaults. /// ///
/// @@ -762,26 +643,26 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn get_sizes(&self) -> Result { + pub async fn list(&self) -> Result { let wire_params = serde_json::json!({}); let _value = self .client - .call(rpc_methods::SESSIONS_GETSIZES, Some(wire_params)) + .call(rpc_methods::PLUGINS_MARKETPLACES_LIST, Some(wire_params)) .await?; Ok(serde_json::from_value(_value)?) } - /// Returns the subset of the supplied session IDs that are currently held by another running process. + /// Registers a new marketplace from a source (owner/repo, URL, or local path). /// - /// Wire method: `sessions.checkInUse`. + /// Wire method: `plugins.marketplaces.add`. /// /// # Parameters /// - /// * `params` - Session IDs to test for live in-use locks. + /// * `params` - Marketplace source to register. /// /// # Returns /// - /// Session IDs from the input set that are currently in use by another process. + /// Result of registering a new marketplace. /// ///
/// @@ -790,29 +671,29 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn check_in_use( + pub async fn add( &self, - params: SessionsCheckInUseRequest, - ) -> Result { + params: PluginsMarketplacesAddRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; let _value = self .client - .call(rpc_methods::SESSIONS_CHECKINUSE, Some(wire_params)) + .call(rpc_methods::PLUGINS_MARKETPLACES_ADD, Some(wire_params)) .await?; Ok(serde_json::from_value(_value)?) } - /// Returns a session's persisted remote-steerable flag, if any has been recorded. + /// Removes a previously-registered marketplace. When the marketplace has dependent plugins and `force` is not set, the marketplace is left intact and the result lists the dependents so the caller can decide whether to retry with `force=true`. /// - /// Wire method: `sessions.getPersistedRemoteSteerable`. + /// Wire method: `plugins.marketplaces.remove`. /// /// # Parameters /// - /// * `params` - Session ID to look up the persisted remote-steerable flag for. + /// * `params` - Name of the marketplace to remove and an optional force flag. /// /// # Returns /// - /// The session's persisted remote-steerable flag, or omitted when no value has been persisted. + /// Outcome of the remove attempt, including dependent-plugin info when applicable. /// ///
/// @@ -821,32 +702,29 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn get_persisted_remote_steerable( + pub async fn remove( &self, - params: SessionsGetPersistedRemoteSteerableRequest, - ) -> Result { + params: PluginsMarketplacesRemoveRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; let _value = self .client - .call( - rpc_methods::SESSIONS_GETPERSISTEDREMOTESTEERABLE, - Some(wire_params), - ) + .call(rpc_methods::PLUGINS_MARKETPLACES_REMOVE, Some(wire_params)) .await?; Ok(serde_json::from_value(_value)?) } - /// Closes a session: emits shutdown, flushes pending events, releases the in-use lock, and disposes the active session. + /// Lists plugins advertised by a registered marketplace. /// - /// Wire method: `sessions.close`. + /// Wire method: `plugins.marketplaces.browse`. /// /// # Parameters /// - /// * `params` - Session ID to close. + /// * `params` - Name of the marketplace whose plugin catalog to fetch. /// /// # Returns /// - /// Closes a session: emits shutdown, flushes pending events to disk, releases the in-use lock, disposes the active session. Idempotent: succeeds even if the session is not currently active. + /// Plugins advertised by the marketplace. /// ///
/// @@ -855,26 +733,25 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn close(&self, params: SessionsCloseRequest) -> Result { + pub async fn browse( + &self, + params: PluginsMarketplacesBrowseRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; let _value = self .client - .call(rpc_methods::SESSIONS_CLOSE, Some(wire_params)) + .call(rpc_methods::PLUGINS_MARKETPLACES_BROWSE, Some(wire_params)) .await?; Ok(serde_json::from_value(_value)?) } - /// Closes, deactivates, and deletes a set of sessions, returning the bytes freed per session. - /// - /// Wire method: `sessions.bulkDelete`. + /// Re-fetches one or all registered marketplace catalogs. /// - /// # Parameters - /// - /// * `params` - Session IDs to close, deactivate, and delete from disk. + /// Wire method: `plugins.marketplaces.refresh`. /// /// # Returns /// - /// Map of sessionId -> bytes freed by removing the session's workspace directory. + /// Result of refreshing one or more marketplace catalogs. /// ///
/// @@ -883,29 +760,26 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn bulk_delete( - &self, - params: SessionsBulkDeleteRequest, - ) -> Result { - let wire_params = serde_json::to_value(params)?; + pub async fn refresh(&self) -> Result { + let wire_params = serde_json::json!({}); let _value = self .client - .call(rpc_methods::SESSIONS_BULKDELETE, Some(wire_params)) + .call(rpc_methods::PLUGINS_MARKETPLACES_REFRESH, Some(wire_params)) .await?; Ok(serde_json::from_value(_value)?) } - /// Deletes sessions older than the given threshold, with optional dry-run and exclusion list. + /// Re-fetches one or all registered marketplace catalogs. /// - /// Wire method: `sessions.pruneOld`. + /// Wire method: `plugins.marketplaces.refresh`. /// /// # Parameters /// - /// * `params` - Age threshold and optional flags controlling which old sessions are pruned (or simulated when dryRun is true). + /// * `params` - Optional marketplace name; omit to refresh all. /// /// # Returns /// - /// Outcome of the prune operation: deleted IDs, dry-run candidates, skipped IDs, total bytes freed, and the dry-run flag. + /// Result of refreshing one or more marketplace catalogs. /// ///
/// @@ -914,29 +788,650 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn prune_old( + pub async fn refresh_with_params( &self, - params: SessionsPruneOldRequest, - ) -> Result { + params: PluginsMarketplacesRefreshRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; let _value = self .client - .call(rpc_methods::SESSIONS_PRUNEOLD, Some(wire_params)) + .call(rpc_methods::PLUGINS_MARKETPLACES_REFRESH, Some(wire_params)) .await?; Ok(serde_json::from_value(_value)?) } +} - /// Flushes a session's pending events to disk. - /// - /// Wire method: `sessions.save`. - /// - /// # Parameters - /// - /// * `params` - Session ID whose pending events should be flushed to disk. - /// +/// `runtime.*` RPCs. +#[derive(Clone, Copy)] +pub struct ClientRpcRuntime<'a> { + pub(crate) client: &'a Client, +} + +impl<'a> ClientRpcRuntime<'a> { + /// Gracefully shuts down an SDK-owned runtime. The response is sent only after cleanup completes; callers may then terminate the owned runtime process. + /// + /// Wire method: `runtime.shutdown`. + pub async fn shutdown(&self) -> Result<(), Error> { + let wire_params = serde_json::json!({}); + let _value = self + .client + .call(rpc_methods::RUNTIME_SHUTDOWN, Some(wire_params)) + .await?; + Ok(()) + } +} + +/// `secrets.*` RPCs. +#[derive(Clone, Copy)] +pub struct ClientRpcSecrets<'a> { + pub(crate) client: &'a Client, +} + +impl<'a> ClientRpcSecrets<'a> { + /// Registers secret values for redaction in session logs and exports. The SDK calls this to inject dynamically generated secret values (e.g., OIDC tokens). + /// + /// Wire method: `secrets.addFilterValues`. + /// + /// # Parameters + /// + /// * `params` - Secret values to add to the redaction filter. + /// + /// # Returns + /// + /// Confirmation that the secret values were registered. + pub async fn add_filter_values( + &self, + params: SecretsAddFilterValuesRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SECRETS_ADDFILTERVALUES, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } +} + +/// `sessionFs.*` RPCs. +#[derive(Clone, Copy)] +pub struct ClientRpcSessionFs<'a> { + pub(crate) client: &'a Client, +} + +impl<'a> ClientRpcSessionFs<'a> { + /// Registers an SDK client as the session filesystem provider. + /// + /// Wire method: `sessionFs.setProvider`. + /// + /// # Parameters + /// + /// * `params` - Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider. + /// + /// # Returns + /// + /// Indicates whether the calling client was registered as the session filesystem provider. + pub async fn set_provider( + &self, + params: SessionFsSetProviderRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONFS_SETPROVIDER, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } +} + +/// `sessions.*` RPCs. +#[derive(Clone, Copy)] +pub struct ClientRpcSessions<'a> { + pub(crate) client: &'a Client, +} + +impl<'a> ClientRpcSessions<'a> { + /// Creates or resumes a local session and returns the opened session ID. + /// + /// Wire method: `sessions.open`. + /// + /// # Returns + /// + /// Result of opening a session. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn open(&self) -> Result { + let wire_params = serde_json::json!({}); + let _value = self + .client + .call(rpc_methods::SESSIONS_OPEN, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Creates a new session by forking persisted history from an existing session. + /// + /// Wire method: `sessions.fork`. + /// + /// # Parameters + /// + /// * `params` - Source session identifier to fork from, optional event-ID boundary, and optional friendly name for the new session. + /// + /// # Returns + /// + /// Identifier and optional friendly name assigned to the newly forked session. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn fork(&self, params: SessionsForkRequest) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_FORK, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Connects to an existing remote session and exposes it as an SDK session. + /// + /// Wire method: `sessions.connect`. + /// + /// # Parameters + /// + /// * `params` - Remote session connection parameters. + /// + /// # Returns + /// + /// Remote session connection result. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn connect( + &self, + params: ConnectRemoteSessionParams, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_CONNECT, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Lists sessions, optionally filtered by source and working-directory context. Returned entries are discriminated by `isRemote`: local entries carry only the lightweight `LocalSessionMetadataValue` shape; remote entries carry the full `RemoteSessionMetadataValue` shape (repository, PR number, taskType, etc.). + /// + /// Wire method: `sessions.list`. + /// + /// # Returns + /// + /// Sessions matching the filter, ordered most-recently-modified first. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn list(&self) -> Result { + let wire_params = serde_json::json!({}); + let _value = self + .client + .call(rpc_methods::SESSIONS_LIST, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Lists sessions, optionally filtered by source and working-directory context. Returned entries are discriminated by `isRemote`: local entries carry only the lightweight `LocalSessionMetadataValue` shape; remote entries carry the full `RemoteSessionMetadataValue` shape (repository, PR number, taskType, etc.). + /// + /// Wire method: `sessions.list`. + /// + /// # Parameters + /// + /// * `params` - Optional source filter, metadata-load limit, and context filter applied to the returned sessions. + /// + /// # Returns + /// + /// Sessions matching the filter, ordered most-recently-modified first. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn list_with_params( + &self, + params: SessionsListRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_LIST, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Finds the local session bound to a GitHub task ID, if any. + /// + /// Wire method: `sessions.findByTaskId`. + /// + /// # Parameters + /// + /// * `params` - GitHub task ID to look up. + /// + /// # Returns + /// + /// ID of the local session bound to the given GitHub task, or omitted when none. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn find_by_task_id( + &self, + params: SessionsFindByTaskIDRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_FINDBYTASKID, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Resolves a UUID prefix to a unique session ID, if exactly one session matches. + /// + /// Wire method: `sessions.findByPrefix`. + /// + /// # Parameters + /// + /// * `params` - UUID prefix to resolve to a unique session ID. + /// + /// # Returns + /// + /// Session ID matching the prefix, omitted when no unique match exists. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn find_by_prefix( + &self, + params: SessionsFindByPrefixRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_FINDBYPREFIX, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Returns the most-relevant prior session for a given working-directory context. + /// + /// Wire method: `sessions.getLastForContext`. + /// + /// # Parameters + /// + /// * `params` - Optional working-directory context used to score session relevance. + /// + /// # Returns + /// + /// Most-relevant session ID for the supplied context, or omitted when no sessions exist. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn get_last_for_context( + &self, + params: SessionsGetLastForContextRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_GETLASTFORCONTEXT, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Computes the absolute path to a session's persisted events.jsonl file. Internal: filesystem paths are only meaningful in-process (CLI and runtime share a filesystem). Currently used by the CLI's contribution-graph feature to read historical events directly. Remote SDK consumers must not depend on this; a proper event-query API would replace it if the contribution graph ever needed to work over the wire. + /// + /// Wire method: `sessions.getEventFilePath`. + /// + /// # Parameters + /// + /// * `params` - Session ID whose event-log file path to compute. + /// + /// # Returns + /// + /// Absolute path to the session's events.jsonl file on disk. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub(crate) async fn get_event_file_path( + &self, + params: SessionsGetEventFilePathRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_GETEVENTFILEPATH, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Returns the on-disk byte size of each session's workspace directory. + /// + /// Wire method: `sessions.getSizes`. + /// + /// # Returns + /// + /// Map of sessionId -> on-disk size in bytes for each session's workspace directory. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn get_sizes(&self) -> Result { + let wire_params = serde_json::json!({}); + let _value = self + .client + .call(rpc_methods::SESSIONS_GETSIZES, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Returns the subset of the supplied session IDs that are currently held by another running process. + /// + /// Wire method: `sessions.checkInUse`. + /// + /// # Parameters + /// + /// * `params` - Session IDs to test for live in-use locks. + /// + /// # Returns + /// + /// Session IDs from the input set that are currently in use by another process. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn check_in_use( + &self, + params: SessionsCheckInUseRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_CHECKINUSE, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Returns a session's persisted remote-steerable flag, if any has been recorded. Internal: this is CLI-specific book-keeping used by `--continue` / `--resume` to inherit the prior session's remote-steerable preference. SDK consumers that want similar behavior should manage their own persistence around start/stop calls rather than relying on this runtime-side flag. + /// + /// Wire method: `sessions.getPersistedRemoteSteerable`. + /// + /// # Parameters + /// + /// * `params` - Session ID to look up the persisted remote-steerable flag for. + /// + /// # Returns + /// + /// The session's persisted remote-steerable flag, or omitted when no value has been persisted. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub(crate) async fn get_persisted_remote_steerable( + &self, + params: SessionsGetPersistedRemoteSteerableRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call( + rpc_methods::SESSIONS_GETPERSISTEDREMOTESTEERABLE, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Closes a session: emits shutdown, flushes pending events, releases the in-use lock, and disposes the active session. + /// + /// Wire method: `sessions.close`. + /// + /// # Parameters + /// + /// * `params` - Session ID to close. + /// + /// # Returns + /// + /// Closes a session: emits shutdown, flushes pending events to disk, releases the in-use lock, disposes the active session. Idempotent: succeeds even if the session is not currently active. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn close(&self, params: SessionsCloseRequest) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_CLOSE, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Closes, deactivates, and deletes a set of sessions, returning the bytes freed per session. + /// + /// Wire method: `sessions.bulkDelete`. + /// + /// # Parameters + /// + /// * `params` - Session IDs to close, deactivate, and delete from disk. + /// + /// # Returns + /// + /// Map of sessionId -> bytes freed by removing the session's workspace directory. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn bulk_delete( + &self, + params: SessionsBulkDeleteRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_BULKDELETE, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Deletes sessions older than the given threshold, with optional dry-run and exclusion list. + /// + /// Wire method: `sessions.pruneOld`. + /// + /// # Parameters + /// + /// * `params` - Age threshold and optional flags controlling which old sessions are pruned (or simulated when dryRun is true). + /// + /// # Returns + /// + /// Outcome of the prune operation: deleted IDs, dry-run candidates, skipped IDs, total bytes freed, and the dry-run flag. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn prune_old( + &self, + params: SessionsPruneOldRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_PRUNEOLD, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Flushes a session's pending events to disk. + /// + /// Wire method: `sessions.save`. + /// + /// # Parameters + /// + /// * `params` - Session ID whose pending events should be flushed to disk. + /// + /// # Returns + /// + /// Flush a session's pending events to disk. No-op when no writer exists for the session (e.g., already closed). + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn save(&self, params: SessionsSaveRequest) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_SAVE, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Releases the in-use lock held by this process for a session. + /// + /// Wire method: `sessions.releaseLock`. + /// + /// # Parameters + /// + /// * `params` - Session ID whose in-use lock should be released. + /// + /// # Returns + /// + /// Release the in-use lock held by this process for the given session. No-op when this process does not currently hold a lock for the session. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn release_lock( + &self, + params: SessionsReleaseLockRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_RELEASELOCK, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Backfills missing summary and context fields on the supplied session metadata records. + /// + /// Wire method: `sessions.enrichMetadata`. + /// + /// # Parameters + /// + /// * `params` - Session metadata records to enrich with summary and context information. + /// + /// # Returns + /// + /// The enriched metadata records, with summary and context fields backfilled where available. Sessions confirmed empty and unnamed are omitted. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn enrich_metadata( + &self, + params: SessionsEnrichMetadataRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_ENRICHMETADATA, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Reloads user, plugin, and (optionally) repo hooks on the active session. + /// + /// Wire method: `sessions.reloadPluginHooks`. + /// + /// # Parameters + /// + /// * `params` - Active session ID and an optional flag for deferring repo-level hooks until folder trust. + /// /// # Returns /// - /// Flush a session's pending events to disk. No-op when no writer exists for the session (e.g., already closed). + /// Reload all hooks (user, plugin, optionally repo) and apply them to the active session. Call after installing or removing plugins so their hooks take effect immediately. No-op when no active session matches the given sessionId. /// ///
/// @@ -945,26 +1440,29 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn save(&self, params: SessionsSaveRequest) -> Result { + pub async fn reload_plugin_hooks( + &self, + params: SessionsReloadPluginHooksRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; let _value = self .client - .call(rpc_methods::SESSIONS_SAVE, Some(wire_params)) + .call(rpc_methods::SESSIONS_RELOADPLUGINHOOKS, Some(wire_params)) .await?; Ok(serde_json::from_value(_value)?) } - /// Releases the in-use lock held by this process for a session. + /// Loads previously-deferred repo-level hooks on the active session, returning queued startup prompts. /// - /// Wire method: `sessions.releaseLock`. + /// Wire method: `sessions.loadDeferredRepoHooks`. /// /// # Parameters /// - /// * `params` - Session ID whose in-use lock should be released. + /// * `params` - Active session ID whose deferred repo-level hooks should be loaded. /// /// # Returns /// - /// Release the in-use lock held by this process for the given session. No-op when this process does not currently hold a lock for the session. + /// Queued repo-level startup prompts and the total hook command count after loading. /// ///
/// @@ -973,29 +1471,32 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn release_lock( + pub async fn load_deferred_repo_hooks( &self, - params: SessionsReleaseLockRequest, - ) -> Result { + params: SessionsLoadDeferredRepoHooksRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; let _value = self .client - .call(rpc_methods::SESSIONS_RELEASELOCK, Some(wire_params)) + .call( + rpc_methods::SESSIONS_LOADDEFERREDREPOHOOKS, + Some(wire_params), + ) .await?; Ok(serde_json::from_value(_value)?) } - /// Backfills missing summary and context fields on the supplied session metadata records. + /// Replaces the manager-wide additional plugins registered with the session manager. /// - /// Wire method: `sessions.enrichMetadata`. + /// Wire method: `sessions.setAdditionalPlugins`. /// /// # Parameters /// - /// * `params` - Session metadata records to enrich with summary and context information. + /// * `params` - Manager-wide additional plugins to register; replaces any previously-configured set. /// /// # Returns /// - /// The enriched metadata records, with summary and context fields backfilled where available. Sessions confirmed empty and unnamed are omitted. + /// Replace the manager-wide additional plugins. New session creations and subsequent hook reloads see the new set; already-running sessions keep their existing hook installation until the next reload. /// ///
/// @@ -1004,29 +1505,32 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn enrich_metadata( + pub async fn set_additional_plugins( &self, - params: SessionsEnrichMetadataRequest, - ) -> Result { + params: SessionsSetAdditionalPluginsRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; let _value = self .client - .call(rpc_methods::SESSIONS_ENRICHMETADATA, Some(wire_params)) + .call( + rpc_methods::SESSIONS_SETADDITIONALPLUGINS, + Some(wire_params), + ) .await?; Ok(serde_json::from_value(_value)?) } - /// Reloads user, plugin, and (optionally) repo hooks on the active session. + /// Gets the dynamic-context board entry count associated with a session, when available. Internal: this exists solely so CLI telemetry events (`rem_spawn_gate`, `rem_consolidation_complete`) can pair START / END board counts around the detached rem-agent spawn. "Dynamic context board" is a runtime-internal concept that is not part of the public SDK contract; the long-term plan is to relocate the telemetry emission into the runtime so this method can be deleted entirely. /// - /// Wire method: `sessions.reloadPluginHooks`. + /// Wire method: `sessions.getBoardEntryCount`. /// /// # Parameters /// - /// * `params` - Active session ID and an optional flag for deferring repo-level hooks until folder trust. + /// * `params` - Session ID whose board entry count should be returned. /// /// # Returns /// - /// Reload all hooks (user, plugin, optionally repo) and apply them to the active session. Call after installing or removing plugins so their hooks take effect immediately. No-op when no active session matches the given sessionId. + /// Dynamic-context board entry count, when available. /// ///
/// @@ -1035,29 +1539,265 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn reload_plugin_hooks( + pub(crate) async fn get_board_entry_count( &self, - params: SessionsReloadPluginHooksRequest, - ) -> Result { + params: SessionsGetBoardEntryCountRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; let _value = self .client - .call(rpc_methods::SESSIONS_RELOADPLUGINHOOKS, Some(wire_params)) + .call(rpc_methods::SESSIONS_GETBOARDENTRYCOUNT, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Attaches the runtime-managed remote-control singleton to a session, awaiting initial setup. If remote control is already attached to a different session, the singleton is transferred (preserving the underlying Mission Control connection). Returns the final status. + /// + /// Wire method: `sessions.startRemoteControl`. + /// + /// # Parameters + /// + /// * `params` - Parameters for attaching the remote-control singleton to a session. + /// + /// # Returns + /// + /// Wrapper for the singleton's current status. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn start_remote_control( + &self, + params: SessionsStartRemoteControlRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_STARTREMOTECONTROL, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Atomically rebinds the remote-control singleton to a different session, preserving the underlying Mission Control connection. When `expectedFromSessionId` is provided and does not match the singleton's current `attachedSessionId`, the transfer is rejected with `transferred: false` and the current status is returned unchanged. + /// + /// Wire method: `sessions.transferRemoteControl`. + /// + /// # Parameters + /// + /// * `params` - Parameters for atomically rebinding the remote-control singleton. + /// + /// # Returns + /// + /// Outcome of a transferRemoteControl call. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn transfer_remote_control( + &self, + params: SessionsTransferRemoteControlRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call( + rpc_methods::SESSIONS_TRANSFERREMOTECONTROL, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Patches the steering state of the active remote-control singleton. When remote control is off, this is a no-op and the off status is returned. Today only `enabled: true` is actionable on the underlying exporter; passing `false` is reserved for future use. + /// + /// Wire method: `sessions.setRemoteControlSteering`. + /// + /// # Parameters + /// + /// * `params` - Patch for the singleton's steering state. + /// + /// # Returns + /// + /// Wrapper for the singleton's current status. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn set_remote_control_steering( + &self, + params: SessionsSetRemoteControlSteeringRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call( + rpc_methods::SESSIONS_SETREMOTECONTROLSTEERING, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Stops the remote-control singleton. When `expectedSessionId` is provided and does not match the singleton's current `attachedSessionId`, the stop is rejected with `stopped: false` and the current status is returned unchanged (unless `force` is set, in which case the singleton is unconditionally torn down). + /// + /// Wire method: `sessions.stopRemoteControl`. + /// + /// # Returns + /// + /// Outcome of a stopRemoteControl call. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn stop_remote_control(&self) -> Result { + let wire_params = serde_json::json!({}); + let _value = self + .client + .call(rpc_methods::SESSIONS_STOPREMOTECONTROL, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Stops the remote-control singleton. When `expectedSessionId` is provided and does not match the singleton's current `attachedSessionId`, the stop is rejected with `stopped: false` and the current status is returned unchanged (unless `force` is set, in which case the singleton is unconditionally torn down). + /// + /// Wire method: `sessions.stopRemoteControl`. + /// + /// # Parameters + /// + /// * `params` - Parameters for stopping the remote-control singleton. + /// + /// # Returns + /// + /// Outcome of a stopRemoteControl call. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn stop_remote_control_with_params( + &self, + params: SessionsStopRemoteControlRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_STOPREMOTECONTROL, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Returns the current state of the remote-control singleton, including the attached session id and frontend URL when active. + /// + /// Wire method: `sessions.getRemoteControlStatus`. + /// + /// # Returns + /// + /// Wrapper for the singleton's current status. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn get_remote_control_status(&self) -> Result { + let wire_params = serde_json::json!({}); + let _value = self + .client + .call( + rpc_methods::SESSIONS_GETREMOTECONTROLSTATUS, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Cursor-based long-poll for sessions spawned by the runtime (e.g. in response to a Mission Control `start_session` command). The cursor is an opaque token; pass it back to receive only spawn events that occurred AFTER the cursor was issued. Omit the cursor on the first call to receive any events buffered since the runtime started. Internal: this is a CLI background-daemon plumbing primitive. SDK consumers that need to react to runtime-spawned sessions should subscribe to a higher-level event stream rather than driving a long-poll loop. + /// + /// Wire method: `sessions.pollSpawnedSessions`. + /// + /// # Returns + /// + /// Batch of spawn events plus a cursor for follow-up polls. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub(crate) async fn poll_spawned_sessions(&self) -> Result { + let wire_params = serde_json::json!({}); + let _value = self + .client + .call(rpc_methods::SESSIONS_POLLSPAWNEDSESSIONS, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Cursor-based long-poll for sessions spawned by the runtime (e.g. in response to a Mission Control `start_session` command). The cursor is an opaque token; pass it back to receive only spawn events that occurred AFTER the cursor was issued. Omit the cursor on the first call to receive any events buffered since the runtime started. Internal: this is a CLI background-daemon plumbing primitive. SDK consumers that need to react to runtime-spawned sessions should subscribe to a higher-level event stream rather than driving a long-poll loop. + /// + /// Wire method: `sessions.pollSpawnedSessions`. + /// + /// # Parameters + /// + /// * `params` - Cursor and optional long-poll wait for polling runtime-spawned sessions. + /// + /// # Returns + /// + /// Batch of spawn events plus a cursor for follow-up polls. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub(crate) async fn poll_spawned_sessions_with_params( + &self, + params: SessionsPollSpawnedSessionsRequest, + ) -> Result { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::SESSIONS_POLLSPAWNEDSESSIONS, Some(wire_params)) .await?; Ok(serde_json::from_value(_value)?) } - /// Loads previously-deferred repo-level hooks on the active session, returning queued startup prompts. + /// Registers extension-provided tools on the given session, gated by an optional `enabled` callback. Returns an opaque unsubscribe function the caller must invoke to deregister the tools when the extension is torn down. Marked internal because `loader`, `enabled`, and the returned `unsubscribe` are in-process handles that cannot cross the JSON-RPC boundary. Disappears once extension discovery / launch / tool registration are owned by the runtime: SDK consumers will pass pure config (search paths, disabled ids) via `SessionOptions` and the runtime will resolve, launch, register, and tear down extensions itself. /// - /// Wire method: `sessions.loadDeferredRepoHooks`. + /// Wire method: `sessions.registerExtensionToolsOnSession`. /// /// # Parameters /// - /// * `params` - Active session ID whose deferred repo-level hooks should be loaded. + /// * `params` - Params to attach an extension loader's tools to a session. /// /// # Returns /// - /// Queued repo-level startup prompts and the total hook command count after loading. + /// Handle for releasing the extension tool registration. /// ///
/// @@ -1066,32 +1806,28 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn load_deferred_repo_hooks( + pub(crate) async fn register_extension_tools_on_session( &self, - params: SessionsLoadDeferredRepoHooksRequest, - ) -> Result { + params: RegisterExtensionToolsParams, + ) -> Result { let wire_params = serde_json::to_value(params)?; let _value = self .client .call( - rpc_methods::SESSIONS_LOADDEFERREDREPOHOOKS, + rpc_methods::SESSIONS_REGISTEREXTENSIONTOOLSONSESSION, Some(wire_params), ) .await?; Ok(serde_json::from_value(_value)?) } - /// Replaces the manager-wide additional plugins registered with the session manager. + /// Attaches (or detaches) an in-process ExtensionController delegate for the given session, used by shared-API surfaces that need to query or modify the session's extension state. Pass `controller: undefined` to detach. Marked internal because the controller is an in-process object that cannot cross the JSON-RPC boundary. Disappears alongside `registerExtensionToolsOnSession`: once the runtime owns extension management, the public surface exposes list/enable/disable/reload as dedicated RPCs served by the runtime. /// - /// Wire method: `sessions.setAdditionalPlugins`. + /// Wire method: `sessions.configureSessionExtensions`. /// /// # Parameters /// - /// * `params` - Manager-wide additional plugins to register; replaces any previously-configured set. - /// - /// # Returns - /// - /// Replace the manager-wide additional plugins. New session creations and subsequent hook reloads see the new set; already-running sessions keep their existing hook installation until the next reload. + /// * `params` - Params to attach or detach an in-process ExtensionController delegate. /// ///
/// @@ -1100,19 +1836,19 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn set_additional_plugins( + pub(crate) async fn configure_session_extensions( &self, - params: SessionsSetAdditionalPluginsRequest, - ) -> Result { + params: ConfigureSessionExtensionsParams, + ) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; let _value = self .client .call( - rpc_methods::SESSIONS_SETADDITIONALPLUGINS, + rpc_methods::SESSIONS_CONFIGURESESSIONEXTENSIONS, Some(wire_params), ) .await?; - Ok(serde_json::from_value(_value)?) + Ok(()) } } @@ -2787,13 +3523,13 @@ impl<'a> SessionRpcMcp<'a> { } } - /// Lists MCP servers configured for the session and their connection status. + /// Lists MCP servers configured for the session, their connection status, and host-level state. The host-level state (disabled/filtered servers, failed/needs-auth/pending connections, mcp3p policy, full config) is empty/zero when no MCP host has been initialized for the session. /// /// Wire method: `session.mcp.list`. /// /// # Returns /// - /// MCP servers configured for the session, with their connection status. + /// MCP servers configured for the session, with their connection status and host-level state. /// ///
/// @@ -2812,6 +3548,39 @@ impl<'a> SessionRpcMcp<'a> { Ok(serde_json::from_value(_value)?) } + /// Lists the tools exposed by a connected MCP server on this session's host. + /// + /// Wire method: `session.mcp.listTools`. + /// + /// # Parameters + /// + /// * `params` - Server name whose tool list should be returned. + /// + /// # Returns + /// + /// Tools exposed by the connected MCP server. Throws when the server is not connected. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn list_tools( + &self, + params: McpListToolsRequest, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_LISTTOOLS, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + /// Enables an MCP server for the session. /// /// Wire method: `session.mcp.enable`. @@ -2885,6 +3654,39 @@ impl<'a> SessionRpcMcp<'a> { Ok(()) } + /// Reloads MCP server connections for the session with an explicit host-provided configuration. + /// + /// Wire method: `session.mcp.reloadWithConfig`. + /// + /// # Parameters + /// + /// * `params` - Opaque MCP reload configuration. + /// + /// # Returns + /// + /// MCP server startup filtering result. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub(crate) async fn reload_with_config( + &self, + params: McpReloadWithConfigRequest, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_RELOADWITHCONFIG, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + /// Runs an MCP sampling inference on behalf of an MCP server. /// /// Wire method: `session.mcp.executeSampling`. @@ -2913,22 +3715,226 @@ impl<'a> SessionRpcMcp<'a> { let _value = self .session .client() - .call(rpc_methods::SESSION_MCP_EXECUTESAMPLING, Some(wire_params)) + .call(rpc_methods::SESSION_MCP_EXECUTESAMPLING, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Cancels an in-flight MCP sampling execution by request ID. + /// + /// Wire method: `session.mcp.cancelSamplingExecution`. + /// + /// # Parameters + /// + /// * `params` - The requestId previously passed to executeSampling that should be cancelled. + /// + /// # Returns + /// + /// Indicates whether an in-flight sampling execution with the given requestId was found and cancelled. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn cancel_sampling_execution( + &self, + params: McpCancelSamplingExecutionParams, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_MCP_CANCELSAMPLINGEXECUTION, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Sets how environment-variable values supplied to MCP servers are resolved (direct or indirect). + /// + /// Wire method: `session.mcp.setEnvValueMode`. + /// + /// # Parameters + /// + /// * `params` - Mode controlling how MCP server env values are resolved (`direct` or `indirect`). + /// + /// # Returns + /// + /// Env-value mode recorded on the session after the update. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn set_env_value_mode( + &self, + params: McpSetEnvValueModeParams, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_SETENVVALUEMODE, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Removes the auto-managed `github` MCP server when present. + /// + /// Wire method: `session.mcp.removeGitHub`. + /// + /// # Returns + /// + /// Indicates whether the auto-managed `github` MCP server was removed (false when nothing to remove). + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn remove_git_hub(&self) -> Result { + let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_REMOVEGITHUB, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Configures the built-in GitHub MCP server for the session's current auth context. + /// + /// Wire method: `session.mcp.configureGitHub`. + /// + /// # Parameters + /// + /// * `params` - Opaque auth info used to configure GitHub MCP. + /// + /// # Returns + /// + /// Result of configuring GitHub MCP. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub(crate) async fn configure_git_hub( + &self, + params: McpConfigureGitHubRequest, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_CONFIGUREGITHUB, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Starts an individual MCP server on the session's host. + /// + /// Wire method: `session.mcp.startServer`. + /// + /// # Parameters + /// + /// * `params` - Server name and opaque configuration for an individual MCP server start. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub(crate) async fn start_server(&self, params: McpStartServerRequest) -> Result<(), Error> { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_STARTSERVER, Some(wire_params)) + .await?; + Ok(()) + } + + /// Restarts an individual MCP server on the session's host (stops then starts). + /// + /// Wire method: `session.mcp.restartServer`. + /// + /// # Parameters + /// + /// * `params` - Server name and opaque configuration for an individual MCP server restart. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub(crate) async fn restart_server( + &self, + params: McpRestartServerRequest, + ) -> Result<(), Error> { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_RESTARTSERVER, Some(wire_params)) + .await?; + Ok(()) + } + + /// Stops an individual MCP server on the session's host. + /// + /// Wire method: `session.mcp.stopServer`. + /// + /// # Parameters + /// + /// * `params` - Server name for an individual MCP server stop. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn stop_server(&self, params: McpStopServerRequest) -> Result<(), Error> { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_STOPSERVER, Some(wire_params)) .await?; - Ok(serde_json::from_value(_value)?) + Ok(()) } - /// Cancels an in-flight MCP sampling execution by request ID. + /// Registers a pre-connected external MCP client (e.g. IDE) on the session's host. The caller retains lifecycle ownership of the client and transport. Marked internal because the `client` and `transport` arguments are in-process MCP SDK instances that cannot be serialized across the JSON-RPC boundary; once the CLI moves on top of the SDK, external clients will be expressed as transport configs the runtime can construct itself. /// - /// Wire method: `session.mcp.cancelSamplingExecution`. + /// Wire method: `session.mcp.registerExternalClient`. /// /// # Parameters /// - /// * `params` - The requestId previously passed to executeSampling that should be cancelled. - /// - /// # Returns - /// - /// Indicates whether an in-flight sampling execution with the given requestId was found and cancelled. + /// * `params` - Registration parameters for an external MCP client. /// ///
/// @@ -2937,34 +3943,30 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn cancel_sampling_execution( + pub(crate) async fn register_external_client( &self, - params: McpCancelSamplingExecutionParams, - ) -> Result { + params: McpRegisterExternalClientRequest, + ) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); let _value = self .session .client() .call( - rpc_methods::SESSION_MCP_CANCELSAMPLINGEXECUTION, + rpc_methods::SESSION_MCP_REGISTEREXTERNALCLIENT, Some(wire_params), ) .await?; - Ok(serde_json::from_value(_value)?) + Ok(()) } - /// Sets how environment-variable values supplied to MCP servers are resolved (direct or indirect). + /// Unregisters a previously registered external MCP client by server name. Marked internal as the paired companion of `registerExternalClient`: only in-process callers that registered a client this way can meaningfully unregister it. Disappears alongside `registerExternalClient`: once external clients are described to the runtime as config rather than handed in as instances, lifecycle (including deregistration) is owned entirely by the runtime. /// - /// Wire method: `session.mcp.setEnvValueMode`. + /// Wire method: `session.mcp.unregisterExternalClient`. /// /// # Parameters /// - /// * `params` - Mode controlling how MCP server env values are resolved (`direct` or `indirect`). - /// - /// # Returns - /// - /// Env-value mode recorded on the session after the update. + /// * `params` - Server name identifying the external client to remove. /// ///
/// @@ -2973,27 +3975,34 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn set_env_value_mode( + pub(crate) async fn unregister_external_client( &self, - params: McpSetEnvValueModeParams, - ) -> Result { + params: McpUnregisterExternalClientRequest, + ) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); let _value = self .session .client() - .call(rpc_methods::SESSION_MCP_SETENVVALUEMODE, Some(wire_params)) + .call( + rpc_methods::SESSION_MCP_UNREGISTEREXTERNALCLIENT, + Some(wire_params), + ) .await?; - Ok(serde_json::from_value(_value)?) + Ok(()) } - /// Removes the auto-managed `github` MCP server when present. + /// Checks whether a named MCP server is currently running on the session's host. /// - /// Wire method: `session.mcp.removeGitHub`. + /// Wire method: `session.mcp.isServerRunning`. + /// + /// # Parameters + /// + /// * `params` - Server name to check running status for. /// /// # Returns /// - /// Indicates whether the auto-managed `github` MCP server was removed (false when nothing to remove). + /// Whether the named MCP server is running. /// ///
/// @@ -3002,12 +4011,16 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn remove_git_hub(&self) -> Result { - let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + pub async fn is_server_running( + &self, + params: McpIsServerRunningRequest, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); let _value = self .session .client() - .call(rpc_methods::SESSION_MCP_REMOVEGITHUB, Some(wire_params)) + .call(rpc_methods::SESSION_MCP_ISSERVERRUNNING, Some(wire_params)) .await?; Ok(serde_json::from_value(_value)?) } @@ -3223,6 +4236,39 @@ pub struct SessionRpcMcpOauth<'a> { } impl<'a> SessionRpcMcpOauth<'a> { + /// Responds to a pending MCP OAuth provider request. Marked internal because the `provider` argument is an in-process OAuthClientProvider instance that cannot be carried over the wire; the public OAuth surface will route the response through a wire-clean handshake once the CLI moves on top of the SDK. + /// + /// Wire method: `session.mcp.oauth.respond`. + /// + /// # Parameters + /// + /// * `params` - MCP OAuth request id and optional provider response. + /// + /// # Returns + /// + /// Empty result after recording the MCP OAuth response. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub(crate) async fn respond( + &self, + params: McpOauthRespondRequest, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_OAUTH_RESPOND, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + /// Starts OAuth authentication for a remote MCP server. /// /// Wire method: `session.mcp.oauth.login`. @@ -3314,6 +4360,31 @@ impl<'a> SessionRpcMetadata<'a> { Ok(serde_json::from_value(_value)?) } + /// Returns a snapshot of activity flags for the session. + /// + /// Wire method: `session.metadata.activity`. + /// + /// # Returns + /// + /// Current activity flags for the session. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn activity(&self) -> Result { + let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_METADATA_ACTIVITY, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + /// Returns the token breakdown for the session's current context window for a given model. /// /// Wire method: `session.metadata.contextInfo`. @@ -4677,6 +5748,31 @@ impl<'a> SessionRpcPlan<'a> { .await?; Ok(()) } + + /// Reads todo rows from the session SQL database for plan rendering. + /// + /// Wire method: `session.plan.readSqlTodos`. + /// + /// # Returns + /// + /// Todo rows read from the session SQL database. Empty when no session database is available. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn read_sql_todos(&self) -> Result { + let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PLAN_READSQLTODOS, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } } /// `session.plugins.*` RPCs. @@ -4710,6 +5806,53 @@ impl<'a> SessionRpcPlugins<'a> { .await?; Ok(serde_json::from_value(_value)?) } + + /// Reloads the session's plugin set, refreshing MCP servers, custom agents, hooks, and skills cache so SDK-driven changes via `server.plugins.*` take effect immediately. + /// + /// Wire method: `session.plugins.reload`. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn reload(&self) -> Result<(), Error> { + let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PLUGINS_RELOAD, Some(wire_params)) + .await?; + Ok(()) + } + + /// Reloads the session's plugin set, refreshing MCP servers, custom agents, hooks, and skills cache so SDK-driven changes via `server.plugins.*` take effect immediately. + /// + /// Wire method: `session.plugins.reload`. + /// + /// # Parameters + /// + /// * `params` - Optional flags controlling which side effects the reload performs. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn reload_with_params(&self, params: PluginsReloadRequest) -> Result<(), Error> { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PLUGINS_RELOAD, Some(wire_params)) + .await?; + Ok(()) + } } /// `session.queue.*` RPCs. @@ -5018,6 +6161,78 @@ impl<'a> SessionRpcShell<'a> { .await?; Ok(serde_json::from_value(_value)?) } + + /// Executes a user-requested shell command through the session runtime. + /// + /// Wire method: `session.shell.executeUserRequested`. + /// + /// # Parameters + /// + /// * `params` - User-requested shell command and cancellation handle. + /// + /// # Returns + /// + /// Result of a user-requested shell command. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn execute_user_requested( + &self, + params: ShellExecuteUserRequestedRequest, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_SHELL_EXECUTEUSERREQUESTED, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Cancels a user-requested shell command by request ID. + /// + /// Wire method: `session.shell.cancelUserRequested`. + /// + /// # Parameters + /// + /// * `params` - User-requested shell execution cancellation handle. + /// + /// # Returns + /// + /// Cancellation result for a user-requested shell command. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn cancel_user_requested( + &self, + params: ShellCancelUserRequestedRequest, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_SHELL_CANCELUSERREQUESTED, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } } /// `session.skills.*` RPCs. @@ -5519,6 +6734,34 @@ pub struct SessionRpcTelemetry<'a> { } impl<'a> SessionRpcTelemetry<'a> { + /// Gets the telemetry engagement ID currently associated with the session, when available. + /// + /// Wire method: `session.telemetry.getEngagementId`. + /// + /// # Returns + /// + /// Telemetry engagement ID for the session, when available. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn get_engagement_id(&self) -> Result { + let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_TELEMETRY_GETENGAGEMENTID, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + /// Sets feature override key/value pairs to attach to subsequent telemetry events for the session. /// /// Wire method: `session.telemetry.setFeatureOverrides`. @@ -5659,6 +6902,39 @@ pub struct SessionRpcUi<'a> { } impl<'a> SessionRpcUi<'a> { + /// Runs a transient no-tools model query against the current conversation context. + /// + /// Wire method: `session.ui.ephemeralQuery`. + /// + /// # Parameters + /// + /// * `params` - Transient question to answer without adding it to conversation history. + /// + /// # Returns + /// + /// Transient answer generated from current conversation context. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn ephemeral_query( + &self, + params: UIEphemeralQueryRequest, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_UI_EPHEMERALQUERY, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + /// Requests structured input from a UI-capable client. /// /// Wire method: `session.ui.elicitation`. diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs index aae4e87b4..7fb8fe0e0 100644 --- a/rust/src/generated/session_events.rs +++ b/rust/src/generated/session_events.rs @@ -181,6 +181,8 @@ pub enum SessionEventType { SessionCanvasOpened, #[serde(rename = "session.canvas.registry_changed")] SessionCanvasRegistryChanged, + #[serde(rename = "session.canvas.closed")] + SessionCanvasClosed, #[serde(rename = "session.extensions.attachments_pushed")] SessionExtensionsAttachmentsPushed, #[serde(rename = "mcp_app.tool_call_complete")] @@ -369,6 +371,8 @@ pub enum SessionEventData { SessionCanvasOpened(SessionCanvasOpenedData), #[serde(rename = "session.canvas.registry_changed")] SessionCanvasRegistryChanged(SessionCanvasRegistryChangedData), + #[serde(rename = "session.canvas.closed")] + SessionCanvasClosed(SessionCanvasClosedData), #[serde(rename = "session.extensions.attachments_pushed")] SessionExtensionsAttachmentsPushed(SessionExtensionsAttachmentsPushedData), #[serde(rename = "mcp_app.tool_call_complete")] @@ -547,7 +551,7 @@ pub struct SessionErrorData { pub url: Option, } -/// Session event "session.idle". Payload indicating the session is idle with no background agents in flight +/// Session event "session.idle". Payload indicating the session is idle with no background agents or attached shell commands in flight #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionIdleData { @@ -1242,6 +1246,9 @@ pub struct AssistantMessageData { ///
#[serde(skip_serializing_if = "Option::is_none")] pub anthropic_advisor_model: Option, + /// Provider's completion / response identifier; shared across all chunks of a single API call. Used to group multi-chunk assistant utterances. + #[serde(skip_serializing_if = "Option::is_none")] + pub api_call_id: Option, /// The assistant's text response content pub content: String, /// Encrypted reasoning content from OpenAI models. Session-bound and stripped on resume. @@ -1925,7 +1932,7 @@ 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). + /// Model the sub-agent will run with, when known at start. #[serde(skip_serializing_if = "Option::is_none")] pub model: Option, /// Tool call ID of the parent tool invocation that spawned this sub-agent @@ -1969,7 +1976,7 @@ pub struct SubagentFailedData { pub duration_ms: Option, /// Error message describing why the sub-agent failed pub error: String, - /// Model used by the sub-agent (if any model calls succeeded before failure) + /// Model selected for the sub-agent, when known #[serde(skip_serializing_if = "Option::is_none")] pub model: Option, /// Tool call ID of the parent tool invocation that spawned this sub-agent @@ -2018,6 +2025,9 @@ pub struct HookStartData { pub struct HookEndError { /// Human-readable error message pub message: String, + /// Source label of the hook that errored (e.g. the plugin it was loaded from), when known + #[serde(skip_serializing_if = "Option::is_none")] + pub source: Option, /// Error stack trace, when available #[serde(skip_serializing_if = "Option::is_none")] pub stack: Option, @@ -3271,6 +3281,18 @@ pub struct SessionCanvasRegistryChangedData { pub canvases: Vec, } +/// Session event "session.canvas.closed". +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionCanvasClosedData { + /// Provider-local canvas identifier + pub canvas_id: String, + /// Owning provider identifier + pub extension_id: String, + /// Stable caller-supplied identifier of the canvas instance that was closed + pub instance_id: String, +} + /// Session event "session.extensions.attachments_pushed". #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json index 7c106e0df..6e15842e3 100644 --- a/test/harness/package-lock.json +++ b/test/harness/package-lock.json @@ -8,11 +8,8 @@ "name": "harness", "version": "1.0.0", "license": "ISC", - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, "devDependencies": { - "@github/copilot": "^1.0.57", + "@github/copilot": "^1.0.60", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14", @@ -22,6 +19,9 @@ "typescript": "^5.9.3", "vitest": "^4.0.18", "yaml": "^2.8.2" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" } }, "node_modules/@emnapi/core": { @@ -501,9 +501,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.57.tgz", - "integrity": "sha512-7dpOu9/qiodmFohZVpTxYmTcjbcXfstWeHof0Ka5RkhguKMkbS3c+sW23a7TTjtlViTV73z+IZFfFW1ru621kw==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.60.tgz", + "integrity": "sha512-+GjW+GJNo55nwJwt48o9szWcyhuY0u682cBKQI1ay9jVBX8DCCXC6HB6Tyv5/MaM4N7CxTiEgp48aVMkye8K+g==", "dev": true, "license": "SEE LICENSE IN LICENSE.md", "dependencies": { @@ -513,20 +513,20 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.57", - "@github/copilot-darwin-x64": "1.0.57", - "@github/copilot-linux-arm64": "1.0.57", - "@github/copilot-linux-x64": "1.0.57", - "@github/copilot-linuxmusl-arm64": "1.0.57", - "@github/copilot-linuxmusl-x64": "1.0.57", - "@github/copilot-win32-arm64": "1.0.57", - "@github/copilot-win32-x64": "1.0.57" + "@github/copilot-darwin-arm64": "1.0.60", + "@github/copilot-darwin-x64": "1.0.60", + "@github/copilot-linux-arm64": "1.0.60", + "@github/copilot-linux-x64": "1.0.60", + "@github/copilot-linuxmusl-arm64": "1.0.60", + "@github/copilot-linuxmusl-x64": "1.0.60", + "@github/copilot-win32-arm64": "1.0.60", + "@github/copilot-win32-x64": "1.0.60" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.57.tgz", - "integrity": "sha512-ZmsojZbitPSRfgw3W9wBrHGLRDsBvMCjGsGnJ7xXOU6qxeF/IyWHADxEv1WKfDw8BdCM+LE5yITPXB8bcvCdqQ==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.60.tgz", + "integrity": "sha512-TErNaVxsv+uB3bdHwdoKorCd1rhiRh7HkX48vnS7jwqa8EtGgAkzNrHKC7mruL2rnYOOsNIdPfhzQk+2Y6PSxQ==", "cpu": [ "arm64" ], @@ -541,9 +541,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.57.tgz", - "integrity": "sha512-F4TFDOdORy4oSHJS4DE+3sTk09uk1lohOloe0jfvoEVxJSU6jdQcJLNGoo+BQljcG7a1HEBrmB04iAWG1UXVfA==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.60.tgz", + "integrity": "sha512-PthhcR6PqbQlT04xQKTElpPSJOrJd65nK/l9Sjmpwtk21RrDKs13DCY/19ubP17updYUWBxp3VNfyfN3DAQKOA==", "cpu": [ "x64" ], @@ -558,9 +558,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.57.tgz", - "integrity": "sha512-6apNY/v7CMxKk45CctUZLzQnddBpIG9keSendFKYN+kBIEBSdy//s/Cz/4YQX1iERnklpgZRP7FvcwaKs0/7YA==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.60.tgz", + "integrity": "sha512-AVahkDVQTiGmHvDjlb4CHO8CFEGqmCEipxi0qTA60oH3Y3W2C4aYBwEBtP/85pN3wUUKZJVrWTCcxdufUBuK2Q==", "cpu": [ "arm64" ], @@ -575,9 +575,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.57.tgz", - "integrity": "sha512-EOOnU4Y+vZHfxVl8eBAP7JtSTmu5d4ZDUC9wCGpAA5k703lEnpu8UOv04mTHRn8KTzb8gj+ijNhxDWe3Xljbaw==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.60.tgz", + "integrity": "sha512-NwQjV2ZyUdJVAO4t7wiT+eR3uNWYP57xaLUIhf6JTMGpsTyN+mAFXW63xpwM/K+Pug62uRDQDBjEeOQRB7qZrA==", "cpu": [ "x64" ], @@ -592,9 +592,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.57.tgz", - "integrity": "sha512-FCAaaJLX5T2ZpMeS1TCNnhQuGqyH9WVZndFdN1VOEnN/iWeSSaVF3lM4TPyRHHnWDVxzZtB+VLqOSjINZntD6g==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.60.tgz", + "integrity": "sha512-AYGPc9vq2k248bVwUbiVJ65kIYYMQQ7ci+S3oefWBIyYtYwAH0n+Q/IGAj49IPrelBarYABAsX+EQZJJC8rhxw==", "cpu": [ "arm64" ], @@ -609,9 +609,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.57.tgz", - "integrity": "sha512-AMIBN830yOvNcrj2Q0tGMImqat/V24wZS/4m5BaUssELM7r7KrT9ZBnBs+nWDZYeQaRoblFWL3f4AfxE3t94lQ==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.60.tgz", + "integrity": "sha512-9/F7yl0/9FpGvYR/TCQtbhu0vIaUVem6U7em85QYaEjkS45nK500pByCMWY0bXv2eSS8U2g+8FOAjfkyLlxwPw==", "cpu": [ "x64" ], @@ -626,9 +626,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.57.tgz", - "integrity": "sha512-3TL2bd1/p/sYbNgDIqbnjES//zlXP5b0sPEXKQRrpVF9ZLN3vjQ1tmBWx8Qx7zn2J3oywH2dG7qKjuxWTJRXKA==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.60.tgz", + "integrity": "sha512-ZxxS+Ua1+7Puz80yTOpQ4WS+s32NjrxIsqo8gE0FpuZId16BGOGbWkzWQvR/k2AVBCqpLZ7SK3LfDVKuKJRbpA==", "cpu": [ "arm64" ], @@ -643,9 +643,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.57", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.57.tgz", - "integrity": "sha512-zuKqRn0pIF+ZvuiMXbZkYK1AMlrV21kFTpyf5l7gdI1dzJuwHNI0Qfe0gzaZYaU1B4htbzMk9MhEbjR1PQcoJg==", + "version": "1.0.60", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.60.tgz", + "integrity": "sha512-e91ZlFz9J1lkadExLg36oN8Ms/xIa03vAEir3DmyCeYebZ+Y48vdS+BwhQEma+GLoxJUOhzHndCckGnMRfNIbA==", "cpu": [ "x64" ], diff --git a/test/harness/package.json b/test/harness/package.json index 2157fe1f3..99a7583d3 100644 --- a/test/harness/package.json +++ b/test/harness/package.json @@ -14,7 +14,7 @@ "node": "^20.19.0 || >=22.12.0" }, "devDependencies": { - "@github/copilot": "^1.0.57", + "@github/copilot": "^1.0.60", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14", From beaa1c882342f871f8ad1fe76a02d259dcd76ea9 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 8 Jun 2026 10:52:53 -0400 Subject: [PATCH 2/5] Regenerate codegen and adjust tests for 1.0.60 - scripts/codegen/go.ts: also match discriminator method name on the discriminator property itself, so sum types with a single variant (e.g. PermissionDecisionNoResult) get the sealing method. - scripts/codegen/python.ts: add reorderPythonDataclassFields pass that moves required fields before optional ones (Python dataclass rule). - Regenerate Go/Python/Java artifacts and adapt E2E tests across all SDKs to the updated RPC surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dotnet/test/E2E/RpcRemoteE2ETests.cs | 2 - dotnet/test/E2E/RpcServerE2ETests.cs | 38 +-- go/internal/e2e/rpc_remote_e2e_test.go | 14 - go/internal/e2e/rpc_server_e2e_test.go | 41 +-- go/rpc/generated_rpc_union_test.go | 4 +- go/rpc/permission_decision_no_result.go | 4 + go/rpc/zrpc.go | 286 +++++++++--------- go/rpc/zrpc_encoding.go | 218 ++++++------- go/rpc/zsession_encoding.go | 84 ++--- go/rpc/zsession_events.go | 104 +++---- .../com/github/copilot/CopilotClient.java | 6 +- .../copilot/SessionEventHandlingTest.java | 2 +- .../rpc/GeneratedRpcRecordsCoverageTest.java | 2 +- nodejs/test/e2e/rpc_remote.e2e.test.ts | 17 +- nodejs/test/e2e/rpc_server.e2e.test.ts | 24 +- python/copilot/generated/rpc.py | 18 +- python/e2e/test_rpc_remote_e2e.py | 9 - python/e2e/test_rpc_server_e2e.py | 19 +- rust/tests/e2e/rpc_remote.rs | 13 +- rust/tests/e2e/rpc_server.rs | 55 ++-- scripts/codegen/go.ts | 5 +- scripts/codegen/python.ts | 52 ++++ 22 files changed, 472 insertions(+), 545 deletions(-) diff --git a/dotnet/test/E2E/RpcRemoteE2ETests.cs b/dotnet/test/E2E/RpcRemoteE2ETests.cs index 40c3d8273..2af223542 100644 --- a/dotnet/test/E2E/RpcRemoteE2ETests.cs +++ b/dotnet/test/E2E/RpcRemoteE2ETests.cs @@ -48,12 +48,10 @@ public async Task Should_Notify_Steerable_Changed_Event_And_Persist_Flag() await session.Rpc.Remote.NotifySteerableChangedAsync(true); await WaitForRemoteSteerableEventAsync(session, expected: true); - Assert.True((await Client.Rpc.Sessions.GetPersistedRemoteSteerableAsync(session.SessionId)).RemoteSteerable); await session.Rpc.Remote.NotifySteerableChangedAsync(false); await WaitForRemoteSteerableEventAsync(session, expected: false); - Assert.False((await Client.Rpc.Sessions.GetPersistedRemoteSteerableAsync(session.SessionId)).RemoteSteerable); } private static async Task WaitForRemoteSteerableEventAsync(CopilotSession session, bool expected) diff --git a/dotnet/test/E2E/RpcServerE2ETests.cs b/dotnet/test/E2E/RpcServerE2ETests.cs index dea86df81..da4a360dd 100644 --- a/dotnet/test/E2E/RpcServerE2ETests.cs +++ b/dotnet/test/E2E/RpcServerE2ETests.cs @@ -9,7 +9,8 @@ using RpcSessionFsSetProviderConventions = GitHub.Copilot.Rpc.SessionFsSetProviderConventions; using RpcSessionContext = GitHub.Copilot.Rpc.SessionContext; using RpcSessionListFilter = GitHub.Copilot.Rpc.SessionListFilter; -using RpcSessionMetadata = GitHub.Copilot.Rpc.SessionMetadata; +using RpcLocalSessionMetadataValue = GitHub.Copilot.Rpc.LocalSessionMetadataValue; +using RpcSessionListEntry = GitHub.Copilot.Rpc.SessionListEntry; namespace GitHub.Copilot.Test.E2E; @@ -73,41 +74,34 @@ private static bool PathEquals(string? expected, string? actual) return string.Equals(normalizedExpected, normalizedActual, comparison); } - private async Task SaveAndWaitForEventFileAsync(string sessionId) - => await SaveAndWaitForEventFileAsync(Client, sessionId); + private async Task SaveSessionAsync(string sessionId) + => await SaveSessionAsync(Client, sessionId); - private static async Task SaveAndWaitForEventFileAsync(CopilotClient client, string sessionId) + private static async Task SaveSessionAsync(CopilotClient client, string sessionId) { var saveResult = await client.Rpc.Sessions.SaveAsync(sessionId); Assert.NotNull(saveResult); - - var pathResult = await client.Rpc.Sessions.GetEventFilePathAsync(sessionId); - Assert.False(string.IsNullOrWhiteSpace(pathResult.FilePath)); - Assert.True(Path.IsPathRooted(pathResult.FilePath), $"Expected an absolute event file path, got '{pathResult.FilePath}'."); - Assert.Equal("events.jsonl", Path.GetFileName(pathResult.FilePath)); - - return pathResult.FilePath; } - private static async Task PersistSessionAsync(CopilotClient client, CopilotSession session, string marker) + private static async Task PersistSessionAsync(CopilotClient client, CopilotSession session, string marker) { await session.LogAsync(marker); - return await SaveAndWaitForEventFileAsync(client, session.SessionId); + await SaveSessionAsync(client, session.SessionId); } - private async Task WaitForListedSessionAsync( + private async Task WaitForListedSessionAsync( string sessionId, RpcSessionListFilter? filter = null, long? metadataLimit = null) => await WaitForListedSessionAsync(Client, sessionId, filter, metadataLimit); - private static async Task WaitForListedSessionAsync( + private static async Task WaitForListedSessionAsync( CopilotClient client, string sessionId, RpcSessionListFilter? filter = null, long? metadataLimit = null) { - RpcSessionMetadata? metadata = null; + RpcSessionListEntry? metadata = null; await TestHelper.WaitForConditionAsync( async () => { @@ -241,8 +235,7 @@ public async Task Should_List_Find_And_Inspect_Persisted_Session_State() try { - var eventFilePath = await SaveAndWaitForEventFileAsync(client, sessionId); - Assert.Contains(sessionId, eventFilePath, StringComparison.OrdinalIgnoreCase); + await SaveSessionAsync(client, sessionId); var listed = await client.Rpc.Sessions.ListAsync( metadataLimit: 0, @@ -269,9 +262,6 @@ public async Task Should_List_Find_And_Inspect_Persisted_Session_State() var inUse = await client.Rpc.Sessions.CheckInUseAsync([sessionId, missingSessionId]); Assert.DoesNotContain(missingSessionId, inUse.InUse); - - var remoteSteerable = await client.Rpc.Sessions.GetPersistedRemoteSteerableAsync(sessionId); - Assert.Null(remoteSteerable.RemoteSteerable); } finally { @@ -297,9 +287,9 @@ public async Task Should_Enrich_Basic_Session_Metadata() try { - await SaveAndWaitForEventFileAsync(client, sessionId); + await SaveSessionAsync(client, sessionId); - var basic = new RpcSessionMetadata + var basic = new RpcLocalSessionMetadataValue { SessionId = sessionId, StartTime = DateTimeOffset.UtcNow.ToString("O"), @@ -406,7 +396,7 @@ public async Task Should_Prune_DryRun_And_BulkDelete_Persisted_Session() OnPermissionRequest = PermissionHandler.ApproveAll, }); - await SaveAndWaitForEventFileAsync(client, sessionId); + await SaveSessionAsync(client, sessionId); await client.Rpc.Sessions.CloseAsync(sessionId); var prune = await client.Rpc.Sessions.PruneOldAsync( diff --git a/go/internal/e2e/rpc_remote_e2e_test.go b/go/internal/e2e/rpc_remote_e2e_test.go index 52b8beeda..fa4392b03 100644 --- a/go/internal/e2e/rpc_remote_e2e_test.go +++ b/go/internal/e2e/rpc_remote_e2e_test.go @@ -51,25 +51,11 @@ func TestRPCRemoteE2E(t *testing.T) { t.Fatalf("Remote.NotifySteerableChanged(true) failed: %v", err) } waitForRemoteSteerableEvent(t, session, true) - persisted, err := client.RPC.Sessions.GetPersistedRemoteSteerable(t.Context(), &rpc.SessionsGetPersistedRemoteSteerableRequest{SessionID: session.SessionID}) - if err != nil { - t.Fatalf("Sessions.GetPersistedRemoteSteerable(true) failed: %v", err) - } - if persisted.RemoteSteerable == nil || !*persisted.RemoteSteerable { - t.Fatalf("Expected persisted RemoteSteerable=true, got %+v", persisted) - } if _, err := session.RPC.Remote.NotifySteerableChanged(t.Context(), &rpc.RemoteNotifySteerableChangedRequest{RemoteSteerable: false}); err != nil { t.Fatalf("Remote.NotifySteerableChanged(false) failed: %v", err) } waitForRemoteSteerableEvent(t, session, false) - persisted, err = client.RPC.Sessions.GetPersistedRemoteSteerable(t.Context(), &rpc.SessionsGetPersistedRemoteSteerableRequest{SessionID: session.SessionID}) - if err != nil { - t.Fatalf("Sessions.GetPersistedRemoteSteerable(false) failed: %v", err) - } - if persisted.RemoteSteerable == nil || *persisted.RemoteSteerable { - t.Fatalf("Expected persisted RemoteSteerable=false, got %+v", persisted) - } }) } diff --git a/go/internal/e2e/rpc_server_e2e_test.go b/go/internal/e2e/rpc_server_e2e_test.go index 6f6c77e7d..ba661acdb 100644 --- a/go/internal/e2e/rpc_server_e2e_test.go +++ b/go/internal/e2e/rpc_server_e2e_test.go @@ -221,10 +221,7 @@ func TestRPCServerE2E(t *testing.T) { t.Fatalf("Log failed: %v", err) } - eventFilePath := saveAndGetEventFilePath(t, client, sessionID) - if !strings.Contains(strings.ToLower(eventFilePath), strings.ToLower(sessionID)) { - t.Fatalf("Expected event file path %q to contain session ID %q", eventFilePath, sessionID) - } + saveSession(t, client, sessionID) metadataLimit := int64(0) filter := &rpc.SessionListFilter{Cwd: &workingDirectory} @@ -239,8 +236,9 @@ func TestRPCServerE2E(t *testing.T) { t.Fatal("Expected non-nil sessions list") } for _, metadata := range listed.Sessions { - if metadata.Context != nil { - assertRPCPathEqual(t, workingDirectory, metadata.Context.Cwd) + local, ok := metadata.(*rpc.LocalSessionMetadataValue) + if ok && local.Context != nil { + assertRPCPathEqual(t, workingDirectory, local.Context.Cwd) } } @@ -289,13 +287,6 @@ func TestRPCServerE2E(t *testing.T) { t.Fatalf("Did not expect missing session %q to be in use: %+v", missingSessionID, inUse.InUse) } - remoteSteerable, err := client.RPC.Sessions.GetPersistedRemoteSteerable(t.Context(), &rpc.SessionsGetPersistedRemoteSteerableRequest{SessionID: sessionID}) - if err != nil { - t.Fatalf("Sessions.GetPersistedRemoteSteerable failed: %v", err) - } - if remoteSteerable.RemoteSteerable != nil { - t.Fatalf("Expected no persisted remote steerable flag, got %v", *remoteSteerable.RemoteSteerable) - } }) t.Run("should enrich basic session metadata", func(t *testing.T) { @@ -319,11 +310,11 @@ func TestRPCServerE2E(t *testing.T) { if err := session.Log(t.Context(), "SERVER_RPC_ENRICH_READY", nil); err != nil { t.Fatalf("Log failed: %v", err) } - saveAndGetEventFilePath(t, client, sessionID) + saveSession(t, client, sessionID) now := time.Now().UTC().Format(time.RFC3339Nano) result, err := client.RPC.Sessions.EnrichMetadata(t.Context(), &rpc.SessionsEnrichMetadataRequest{ - Sessions: []rpc.SessionMetadata{{ + Sessions: []rpc.LocalSessionMetadataValue{{ SessionID: sessionID, StartTime: now, ModifiedTime: now, @@ -371,7 +362,7 @@ func TestRPCServerE2E(t *testing.T) { if err := session.Log(t.Context(), "SERVER_RPC_CLOSE_READY", nil); err != nil { t.Fatalf("Log failed: %v", err) } - saveAndGetEventFilePath(t, client, sessionID) + saveSession(t, client, sessionID) if _, err := client.RPC.Sessions.Close(t.Context(), &rpc.SessionsCloseRequest{SessionID: sessionID}); err != nil { t.Fatalf("Sessions.Close failed: %v", err) @@ -410,7 +401,7 @@ func TestRPCServerE2E(t *testing.T) { t.Fatalf("Log failed: %v", err) } - saveAndGetEventFilePath(t, client, sessionID) + saveSession(t, client, sessionID) if _, err := client.RPC.Sessions.Close(t.Context(), &rpc.SessionsCloseRequest{SessionID: sessionID}); err != nil { t.Fatalf("Sessions.Close failed: %v", err) } @@ -624,23 +615,9 @@ func findServerSkill(skills []rpc.ServerSkill, name string) *rpc.ServerSkill { return nil } -func saveAndGetEventFilePath(t *testing.T, client *copilot.Client, sessionID string) string { +func saveSession(t *testing.T, client *copilot.Client, sessionID string) { t.Helper() if _, err := client.RPC.Sessions.Save(t.Context(), &rpc.SessionsSaveRequest{SessionID: sessionID}); err != nil { t.Fatalf("Sessions.Save failed: %v", err) } - path, err := client.RPC.Sessions.GetEventFilePath(t.Context(), &rpc.SessionsGetEventFilePathRequest{SessionID: sessionID}) - if err != nil { - t.Fatalf("Sessions.GetEventFilePath failed: %v", err) - } - if strings.TrimSpace(path.FilePath) == "" { - t.Fatal("Expected non-empty event file path") - } - if !filepath.IsAbs(path.FilePath) { - t.Fatalf("Expected absolute event file path, got %q", path.FilePath) - } - if filepath.Base(path.FilePath) != "events.jsonl" { - t.Fatalf("Expected events.jsonl event file, got %q", path.FilePath) - } - return path.FilePath } diff --git a/go/rpc/generated_rpc_union_test.go b/go/rpc/generated_rpc_union_test.go index 131409f04..92bcb4c07 100644 --- a/go/rpc/generated_rpc_union_test.go +++ b/go/rpc/generated_rpc_union_test.go @@ -322,8 +322,8 @@ func TestUIElicitationSchemaPropertyJSONUnion(t *testing.T) { if !ok { t.Fatalf("count property = %T, want *UIElicitationSchemaPropertyNumber", schema.Properties["count"]) } - if count.Type() != UIElicitationSchemaPropertyTypeInteger { - t.Fatalf("count type = %q, want %q", count.Type(), UIElicitationSchemaPropertyTypeInteger) + if count.Discriminator != UIElicitationSchemaPropertyNumberTypeInteger { + t.Fatalf("count type = %q, want %q", count.Discriminator, UIElicitationSchemaPropertyNumberTypeInteger) } arrayChoice, ok := schema.Properties["arrayChoice"].(*UIElicitationArrayEnumField) diff --git a/go/rpc/permission_decision_no_result.go b/go/rpc/permission_decision_no_result.go index 3337120bc..c68b9fe78 100644 --- a/go/rpc/permission_decision_no_result.go +++ b/go/rpc/permission_decision_no_result.go @@ -15,6 +15,10 @@ func (PermissionDecisionNoResult) Kind() PermissionDecisionKind { return PermissionDecisionKind("no-result") } +func (PermissionDecisionNoResult) permissionDecisionKind() PermissionDecisionKind { + return PermissionDecisionKind("no-result") +} + // MarshalJSON emits {"kind":"no-result"} for serialization symmetry with // the other PermissionDecision variants. The SDK normally suppresses this // value before it reaches the wire, but a stable representation is useful diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go index 8d9c99ba8..0daf0be63 100644 --- a/go/rpc/zrpc.go +++ b/go/rpc/zrpc.go @@ -199,7 +199,7 @@ type AgentRegistrySpawnRequest struct { // be removed. type AgentRegistrySpawnResult interface { agentRegistrySpawnResult() - Kind() AgentRegistrySpawnResultKind + agentRegistrySpawnResultKind() AgentRegistrySpawnResultKind } type RawAgentRegistrySpawnResultData struct { @@ -208,7 +208,7 @@ type RawAgentRegistrySpawnResultData struct { } func (RawAgentRegistrySpawnResultData) agentRegistrySpawnResult() {} -func (r RawAgentRegistrySpawnResultData) Kind() AgentRegistrySpawnResultKind { +func (r RawAgentRegistrySpawnResultData) agentRegistrySpawnResultKind() AgentRegistrySpawnResultKind { return r.Discriminator } @@ -223,7 +223,7 @@ type AgentRegistrySpawnError struct { } func (AgentRegistrySpawnError) agentRegistrySpawnResult() {} -func (AgentRegistrySpawnError) Kind() AgentRegistrySpawnResultKind { +func (AgentRegistrySpawnError) agentRegistrySpawnResultKind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindSpawnError } @@ -239,7 +239,7 @@ type AgentRegistrySpawnRegistryTimeout struct { } func (AgentRegistrySpawnRegistryTimeout) agentRegistrySpawnResult() {} -func (AgentRegistrySpawnRegistryTimeout) Kind() AgentRegistrySpawnResultKind { +func (AgentRegistrySpawnRegistryTimeout) agentRegistrySpawnResultKind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindRegistryTimeout } @@ -263,7 +263,7 @@ type AgentRegistrySpawnSpawned struct { } func (AgentRegistrySpawnSpawned) agentRegistrySpawnResult() {} -func (AgentRegistrySpawnSpawned) Kind() AgentRegistrySpawnResultKind { +func (AgentRegistrySpawnSpawned) agentRegistrySpawnResultKind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindSpawned } @@ -282,7 +282,7 @@ type AgentRegistrySpawnValidationError struct { } func (AgentRegistrySpawnValidationError) agentRegistrySpawnResult() {} -func (AgentRegistrySpawnValidationError) Kind() AgentRegistrySpawnResultKind { +func (AgentRegistrySpawnValidationError) agentRegistrySpawnResultKind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindValidationError } @@ -333,7 +333,7 @@ type AllowAllPermissionState struct { // Experimental: Attachment is part of an experimental API and may change or be removed. type Attachment interface { attachment() - Type() AttachmentType + attachmentType() AttachmentType } type RawAttachmentData struct { @@ -342,7 +342,7 @@ type RawAttachmentData struct { } func (RawAttachmentData) attachment() {} -func (r RawAttachmentData) Type() AttachmentType { +func (r RawAttachmentData) attachmentType() AttachmentType { return r.Discriminator } @@ -358,7 +358,7 @@ type AttachmentBlob struct { } func (AttachmentBlob) attachment() {} -func (AttachmentBlob) Type() AttachmentType { +func (AttachmentBlob) attachmentType() AttachmentType { return AttachmentTypeBlob } @@ -373,7 +373,7 @@ type AttachmentDirectory struct { } func (AttachmentDirectory) attachment() {} -func (AttachmentDirectory) Type() AttachmentType { +func (AttachmentDirectory) attachmentType() AttachmentType { return AttachmentTypeDirectory } @@ -400,7 +400,7 @@ type AttachmentExtensionContext struct { } func (AttachmentExtensionContext) attachment() {} -func (AttachmentExtensionContext) Type() AttachmentType { +func (AttachmentExtensionContext) attachmentType() AttachmentType { return AttachmentTypeExtensionContext } @@ -416,7 +416,7 @@ type AttachmentFile struct { } func (AttachmentFile) attachment() {} -func (AttachmentFile) Type() AttachmentType { +func (AttachmentFile) attachmentType() AttachmentType { return AttachmentTypeFile } @@ -437,7 +437,7 @@ type AttachmentGitHubReference struct { } func (AttachmentGitHubReference) attachment() {} -func (AttachmentGitHubReference) Type() AttachmentType { +func (AttachmentGitHubReference) attachmentType() AttachmentType { return AttachmentTypeGitHubReference } @@ -456,7 +456,7 @@ type AttachmentSelection struct { } func (AttachmentSelection) attachment() {} -func (AttachmentSelection) Type() AttachmentType { +func (AttachmentSelection) attachmentType() AttachmentType { return AttachmentTypeSelection } @@ -504,7 +504,7 @@ type AttachmentSelectionDetailsStart struct { // Experimental: AuthInfo is part of an experimental API and may change or be removed. type AuthInfo interface { authInfo() - Type() AuthInfoType + authInfoType() AuthInfoType } type RawAuthInfoData struct { @@ -513,7 +513,7 @@ type RawAuthInfoData struct { } func (RawAuthInfoData) authInfo() {} -func (r RawAuthInfoData) Type() AuthInfoType { +func (r RawAuthInfoData) authInfoType() AuthInfoType { return r.Discriminator } @@ -531,7 +531,7 @@ type APIKeyAuthInfo struct { } func (APIKeyAuthInfo) authInfo() {} -func (APIKeyAuthInfo) Type() AuthInfoType { +func (APIKeyAuthInfo) authInfoType() AuthInfoType { return AuthInfoTypeAPIKey } @@ -548,7 +548,7 @@ type CopilotAPITokenAuthInfo struct { } func (CopilotAPITokenAuthInfo) authInfo() {} -func (CopilotAPITokenAuthInfo) Type() AuthInfoType { +func (CopilotAPITokenAuthInfo) authInfoType() AuthInfoType { return AuthInfoTypeCopilotAPIToken } @@ -571,7 +571,7 @@ type EnvAuthInfo struct { } func (EnvAuthInfo) authInfo() {} -func (EnvAuthInfo) Type() AuthInfoType { +func (EnvAuthInfo) authInfoType() AuthInfoType { return AuthInfoTypeEnv } @@ -591,7 +591,7 @@ type GhCLIAuthInfo struct { } func (GhCLIAuthInfo) authInfo() {} -func (GhCLIAuthInfo) Type() AuthInfoType { +func (GhCLIAuthInfo) authInfoType() AuthInfoType { return AuthInfoTypeGhCLI } @@ -609,7 +609,7 @@ type HMACAuthInfo struct { } func (HMACAuthInfo) authInfo() {} -func (HMACAuthInfo) Type() AuthInfoType { +func (HMACAuthInfo) authInfoType() AuthInfoType { return AuthInfoTypeHMAC } @@ -627,7 +627,7 @@ type TokenAuthInfo struct { } func (TokenAuthInfo) authInfo() {} -func (TokenAuthInfo) Type() AuthInfoType { +func (TokenAuthInfo) authInfoType() AuthInfoType { return AuthInfoTypeToken } @@ -645,7 +645,7 @@ type UserAuthInfo struct { } func (UserAuthInfo) authInfo() {} -func (UserAuthInfo) Type() AuthInfoType { +func (UserAuthInfo) authInfoType() AuthInfoType { return AuthInfoTypeUser } @@ -1370,7 +1370,7 @@ type ExternalToolTextResultForLlmBinaryResultsForLlm struct { // change or be removed. type ExternalToolTextResultForLlmContent interface { externalToolTextResultForLlmContent() - Type() ExternalToolTextResultForLlmContentType + externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType } type RawExternalToolTextResultForLlmContentData struct { @@ -1379,7 +1379,7 @@ type RawExternalToolTextResultForLlmContentData struct { } func (RawExternalToolTextResultForLlmContentData) externalToolTextResultForLlmContent() {} -func (r RawExternalToolTextResultForLlmContentData) Type() ExternalToolTextResultForLlmContentType { +func (r RawExternalToolTextResultForLlmContentData) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { return r.Discriminator } @@ -1394,7 +1394,7 @@ type ExternalToolTextResultForLlmContentAudio struct { } func (ExternalToolTextResultForLlmContentAudio) externalToolTextResultForLlmContent() {} -func (ExternalToolTextResultForLlmContentAudio) Type() ExternalToolTextResultForLlmContentType { +func (ExternalToolTextResultForLlmContentAudio) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeAudio } @@ -1409,7 +1409,7 @@ type ExternalToolTextResultForLlmContentImage struct { } func (ExternalToolTextResultForLlmContentImage) externalToolTextResultForLlmContent() {} -func (ExternalToolTextResultForLlmContentImage) Type() ExternalToolTextResultForLlmContentType { +func (ExternalToolTextResultForLlmContentImage) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeImage } @@ -1422,7 +1422,7 @@ type ExternalToolTextResultForLlmContentResource struct { } func (ExternalToolTextResultForLlmContentResource) externalToolTextResultForLlmContent() {} -func (ExternalToolTextResultForLlmContentResource) Type() ExternalToolTextResultForLlmContentType { +func (ExternalToolTextResultForLlmContentResource) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeResource } @@ -1447,7 +1447,7 @@ type ExternalToolTextResultForLlmContentResourceLink struct { } func (ExternalToolTextResultForLlmContentResourceLink) externalToolTextResultForLlmContent() {} -func (ExternalToolTextResultForLlmContentResourceLink) Type() ExternalToolTextResultForLlmContentType { +func (ExternalToolTextResultForLlmContentResourceLink) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeResourceLink } @@ -1464,7 +1464,7 @@ type ExternalToolTextResultForLlmContentTerminal struct { } func (ExternalToolTextResultForLlmContentTerminal) externalToolTextResultForLlmContent() {} -func (ExternalToolTextResultForLlmContentTerminal) Type() ExternalToolTextResultForLlmContentType { +func (ExternalToolTextResultForLlmContentTerminal) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeTerminal } @@ -1477,7 +1477,7 @@ type ExternalToolTextResultForLlmContentText struct { } func (ExternalToolTextResultForLlmContentText) externalToolTextResultForLlmContent() {} -func (ExternalToolTextResultForLlmContentText) Type() ExternalToolTextResultForLlmContentType { +func (ExternalToolTextResultForLlmContentText) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeText } @@ -3151,7 +3151,7 @@ type PendingPermissionRequestList struct { // removed. type PermissionDecision interface { permissionDecision() - Kind() PermissionDecisionKind + permissionDecisionKind() PermissionDecisionKind } type RawPermissionDecisionData struct { @@ -3160,7 +3160,7 @@ type RawPermissionDecisionData struct { } func (RawPermissionDecisionData) permissionDecision() {} -func (r RawPermissionDecisionData) Kind() PermissionDecisionKind { +func (r RawPermissionDecisionData) permissionDecisionKind() PermissionDecisionKind { return r.Discriminator } @@ -3171,7 +3171,7 @@ type PermissionDecisionApproved struct { } func (PermissionDecisionApproved) permissionDecision() {} -func (PermissionDecisionApproved) Kind() PermissionDecisionKind { +func (PermissionDecisionApproved) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindApproved } @@ -3186,7 +3186,7 @@ type PermissionDecisionApprovedForLocation struct { } func (PermissionDecisionApprovedForLocation) permissionDecision() {} -func (PermissionDecisionApprovedForLocation) Kind() PermissionDecisionKind { +func (PermissionDecisionApprovedForLocation) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindApprovedForLocation } @@ -3199,7 +3199,7 @@ type PermissionDecisionApprovedForSession struct { } func (PermissionDecisionApprovedForSession) permissionDecision() {} -func (PermissionDecisionApprovedForSession) Kind() PermissionDecisionKind { +func (PermissionDecisionApprovedForSession) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindApprovedForSession } @@ -3214,7 +3214,7 @@ type PermissionDecisionApproveForLocation struct { } func (PermissionDecisionApproveForLocation) permissionDecision() {} -func (PermissionDecisionApproveForLocation) Kind() PermissionDecisionKind { +func (PermissionDecisionApproveForLocation) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindApproveForLocation } @@ -3229,7 +3229,7 @@ type PermissionDecisionApproveForSession struct { } func (PermissionDecisionApproveForSession) permissionDecision() {} -func (PermissionDecisionApproveForSession) Kind() PermissionDecisionKind { +func (PermissionDecisionApproveForSession) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindApproveForSession } @@ -3240,7 +3240,7 @@ type PermissionDecisionApproveOnce struct { } func (PermissionDecisionApproveOnce) permissionDecision() {} -func (PermissionDecisionApproveOnce) Kind() PermissionDecisionKind { +func (PermissionDecisionApproveOnce) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindApproveOnce } @@ -3253,7 +3253,7 @@ type PermissionDecisionApprovePermanently struct { } func (PermissionDecisionApprovePermanently) permissionDecision() {} -func (PermissionDecisionApprovePermanently) Kind() PermissionDecisionKind { +func (PermissionDecisionApprovePermanently) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindApprovePermanently } @@ -3266,7 +3266,7 @@ type PermissionDecisionCancelled struct { } func (PermissionDecisionCancelled) permissionDecision() {} -func (PermissionDecisionCancelled) Kind() PermissionDecisionKind { +func (PermissionDecisionCancelled) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindCancelled } @@ -3281,7 +3281,7 @@ type PermissionDecisionDeniedByContentExclusionPolicy struct { } func (PermissionDecisionDeniedByContentExclusionPolicy) permissionDecision() {} -func (PermissionDecisionDeniedByContentExclusionPolicy) Kind() PermissionDecisionKind { +func (PermissionDecisionDeniedByContentExclusionPolicy) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindDeniedByContentExclusionPolicy } @@ -3296,7 +3296,7 @@ type PermissionDecisionDeniedByPermissionRequestHook struct { } func (PermissionDecisionDeniedByPermissionRequestHook) permissionDecision() {} -func (PermissionDecisionDeniedByPermissionRequestHook) Kind() PermissionDecisionKind { +func (PermissionDecisionDeniedByPermissionRequestHook) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindDeniedByPermissionRequestHook } @@ -3309,7 +3309,7 @@ type PermissionDecisionDeniedByRules struct { } func (PermissionDecisionDeniedByRules) permissionDecision() {} -func (PermissionDecisionDeniedByRules) Kind() PermissionDecisionKind { +func (PermissionDecisionDeniedByRules) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindDeniedByRules } @@ -3324,7 +3324,7 @@ type PermissionDecisionDeniedInteractivelyByUser struct { } func (PermissionDecisionDeniedInteractivelyByUser) permissionDecision() {} -func (PermissionDecisionDeniedInteractivelyByUser) Kind() PermissionDecisionKind { +func (PermissionDecisionDeniedInteractivelyByUser) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindDeniedInteractivelyByUser } @@ -3335,7 +3335,7 @@ type PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser struct { } func (PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) permissionDecision() {} -func (PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) Kind() PermissionDecisionKind { +func (PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindDeniedNoApprovalRuleAndCouldNotRequestFromUser } @@ -3348,7 +3348,7 @@ type PermissionDecisionReject struct { } func (PermissionDecisionReject) permissionDecision() {} -func (PermissionDecisionReject) Kind() PermissionDecisionKind { +func (PermissionDecisionReject) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindReject } @@ -3359,7 +3359,7 @@ type PermissionDecisionUserNotAvailable struct { } func (PermissionDecisionUserNotAvailable) permissionDecision() {} -func (PermissionDecisionUserNotAvailable) Kind() PermissionDecisionKind { +func (PermissionDecisionUserNotAvailable) permissionDecisionKind() PermissionDecisionKind { return PermissionDecisionKindUserNotAvailable } @@ -3368,7 +3368,7 @@ func (PermissionDecisionUserNotAvailable) Kind() PermissionDecisionKind { // and may change or be removed. type PermissionDecisionApproveForLocationApproval interface { permissionDecisionApproveForLocationApproval() - Kind() PermissionDecisionApproveForLocationApprovalKind + permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind } type RawPermissionDecisionApproveForLocationApprovalData struct { @@ -3378,7 +3378,7 @@ type RawPermissionDecisionApproveForLocationApprovalData struct { func (RawPermissionDecisionApproveForLocationApprovalData) permissionDecisionApproveForLocationApproval() { } -func (r RawPermissionDecisionApproveForLocationApprovalData) Kind() PermissionDecisionApproveForLocationApprovalKind { +func (r RawPermissionDecisionApproveForLocationApprovalData) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { return r.Discriminator } @@ -3392,7 +3392,7 @@ type PermissionDecisionApproveForLocationApprovalCommands struct { func (PermissionDecisionApproveForLocationApprovalCommands) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalCommands) Kind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalCommands) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindCommands } @@ -3406,7 +3406,7 @@ type PermissionDecisionApproveForLocationApprovalCustomTool struct { func (PermissionDecisionApproveForLocationApprovalCustomTool) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalCustomTool) Kind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalCustomTool) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindCustomTool } @@ -3421,7 +3421,7 @@ type PermissionDecisionApproveForLocationApprovalExtensionManagement struct { func (PermissionDecisionApproveForLocationApprovalExtensionManagement) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalExtensionManagement) Kind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalExtensionManagement) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindExtensionManagement } @@ -3436,7 +3436,7 @@ type PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess struc func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) Kind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindExtensionPermissionAccess } @@ -3452,7 +3452,7 @@ type PermissionDecisionApproveForLocationApprovalMCP struct { func (PermissionDecisionApproveForLocationApprovalMCP) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalMCP) Kind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalMCP) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindMCP } @@ -3466,7 +3466,7 @@ type PermissionDecisionApproveForLocationApprovalMCPSampling struct { func (PermissionDecisionApproveForLocationApprovalMCPSampling) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalMCPSampling) Kind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalMCPSampling) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindMCPSampling } @@ -3478,7 +3478,7 @@ type PermissionDecisionApproveForLocationApprovalMemory struct { func (PermissionDecisionApproveForLocationApprovalMemory) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalMemory) Kind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalMemory) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindMemory } @@ -3490,7 +3490,7 @@ type PermissionDecisionApproveForLocationApprovalRead struct { func (PermissionDecisionApproveForLocationApprovalRead) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalRead) Kind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalRead) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindRead } @@ -3502,7 +3502,7 @@ type PermissionDecisionApproveForLocationApprovalWrite struct { func (PermissionDecisionApproveForLocationApprovalWrite) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalWrite) Kind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalWrite) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindWrite } @@ -3511,7 +3511,7 @@ func (PermissionDecisionApproveForLocationApprovalWrite) Kind() PermissionDecisi // and may change or be removed. type PermissionDecisionApproveForSessionApproval interface { permissionDecisionApproveForSessionApproval() - Kind() PermissionDecisionApproveForSessionApprovalKind + permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind } type RawPermissionDecisionApproveForSessionApprovalData struct { @@ -3521,7 +3521,7 @@ type RawPermissionDecisionApproveForSessionApprovalData struct { func (RawPermissionDecisionApproveForSessionApprovalData) permissionDecisionApproveForSessionApproval() { } -func (r RawPermissionDecisionApproveForSessionApprovalData) Kind() PermissionDecisionApproveForSessionApprovalKind { +func (r RawPermissionDecisionApproveForSessionApprovalData) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { return r.Discriminator } @@ -3535,7 +3535,7 @@ type PermissionDecisionApproveForSessionApprovalCommands struct { func (PermissionDecisionApproveForSessionApprovalCommands) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalCommands) Kind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalCommands) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindCommands } @@ -3549,7 +3549,7 @@ type PermissionDecisionApproveForSessionApprovalCustomTool struct { func (PermissionDecisionApproveForSessionApprovalCustomTool) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalCustomTool) Kind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalCustomTool) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindCustomTool } @@ -3564,7 +3564,7 @@ type PermissionDecisionApproveForSessionApprovalExtensionManagement struct { func (PermissionDecisionApproveForSessionApprovalExtensionManagement) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalExtensionManagement) Kind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalExtensionManagement) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindExtensionManagement } @@ -3579,7 +3579,7 @@ type PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess struct func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) Kind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindExtensionPermissionAccess } @@ -3594,7 +3594,7 @@ type PermissionDecisionApproveForSessionApprovalMCP struct { } func (PermissionDecisionApproveForSessionApprovalMCP) permissionDecisionApproveForSessionApproval() {} -func (PermissionDecisionApproveForSessionApprovalMCP) Kind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalMCP) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindMCP } @@ -3608,7 +3608,7 @@ type PermissionDecisionApproveForSessionApprovalMCPSampling struct { func (PermissionDecisionApproveForSessionApprovalMCPSampling) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalMCPSampling) Kind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalMCPSampling) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindMCPSampling } @@ -3620,7 +3620,7 @@ type PermissionDecisionApproveForSessionApprovalMemory struct { func (PermissionDecisionApproveForSessionApprovalMemory) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalMemory) Kind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalMemory) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindMemory } @@ -3632,7 +3632,7 @@ type PermissionDecisionApproveForSessionApprovalRead struct { func (PermissionDecisionApproveForSessionApprovalRead) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalRead) Kind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalRead) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindRead } @@ -3644,7 +3644,7 @@ type PermissionDecisionApproveForSessionApprovalWrite struct { func (PermissionDecisionApproveForSessionApprovalWrite) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalWrite) Kind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalWrite) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindWrite } @@ -3917,7 +3917,7 @@ type PermissionsGetAllowAllRequest struct { // and may change or be removed. type PermissionsLocationsAddToolApprovalDetails interface { permissionsLocationsAddToolApprovalDetails() - Kind() PermissionsLocationsAddToolApprovalDetailsKind + permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind } type RawPermissionsLocationsAddToolApprovalDetailsData struct { @@ -3927,7 +3927,7 @@ type RawPermissionsLocationsAddToolApprovalDetailsData struct { func (RawPermissionsLocationsAddToolApprovalDetailsData) permissionsLocationsAddToolApprovalDetails() { } -func (r RawPermissionsLocationsAddToolApprovalDetailsData) Kind() PermissionsLocationsAddToolApprovalDetailsKind { +func (r RawPermissionsLocationsAddToolApprovalDetailsData) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { return r.Discriminator } @@ -3941,7 +3941,7 @@ type PermissionsLocationsAddToolApprovalDetailsCommands struct { func (PermissionsLocationsAddToolApprovalDetailsCommands) permissionsLocationsAddToolApprovalDetails() { } -func (PermissionsLocationsAddToolApprovalDetailsCommands) Kind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsCommands) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindCommands } @@ -3955,7 +3955,7 @@ type PermissionsLocationsAddToolApprovalDetailsCustomTool struct { func (PermissionsLocationsAddToolApprovalDetailsCustomTool) permissionsLocationsAddToolApprovalDetails() { } -func (PermissionsLocationsAddToolApprovalDetailsCustomTool) Kind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsCustomTool) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindCustomTool } @@ -3970,7 +3970,7 @@ type PermissionsLocationsAddToolApprovalDetailsExtensionManagement struct { func (PermissionsLocationsAddToolApprovalDetailsExtensionManagement) permissionsLocationsAddToolApprovalDetails() { } -func (PermissionsLocationsAddToolApprovalDetailsExtensionManagement) Kind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsExtensionManagement) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindExtensionManagement } @@ -3984,7 +3984,7 @@ type PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess struct func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) permissionsLocationsAddToolApprovalDetails() { } -func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) Kind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindExtensionPermissionAccess } @@ -3999,7 +3999,7 @@ type PermissionsLocationsAddToolApprovalDetailsMCP struct { } func (PermissionsLocationsAddToolApprovalDetailsMCP) permissionsLocationsAddToolApprovalDetails() {} -func (PermissionsLocationsAddToolApprovalDetailsMCP) Kind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsMCP) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindMCP } @@ -4013,7 +4013,7 @@ type PermissionsLocationsAddToolApprovalDetailsMCPSampling struct { func (PermissionsLocationsAddToolApprovalDetailsMCPSampling) permissionsLocationsAddToolApprovalDetails() { } -func (PermissionsLocationsAddToolApprovalDetailsMCPSampling) Kind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsMCPSampling) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindMCPSampling } @@ -4025,7 +4025,7 @@ type PermissionsLocationsAddToolApprovalDetailsMemory struct { func (PermissionsLocationsAddToolApprovalDetailsMemory) permissionsLocationsAddToolApprovalDetails() { } -func (PermissionsLocationsAddToolApprovalDetailsMemory) Kind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsMemory) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindMemory } @@ -4036,7 +4036,7 @@ type PermissionsLocationsAddToolApprovalDetailsRead struct { } func (PermissionsLocationsAddToolApprovalDetailsRead) permissionsLocationsAddToolApprovalDetails() {} -func (PermissionsLocationsAddToolApprovalDetailsRead) Kind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsRead) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindRead } @@ -4047,7 +4047,7 @@ type PermissionsLocationsAddToolApprovalDetailsWrite struct { } func (PermissionsLocationsAddToolApprovalDetailsWrite) permissionsLocationsAddToolApprovalDetails() {} -func (PermissionsLocationsAddToolApprovalDetailsWrite) Kind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsWrite) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindWrite } @@ -4526,7 +4526,7 @@ type ProviderConfigAzure struct { // Experimental: PushAttachment is part of an experimental API and may change or be removed. type PushAttachment interface { pushAttachment() - Type() PushAttachmentType + pushAttachmentType() PushAttachmentType } type RawPushAttachmentData struct { @@ -4535,7 +4535,7 @@ type RawPushAttachmentData struct { } func (RawPushAttachmentData) pushAttachment() {} -func (r RawPushAttachmentData) Type() PushAttachmentType { +func (r RawPushAttachmentData) pushAttachmentType() PushAttachmentType { return r.Discriminator } @@ -4550,7 +4550,7 @@ type ExtensionContextPushInput struct { } func (ExtensionContextPushInput) pushAttachment() {} -func (ExtensionContextPushInput) Type() PushAttachmentType { +func (ExtensionContextPushInput) pushAttachmentType() PushAttachmentType { return PushAttachmentTypeExtensionContext } @@ -4567,7 +4567,7 @@ type PushAttachmentBlob struct { } func (PushAttachmentBlob) pushAttachment() {} -func (PushAttachmentBlob) Type() PushAttachmentType { +func (PushAttachmentBlob) pushAttachmentType() PushAttachmentType { return PushAttachmentTypeBlob } @@ -4582,7 +4582,7 @@ type PushAttachmentDirectory struct { } func (PushAttachmentDirectory) pushAttachment() {} -func (PushAttachmentDirectory) Type() PushAttachmentType { +func (PushAttachmentDirectory) pushAttachmentType() PushAttachmentType { return PushAttachmentTypeDirectory } @@ -4599,7 +4599,7 @@ type PushAttachmentFile struct { } func (PushAttachmentFile) pushAttachment() {} -func (PushAttachmentFile) Type() PushAttachmentType { +func (PushAttachmentFile) pushAttachmentType() PushAttachmentType { return PushAttachmentTypeFile } @@ -4620,7 +4620,7 @@ type PushAttachmentGitHubReference struct { } func (PushAttachmentGitHubReference) pushAttachment() {} -func (PushAttachmentGitHubReference) Type() PushAttachmentType { +func (PushAttachmentGitHubReference) pushAttachmentType() PushAttachmentType { return PushAttachmentTypeGitHubReference } @@ -4639,7 +4639,7 @@ type PushAttachmentSelection struct { } func (PushAttachmentSelection) pushAttachment() {} -func (PushAttachmentSelection) Type() PushAttachmentType { +func (PushAttachmentSelection) pushAttachmentType() PushAttachmentType { return PushAttachmentTypeSelection } @@ -4688,7 +4688,7 @@ type PushAttachmentSelectionDetailsStart struct { // removed. type QueuedCommandResult interface { queuedCommandResult() - Handled() bool + queuedCommandResultHandled() bool } // Schema for the `QueuedCommandHandled` type. @@ -4701,7 +4701,7 @@ type QueuedCommandHandled struct { } func (QueuedCommandHandled) queuedCommandResult() {} -func (QueuedCommandHandled) Handled() bool { +func (QueuedCommandHandled) queuedCommandResultHandled() bool { return true } @@ -4712,7 +4712,7 @@ type QueuedCommandNotHandled struct { } func (QueuedCommandNotHandled) queuedCommandResult() {} -func (QueuedCommandNotHandled) Handled() bool { +func (QueuedCommandNotHandled) queuedCommandResultHandled() bool { return false } @@ -4854,7 +4854,7 @@ type RemoteControlConfigExistingMcSession struct { // removed. type RemoteControlStatus interface { remoteControlStatus() - State() RemoteControlStatusState + remoteControlStatusState() RemoteControlStatusState } type RawRemoteControlStatusData struct { @@ -4863,7 +4863,7 @@ type RawRemoteControlStatusData struct { } func (RawRemoteControlStatusData) remoteControlStatus() {} -func (r RawRemoteControlStatusData) State() RemoteControlStatusState { +func (r RawRemoteControlStatusData) remoteControlStatusState() RemoteControlStatusState { return r.Discriminator } @@ -4887,7 +4887,7 @@ type RemoteControlStatusActive struct { } func (RemoteControlStatusActive) remoteControlStatus() {} -func (RemoteControlStatusActive) State() RemoteControlStatusState { +func (RemoteControlStatusActive) remoteControlStatusState() RemoteControlStatusState { return RemoteControlStatusStateActive } @@ -4900,7 +4900,7 @@ type RemoteControlStatusConnecting struct { } func (RemoteControlStatusConnecting) remoteControlStatus() {} -func (RemoteControlStatusConnecting) State() RemoteControlStatusState { +func (RemoteControlStatusConnecting) remoteControlStatusState() RemoteControlStatusState { return RemoteControlStatusStateConnecting } @@ -4915,7 +4915,7 @@ type RemoteControlStatusError struct { } func (RemoteControlStatusError) remoteControlStatus() {} -func (RemoteControlStatusError) State() RemoteControlStatusState { +func (RemoteControlStatusError) remoteControlStatusState() RemoteControlStatusState { return RemoteControlStatusStateError } @@ -4926,7 +4926,7 @@ type RemoteControlStatusOff struct { } func (RemoteControlStatusOff) remoteControlStatus() {} -func (RemoteControlStatusOff) State() RemoteControlStatusState { +func (RemoteControlStatusOff) remoteControlStatusState() RemoteControlStatusState { return RemoteControlStatusStateOff } @@ -5714,11 +5714,11 @@ type SessionList struct { // removed. type SessionListEntry interface { sessionListEntry() - IsRemote() bool + sessionListEntryIsRemote() bool } func (LocalSessionMetadataValue) sessionListEntry() {} -func (LocalSessionMetadataValue) IsRemote() bool { +func (LocalSessionMetadataValue) sessionListEntryIsRemote() bool { return false } @@ -5757,7 +5757,7 @@ type RemoteSessionMetadataValue struct { } func (RemoteSessionMetadataValue) sessionListEntry() {} -func (RemoteSessionMetadataValue) IsRemote() bool { +func (RemoteSessionMetadataValue) sessionListEntryIsRemote() bool { return true } @@ -6046,7 +6046,7 @@ type SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource struct { // removed. type SessionOpenParams interface { sessionOpenParams() - Kind() SessionOpenParamsKind + sessionOpenParamsKind() SessionOpenParamsKind } type RawSessionOpenParamsData struct { @@ -6055,7 +6055,7 @@ type RawSessionOpenParamsData struct { } func (RawSessionOpenParamsData) sessionOpenParams() {} -func (r RawSessionOpenParamsData) Kind() SessionOpenParamsKind { +func (r RawSessionOpenParamsData) sessionOpenParamsKind() SessionOpenParamsKind { return r.Discriminator } @@ -6068,7 +6068,7 @@ type SessionsOpenAttach struct { } func (SessionsOpenAttach) sessionOpenParams() {} -func (SessionsOpenAttach) Kind() SessionOpenParamsKind { +func (SessionsOpenAttach) sessionOpenParamsKind() SessionOpenParamsKind { return SessionOpenParamsKindAttach } @@ -6094,7 +6094,7 @@ type SessionsOpenCloud struct { } func (SessionsOpenCloud) sessionOpenParams() {} -func (SessionsOpenCloud) Kind() SessionOpenParamsKind { +func (SessionsOpenCloud) sessionOpenParamsKind() SessionOpenParamsKind { return SessionOpenParamsKindCloud } @@ -6109,7 +6109,7 @@ type SessionsOpenCreate struct { } func (SessionsOpenCreate) sessionOpenParams() {} -func (SessionsOpenCreate) Kind() SessionOpenParamsKind { +func (SessionsOpenCreate) sessionOpenParamsKind() SessionOpenParamsKind { return SessionOpenParamsKindCreate } @@ -6137,7 +6137,7 @@ type SessionsOpenHandoff struct { } func (SessionsOpenHandoff) sessionOpenParams() {} -func (SessionsOpenHandoff) Kind() SessionOpenParamsKind { +func (SessionsOpenHandoff) sessionOpenParamsKind() SessionOpenParamsKind { return SessionOpenParamsKindHandoff } @@ -6154,7 +6154,7 @@ type SessionsOpenRemote struct { } func (SessionsOpenRemote) sessionOpenParams() {} -func (SessionsOpenRemote) Kind() SessionOpenParamsKind { +func (SessionsOpenRemote) sessionOpenParamsKind() SessionOpenParamsKind { return SessionOpenParamsKindRemote } @@ -6173,7 +6173,7 @@ type SessionsOpenResume struct { } func (SessionsOpenResume) sessionOpenParams() {} -func (SessionsOpenResume) Kind() SessionOpenParamsKind { +func (SessionsOpenResume) sessionOpenParamsKind() SessionOpenParamsKind { return SessionOpenParamsKindResume } @@ -6190,7 +6190,7 @@ type SessionsOpenResumeLast struct { } func (SessionsOpenResumeLast) sessionOpenParams() {} -func (SessionsOpenResumeLast) Kind() SessionOpenParamsKind { +func (SessionsOpenResumeLast) sessionOpenParamsKind() SessionOpenParamsKind { return SessionOpenParamsKindResumeLast } @@ -7059,7 +7059,7 @@ type SlashCommandInput struct { // or be removed. type SlashCommandInvocationResult interface { slashCommandInvocationResult() - Kind() SlashCommandInvocationResultKind + slashCommandInvocationResultKind() SlashCommandInvocationResultKind } type RawSlashCommandInvocationResultData struct { @@ -7068,7 +7068,7 @@ type RawSlashCommandInvocationResultData struct { } func (RawSlashCommandInvocationResultData) slashCommandInvocationResult() {} -func (r RawSlashCommandInvocationResultData) Kind() SlashCommandInvocationResultKind { +func (r RawSlashCommandInvocationResultData) slashCommandInvocationResultKind() SlashCommandInvocationResultKind { return r.Discriminator } @@ -7088,7 +7088,7 @@ type SlashCommandAgentPromptResult struct { } func (SlashCommandAgentPromptResult) slashCommandInvocationResult() {} -func (SlashCommandAgentPromptResult) Kind() SlashCommandInvocationResultKind { +func (SlashCommandAgentPromptResult) slashCommandInvocationResultKind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindAgentPrompt } @@ -7104,7 +7104,7 @@ type SlashCommandCompletedResult struct { } func (SlashCommandCompletedResult) slashCommandInvocationResult() {} -func (SlashCommandCompletedResult) Kind() SlashCommandInvocationResultKind { +func (SlashCommandCompletedResult) slashCommandInvocationResultKind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindCompleted } @@ -7124,7 +7124,7 @@ type SlashCommandSelectSubcommandResult struct { } func (SlashCommandSelectSubcommandResult) slashCommandInvocationResult() {} -func (SlashCommandSelectSubcommandResult) Kind() SlashCommandInvocationResultKind { +func (SlashCommandSelectSubcommandResult) slashCommandInvocationResultKind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindSelectSubcommand } @@ -7144,7 +7144,7 @@ type SlashCommandTextResult struct { } func (SlashCommandTextResult) slashCommandInvocationResult() {} -func (SlashCommandTextResult) Kind() SlashCommandInvocationResultKind { +func (SlashCommandTextResult) slashCommandInvocationResultKind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindText } @@ -7164,7 +7164,7 @@ type SlashCommandSelectSubcommandOption struct { // Experimental: TaskInfo is part of an experimental API and may change or be removed. type TaskInfo interface { taskInfo() - Type() TaskInfoType + taskInfoType() TaskInfoType } type RawTaskInfoData struct { @@ -7173,7 +7173,7 @@ type RawTaskInfoData struct { } func (RawTaskInfoData) taskInfo() {} -func (r RawTaskInfoData) Type() TaskInfoType { +func (r RawTaskInfoData) taskInfoType() TaskInfoType { return r.Discriminator } @@ -7220,7 +7220,7 @@ type TaskAgentInfo struct { } func (TaskAgentInfo) taskInfo() {} -func (TaskAgentInfo) Type() TaskInfoType { +func (TaskAgentInfo) taskInfoType() TaskInfoType { return TaskInfoTypeAgent } @@ -7253,7 +7253,7 @@ type TaskShellInfo struct { } func (TaskShellInfo) taskInfo() {} -func (TaskShellInfo) Type() TaskInfoType { +func (TaskShellInfo) taskInfoType() TaskInfoType { return TaskInfoTypeShell } @@ -7267,7 +7267,7 @@ type TaskList struct { // Experimental: TaskProgress is part of an experimental API and may change or be removed. type TaskProgress interface { taskProgress() - Type() TaskProgressType + taskProgressType() TaskProgressType } type RawTaskProgressData struct { @@ -7276,7 +7276,7 @@ type RawTaskProgressData struct { } func (RawTaskProgressData) taskProgress() {} -func (r RawTaskProgressData) Type() TaskProgressType { +func (r RawTaskProgressData) taskProgressType() TaskProgressType { return r.Discriminator } @@ -7291,7 +7291,7 @@ type TaskAgentProgress struct { } func (TaskAgentProgress) taskProgress() {} -func (TaskAgentProgress) Type() TaskProgressType { +func (TaskAgentProgress) taskProgressType() TaskProgressType { return TaskProgressTypeAgent } @@ -7306,7 +7306,7 @@ type TaskShellProgress struct { } func (TaskShellProgress) taskProgress() {} -func (TaskShellProgress) Type() TaskProgressType { +func (TaskShellProgress) taskProgressType() TaskProgressType { return TaskProgressTypeShell } @@ -7627,7 +7627,7 @@ type UIElicitationSchema struct { // or be removed. type UIElicitationSchemaProperty interface { uiElicitationSchemaProperty() - Type() UIElicitationSchemaPropertyType + uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType } type RawUIElicitationSchemaPropertyData struct { @@ -7636,7 +7636,7 @@ type RawUIElicitationSchemaPropertyData struct { } func (RawUIElicitationSchemaPropertyData) uiElicitationSchemaProperty() {} -func (r RawUIElicitationSchemaPropertyData) Type() UIElicitationSchemaPropertyType { +func (r RawUIElicitationSchemaPropertyData) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { return r.Discriminator } @@ -7659,7 +7659,7 @@ type UIElicitationArrayAnyOfField struct { } func (UIElicitationArrayAnyOfField) uiElicitationSchemaProperty() {} -func (UIElicitationArrayAnyOfField) Type() UIElicitationSchemaPropertyType { +func (UIElicitationArrayAnyOfField) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeArray } @@ -7682,7 +7682,7 @@ type UIElicitationArrayEnumField struct { } func (UIElicitationArrayEnumField) uiElicitationSchemaProperty() {} -func (UIElicitationArrayEnumField) Type() UIElicitationSchemaPropertyType { +func (UIElicitationArrayEnumField) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeArray } @@ -7699,7 +7699,7 @@ type UIElicitationSchemaPropertyBoolean struct { } func (UIElicitationSchemaPropertyBoolean) uiElicitationSchemaProperty() {} -func (UIElicitationSchemaPropertyBoolean) Type() UIElicitationSchemaPropertyType { +func (UIElicitationSchemaPropertyBoolean) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeBoolean } @@ -7721,7 +7721,7 @@ type UIElicitationSchemaPropertyNumber struct { } func (UIElicitationSchemaPropertyNumber) uiElicitationSchemaProperty() {} -func (r UIElicitationSchemaPropertyNumber) Type() UIElicitationSchemaPropertyType { +func (r UIElicitationSchemaPropertyNumber) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { if r.Discriminator == "" { return UIElicitationSchemaPropertyTypeNumber } @@ -7747,7 +7747,7 @@ type UIElicitationSchemaPropertyString struct { } func (UIElicitationSchemaPropertyString) uiElicitationSchemaProperty() {} -func (UIElicitationSchemaPropertyString) Type() UIElicitationSchemaPropertyType { +func (UIElicitationSchemaPropertyString) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeString } @@ -7768,7 +7768,7 @@ type UIElicitationStringEnumField struct { } func (UIElicitationStringEnumField) uiElicitationSchemaProperty() {} -func (UIElicitationStringEnumField) Type() UIElicitationSchemaPropertyType { +func (UIElicitationStringEnumField) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeString } @@ -7787,7 +7787,7 @@ type UIElicitationStringOneOfField struct { } func (UIElicitationStringOneOfField) uiElicitationSchemaProperty() {} -func (UIElicitationStringOneOfField) Type() UIElicitationSchemaPropertyType { +func (UIElicitationStringOneOfField) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeString } @@ -8081,7 +8081,7 @@ type UserSettingsReloadResult struct { // removed. type UserToolSessionApproval interface { userToolSessionApproval() - Kind() UserToolSessionApprovalKind + userToolSessionApprovalKind() UserToolSessionApprovalKind } type RawUserToolSessionApprovalData struct { @@ -8090,7 +8090,7 @@ type RawUserToolSessionApprovalData struct { } func (RawUserToolSessionApprovalData) userToolSessionApproval() {} -func (r RawUserToolSessionApprovalData) Kind() UserToolSessionApprovalKind { +func (r RawUserToolSessionApprovalData) userToolSessionApprovalKind() UserToolSessionApprovalKind { return r.Discriminator } @@ -8103,7 +8103,7 @@ type UserToolSessionApprovalCommands struct { } func (UserToolSessionApprovalCommands) userToolSessionApproval() {} -func (UserToolSessionApprovalCommands) Kind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalCommands) userToolSessionApprovalKind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindCommands } @@ -8116,7 +8116,7 @@ type UserToolSessionApprovalCustomTool struct { } func (UserToolSessionApprovalCustomTool) userToolSessionApproval() {} -func (UserToolSessionApprovalCustomTool) Kind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalCustomTool) userToolSessionApprovalKind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindCustomTool } @@ -8129,7 +8129,7 @@ type UserToolSessionApprovalExtensionManagement struct { } func (UserToolSessionApprovalExtensionManagement) userToolSessionApproval() {} -func (UserToolSessionApprovalExtensionManagement) Kind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalExtensionManagement) userToolSessionApprovalKind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindExtensionManagement } @@ -8142,7 +8142,7 @@ type UserToolSessionApprovalExtensionPermissionAccess struct { } func (UserToolSessionApprovalExtensionPermissionAccess) userToolSessionApproval() {} -func (UserToolSessionApprovalExtensionPermissionAccess) Kind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalExtensionPermissionAccess) userToolSessionApprovalKind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindExtensionPermissionAccess } @@ -8157,7 +8157,7 @@ type UserToolSessionApprovalMCP struct { } func (UserToolSessionApprovalMCP) userToolSessionApproval() {} -func (UserToolSessionApprovalMCP) Kind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalMCP) userToolSessionApprovalKind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindMCP } @@ -8168,7 +8168,7 @@ type UserToolSessionApprovalMemory struct { } func (UserToolSessionApprovalMemory) userToolSessionApproval() {} -func (UserToolSessionApprovalMemory) Kind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalMemory) userToolSessionApprovalKind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindMemory } @@ -8179,7 +8179,7 @@ type UserToolSessionApprovalRead struct { } func (UserToolSessionApprovalRead) userToolSessionApproval() {} -func (UserToolSessionApprovalRead) Kind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalRead) userToolSessionApprovalKind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindRead } @@ -8190,7 +8190,7 @@ type UserToolSessionApprovalWrite struct { } func (UserToolSessionApprovalWrite) userToolSessionApproval() {} -func (UserToolSessionApprovalWrite) Kind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalWrite) userToolSessionApprovalKind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindWrite } diff --git a/go/rpc/zrpc_encoding.go b/go/rpc/zrpc_encoding.go index 2a4e3e481..8c28f5f73 100644 --- a/go/rpc/zrpc_encoding.go +++ b/go/rpc/zrpc_encoding.go @@ -67,7 +67,7 @@ func (r AgentRegistrySpawnError) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.agentRegistrySpawnResultKind(), alias: alias(r), }) } @@ -78,7 +78,7 @@ func (r AgentRegistrySpawnRegistryTimeout) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.agentRegistrySpawnResultKind(), alias: alias(r), }) } @@ -89,7 +89,7 @@ func (r AgentRegistrySpawnSpawned) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.agentRegistrySpawnResultKind(), alias: alias(r), }) } @@ -100,7 +100,7 @@ func (r AgentRegistrySpawnValidationError) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.agentRegistrySpawnResultKind(), alias: alias(r), }) } @@ -176,7 +176,7 @@ func (r AttachmentBlob) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.attachmentType(), alias: alias(r), }) } @@ -187,7 +187,7 @@ func (r AttachmentDirectory) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.attachmentType(), alias: alias(r), }) } @@ -198,7 +198,7 @@ func (r AttachmentExtensionContext) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.attachmentType(), alias: alias(r), }) } @@ -209,7 +209,7 @@ func (r AttachmentFile) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.attachmentType(), alias: alias(r), }) } @@ -220,7 +220,7 @@ func (r AttachmentGitHubReference) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.attachmentType(), alias: alias(r), }) } @@ -231,7 +231,7 @@ func (r AttachmentSelection) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.attachmentType(), alias: alias(r), }) } @@ -313,7 +313,7 @@ func (r APIKeyAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.authInfoType(), alias: alias(r), }) } @@ -324,7 +324,7 @@ func (r CopilotAPITokenAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.authInfoType(), alias: alias(r), }) } @@ -335,7 +335,7 @@ func (r EnvAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.authInfoType(), alias: alias(r), }) } @@ -346,7 +346,7 @@ func (r GhCLIAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.authInfoType(), alias: alias(r), }) } @@ -357,7 +357,7 @@ func (r HMACAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.authInfoType(), alias: alias(r), }) } @@ -368,7 +368,7 @@ func (r TokenAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.authInfoType(), alias: alias(r), }) } @@ -379,7 +379,7 @@ func (r UserAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.authInfoType(), alias: alias(r), }) } @@ -422,7 +422,7 @@ func (r QueuedCommandHandled) MarshalJSON() ([]byte, error) { Handled bool `json:"handled"` alias }{ - Handled: r.Handled(), + Handled: r.queuedCommandResultHandled(), alias: alias(r), }) } @@ -433,7 +433,7 @@ func (r QueuedCommandNotHandled) MarshalJSON() ([]byte, error) { Handled bool `json:"handled"` alias }{ - Handled: r.Handled(), + Handled: r.queuedCommandResultHandled(), alias: alias(r), }) } @@ -561,7 +561,7 @@ func (r ExternalToolTextResultForLlmContentAudio) MarshalJSON() ([]byte, error) Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.externalToolTextResultForLlmContentType(), alias: alias(r), }) } @@ -572,7 +572,7 @@ func (r ExternalToolTextResultForLlmContentImage) MarshalJSON() ([]byte, error) Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.externalToolTextResultForLlmContentType(), alias: alias(r), }) } @@ -657,7 +657,7 @@ func (r ExternalToolTextResultForLlmContentResource) MarshalJSON() ([]byte, erro Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.externalToolTextResultForLlmContentType(), alias: alias(r), }) } @@ -668,7 +668,7 @@ func (r ExternalToolTextResultForLlmContentResourceLink) MarshalJSON() ([]byte, Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.externalToolTextResultForLlmContentType(), alias: alias(r), }) } @@ -679,7 +679,7 @@ func (r ExternalToolTextResultForLlmContentTerminal) MarshalJSON() ([]byte, erro Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.externalToolTextResultForLlmContentType(), alias: alias(r), }) } @@ -690,7 +690,7 @@ func (r ExternalToolTextResultForLlmContentText) MarshalJSON() ([]byte, error) { Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.externalToolTextResultForLlmContentType(), alias: alias(r), }) } @@ -1201,7 +1201,7 @@ func (r PermissionDecisionApproved) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1289,7 +1289,7 @@ func (r UserToolSessionApprovalCommands) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.userToolSessionApprovalKind(), alias: alias(r), }) } @@ -1300,7 +1300,7 @@ func (r UserToolSessionApprovalCustomTool) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.userToolSessionApprovalKind(), alias: alias(r), }) } @@ -1311,7 +1311,7 @@ func (r UserToolSessionApprovalExtensionManagement) MarshalJSON() ([]byte, error Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.userToolSessionApprovalKind(), alias: alias(r), }) } @@ -1322,7 +1322,7 @@ func (r UserToolSessionApprovalExtensionPermissionAccess) MarshalJSON() ([]byte, Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.userToolSessionApprovalKind(), alias: alias(r), }) } @@ -1333,7 +1333,7 @@ func (r UserToolSessionApprovalMCP) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.userToolSessionApprovalKind(), alias: alias(r), }) } @@ -1344,7 +1344,7 @@ func (r UserToolSessionApprovalMemory) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.userToolSessionApprovalKind(), alias: alias(r), }) } @@ -1355,7 +1355,7 @@ func (r UserToolSessionApprovalRead) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.userToolSessionApprovalKind(), alias: alias(r), }) } @@ -1366,7 +1366,7 @@ func (r UserToolSessionApprovalWrite) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.userToolSessionApprovalKind(), alias: alias(r), }) } @@ -1397,7 +1397,7 @@ func (r PermissionDecisionApprovedForLocation) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1426,7 +1426,7 @@ func (r PermissionDecisionApprovedForSession) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1520,7 +1520,7 @@ func (r PermissionDecisionApproveForLocationApprovalCommands) MarshalJSON() ([]b Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForLocationApprovalKind(), alias: alias(r), }) } @@ -1531,7 +1531,7 @@ func (r PermissionDecisionApproveForLocationApprovalCustomTool) MarshalJSON() ([ Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForLocationApprovalKind(), alias: alias(r), }) } @@ -1542,7 +1542,7 @@ func (r PermissionDecisionApproveForLocationApprovalExtensionManagement) Marshal Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForLocationApprovalKind(), alias: alias(r), }) } @@ -1553,7 +1553,7 @@ func (r PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) M Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForLocationApprovalKind(), alias: alias(r), }) } @@ -1564,7 +1564,7 @@ func (r PermissionDecisionApproveForLocationApprovalMCP) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForLocationApprovalKind(), alias: alias(r), }) } @@ -1575,7 +1575,7 @@ func (r PermissionDecisionApproveForLocationApprovalMCPSampling) MarshalJSON() ( Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForLocationApprovalKind(), alias: alias(r), }) } @@ -1586,7 +1586,7 @@ func (r PermissionDecisionApproveForLocationApprovalMemory) MarshalJSON() ([]byt Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForLocationApprovalKind(), alias: alias(r), }) } @@ -1597,7 +1597,7 @@ func (r PermissionDecisionApproveForLocationApprovalRead) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForLocationApprovalKind(), alias: alias(r), }) } @@ -1608,7 +1608,7 @@ func (r PermissionDecisionApproveForLocationApprovalWrite) MarshalJSON() ([]byte Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForLocationApprovalKind(), alias: alias(r), }) } @@ -1639,7 +1639,7 @@ func (r PermissionDecisionApproveForLocation) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1733,7 +1733,7 @@ func (r PermissionDecisionApproveForSessionApprovalCommands) MarshalJSON() ([]by Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForSessionApprovalKind(), alias: alias(r), }) } @@ -1744,7 +1744,7 @@ func (r PermissionDecisionApproveForSessionApprovalCustomTool) MarshalJSON() ([] Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForSessionApprovalKind(), alias: alias(r), }) } @@ -1755,7 +1755,7 @@ func (r PermissionDecisionApproveForSessionApprovalExtensionManagement) MarshalJ Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForSessionApprovalKind(), alias: alias(r), }) } @@ -1766,7 +1766,7 @@ func (r PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) Ma Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForSessionApprovalKind(), alias: alias(r), }) } @@ -1777,7 +1777,7 @@ func (r PermissionDecisionApproveForSessionApprovalMCP) MarshalJSON() ([]byte, e Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForSessionApprovalKind(), alias: alias(r), }) } @@ -1788,7 +1788,7 @@ func (r PermissionDecisionApproveForSessionApprovalMCPSampling) MarshalJSON() ([ Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForSessionApprovalKind(), alias: alias(r), }) } @@ -1799,7 +1799,7 @@ func (r PermissionDecisionApproveForSessionApprovalMemory) MarshalJSON() ([]byte Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForSessionApprovalKind(), alias: alias(r), }) } @@ -1810,7 +1810,7 @@ func (r PermissionDecisionApproveForSessionApprovalRead) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForSessionApprovalKind(), alias: alias(r), }) } @@ -1821,7 +1821,7 @@ func (r PermissionDecisionApproveForSessionApprovalWrite) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionApproveForSessionApprovalKind(), alias: alias(r), }) } @@ -1852,7 +1852,7 @@ func (r PermissionDecisionApproveForSession) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1863,7 +1863,7 @@ func (r PermissionDecisionApproveOnce) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1874,7 +1874,7 @@ func (r PermissionDecisionApprovePermanently) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1885,7 +1885,7 @@ func (r PermissionDecisionCancelled) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1896,7 +1896,7 @@ func (r PermissionDecisionDeniedByContentExclusionPolicy) MarshalJSON() ([]byte, Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1907,7 +1907,7 @@ func (r PermissionDecisionDeniedByPermissionRequestHook) MarshalJSON() ([]byte, Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1918,7 +1918,7 @@ func (r PermissionDecisionDeniedByRules) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1929,7 +1929,7 @@ func (r PermissionDecisionDeniedInteractivelyByUser) MarshalJSON() ([]byte, erro Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1940,7 +1940,7 @@ func (r PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) Marsha Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1951,7 +1951,7 @@ func (r PermissionDecisionReject) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -1962,7 +1962,7 @@ func (r PermissionDecisionUserNotAvailable) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionDecisionKind(), alias: alias(r), }) } @@ -2076,7 +2076,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsCommands) MarshalJSON() ([]byt Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), alias: alias(r), }) } @@ -2087,7 +2087,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsCustomTool) MarshalJSON() ([]b Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), alias: alias(r), }) } @@ -2098,7 +2098,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsExtensionManagement) MarshalJS Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), alias: alias(r), }) } @@ -2109,7 +2109,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) Mar Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), alias: alias(r), }) } @@ -2120,7 +2120,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsMCP) MarshalJSON() ([]byte, er Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), alias: alias(r), }) } @@ -2131,7 +2131,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsMCPSampling) MarshalJSON() ([] Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), alias: alias(r), }) } @@ -2142,7 +2142,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsMemory) MarshalJSON() ([]byte, Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), alias: alias(r), }) } @@ -2153,7 +2153,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsRead) MarshalJSON() ([]byte, e Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), alias: alias(r), }) } @@ -2164,7 +2164,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsWrite) MarshalJSON() ([]byte, Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), alias: alias(r), }) } @@ -2260,7 +2260,7 @@ func (r ExtensionContextPushInput) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.pushAttachmentType(), alias: alias(r), }) } @@ -2271,7 +2271,7 @@ func (r PushAttachmentBlob) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.pushAttachmentType(), alias: alias(r), }) } @@ -2282,7 +2282,7 @@ func (r PushAttachmentDirectory) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.pushAttachmentType(), alias: alias(r), }) } @@ -2293,7 +2293,7 @@ func (r PushAttachmentFile) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.pushAttachmentType(), alias: alias(r), }) } @@ -2304,7 +2304,7 @@ func (r PushAttachmentGitHubReference) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.pushAttachmentType(), alias: alias(r), }) } @@ -2315,7 +2315,7 @@ func (r PushAttachmentSelection) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.pushAttachmentType(), alias: alias(r), }) } @@ -2379,7 +2379,7 @@ func (r RemoteControlStatusActive) MarshalJSON() ([]byte, error) { State RemoteControlStatusState `json:"state"` alias }{ - State: r.State(), + State: r.remoteControlStatusState(), alias: alias(r), }) } @@ -2390,7 +2390,7 @@ func (r RemoteControlStatusConnecting) MarshalJSON() ([]byte, error) { State RemoteControlStatusState `json:"state"` alias }{ - State: r.State(), + State: r.remoteControlStatusState(), alias: alias(r), }) } @@ -2401,7 +2401,7 @@ func (r RemoteControlStatusError) MarshalJSON() ([]byte, error) { State RemoteControlStatusState `json:"state"` alias }{ - State: r.State(), + State: r.remoteControlStatusState(), alias: alias(r), }) } @@ -2412,7 +2412,7 @@ func (r RemoteControlStatusOff) MarshalJSON() ([]byte, error) { State RemoteControlStatusState `json:"state"` alias }{ - State: r.State(), + State: r.remoteControlStatusState(), alias: alias(r), }) } @@ -2633,7 +2633,7 @@ func (r LocalSessionMetadataValue) MarshalJSON() ([]byte, error) { IsRemote bool `json:"isRemote"` alias }{ - IsRemote: r.IsRemote(), + IsRemote: r.sessionListEntryIsRemote(), alias: alias(r), }) } @@ -2644,7 +2644,7 @@ func (r RemoteSessionMetadataValue) MarshalJSON() ([]byte, error) { IsRemote bool `json:"isRemote"` alias }{ - IsRemote: r.IsRemote(), + IsRemote: r.sessionListEntryIsRemote(), alias: alias(r), }) } @@ -2859,7 +2859,7 @@ func (r SessionsOpenAttach) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.sessionOpenParamsKind(), alias: alias(r), }) } @@ -2870,7 +2870,7 @@ func (r SessionsOpenCloud) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.sessionOpenParamsKind(), alias: alias(r), }) } @@ -2881,7 +2881,7 @@ func (r SessionsOpenCreate) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.sessionOpenParamsKind(), alias: alias(r), }) } @@ -2892,7 +2892,7 @@ func (r SessionsOpenHandoff) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.sessionOpenParamsKind(), alias: alias(r), }) } @@ -2903,7 +2903,7 @@ func (r SessionsOpenRemote) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.sessionOpenParamsKind(), alias: alias(r), }) } @@ -2914,7 +2914,7 @@ func (r SessionsOpenResume) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.sessionOpenParamsKind(), alias: alias(r), }) } @@ -2925,7 +2925,7 @@ func (r SessionsOpenResumeLast) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.sessionOpenParamsKind(), alias: alias(r), }) } @@ -3007,7 +3007,7 @@ func (r SlashCommandAgentPromptResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.slashCommandInvocationResultKind(), alias: alias(r), }) } @@ -3018,7 +3018,7 @@ func (r SlashCommandCompletedResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.slashCommandInvocationResultKind(), alias: alias(r), }) } @@ -3029,7 +3029,7 @@ func (r SlashCommandSelectSubcommandResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.slashCommandInvocationResultKind(), alias: alias(r), }) } @@ -3040,7 +3040,7 @@ func (r SlashCommandTextResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.slashCommandInvocationResultKind(), alias: alias(r), }) } @@ -3092,7 +3092,7 @@ func (r TaskAgentInfo) MarshalJSON() ([]byte, error) { Type TaskInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.taskInfoType(), alias: alias(r), }) } @@ -3103,7 +3103,7 @@ func (r TaskShellInfo) MarshalJSON() ([]byte, error) { Type TaskInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.taskInfoType(), alias: alias(r), }) } @@ -3176,7 +3176,7 @@ func (r TaskAgentProgress) MarshalJSON() ([]byte, error) { Type TaskProgressType `json:"type"` alias }{ - Type: r.Type(), + Type: r.taskProgressType(), alias: alias(r), }) } @@ -3187,7 +3187,7 @@ func (r TaskShellProgress) MarshalJSON() ([]byte, error) { Type TaskProgressType `json:"type"` alias }{ - Type: r.Type(), + Type: r.taskProgressType(), alias: alias(r), }) } @@ -3474,7 +3474,7 @@ func (r UIElicitationArrayAnyOfField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.uiElicitationSchemaPropertyType(), alias: alias(r), }) } @@ -3485,7 +3485,7 @@ func (r UIElicitationArrayEnumField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.uiElicitationSchemaPropertyType(), alias: alias(r), }) } @@ -3496,7 +3496,7 @@ func (r UIElicitationSchemaPropertyBoolean) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.uiElicitationSchemaPropertyType(), alias: alias(r), }) } @@ -3507,7 +3507,7 @@ func (r UIElicitationSchemaPropertyNumber) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.uiElicitationSchemaPropertyType(), alias: alias(r), }) } @@ -3518,7 +3518,7 @@ func (r UIElicitationSchemaPropertyString) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.uiElicitationSchemaPropertyType(), alias: alias(r), }) } @@ -3529,7 +3529,7 @@ func (r UIElicitationStringEnumField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.uiElicitationSchemaPropertyType(), alias: alias(r), }) } @@ -3540,7 +3540,7 @@ func (r UIElicitationStringOneOfField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.uiElicitationSchemaPropertyType(), alias: alias(r), }) } diff --git a/go/rpc/zsession_encoding.go b/go/rpc/zsession_encoding.go index c9091edc5..a9bcd3d83 100644 --- a/go/rpc/zsession_encoding.go +++ b/go/rpc/zsession_encoding.go @@ -714,7 +714,7 @@ func (r ToolExecutionCompleteContentAudio) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.toolExecutionCompleteContentType(), alias: alias(r), }) } @@ -725,7 +725,7 @@ func (r ToolExecutionCompleteContentImage) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.toolExecutionCompleteContentType(), alias: alias(r), }) } @@ -798,7 +798,7 @@ func (r ToolExecutionCompleteContentResource) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.toolExecutionCompleteContentType(), alias: alias(r), }) } @@ -809,7 +809,7 @@ func (r ToolExecutionCompleteContentResourceLink) MarshalJSON() ([]byte, error) Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.toolExecutionCompleteContentType(), alias: alias(r), }) } @@ -820,7 +820,7 @@ func (r ToolExecutionCompleteContentTerminal) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.toolExecutionCompleteContentType(), alias: alias(r), }) } @@ -831,7 +831,7 @@ func (r ToolExecutionCompleteContentText) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.toolExecutionCompleteContentType(), alias: alias(r), }) } @@ -934,7 +934,7 @@ func (r SystemNotificationAgentCompleted) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.systemNotificationType(), alias: alias(r), }) } @@ -945,7 +945,7 @@ func (r SystemNotificationAgentIdle) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.systemNotificationType(), alias: alias(r), }) } @@ -956,7 +956,7 @@ func (r SystemNotificationInstructionDiscovered) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.systemNotificationType(), alias: alias(r), }) } @@ -967,7 +967,7 @@ func (r SystemNotificationNewInboxMessage) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.systemNotificationType(), alias: alias(r), }) } @@ -978,7 +978,7 @@ func (r SystemNotificationShellCompleted) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.systemNotificationType(), alias: alias(r), }) } @@ -989,7 +989,7 @@ func (r SystemNotificationShellDetachedCompleted) MarshalJSON() ([]byte, error) Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.systemNotificationType(), alias: alias(r), }) } @@ -1109,7 +1109,7 @@ func (r PermissionRequestCustomTool) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionRequestKind(), alias: alias(r), }) } @@ -1120,7 +1120,7 @@ func (r PermissionRequestExtensionManagement) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionRequestKind(), alias: alias(r), }) } @@ -1131,7 +1131,7 @@ func (r PermissionRequestExtensionPermissionAccess) MarshalJSON() ([]byte, error Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionRequestKind(), alias: alias(r), }) } @@ -1142,7 +1142,7 @@ func (r PermissionRequestHook) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionRequestKind(), alias: alias(r), }) } @@ -1153,7 +1153,7 @@ func (r PermissionRequestMCP) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionRequestKind(), alias: alias(r), }) } @@ -1164,7 +1164,7 @@ func (r PermissionRequestMemory) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionRequestKind(), alias: alias(r), }) } @@ -1175,7 +1175,7 @@ func (r PermissionRequestRead) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionRequestKind(), alias: alias(r), }) } @@ -1186,7 +1186,7 @@ func (r PermissionRequestShell) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionRequestKind(), alias: alias(r), }) } @@ -1197,7 +1197,7 @@ func (r PermissionRequestURL) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionRequestKind(), alias: alias(r), }) } @@ -1208,7 +1208,7 @@ func (r PermissionRequestWrite) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionRequestKind(), alias: alias(r), }) } @@ -1314,7 +1314,7 @@ func (r PermissionPromptRequestCommands) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionPromptRequestKind(), alias: alias(r), }) } @@ -1325,7 +1325,7 @@ func (r PermissionPromptRequestCustomTool) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionPromptRequestKind(), alias: alias(r), }) } @@ -1336,7 +1336,7 @@ func (r PermissionPromptRequestExtensionManagement) MarshalJSON() ([]byte, error Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionPromptRequestKind(), alias: alias(r), }) } @@ -1347,7 +1347,7 @@ func (r PermissionPromptRequestExtensionPermissionAccess) MarshalJSON() ([]byte, Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionPromptRequestKind(), alias: alias(r), }) } @@ -1358,7 +1358,7 @@ func (r PermissionPromptRequestHook) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionPromptRequestKind(), alias: alias(r), }) } @@ -1369,7 +1369,7 @@ func (r PermissionPromptRequestMCP) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionPromptRequestKind(), alias: alias(r), }) } @@ -1380,7 +1380,7 @@ func (r PermissionPromptRequestMemory) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionPromptRequestKind(), alias: alias(r), }) } @@ -1391,7 +1391,7 @@ func (r PermissionPromptRequestPath) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionPromptRequestKind(), alias: alias(r), }) } @@ -1402,7 +1402,7 @@ func (r PermissionPromptRequestRead) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionPromptRequestKind(), alias: alias(r), }) } @@ -1413,7 +1413,7 @@ func (r PermissionPromptRequestURL) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionPromptRequestKind(), alias: alias(r), }) } @@ -1424,7 +1424,7 @@ func (r PermissionPromptRequestWrite) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionPromptRequestKind(), alias: alias(r), }) } @@ -1548,7 +1548,7 @@ func (r PermissionApproved) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionResultKind(), alias: alias(r), }) } @@ -1579,7 +1579,7 @@ func (r PermissionApprovedForLocation) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionResultKind(), alias: alias(r), }) } @@ -1608,7 +1608,7 @@ func (r PermissionApprovedForSession) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionResultKind(), alias: alias(r), }) } @@ -1619,7 +1619,7 @@ func (r PermissionCancelled) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionResultKind(), alias: alias(r), }) } @@ -1630,7 +1630,7 @@ func (r PermissionDeniedByContentExclusionPolicy) MarshalJSON() ([]byte, error) Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionResultKind(), alias: alias(r), }) } @@ -1641,7 +1641,7 @@ func (r PermissionDeniedByPermissionRequestHook) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionResultKind(), alias: alias(r), }) } @@ -1652,7 +1652,7 @@ func (r PermissionDeniedByRules) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionResultKind(), alias: alias(r), }) } @@ -1663,7 +1663,7 @@ func (r PermissionDeniedInteractivelyByUser) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionResultKind(), alias: alias(r), }) } @@ -1674,7 +1674,7 @@ func (r PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser) MarshalJSON() Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.permissionResultKind(), alias: alias(r), }) } diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go index 5148d46c3..101a76581 100644 --- a/go/rpc/zsession_events.go +++ b/go/rpc/zsession_events.go @@ -1914,7 +1914,7 @@ type MCPServersLoadedServer struct { // Derived user-facing permission prompt details for UI consumers type PermissionPromptRequest interface { permissionPromptRequest() - Kind() PermissionPromptRequestKind + permissionPromptRequestKind() PermissionPromptRequestKind } type RawPermissionPromptRequest struct { @@ -1923,7 +1923,7 @@ type RawPermissionPromptRequest struct { } func (RawPermissionPromptRequest) permissionPromptRequest() {} -func (r RawPermissionPromptRequest) Kind() PermissionPromptRequestKind { +func (r RawPermissionPromptRequest) permissionPromptRequestKind() PermissionPromptRequestKind { return r.Discriminator } @@ -1944,7 +1944,7 @@ type PermissionPromptRequestCommands struct { } func (PermissionPromptRequestCommands) permissionPromptRequest() {} -func (PermissionPromptRequestCommands) Kind() PermissionPromptRequestKind { +func (PermissionPromptRequestCommands) permissionPromptRequestKind() PermissionPromptRequestKind { return PermissionPromptRequestKindCommands } @@ -1961,7 +1961,7 @@ type PermissionPromptRequestCustomTool struct { } func (PermissionPromptRequestCustomTool) permissionPromptRequest() {} -func (PermissionPromptRequestCustomTool) Kind() PermissionPromptRequestKind { +func (PermissionPromptRequestCustomTool) permissionPromptRequestKind() PermissionPromptRequestKind { return PermissionPromptRequestKindCustomTool } @@ -1976,7 +1976,7 @@ type PermissionPromptRequestExtensionManagement struct { } func (PermissionPromptRequestExtensionManagement) permissionPromptRequest() {} -func (PermissionPromptRequestExtensionManagement) Kind() PermissionPromptRequestKind { +func (PermissionPromptRequestExtensionManagement) permissionPromptRequestKind() PermissionPromptRequestKind { return PermissionPromptRequestKindExtensionManagement } @@ -1991,7 +1991,7 @@ type PermissionPromptRequestExtensionPermissionAccess struct { } func (PermissionPromptRequestExtensionPermissionAccess) permissionPromptRequest() {} -func (PermissionPromptRequestExtensionPermissionAccess) Kind() PermissionPromptRequestKind { +func (PermissionPromptRequestExtensionPermissionAccess) permissionPromptRequestKind() PermissionPromptRequestKind { return PermissionPromptRequestKindExtensionPermissionAccess } @@ -2008,7 +2008,7 @@ type PermissionPromptRequestHook struct { } func (PermissionPromptRequestHook) permissionPromptRequest() {} -func (PermissionPromptRequestHook) Kind() PermissionPromptRequestKind { +func (PermissionPromptRequestHook) permissionPromptRequestKind() PermissionPromptRequestKind { return PermissionPromptRequestKindHook } @@ -2027,7 +2027,7 @@ type PermissionPromptRequestMCP struct { } func (PermissionPromptRequestMCP) permissionPromptRequest() {} -func (PermissionPromptRequestMCP) Kind() PermissionPromptRequestKind { +func (PermissionPromptRequestMCP) permissionPromptRequestKind() PermissionPromptRequestKind { return PermissionPromptRequestKindMCP } @@ -2050,7 +2050,7 @@ type PermissionPromptRequestMemory struct { } func (PermissionPromptRequestMemory) permissionPromptRequest() {} -func (PermissionPromptRequestMemory) Kind() PermissionPromptRequestKind { +func (PermissionPromptRequestMemory) permissionPromptRequestKind() PermissionPromptRequestKind { return PermissionPromptRequestKindMemory } @@ -2065,7 +2065,7 @@ type PermissionPromptRequestPath struct { } func (PermissionPromptRequestPath) permissionPromptRequest() {} -func (PermissionPromptRequestPath) Kind() PermissionPromptRequestKind { +func (PermissionPromptRequestPath) permissionPromptRequestKind() PermissionPromptRequestKind { return PermissionPromptRequestKindPath } @@ -2080,7 +2080,7 @@ type PermissionPromptRequestRead struct { } func (PermissionPromptRequestRead) permissionPromptRequest() {} -func (PermissionPromptRequestRead) Kind() PermissionPromptRequestKind { +func (PermissionPromptRequestRead) permissionPromptRequestKind() PermissionPromptRequestKind { return PermissionPromptRequestKindRead } @@ -2095,7 +2095,7 @@ type PermissionPromptRequestURL struct { } func (PermissionPromptRequestURL) permissionPromptRequest() {} -func (PermissionPromptRequestURL) Kind() PermissionPromptRequestKind { +func (PermissionPromptRequestURL) permissionPromptRequestKind() PermissionPromptRequestKind { return PermissionPromptRequestKindURL } @@ -2116,14 +2116,14 @@ type PermissionPromptRequestWrite struct { } func (PermissionPromptRequestWrite) permissionPromptRequest() {} -func (PermissionPromptRequestWrite) Kind() PermissionPromptRequestKind { +func (PermissionPromptRequestWrite) permissionPromptRequestKind() PermissionPromptRequestKind { return PermissionPromptRequestKindWrite } // Details of the permission being requested type PermissionRequest interface { permissionRequest() - Kind() PermissionRequestKind + permissionRequestKind() PermissionRequestKind } type RawPermissionRequest struct { @@ -2132,7 +2132,7 @@ type RawPermissionRequest struct { } func (RawPermissionRequest) permissionRequest() {} -func (r RawPermissionRequest) Kind() PermissionRequestKind { +func (r RawPermissionRequest) permissionRequestKind() PermissionRequestKind { return r.Discriminator } @@ -2149,7 +2149,7 @@ type PermissionRequestCustomTool struct { } func (PermissionRequestCustomTool) permissionRequest() {} -func (PermissionRequestCustomTool) Kind() PermissionRequestKind { +func (PermissionRequestCustomTool) permissionRequestKind() PermissionRequestKind { return PermissionRequestKindCustomTool } @@ -2164,7 +2164,7 @@ type PermissionRequestExtensionManagement struct { } func (PermissionRequestExtensionManagement) permissionRequest() {} -func (PermissionRequestExtensionManagement) Kind() PermissionRequestKind { +func (PermissionRequestExtensionManagement) permissionRequestKind() PermissionRequestKind { return PermissionRequestKindExtensionManagement } @@ -2179,7 +2179,7 @@ type PermissionRequestExtensionPermissionAccess struct { } func (PermissionRequestExtensionPermissionAccess) permissionRequest() {} -func (PermissionRequestExtensionPermissionAccess) Kind() PermissionRequestKind { +func (PermissionRequestExtensionPermissionAccess) permissionRequestKind() PermissionRequestKind { return PermissionRequestKindExtensionPermissionAccess } @@ -2196,7 +2196,7 @@ type PermissionRequestHook struct { } func (PermissionRequestHook) permissionRequest() {} -func (PermissionRequestHook) Kind() PermissionRequestKind { +func (PermissionRequestHook) permissionRequestKind() PermissionRequestKind { return PermissionRequestKindHook } @@ -2217,7 +2217,7 @@ type PermissionRequestMCP struct { } func (PermissionRequestMCP) permissionRequest() {} -func (PermissionRequestMCP) Kind() PermissionRequestKind { +func (PermissionRequestMCP) permissionRequestKind() PermissionRequestKind { return PermissionRequestKindMCP } @@ -2240,7 +2240,7 @@ type PermissionRequestMemory struct { } func (PermissionRequestMemory) permissionRequest() {} -func (PermissionRequestMemory) Kind() PermissionRequestKind { +func (PermissionRequestMemory) permissionRequestKind() PermissionRequestKind { return PermissionRequestKindMemory } @@ -2255,7 +2255,7 @@ type PermissionRequestRead struct { } func (PermissionRequestRead) permissionRequest() {} -func (PermissionRequestRead) Kind() PermissionRequestKind { +func (PermissionRequestRead) permissionRequestKind() PermissionRequestKind { return PermissionRequestKindRead } @@ -2282,7 +2282,7 @@ type PermissionRequestShell struct { } func (PermissionRequestShell) permissionRequest() {} -func (PermissionRequestShell) Kind() PermissionRequestKind { +func (PermissionRequestShell) permissionRequestKind() PermissionRequestKind { return PermissionRequestKindShell } @@ -2297,7 +2297,7 @@ type PermissionRequestURL struct { } func (PermissionRequestURL) permissionRequest() {} -func (PermissionRequestURL) Kind() PermissionRequestKind { +func (PermissionRequestURL) permissionRequestKind() PermissionRequestKind { return PermissionRequestKindURL } @@ -2318,7 +2318,7 @@ type PermissionRequestWrite struct { } func (PermissionRequestWrite) permissionRequest() {} -func (PermissionRequestWrite) Kind() PermissionRequestKind { +func (PermissionRequestWrite) permissionRequestKind() PermissionRequestKind { return PermissionRequestKindWrite } @@ -2339,7 +2339,7 @@ type PermissionRequestShellPossibleURL struct { // The result of the permission request type PermissionResult interface { permissionResult() - Kind() PermissionResultKind + permissionResultKind() PermissionResultKind } type RawPermissionResult struct { @@ -2348,7 +2348,7 @@ type RawPermissionResult struct { } func (RawPermissionResult) permissionResult() {} -func (r RawPermissionResult) Kind() PermissionResultKind { +func (r RawPermissionResult) permissionResultKind() PermissionResultKind { return r.Discriminator } @@ -2357,7 +2357,7 @@ type PermissionApproved struct { } func (PermissionApproved) permissionResult() {} -func (PermissionApproved) Kind() PermissionResultKind { +func (PermissionApproved) permissionResultKind() PermissionResultKind { return PermissionResultKindApproved } @@ -2370,7 +2370,7 @@ type PermissionApprovedForLocation struct { } func (PermissionApprovedForLocation) permissionResult() {} -func (PermissionApprovedForLocation) Kind() PermissionResultKind { +func (PermissionApprovedForLocation) permissionResultKind() PermissionResultKind { return PermissionResultKindApprovedForLocation } @@ -2381,7 +2381,7 @@ type PermissionApprovedForSession struct { } func (PermissionApprovedForSession) permissionResult() {} -func (PermissionApprovedForSession) Kind() PermissionResultKind { +func (PermissionApprovedForSession) permissionResultKind() PermissionResultKind { return PermissionResultKindApprovedForSession } @@ -2392,7 +2392,7 @@ type PermissionCancelled struct { } func (PermissionCancelled) permissionResult() {} -func (PermissionCancelled) Kind() PermissionResultKind { +func (PermissionCancelled) permissionResultKind() PermissionResultKind { return PermissionResultKindCancelled } @@ -2405,7 +2405,7 @@ type PermissionDeniedByContentExclusionPolicy struct { } func (PermissionDeniedByContentExclusionPolicy) permissionResult() {} -func (PermissionDeniedByContentExclusionPolicy) Kind() PermissionResultKind { +func (PermissionDeniedByContentExclusionPolicy) permissionResultKind() PermissionResultKind { return PermissionResultKindDeniedByContentExclusionPolicy } @@ -2418,7 +2418,7 @@ type PermissionDeniedByPermissionRequestHook struct { } func (PermissionDeniedByPermissionRequestHook) permissionResult() {} -func (PermissionDeniedByPermissionRequestHook) Kind() PermissionResultKind { +func (PermissionDeniedByPermissionRequestHook) permissionResultKind() PermissionResultKind { return PermissionResultKindDeniedByPermissionRequestHook } @@ -2429,7 +2429,7 @@ type PermissionDeniedByRules struct { } func (PermissionDeniedByRules) permissionResult() {} -func (PermissionDeniedByRules) Kind() PermissionResultKind { +func (PermissionDeniedByRules) permissionResultKind() PermissionResultKind { return PermissionResultKindDeniedByRules } @@ -2442,7 +2442,7 @@ type PermissionDeniedInteractivelyByUser struct { } func (PermissionDeniedInteractivelyByUser) permissionResult() {} -func (PermissionDeniedInteractivelyByUser) Kind() PermissionResultKind { +func (PermissionDeniedInteractivelyByUser) permissionResultKind() PermissionResultKind { return PermissionResultKindDeniedInteractivelyByUser } @@ -2451,7 +2451,7 @@ type PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser struct { } func (PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser) permissionResult() {} -func (PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser) Kind() PermissionResultKind { +func (PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser) permissionResultKind() PermissionResultKind { return PermissionResultKindDeniedNoApprovalRuleAndCouldNotRequestFromUser } @@ -2541,7 +2541,7 @@ type SystemMessageMetadata struct { // Structured metadata identifying what triggered this notification type SystemNotification interface { systemNotification() - Type() SystemNotificationType + systemNotificationType() SystemNotificationType } type RawSystemNotification struct { @@ -2550,7 +2550,7 @@ type RawSystemNotification struct { } func (RawSystemNotification) systemNotification() {} -func (r RawSystemNotification) Type() SystemNotificationType { +func (r RawSystemNotification) systemNotificationType() SystemNotificationType { return r.Discriminator } @@ -2569,7 +2569,7 @@ type SystemNotificationAgentCompleted struct { } func (SystemNotificationAgentCompleted) systemNotification() {} -func (SystemNotificationAgentCompleted) Type() SystemNotificationType { +func (SystemNotificationAgentCompleted) systemNotificationType() SystemNotificationType { return SystemNotificationTypeAgentCompleted } @@ -2584,7 +2584,7 @@ type SystemNotificationAgentIdle struct { } func (SystemNotificationAgentIdle) systemNotification() {} -func (SystemNotificationAgentIdle) Type() SystemNotificationType { +func (SystemNotificationAgentIdle) systemNotificationType() SystemNotificationType { return SystemNotificationTypeAgentIdle } @@ -2601,7 +2601,7 @@ type SystemNotificationInstructionDiscovered struct { } func (SystemNotificationInstructionDiscovered) systemNotification() {} -func (SystemNotificationInstructionDiscovered) Type() SystemNotificationType { +func (SystemNotificationInstructionDiscovered) systemNotificationType() SystemNotificationType { return SystemNotificationTypeInstructionDiscovered } @@ -2618,7 +2618,7 @@ type SystemNotificationNewInboxMessage struct { } func (SystemNotificationNewInboxMessage) systemNotification() {} -func (SystemNotificationNewInboxMessage) Type() SystemNotificationType { +func (SystemNotificationNewInboxMessage) systemNotificationType() SystemNotificationType { return SystemNotificationTypeNewInboxMessage } @@ -2633,7 +2633,7 @@ type SystemNotificationShellCompleted struct { } func (SystemNotificationShellCompleted) systemNotification() {} -func (SystemNotificationShellCompleted) Type() SystemNotificationType { +func (SystemNotificationShellCompleted) systemNotificationType() SystemNotificationType { return SystemNotificationTypeShellCompleted } @@ -2646,14 +2646,14 @@ type SystemNotificationShellDetachedCompleted struct { } func (SystemNotificationShellDetachedCompleted) systemNotification() {} -func (SystemNotificationShellDetachedCompleted) Type() SystemNotificationType { +func (SystemNotificationShellDetachedCompleted) systemNotificationType() SystemNotificationType { return SystemNotificationTypeShellDetachedCompleted } // A content block within a tool result, which may be text, terminal output, image, audio, or a resource type ToolExecutionCompleteContent interface { toolExecutionCompleteContent() - Type() ToolExecutionCompleteContentType + toolExecutionCompleteContentType() ToolExecutionCompleteContentType } type RawToolExecutionCompleteContent struct { @@ -2662,7 +2662,7 @@ type RawToolExecutionCompleteContent struct { } func (RawToolExecutionCompleteContent) toolExecutionCompleteContent() {} -func (r RawToolExecutionCompleteContent) Type() ToolExecutionCompleteContentType { +func (r RawToolExecutionCompleteContent) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { return r.Discriminator } @@ -2675,7 +2675,7 @@ type ToolExecutionCompleteContentAudio struct { } func (ToolExecutionCompleteContentAudio) toolExecutionCompleteContent() {} -func (ToolExecutionCompleteContentAudio) Type() ToolExecutionCompleteContentType { +func (ToolExecutionCompleteContentAudio) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeAudio } @@ -2688,7 +2688,7 @@ type ToolExecutionCompleteContentImage struct { } func (ToolExecutionCompleteContentImage) toolExecutionCompleteContent() {} -func (ToolExecutionCompleteContentImage) Type() ToolExecutionCompleteContentType { +func (ToolExecutionCompleteContentImage) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeImage } @@ -2699,7 +2699,7 @@ type ToolExecutionCompleteContentResource struct { } func (ToolExecutionCompleteContentResource) toolExecutionCompleteContent() {} -func (ToolExecutionCompleteContentResource) Type() ToolExecutionCompleteContentType { +func (ToolExecutionCompleteContentResource) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeResource } @@ -2722,7 +2722,7 @@ type ToolExecutionCompleteContentResourceLink struct { } func (ToolExecutionCompleteContentResourceLink) toolExecutionCompleteContent() {} -func (ToolExecutionCompleteContentResourceLink) Type() ToolExecutionCompleteContentType { +func (ToolExecutionCompleteContentResourceLink) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeResourceLink } @@ -2737,7 +2737,7 @@ type ToolExecutionCompleteContentTerminal struct { } func (ToolExecutionCompleteContentTerminal) toolExecutionCompleteContent() {} -func (ToolExecutionCompleteContentTerminal) Type() ToolExecutionCompleteContentType { +func (ToolExecutionCompleteContentTerminal) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeTerminal } @@ -2748,7 +2748,7 @@ type ToolExecutionCompleteContentText struct { } func (ToolExecutionCompleteContentText) toolExecutionCompleteContent() {} -func (ToolExecutionCompleteContentText) Type() ToolExecutionCompleteContentType { +func (ToolExecutionCompleteContentText) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeText } diff --git a/java/src/main/java/com/github/copilot/CopilotClient.java b/java/src/main/java/com/github/copilot/CopilotClient.java index 9e4a776ad..4fe4143f9 100644 --- a/java/src/main/java/com/github/copilot/CopilotClient.java +++ b/java/src/main/java/com/github/copilot/CopilotClient.java @@ -798,7 +798,9 @@ CompletableFuture updateSessionOptionsForMode(CopilotSession session, Bool var params = new SessionOptionsUpdateParams(null, // sessionId — set by SessionOptionsApi null, // model + null, // modelCapabilitiesOverrides null, // reasoningEffort + null, // reasoningSummary null, // clientName null, // lspClientName null, // integrationId @@ -835,12 +837,14 @@ CompletableFuture updateSessionOptionsForMode(CopilotSession session, Bool null, // eventsLogDirectory null, // additionalContentExclusionPolicies patchSchedule, // manageScheduleEnabled + null, // sessionCapabilities null, // skipEmbeddingRetrieval null, // organizationCustomInstructions null, // enableFileHooks null, // enableHostGitOperations null, // enableSessionStore - null // enableSkills + null, // enableSkills + null // contextTier ); return session.getRpc().options.update(params).thenCompose(result -> { diff --git a/java/src/test/java/com/github/copilot/SessionEventHandlingTest.java b/java/src/test/java/com/github/copilot/SessionEventHandlingTest.java index 17c2c59cf..3ca56b817 100644 --- a/java/src/test/java/com/github/copilot/SessionEventHandlingTest.java +++ b/java/src/test/java/com/github/copilot/SessionEventHandlingTest.java @@ -865,7 +865,7 @@ private SessionStartEvent createSessionStartEvent(String sessionId) { private AssistantMessageEvent createAssistantMessageEvent(String content) { var event = new AssistantMessageEvent(); var data = new AssistantMessageEvent.AssistantMessageEventData(null, null, content, null, null, null, null, - null, null, null, null, null, null, null, null, null); + null, null, null, null, null, null, null, null, null, null); event.setData(data); return event; } diff --git a/java/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java b/java/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java index ce8238dec..4ed98c269 100644 --- a/java/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java +++ b/java/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java @@ -678,7 +678,7 @@ void sessionMcpEnableResult_empty() { @Test void sessionMcpListResult_nested() { var server = new McpServer("my-mcp", McpServerStatus.CONNECTED, McpServerSource.USER, null); - var result = new SessionMcpListResult(List.of(server)); + var result = new SessionMcpListResult(List.of(server), null); assertEquals(1, result.servers().size()); assertEquals("my-mcp", result.servers().get(0).name()); assertEquals(McpServerStatus.CONNECTED, result.servers().get(0).status()); diff --git a/nodejs/test/e2e/rpc_remote.e2e.test.ts b/nodejs/test/e2e/rpc_remote.e2e.test.ts index e0f1c68a5..fe4af0d2a 100644 --- a/nodejs/test/e2e/rpc_remote.e2e.test.ts +++ b/nodejs/test/e2e/rpc_remote.e2e.test.ts @@ -62,14 +62,6 @@ describe("Session remote RPC", async () => { ), { timeoutMessage: "Timed out waiting for remote steerable=true event." } ); - expect( - ( - await client.rpc.sessions.getPersistedRemoteSteerable({ - sessionId: session.sessionId, - }) - ).remoteSteerable - ).toBe(true); - await session.rpc.remote.notifySteerableChanged({ remoteSteerable: false }); await waitForCondition( async () => @@ -78,15 +70,8 @@ describe("Session remote RPC", async () => { event.type === "session.remote_steerable_changed" && event.data.remoteSteerable === false ), - { timeoutMessage: "Timed out waiting for remote steerable=false event." } + { timeoutMessage: "Timed out waiting for remote steerable=false event." } ); - expect( - ( - await client.rpc.sessions.getPersistedRemoteSteerable({ - sessionId: session.sessionId, - }) - ).remoteSteerable - ).toBe(false); } finally { await session.disconnect(); } diff --git a/nodejs/test/e2e/rpc_server.e2e.test.ts b/nodejs/test/e2e/rpc_server.e2e.test.ts index 9685a21d0..3d4b00c96 100644 --- a/nodejs/test/e2e/rpc_server.e2e.test.ts +++ b/nodejs/test/e2e/rpc_server.e2e.test.ts @@ -92,16 +92,8 @@ describe("Server-scoped RPC", async () => { return directory; } - async function saveAndGetEventFilePath( - targetClient: CopilotClient, - sessionId: string - ): Promise { + async function saveSession(targetClient: CopilotClient, sessionId: string): Promise { await expect(targetClient.rpc.sessions.save({ sessionId })).resolves.toBeDefined(); - const pathResult = await targetClient.rpc.sessions.getEventFilePath({ sessionId }); - expect(pathResult.filePath.trim()).toBeTruthy(); - expect(path.isAbsolute(pathResult.filePath)).toBe(true); - expect(path.basename(pathResult.filePath)).toBe("events.jsonl"); - return pathResult.filePath; } it("should call rpc ping with typed params and result", async () => { @@ -199,8 +191,7 @@ describe("Server-scoped RPC", async () => { }); try { await session.log("SERVER_RPC_LIST_READY"); - const eventFilePath = await saveAndGetEventFilePath(client, sessionId); - expect(eventFilePath.toLowerCase()).toContain(sessionId.toLowerCase()); + await saveSession(client, sessionId); await client.rpc.sessions.close({ sessionId }); closed = true; @@ -242,11 +233,6 @@ describe("Server-scoped RPC", async () => { sessionIds: [sessionId, missingSessionId], }); expect(inUse.inUse).not.toContain(missingSessionId); - - const remoteSteerable = await client.rpc.sessions.getPersistedRemoteSteerable({ - sessionId, - }); - expect(remoteSteerable.remoteSteerable).toBeUndefined(); } finally { if (closed) { await client.rpc.sessions.bulkDelete({ sessionIds: [sessionId] }); @@ -265,7 +251,7 @@ describe("Server-scoped RPC", async () => { onPermissionRequest: () => ({ kind: "approve-once" }), }); try { - await saveAndGetEventFilePath(client, sessionId); + await saveSession(client, sessionId); const now = new Date().toISOString(); const result = await client.rpc.sessions.enrichMetadata({ @@ -300,7 +286,7 @@ describe("Server-scoped RPC", async () => { }); await session.log("SERVER_RPC_CLOSE_READY"); - await saveAndGetEventFilePath(client, sessionId); + await saveSession(client, sessionId); await expect(client.rpc.sessions.close({ sessionId })).resolves.toBeDefined(); await expect(client.rpc.sessions.releaseLock({ sessionId })).resolves.toBeDefined(); @@ -320,7 +306,7 @@ describe("Server-scoped RPC", async () => { onPermissionRequest: () => ({ kind: "approve-once" }), }); - await saveAndGetEventFilePath(client, sessionId); + await saveSession(client, sessionId); await client.rpc.sessions.close({ sessionId }); const prune = await client.rpc.sessions.pruneOld({ diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py index b04b4a0b5..718160179 100644 --- a/python/copilot/generated/rpc.py +++ b/python/copilot/generated/rpc.py @@ -15217,13 +15217,13 @@ def to_dict(self) -> dict: class MCPRestartServerRequest: """Server name and opaque configuration for an individual MCP server restart.""" + server_name: str + """Name of the MCP server to restart""" + config: Any = None """Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime shape supplied only by in-process CLI callers. """ - server_name: str - """Name of the MCP server to restart""" - @staticmethod def from_dict(obj: Any) -> 'MCPRestartServerRequest': assert isinstance(obj, dict) @@ -15243,13 +15243,13 @@ def to_dict(self) -> dict: class MCPStartServerRequest: """Server name and opaque configuration for an individual MCP server start.""" + server_name: str + """Name of the MCP server to start""" + config: Any = None """Opaque server configuration (MCPServerConfig). Marked internal: an in-process runtime shape supplied only by in-process CLI callers. """ - server_name: str - """Name of the MCP server to start""" - @staticmethod def from_dict(obj: Any) -> 'MCPStartServerRequest': assert isinstance(obj, dict) @@ -18560,6 +18560,9 @@ def to_dict(self) -> dict: class MCPRegisterExternalClientRequest: """Registration parameters for an external MCP client.""" + server_name: str + """Logical server name for the external client""" + client: Any = None """In-process MCP Client instance. Marked internal: cannot be serialized across the JSON-RPC boundary. @@ -18568,9 +18571,6 @@ class MCPRegisterExternalClientRequest: """In-process server config (MCPServerConfig) paired with the in-process client/transport. Marked internal alongside its companions. """ - server_name: str - """Logical server name for the external client""" - transport: Any = None """In-process MCP Transport instance. Marked internal: cannot be serialized across the JSON-RPC boundary. diff --git a/python/e2e/test_rpc_remote_e2e.py b/python/e2e/test_rpc_remote_e2e.py index 8f7f61b78..0d60c368c 100644 --- a/python/e2e/test_rpc_remote_e2e.py +++ b/python/e2e/test_rpc_remote_e2e.py @@ -11,7 +11,6 @@ RemoteEnableRequest, RemoteNotifySteerableChangedRequest, RemoteSessionMode, - SessionsGetPersistedRemoteSteerableRequest, ) from copilot.session import PermissionHandler from copilot.session_events import SessionRemoteSteerableChangedData @@ -78,18 +77,10 @@ async def test_notify_steerable_changed_event_and_persist_flag(self, ctx: E2ETes RemoteNotifySteerableChangedRequest(remote_steerable=True) ) await _wait_for_remote_steerable_event(session, True) - persisted = await ctx.client.rpc.sessions.get_persisted_remote_steerable( - SessionsGetPersistedRemoteSteerableRequest(session_id=session.session_id) - ) - assert persisted.remote_steerable is True await session.rpc.remote.notify_steerable_changed( RemoteNotifySteerableChangedRequest(remote_steerable=False) ) await _wait_for_remote_steerable_event(session, False) - persisted = await ctx.client.rpc.sessions.get_persisted_remote_steerable( - SessionsGetPersistedRemoteSteerableRequest(session_id=session.session_id) - ) - assert persisted.remote_steerable is False finally: await session.disconnect() diff --git a/python/e2e/test_rpc_server_e2e.py b/python/e2e/test_rpc_server_e2e.py index cdcf8e95c..0610bf19d 100644 --- a/python/e2e/test_rpc_server_e2e.py +++ b/python/e2e/test_rpc_server_e2e.py @@ -26,16 +26,14 @@ SessionFSSetProviderConventions, SessionFSSetProviderRequest, SessionListFilter, - SessionMetadata, + LocalSessionMetadataValue, SessionsBulkDeleteRequest, SessionsCheckInUseRequest, SessionsCloseRequest, SessionsEnrichMetadataRequest, SessionsFindByPrefixRequest, SessionsFindByTaskIDRequest, - SessionsGetEventFilePathRequest, SessionsGetLastForContextRequest, - SessionsGetPersistedRemoteSteerableRequest, SessionsListRequest, SessionsLoadDeferredRepoHooksRequest, SessionsPruneOldRequest, @@ -249,14 +247,6 @@ async def test_should_list_find_and_inspect_persisted_session_state(self, ctx: E save = await ctx.client.rpc.sessions.save(SessionsSaveRequest(session_id=session_id)) assert save is not None - event_path = await ctx.client.rpc.sessions.get_event_file_path( - SessionsGetEventFilePathRequest(session_id=session_id) - ) - assert event_path.file_path - assert os.path.isabs(event_path.file_path) - assert os.path.basename(event_path.file_path) == "events.jsonl" - assert session_id.lower() in event_path.file_path.lower() - listed = await ctx.client.rpc.sessions.list( SessionsListRequest( filter=SessionListFilter(cwd=str(working_directory)), @@ -295,11 +285,6 @@ async def test_should_list_find_and_inspect_persisted_session_state(self, ctx: E SessionsCheckInUseRequest(session_ids=[session_id, missing_session_id]) ) assert missing_session_id not in in_use.in_use - - remote_steerable = await ctx.client.rpc.sessions.get_persisted_remote_steerable( - SessionsGetPersistedRemoteSteerableRequest(session_id=session_id) - ) - assert remote_steerable.remote_steerable is None finally: await session.disconnect() @@ -320,7 +305,7 @@ async def test_should_enrich_basic_session_metadata(self, ctx: E2ETestContext): result = await ctx.client.rpc.sessions.enrich_metadata( SessionsEnrichMetadataRequest( sessions=[ - SessionMetadata( + LocalSessionMetadataValue( is_remote=False, modified_time=now, session_id=session_id, diff --git a/rust/tests/e2e/rpc_remote.rs b/rust/tests/e2e/rpc_remote.rs index a3c9ec3dc..c34a8d5e5 100644 --- a/rust/tests/e2e/rpc_remote.rs +++ b/rust/tests/e2e/rpc_remote.rs @@ -1,6 +1,4 @@ -use github_copilot_sdk::rpc::{ - RemoteEnableRequest, RemoteSessionMode, SessionsGetPersistedRemoteSteerableRequest, -}; +use github_copilot_sdk::rpc::{RemoteEnableRequest, RemoteSessionMode}; use github_copilot_sdk::session_events::{SessionEventType, SessionRemoteSteerableChangedData}; use super::support::{wait_for_event, with_e2e_context}; @@ -106,15 +104,6 @@ async fn should_notify_steerable_changed_event_and_persist_flag() { .await .expect("notify remote steerable"); changed.await; - let persisted = client - .rpc() - .sessions() - .get_persisted_remote_steerable(SessionsGetPersistedRemoteSteerableRequest { - session_id: session.id().clone(), - }) - .await - .expect("persisted remote steerable"); - assert_eq!(persisted.remote_steerable, Some(true)); session.disconnect().await.expect("disconnect session"); client.stop().await.expect("stop client"); diff --git a/rust/tests/e2e/rpc_server.rs b/rust/tests/e2e/rpc_server.rs index 6ba277b04..dff8bfd1e 100644 --- a/rust/tests/e2e/rpc_server.rs +++ b/rust/tests/e2e/rpc_server.rs @@ -1,11 +1,10 @@ use github_copilot_sdk::Client; use github_copilot_sdk::rpc::{ - ConnectRemoteSessionParams, McpDiscoverRequest, NameSetRequest, PingRequest, - SecretsAddFilterValuesRequest, SessionContext, SessionFsSetProviderConventions, - SessionFsSetProviderRequest, SessionListFilter, SessionMetadata, SessionsBulkDeleteRequest, + ConnectRemoteSessionParams, LocalSessionMetadataValue, McpDiscoverRequest, NameSetRequest, + PingRequest, SecretsAddFilterValuesRequest, SessionContext, SessionFsSetProviderConventions, + SessionFsSetProviderRequest, SessionListFilter, SessionsBulkDeleteRequest, SessionsCheckInUseRequest, SessionsCloseRequest, SessionsEnrichMetadataRequest, - SessionsFindByPrefixRequest, SessionsFindByTaskIDRequest, SessionsGetEventFilePathRequest, - SessionsGetLastForContextRequest, SessionsGetPersistedRemoteSteerableRequest, + SessionsFindByPrefixRequest, SessionsFindByTaskIDRequest, SessionsGetLastForContextRequest, SessionsListRequest, SessionsLoadDeferredRepoHooksRequest, SessionsPruneOldRequest, SessionsReleaseLockRequest, SessionsReloadPluginHooksRequest, SessionsSaveRequest, SessionsSetAdditionalPluginsRequest, SkillsConfigSetDisabledSkillsRequest, @@ -315,11 +314,12 @@ async fn should_list_find_and_inspect_persisted_session_state() { session.disconnect().await.expect("disconnect session"); let list = client.rpc().sessions().list().await.expect("list sessions"); - assert!( - list.sessions - .iter() - .all(|metadata| !metadata.session_id.as_str().is_empty()) - ); + assert!(list.sessions.iter().all(|metadata| { + metadata + .get("sessionId") + .and_then(serde_json::Value::as_str) + .is_some_and(|id| !id.is_empty()) + })); let filtered = client .rpc() .sessions() @@ -332,14 +332,17 @@ async fn should_list_find_and_inspect_persisted_session_state() { }), include_detached: None, metadata_limit: Some(10), + source: None, + throw_on_error: None, }) .await .expect("filtered sessions"); assert!(filtered.sessions.iter().all(|metadata| { metadata - .context - .as_ref() - .is_none_or(|context| context.cwd == ctx.work_dir().display().to_string()) + .get("context") + .and_then(|context| context.get("cwd")) + .and_then(serde_json::Value::as_str) + .is_none_or(|cwd| cwd == ctx.work_dir().display().to_string()) })); assert!( client @@ -391,20 +394,6 @@ async fn should_list_find_and_inspect_persisted_session_state() { .await .expect("check in use"); assert!(!in_use.in_use.iter().any(|id| id == "missing-session-id")); - assert!( - client - .rpc() - .sessions() - .get_persisted_remote_steerable( - SessionsGetPersistedRemoteSteerableRequest { - session_id: session_id.clone(), - }, - ) - .await - .expect("persisted remote steerable") - .remote_steerable - .is_none() - ); client.stop().await.expect("stop client"); }) @@ -427,7 +416,7 @@ async fn should_enrich_basic_session_metadata() { .await .expect("create session"); let session_id = session.id().clone(); - let metadata = SessionMetadata { + let metadata = LocalSessionMetadataValue { client_name: None, context: Some(SessionContext { branch: None, @@ -634,16 +623,6 @@ async fn should_save_and_get_event_file_path() { }) .await .expect("save session"); - let path = client - .rpc() - .sessions() - .get_event_file_path(SessionsGetEventFilePathRequest { - session_id: session.id().clone(), - }) - .await - .expect("event file path") - .file_path; - assert!(path.ends_with("events.jsonl")); session.disconnect().await.expect("disconnect session"); client.stop().await.expect("stop client"); diff --git a/scripts/codegen/go.ts b/scripts/codegen/go.ts index a3f39048d..e8436a4e7 100644 --- a/scripts/codegen/go.ts +++ b/scripts/codegen/go.ts @@ -1742,10 +1742,11 @@ function goDiscriminatorMethodName( const resolved = resolveSchema(variant.schema, ctx.definitions) ?? variant.schema; const objectSchema = resolveObjectSchema(resolved, ctx.definitions) ?? resolved; return Object.keys(objectSchema.properties ?? {}).some((propName) => { + const propGoName = toGoFieldName(propName); if (propName === discriminatorProp) { - return variant.discriminatorValues.length > 1 && discGoName === "Discriminator"; + return propGoName === discGoName || (variant.discriminatorValues.length > 1 && discGoName === "Discriminator"); } - return toGoFieldName(propName) === discGoName; + return propGoName === discGoName; }); }); diff --git a/scripts/codegen/python.ts b/scripts/codegen/python.ts index 1ce69b9bf..ab733c32a 100644 --- a/scripts/codegen/python.ts +++ b/scripts/codegen/python.ts @@ -1177,6 +1177,57 @@ function removeRequiredAnyDefaultsForPython( }); } +function reorderPythonDataclassFields(code: string): string { + const fieldRe = + /^ \w+: (?:Any|bool|int|float|str|dict|list|ClassVar|[A-Z_]\w*|['"][A-Z_]\w*)(?:[^=]*)?(?: = .*)?$/; + const methodRe = /^ (?:@(?:staticmethod|classmethod|property)|(?:async\s+)?def\s+)/; + const classBlockRe = /(@dataclass\r?\nclass\s+\w+:[\s\S]*?)(?=^@dataclass|^class\s+\w|^def\s+\w|\Z)/gm; + + return code.replace(classBlockRe, (block: string) => { + const lines = block.split("\n"); + const bodyStart = 2; + const memberStart = lines.findIndex((line, index) => index >= bodyStart && methodRe.test(line)); + if (memberStart < 0) { + return block; + } + + const header = lines.slice(0, bodyStart); + const fieldsBody = lines.slice(bodyStart, memberStart); + const members = lines.slice(memberStart); + const preamble: string[] = []; + const groups: string[][] = []; + let current: string[] | undefined; + + for (const line of fieldsBody) { + if (fieldRe.test(line)) { + current = [line]; + groups.push(current); + continue; + } + + if (current) { + current.push(line); + } else { + preamble.push(line); + } + } + + if (groups.length < 2) { + return block; + } + + const required = groups.filter((group) => !group[0].includes(" = ")); + const optional = groups.filter((group) => group[0].includes(" = ")); + const reorderedGroups = [...required, ...optional]; + const changed = reorderedGroups.some((group, index) => group !== groups[index]); + if (!changed) { + return block; + } + + return [...header, ...preamble, ...reorderedGroups.flat(), ...members].join("\n"); + }); +} + function toPascalCase(s: string): string { return fixBrandCasing( s @@ -2834,6 +2885,7 @@ async function generateRpc(schemaPath?: string, sessionEventsSchema?: JSONSchema } ); typesCode = removeRequiredAnyDefaultsForPython(typesCode, allDefinitions, allDefinitionCollections); + typesCode = reorderPythonDataclassFields(typesCode); // Fix bare except: to use Exception (required by ruff/pylint) typesCode = typesCode.replace(/except:/g, "except Exception:"); // Remove unnecessary pass when class has methods (quicktype generates pass for empty schemas) From 367277dcb3987e0ca10e265daf2b0c07f4a1d9c0 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 8 Jun 2026 11:32:26 -0400 Subject: [PATCH 3/5] Fix lint/format failures in Node and Python e2e tests - nodejs/test/e2e/rpc_remote.e2e.test.ts: re-run prettier --write to fix a small indent in waitForCondition call. - python/e2e/test_rpc_server_e2e.py: move LocalSessionMetadataValue into its correct alphabetical position in the from copilot.rpc import block (ruff I001). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- nodejs/test/e2e/rpc_remote.e2e.test.ts | 2 +- python/e2e/test_rpc_server_e2e.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nodejs/test/e2e/rpc_remote.e2e.test.ts b/nodejs/test/e2e/rpc_remote.e2e.test.ts index fe4af0d2a..4d2ba315a 100644 --- a/nodejs/test/e2e/rpc_remote.e2e.test.ts +++ b/nodejs/test/e2e/rpc_remote.e2e.test.ts @@ -70,7 +70,7 @@ describe("Session remote RPC", async () => { event.type === "session.remote_steerable_changed" && event.data.remoteSteerable === false ), - { timeoutMessage: "Timed out waiting for remote steerable=false event." } + { timeoutMessage: "Timed out waiting for remote steerable=false event." } ); } finally { await session.disconnect(); diff --git a/python/e2e/test_rpc_server_e2e.py b/python/e2e/test_rpc_server_e2e.py index 0610bf19d..244eb2ec4 100644 --- a/python/e2e/test_rpc_server_e2e.py +++ b/python/e2e/test_rpc_server_e2e.py @@ -17,6 +17,7 @@ from copilot.rpc import ( AccountGetQuotaRequest, ConnectRemoteSessionParams, + LocalSessionMetadataValue, MCPDiscoverRequest, ModelsListRequest, PingRequest, @@ -26,7 +27,6 @@ SessionFSSetProviderConventions, SessionFSSetProviderRequest, SessionListFilter, - LocalSessionMetadataValue, SessionsBulkDeleteRequest, SessionsCheckInUseRequest, SessionsCloseRequest, From 7ca801f54f78082c1718e8635dae25ac63d9a898 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 8 Jun 2026 12:25:49 -0400 Subject: [PATCH 4/5] Fix Python codegen so ReasoningSummary import is not shadowed The 1.0.60 schema introduces OptionsUpdateReasoningSummary and SessionOpenOptionsReasoningSummary, structurally identical to the shared ReasoningSummary enum. quicktype's enum-merging path (independent of combineClasses) collapsed them into a single locally-defined `class ReasoningSummary(Enum)` that shadowed the import from session_events at the top of rpc.py. ModelSwitchToRequest.to_dict() then called `to_enum(ReasoningSummary, x)` against the local class while session.py constructed values via the imported one, so the isinstance check inside to_enum failed and the unit test TestSessionConfigForwarding.test_set_model_sends_correct_rpc broke. Add a small post-processing step that strips locally-emitted enum classes whose name and value set exactly match a name imported from .session_events. The existing aliases at the end of rpc.py (OptionsUpdateReasoningSummary = ReasoningSummary etc.) now resolve to the imported enum, restoring isinstance equality across the SDK. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- python/copilot/generated/rpc.py | 11 ------ scripts/codegen/python.ts | 59 +++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 11 deletions(-) diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py index 718160179..0f2a57069 100644 --- a/python/copilot/generated/rpc.py +++ b/python/copilot/generated/rpc.py @@ -3392,16 +3392,6 @@ class OptionsUpdateContextTier(Enum): DEFAULT = "default" LONG_CONTEXT = "long_context" -# Experimental: this type is part of an experimental API and may change or be removed. -class ReasoningSummary(Enum): - """Reasoning summary mode for supported model clients. - - Initial reasoning summary mode for supported model clients. - """ - CONCISE = "concise" - DETAILED = "detailed" - NONE = "none" - # Experimental: this type is part of an experimental API and may change or be removed. class OptionsUpdateToolFilterPrecedence(Enum): """Controls how availableTools (allowlist) and excludedTools (denylist) combine when both @@ -23809,7 +23799,6 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "QueuedCommandNotHandled", "QueuedCommandResult", "RPC", - "ReasoningSummary", "RegisterEventInterestParams", "RegisterEventInterestResult", "ReleaseEventInterestParams", diff --git a/scripts/codegen/python.ts b/scripts/codegen/python.ts index ab733c32a..0ba72db50 100644 --- a/scripts/codegen/python.ts +++ b/scripts/codegen/python.ts @@ -1177,6 +1177,60 @@ function removeRequiredAnyDefaultsForPython( }); } +/** + * Remove locally-emitted Enum class definitions whose name already comes from + * a `.session_events` import. + * + * Quicktype's enum-merging path collapses structurally-identical enums (even + * with `combineClasses: false`, which only governs class merging). When the + * RPC schema gains sibling enums like `OptionsUpdateReasoningSummary` and + * `SessionOpenOptionsReasoningSummary` whose value set matches the shared + * `ReasoningSummary` enum, quicktype picks `ReasoningSummary` as the merged + * canonical name. That local class then shadows the import we add at the top + * of `rpc.py`, breaking `isinstance` checks against the canonical enum used + * elsewhere in the SDK. + * + * The fix: detect such shadowed enum definitions, verify the local values + * exactly match the imported enum's values in the session-events schema, and + * strip the local class so references resolve to the import. + */ +function removeShadowedSessionEventEnumsForPython( + code: string, + importedFromSessionEvents: Set, + sessionEventsSchema: JSONSchema7 | undefined +): string { + if (importedFromSessionEvents.size === 0 || !sessionEventsSchema) return code; + const seDefs = collectDefinitionCollections(sessionEventsSchema as Record); + const enumBlockRe = + /(?:^|\n)class\s+(\w+)\s*\(Enum\):\s*\r?\n([\s\S]*?)(?=\nclass\s+\w|\n@dataclass\b|\ndef\s+\w|$)/g; + return code + .replace(enumBlockRe, (match: string, className: string, body: string) => { + if (!importedFromSessionEvents.has(className)) return match; + const seDef = seDefs.definitions[className] ?? seDefs.$defs[className]; + const seResolved = seDef ? resolveSchema(seDef, seDefs) ?? seDef : undefined; + if ( + !seResolved?.enum || + !Array.isArray(seResolved.enum) || + !seResolved.enum.every((value) => typeof value === "string") + ) { + return match; + } + const localValues = new Set(); + const valueRe = /^\s+\w+\s*=\s*"([^"]*)"/gm; + let vm: RegExpExecArray | null; + while ((vm = valueRe.exec(body)) !== null) { + localValues.add(vm[1]); + } + const seValues = new Set(seResolved.enum as string[]); + if (localValues.size !== seValues.size) return match; + for (const value of localValues) { + if (!seValues.has(value)) return match; + } + return ""; + }) + .replace(/\n{3,}/g, "\n\n"); +} + function reorderPythonDataclassFields(code: string): string { const fieldRe = /^ \w+: (?:Any|bool|int|float|str|dict|list|ClassVar|[A-Z_]\w*|['"][A-Z_]\w*)(?:[^=]*)?(?: = .*)?$/; @@ -2896,6 +2950,11 @@ async function generateRpc(schemaPath?: string, sessionEventsSchema?: JSONSchema typesCode = collapsePlaceholderPythonDataclasses(typesCode, knownDefNames); typesCode = postProcessExternalUnionAliasesForPython(typesCode, externalUnionAliases); typesCode = postProcessExternalRefsForPython(typesCode, externalRefs.placeholderNames, externalEnumNames); + typesCode = removeShadowedSessionEventEnumsForPython( + typesCode, + externalRefs.imports.get(".session_events") ?? new Set(), + sessionEventsSchema + ); const { code: typesCodeAfterUnions, unions: refBasedUnions } = postProcessRefBasedDiscriminatedUnionsForPython( typesCode, allDefinitions, From e9ca1db856bd772b9db6413facfad03f3078cc64 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 8 Jun 2026 13:26:27 -0400 Subject: [PATCH 5/5] Scope down Go discriminator-method collision detection The previous change to `goDiscriminatorMethodName` over-broadly flagged collisions whenever the discriminator property's natural Go name matched the chosen method name, even on multi-variant unions where the discriminator field is elided or renamed to `Discriminator` on the emitted variant structs. The result was 98 unnecessary `Kind()` -> `xxxKind()` method renames across 8 multi-variant unions (PermissionPromptRequest, PermissionDecision, AgentRegistrySpawnResult, SlashCommandInvocationResult, UserToolSessionApproval, PermissionsLocationsAddToolApprovalDetails, and the two ApproveFor* variants). The real natural-name collision case is when the variant struct is a pre-existing type (already in `ctx.generatedNames`) that retained the discriminator as a struct field with its natural Go name -- e.g., `SessionListEntry`'s `LocalSessionMetadataValue.IsRemote bool` field, which would clash with an exported `IsRemote() bool` interface method on the union. This commit narrows the natural-name check to that pre-existing-variant case, leaving the independent `Discriminator`-rename collision clause unchanged. Also drops the now-dead `permissionDecisionKind()` helper from the hand-written `permission_decision_no_result.go`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- go/rpc/permission_decision_no_result.go | 4 - go/rpc/zrpc.go | 280 ++++++++++++------------ go/rpc/zrpc_encoding.go | 214 +++++++++--------- go/rpc/zsession_encoding.go | 84 +++---- go/rpc/zsession_events.go | 104 ++++----- scripts/codegen/go.ts | 10 +- 6 files changed, 350 insertions(+), 346 deletions(-) diff --git a/go/rpc/permission_decision_no_result.go b/go/rpc/permission_decision_no_result.go index c68b9fe78..3337120bc 100644 --- a/go/rpc/permission_decision_no_result.go +++ b/go/rpc/permission_decision_no_result.go @@ -15,10 +15,6 @@ func (PermissionDecisionNoResult) Kind() PermissionDecisionKind { return PermissionDecisionKind("no-result") } -func (PermissionDecisionNoResult) permissionDecisionKind() PermissionDecisionKind { - return PermissionDecisionKind("no-result") -} - // MarshalJSON emits {"kind":"no-result"} for serialization symmetry with // the other PermissionDecision variants. The SDK normally suppresses this // value before it reaches the wire, but a stable representation is useful diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go index 0daf0be63..6c3252007 100644 --- a/go/rpc/zrpc.go +++ b/go/rpc/zrpc.go @@ -199,7 +199,7 @@ type AgentRegistrySpawnRequest struct { // be removed. type AgentRegistrySpawnResult interface { agentRegistrySpawnResult() - agentRegistrySpawnResultKind() AgentRegistrySpawnResultKind + Kind() AgentRegistrySpawnResultKind } type RawAgentRegistrySpawnResultData struct { @@ -208,7 +208,7 @@ type RawAgentRegistrySpawnResultData struct { } func (RawAgentRegistrySpawnResultData) agentRegistrySpawnResult() {} -func (r RawAgentRegistrySpawnResultData) agentRegistrySpawnResultKind() AgentRegistrySpawnResultKind { +func (r RawAgentRegistrySpawnResultData) Kind() AgentRegistrySpawnResultKind { return r.Discriminator } @@ -223,7 +223,7 @@ type AgentRegistrySpawnError struct { } func (AgentRegistrySpawnError) agentRegistrySpawnResult() {} -func (AgentRegistrySpawnError) agentRegistrySpawnResultKind() AgentRegistrySpawnResultKind { +func (AgentRegistrySpawnError) Kind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindSpawnError } @@ -239,7 +239,7 @@ type AgentRegistrySpawnRegistryTimeout struct { } func (AgentRegistrySpawnRegistryTimeout) agentRegistrySpawnResult() {} -func (AgentRegistrySpawnRegistryTimeout) agentRegistrySpawnResultKind() AgentRegistrySpawnResultKind { +func (AgentRegistrySpawnRegistryTimeout) Kind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindRegistryTimeout } @@ -263,7 +263,7 @@ type AgentRegistrySpawnSpawned struct { } func (AgentRegistrySpawnSpawned) agentRegistrySpawnResult() {} -func (AgentRegistrySpawnSpawned) agentRegistrySpawnResultKind() AgentRegistrySpawnResultKind { +func (AgentRegistrySpawnSpawned) Kind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindSpawned } @@ -282,7 +282,7 @@ type AgentRegistrySpawnValidationError struct { } func (AgentRegistrySpawnValidationError) agentRegistrySpawnResult() {} -func (AgentRegistrySpawnValidationError) agentRegistrySpawnResultKind() AgentRegistrySpawnResultKind { +func (AgentRegistrySpawnValidationError) Kind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindValidationError } @@ -333,7 +333,7 @@ type AllowAllPermissionState struct { // Experimental: Attachment is part of an experimental API and may change or be removed. type Attachment interface { attachment() - attachmentType() AttachmentType + Type() AttachmentType } type RawAttachmentData struct { @@ -342,7 +342,7 @@ type RawAttachmentData struct { } func (RawAttachmentData) attachment() {} -func (r RawAttachmentData) attachmentType() AttachmentType { +func (r RawAttachmentData) Type() AttachmentType { return r.Discriminator } @@ -358,7 +358,7 @@ type AttachmentBlob struct { } func (AttachmentBlob) attachment() {} -func (AttachmentBlob) attachmentType() AttachmentType { +func (AttachmentBlob) Type() AttachmentType { return AttachmentTypeBlob } @@ -373,7 +373,7 @@ type AttachmentDirectory struct { } func (AttachmentDirectory) attachment() {} -func (AttachmentDirectory) attachmentType() AttachmentType { +func (AttachmentDirectory) Type() AttachmentType { return AttachmentTypeDirectory } @@ -400,7 +400,7 @@ type AttachmentExtensionContext struct { } func (AttachmentExtensionContext) attachment() {} -func (AttachmentExtensionContext) attachmentType() AttachmentType { +func (AttachmentExtensionContext) Type() AttachmentType { return AttachmentTypeExtensionContext } @@ -416,7 +416,7 @@ type AttachmentFile struct { } func (AttachmentFile) attachment() {} -func (AttachmentFile) attachmentType() AttachmentType { +func (AttachmentFile) Type() AttachmentType { return AttachmentTypeFile } @@ -437,7 +437,7 @@ type AttachmentGitHubReference struct { } func (AttachmentGitHubReference) attachment() {} -func (AttachmentGitHubReference) attachmentType() AttachmentType { +func (AttachmentGitHubReference) Type() AttachmentType { return AttachmentTypeGitHubReference } @@ -456,7 +456,7 @@ type AttachmentSelection struct { } func (AttachmentSelection) attachment() {} -func (AttachmentSelection) attachmentType() AttachmentType { +func (AttachmentSelection) Type() AttachmentType { return AttachmentTypeSelection } @@ -504,7 +504,7 @@ type AttachmentSelectionDetailsStart struct { // Experimental: AuthInfo is part of an experimental API and may change or be removed. type AuthInfo interface { authInfo() - authInfoType() AuthInfoType + Type() AuthInfoType } type RawAuthInfoData struct { @@ -513,7 +513,7 @@ type RawAuthInfoData struct { } func (RawAuthInfoData) authInfo() {} -func (r RawAuthInfoData) authInfoType() AuthInfoType { +func (r RawAuthInfoData) Type() AuthInfoType { return r.Discriminator } @@ -531,7 +531,7 @@ type APIKeyAuthInfo struct { } func (APIKeyAuthInfo) authInfo() {} -func (APIKeyAuthInfo) authInfoType() AuthInfoType { +func (APIKeyAuthInfo) Type() AuthInfoType { return AuthInfoTypeAPIKey } @@ -548,7 +548,7 @@ type CopilotAPITokenAuthInfo struct { } func (CopilotAPITokenAuthInfo) authInfo() {} -func (CopilotAPITokenAuthInfo) authInfoType() AuthInfoType { +func (CopilotAPITokenAuthInfo) Type() AuthInfoType { return AuthInfoTypeCopilotAPIToken } @@ -571,7 +571,7 @@ type EnvAuthInfo struct { } func (EnvAuthInfo) authInfo() {} -func (EnvAuthInfo) authInfoType() AuthInfoType { +func (EnvAuthInfo) Type() AuthInfoType { return AuthInfoTypeEnv } @@ -591,7 +591,7 @@ type GhCLIAuthInfo struct { } func (GhCLIAuthInfo) authInfo() {} -func (GhCLIAuthInfo) authInfoType() AuthInfoType { +func (GhCLIAuthInfo) Type() AuthInfoType { return AuthInfoTypeGhCLI } @@ -609,7 +609,7 @@ type HMACAuthInfo struct { } func (HMACAuthInfo) authInfo() {} -func (HMACAuthInfo) authInfoType() AuthInfoType { +func (HMACAuthInfo) Type() AuthInfoType { return AuthInfoTypeHMAC } @@ -627,7 +627,7 @@ type TokenAuthInfo struct { } func (TokenAuthInfo) authInfo() {} -func (TokenAuthInfo) authInfoType() AuthInfoType { +func (TokenAuthInfo) Type() AuthInfoType { return AuthInfoTypeToken } @@ -645,7 +645,7 @@ type UserAuthInfo struct { } func (UserAuthInfo) authInfo() {} -func (UserAuthInfo) authInfoType() AuthInfoType { +func (UserAuthInfo) Type() AuthInfoType { return AuthInfoTypeUser } @@ -1370,7 +1370,7 @@ type ExternalToolTextResultForLlmBinaryResultsForLlm struct { // change or be removed. type ExternalToolTextResultForLlmContent interface { externalToolTextResultForLlmContent() - externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType + Type() ExternalToolTextResultForLlmContentType } type RawExternalToolTextResultForLlmContentData struct { @@ -1379,7 +1379,7 @@ type RawExternalToolTextResultForLlmContentData struct { } func (RawExternalToolTextResultForLlmContentData) externalToolTextResultForLlmContent() {} -func (r RawExternalToolTextResultForLlmContentData) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { +func (r RawExternalToolTextResultForLlmContentData) Type() ExternalToolTextResultForLlmContentType { return r.Discriminator } @@ -1394,7 +1394,7 @@ type ExternalToolTextResultForLlmContentAudio struct { } func (ExternalToolTextResultForLlmContentAudio) externalToolTextResultForLlmContent() {} -func (ExternalToolTextResultForLlmContentAudio) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { +func (ExternalToolTextResultForLlmContentAudio) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeAudio } @@ -1409,7 +1409,7 @@ type ExternalToolTextResultForLlmContentImage struct { } func (ExternalToolTextResultForLlmContentImage) externalToolTextResultForLlmContent() {} -func (ExternalToolTextResultForLlmContentImage) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { +func (ExternalToolTextResultForLlmContentImage) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeImage } @@ -1422,7 +1422,7 @@ type ExternalToolTextResultForLlmContentResource struct { } func (ExternalToolTextResultForLlmContentResource) externalToolTextResultForLlmContent() {} -func (ExternalToolTextResultForLlmContentResource) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { +func (ExternalToolTextResultForLlmContentResource) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeResource } @@ -1447,7 +1447,7 @@ type ExternalToolTextResultForLlmContentResourceLink struct { } func (ExternalToolTextResultForLlmContentResourceLink) externalToolTextResultForLlmContent() {} -func (ExternalToolTextResultForLlmContentResourceLink) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { +func (ExternalToolTextResultForLlmContentResourceLink) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeResourceLink } @@ -1464,7 +1464,7 @@ type ExternalToolTextResultForLlmContentTerminal struct { } func (ExternalToolTextResultForLlmContentTerminal) externalToolTextResultForLlmContent() {} -func (ExternalToolTextResultForLlmContentTerminal) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { +func (ExternalToolTextResultForLlmContentTerminal) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeTerminal } @@ -1477,7 +1477,7 @@ type ExternalToolTextResultForLlmContentText struct { } func (ExternalToolTextResultForLlmContentText) externalToolTextResultForLlmContent() {} -func (ExternalToolTextResultForLlmContentText) externalToolTextResultForLlmContentType() ExternalToolTextResultForLlmContentType { +func (ExternalToolTextResultForLlmContentText) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeText } @@ -3151,7 +3151,7 @@ type PendingPermissionRequestList struct { // removed. type PermissionDecision interface { permissionDecision() - permissionDecisionKind() PermissionDecisionKind + Kind() PermissionDecisionKind } type RawPermissionDecisionData struct { @@ -3160,7 +3160,7 @@ type RawPermissionDecisionData struct { } func (RawPermissionDecisionData) permissionDecision() {} -func (r RawPermissionDecisionData) permissionDecisionKind() PermissionDecisionKind { +func (r RawPermissionDecisionData) Kind() PermissionDecisionKind { return r.Discriminator } @@ -3171,7 +3171,7 @@ type PermissionDecisionApproved struct { } func (PermissionDecisionApproved) permissionDecision() {} -func (PermissionDecisionApproved) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionApproved) Kind() PermissionDecisionKind { return PermissionDecisionKindApproved } @@ -3186,7 +3186,7 @@ type PermissionDecisionApprovedForLocation struct { } func (PermissionDecisionApprovedForLocation) permissionDecision() {} -func (PermissionDecisionApprovedForLocation) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionApprovedForLocation) Kind() PermissionDecisionKind { return PermissionDecisionKindApprovedForLocation } @@ -3199,7 +3199,7 @@ type PermissionDecisionApprovedForSession struct { } func (PermissionDecisionApprovedForSession) permissionDecision() {} -func (PermissionDecisionApprovedForSession) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionApprovedForSession) Kind() PermissionDecisionKind { return PermissionDecisionKindApprovedForSession } @@ -3214,7 +3214,7 @@ type PermissionDecisionApproveForLocation struct { } func (PermissionDecisionApproveForLocation) permissionDecision() {} -func (PermissionDecisionApproveForLocation) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionApproveForLocation) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveForLocation } @@ -3229,7 +3229,7 @@ type PermissionDecisionApproveForSession struct { } func (PermissionDecisionApproveForSession) permissionDecision() {} -func (PermissionDecisionApproveForSession) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionApproveForSession) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveForSession } @@ -3240,7 +3240,7 @@ type PermissionDecisionApproveOnce struct { } func (PermissionDecisionApproveOnce) permissionDecision() {} -func (PermissionDecisionApproveOnce) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionApproveOnce) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveOnce } @@ -3253,7 +3253,7 @@ type PermissionDecisionApprovePermanently struct { } func (PermissionDecisionApprovePermanently) permissionDecision() {} -func (PermissionDecisionApprovePermanently) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionApprovePermanently) Kind() PermissionDecisionKind { return PermissionDecisionKindApprovePermanently } @@ -3266,7 +3266,7 @@ type PermissionDecisionCancelled struct { } func (PermissionDecisionCancelled) permissionDecision() {} -func (PermissionDecisionCancelled) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionCancelled) Kind() PermissionDecisionKind { return PermissionDecisionKindCancelled } @@ -3281,7 +3281,7 @@ type PermissionDecisionDeniedByContentExclusionPolicy struct { } func (PermissionDecisionDeniedByContentExclusionPolicy) permissionDecision() {} -func (PermissionDecisionDeniedByContentExclusionPolicy) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionDeniedByContentExclusionPolicy) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedByContentExclusionPolicy } @@ -3296,7 +3296,7 @@ type PermissionDecisionDeniedByPermissionRequestHook struct { } func (PermissionDecisionDeniedByPermissionRequestHook) permissionDecision() {} -func (PermissionDecisionDeniedByPermissionRequestHook) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionDeniedByPermissionRequestHook) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedByPermissionRequestHook } @@ -3309,7 +3309,7 @@ type PermissionDecisionDeniedByRules struct { } func (PermissionDecisionDeniedByRules) permissionDecision() {} -func (PermissionDecisionDeniedByRules) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionDeniedByRules) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedByRules } @@ -3324,7 +3324,7 @@ type PermissionDecisionDeniedInteractivelyByUser struct { } func (PermissionDecisionDeniedInteractivelyByUser) permissionDecision() {} -func (PermissionDecisionDeniedInteractivelyByUser) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionDeniedInteractivelyByUser) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedInteractivelyByUser } @@ -3335,7 +3335,7 @@ type PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser struct { } func (PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) permissionDecision() {} -func (PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedNoApprovalRuleAndCouldNotRequestFromUser } @@ -3348,7 +3348,7 @@ type PermissionDecisionReject struct { } func (PermissionDecisionReject) permissionDecision() {} -func (PermissionDecisionReject) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionReject) Kind() PermissionDecisionKind { return PermissionDecisionKindReject } @@ -3359,7 +3359,7 @@ type PermissionDecisionUserNotAvailable struct { } func (PermissionDecisionUserNotAvailable) permissionDecision() {} -func (PermissionDecisionUserNotAvailable) permissionDecisionKind() PermissionDecisionKind { +func (PermissionDecisionUserNotAvailable) Kind() PermissionDecisionKind { return PermissionDecisionKindUserNotAvailable } @@ -3368,7 +3368,7 @@ func (PermissionDecisionUserNotAvailable) permissionDecisionKind() PermissionDec // and may change or be removed. type PermissionDecisionApproveForLocationApproval interface { permissionDecisionApproveForLocationApproval() - permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind + Kind() PermissionDecisionApproveForLocationApprovalKind } type RawPermissionDecisionApproveForLocationApprovalData struct { @@ -3378,7 +3378,7 @@ type RawPermissionDecisionApproveForLocationApprovalData struct { func (RawPermissionDecisionApproveForLocationApprovalData) permissionDecisionApproveForLocationApproval() { } -func (r RawPermissionDecisionApproveForLocationApprovalData) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { +func (r RawPermissionDecisionApproveForLocationApprovalData) Kind() PermissionDecisionApproveForLocationApprovalKind { return r.Discriminator } @@ -3392,7 +3392,7 @@ type PermissionDecisionApproveForLocationApprovalCommands struct { func (PermissionDecisionApproveForLocationApprovalCommands) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalCommands) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalCommands) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindCommands } @@ -3406,7 +3406,7 @@ type PermissionDecisionApproveForLocationApprovalCustomTool struct { func (PermissionDecisionApproveForLocationApprovalCustomTool) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalCustomTool) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalCustomTool) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindCustomTool } @@ -3421,7 +3421,7 @@ type PermissionDecisionApproveForLocationApprovalExtensionManagement struct { func (PermissionDecisionApproveForLocationApprovalExtensionManagement) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalExtensionManagement) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalExtensionManagement) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindExtensionManagement } @@ -3436,7 +3436,7 @@ type PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess struc func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindExtensionPermissionAccess } @@ -3452,7 +3452,7 @@ type PermissionDecisionApproveForLocationApprovalMCP struct { func (PermissionDecisionApproveForLocationApprovalMCP) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalMCP) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalMCP) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindMCP } @@ -3466,7 +3466,7 @@ type PermissionDecisionApproveForLocationApprovalMCPSampling struct { func (PermissionDecisionApproveForLocationApprovalMCPSampling) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalMCPSampling) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalMCPSampling) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindMCPSampling } @@ -3478,7 +3478,7 @@ type PermissionDecisionApproveForLocationApprovalMemory struct { func (PermissionDecisionApproveForLocationApprovalMemory) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalMemory) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalMemory) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindMemory } @@ -3490,7 +3490,7 @@ type PermissionDecisionApproveForLocationApprovalRead struct { func (PermissionDecisionApproveForLocationApprovalRead) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalRead) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalRead) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindRead } @@ -3502,7 +3502,7 @@ type PermissionDecisionApproveForLocationApprovalWrite struct { func (PermissionDecisionApproveForLocationApprovalWrite) permissionDecisionApproveForLocationApproval() { } -func (PermissionDecisionApproveForLocationApprovalWrite) permissionDecisionApproveForLocationApprovalKind() PermissionDecisionApproveForLocationApprovalKind { +func (PermissionDecisionApproveForLocationApprovalWrite) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindWrite } @@ -3511,7 +3511,7 @@ func (PermissionDecisionApproveForLocationApprovalWrite) permissionDecisionAppro // and may change or be removed. type PermissionDecisionApproveForSessionApproval interface { permissionDecisionApproveForSessionApproval() - permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind + Kind() PermissionDecisionApproveForSessionApprovalKind } type RawPermissionDecisionApproveForSessionApprovalData struct { @@ -3521,7 +3521,7 @@ type RawPermissionDecisionApproveForSessionApprovalData struct { func (RawPermissionDecisionApproveForSessionApprovalData) permissionDecisionApproveForSessionApproval() { } -func (r RawPermissionDecisionApproveForSessionApprovalData) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { +func (r RawPermissionDecisionApproveForSessionApprovalData) Kind() PermissionDecisionApproveForSessionApprovalKind { return r.Discriminator } @@ -3535,7 +3535,7 @@ type PermissionDecisionApproveForSessionApprovalCommands struct { func (PermissionDecisionApproveForSessionApprovalCommands) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalCommands) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalCommands) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindCommands } @@ -3549,7 +3549,7 @@ type PermissionDecisionApproveForSessionApprovalCustomTool struct { func (PermissionDecisionApproveForSessionApprovalCustomTool) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalCustomTool) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalCustomTool) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindCustomTool } @@ -3564,7 +3564,7 @@ type PermissionDecisionApproveForSessionApprovalExtensionManagement struct { func (PermissionDecisionApproveForSessionApprovalExtensionManagement) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalExtensionManagement) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalExtensionManagement) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindExtensionManagement } @@ -3579,7 +3579,7 @@ type PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess struct func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindExtensionPermissionAccess } @@ -3594,7 +3594,7 @@ type PermissionDecisionApproveForSessionApprovalMCP struct { } func (PermissionDecisionApproveForSessionApprovalMCP) permissionDecisionApproveForSessionApproval() {} -func (PermissionDecisionApproveForSessionApprovalMCP) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalMCP) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindMCP } @@ -3608,7 +3608,7 @@ type PermissionDecisionApproveForSessionApprovalMCPSampling struct { func (PermissionDecisionApproveForSessionApprovalMCPSampling) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalMCPSampling) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalMCPSampling) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindMCPSampling } @@ -3620,7 +3620,7 @@ type PermissionDecisionApproveForSessionApprovalMemory struct { func (PermissionDecisionApproveForSessionApprovalMemory) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalMemory) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalMemory) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindMemory } @@ -3632,7 +3632,7 @@ type PermissionDecisionApproveForSessionApprovalRead struct { func (PermissionDecisionApproveForSessionApprovalRead) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalRead) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalRead) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindRead } @@ -3644,7 +3644,7 @@ type PermissionDecisionApproveForSessionApprovalWrite struct { func (PermissionDecisionApproveForSessionApprovalWrite) permissionDecisionApproveForSessionApproval() { } -func (PermissionDecisionApproveForSessionApprovalWrite) permissionDecisionApproveForSessionApprovalKind() PermissionDecisionApproveForSessionApprovalKind { +func (PermissionDecisionApproveForSessionApprovalWrite) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindWrite } @@ -3917,7 +3917,7 @@ type PermissionsGetAllowAllRequest struct { // and may change or be removed. type PermissionsLocationsAddToolApprovalDetails interface { permissionsLocationsAddToolApprovalDetails() - permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind + Kind() PermissionsLocationsAddToolApprovalDetailsKind } type RawPermissionsLocationsAddToolApprovalDetailsData struct { @@ -3927,7 +3927,7 @@ type RawPermissionsLocationsAddToolApprovalDetailsData struct { func (RawPermissionsLocationsAddToolApprovalDetailsData) permissionsLocationsAddToolApprovalDetails() { } -func (r RawPermissionsLocationsAddToolApprovalDetailsData) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { +func (r RawPermissionsLocationsAddToolApprovalDetailsData) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return r.Discriminator } @@ -3941,7 +3941,7 @@ type PermissionsLocationsAddToolApprovalDetailsCommands struct { func (PermissionsLocationsAddToolApprovalDetailsCommands) permissionsLocationsAddToolApprovalDetails() { } -func (PermissionsLocationsAddToolApprovalDetailsCommands) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsCommands) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindCommands } @@ -3955,7 +3955,7 @@ type PermissionsLocationsAddToolApprovalDetailsCustomTool struct { func (PermissionsLocationsAddToolApprovalDetailsCustomTool) permissionsLocationsAddToolApprovalDetails() { } -func (PermissionsLocationsAddToolApprovalDetailsCustomTool) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsCustomTool) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindCustomTool } @@ -3970,7 +3970,7 @@ type PermissionsLocationsAddToolApprovalDetailsExtensionManagement struct { func (PermissionsLocationsAddToolApprovalDetailsExtensionManagement) permissionsLocationsAddToolApprovalDetails() { } -func (PermissionsLocationsAddToolApprovalDetailsExtensionManagement) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsExtensionManagement) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindExtensionManagement } @@ -3984,7 +3984,7 @@ type PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess struct func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) permissionsLocationsAddToolApprovalDetails() { } -func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindExtensionPermissionAccess } @@ -3999,7 +3999,7 @@ type PermissionsLocationsAddToolApprovalDetailsMCP struct { } func (PermissionsLocationsAddToolApprovalDetailsMCP) permissionsLocationsAddToolApprovalDetails() {} -func (PermissionsLocationsAddToolApprovalDetailsMCP) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsMCP) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindMCP } @@ -4013,7 +4013,7 @@ type PermissionsLocationsAddToolApprovalDetailsMCPSampling struct { func (PermissionsLocationsAddToolApprovalDetailsMCPSampling) permissionsLocationsAddToolApprovalDetails() { } -func (PermissionsLocationsAddToolApprovalDetailsMCPSampling) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsMCPSampling) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindMCPSampling } @@ -4025,7 +4025,7 @@ type PermissionsLocationsAddToolApprovalDetailsMemory struct { func (PermissionsLocationsAddToolApprovalDetailsMemory) permissionsLocationsAddToolApprovalDetails() { } -func (PermissionsLocationsAddToolApprovalDetailsMemory) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsMemory) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindMemory } @@ -4036,7 +4036,7 @@ type PermissionsLocationsAddToolApprovalDetailsRead struct { } func (PermissionsLocationsAddToolApprovalDetailsRead) permissionsLocationsAddToolApprovalDetails() {} -func (PermissionsLocationsAddToolApprovalDetailsRead) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsRead) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindRead } @@ -4047,7 +4047,7 @@ type PermissionsLocationsAddToolApprovalDetailsWrite struct { } func (PermissionsLocationsAddToolApprovalDetailsWrite) permissionsLocationsAddToolApprovalDetails() {} -func (PermissionsLocationsAddToolApprovalDetailsWrite) permissionsLocationsAddToolApprovalDetailsKind() PermissionsLocationsAddToolApprovalDetailsKind { +func (PermissionsLocationsAddToolApprovalDetailsWrite) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindWrite } @@ -4526,7 +4526,7 @@ type ProviderConfigAzure struct { // Experimental: PushAttachment is part of an experimental API and may change or be removed. type PushAttachment interface { pushAttachment() - pushAttachmentType() PushAttachmentType + Type() PushAttachmentType } type RawPushAttachmentData struct { @@ -4535,7 +4535,7 @@ type RawPushAttachmentData struct { } func (RawPushAttachmentData) pushAttachment() {} -func (r RawPushAttachmentData) pushAttachmentType() PushAttachmentType { +func (r RawPushAttachmentData) Type() PushAttachmentType { return r.Discriminator } @@ -4550,7 +4550,7 @@ type ExtensionContextPushInput struct { } func (ExtensionContextPushInput) pushAttachment() {} -func (ExtensionContextPushInput) pushAttachmentType() PushAttachmentType { +func (ExtensionContextPushInput) Type() PushAttachmentType { return PushAttachmentTypeExtensionContext } @@ -4567,7 +4567,7 @@ type PushAttachmentBlob struct { } func (PushAttachmentBlob) pushAttachment() {} -func (PushAttachmentBlob) pushAttachmentType() PushAttachmentType { +func (PushAttachmentBlob) Type() PushAttachmentType { return PushAttachmentTypeBlob } @@ -4582,7 +4582,7 @@ type PushAttachmentDirectory struct { } func (PushAttachmentDirectory) pushAttachment() {} -func (PushAttachmentDirectory) pushAttachmentType() PushAttachmentType { +func (PushAttachmentDirectory) Type() PushAttachmentType { return PushAttachmentTypeDirectory } @@ -4599,7 +4599,7 @@ type PushAttachmentFile struct { } func (PushAttachmentFile) pushAttachment() {} -func (PushAttachmentFile) pushAttachmentType() PushAttachmentType { +func (PushAttachmentFile) Type() PushAttachmentType { return PushAttachmentTypeFile } @@ -4620,7 +4620,7 @@ type PushAttachmentGitHubReference struct { } func (PushAttachmentGitHubReference) pushAttachment() {} -func (PushAttachmentGitHubReference) pushAttachmentType() PushAttachmentType { +func (PushAttachmentGitHubReference) Type() PushAttachmentType { return PushAttachmentTypeGitHubReference } @@ -4639,7 +4639,7 @@ type PushAttachmentSelection struct { } func (PushAttachmentSelection) pushAttachment() {} -func (PushAttachmentSelection) pushAttachmentType() PushAttachmentType { +func (PushAttachmentSelection) Type() PushAttachmentType { return PushAttachmentTypeSelection } @@ -4688,7 +4688,7 @@ type PushAttachmentSelectionDetailsStart struct { // removed. type QueuedCommandResult interface { queuedCommandResult() - queuedCommandResultHandled() bool + Handled() bool } // Schema for the `QueuedCommandHandled` type. @@ -4701,7 +4701,7 @@ type QueuedCommandHandled struct { } func (QueuedCommandHandled) queuedCommandResult() {} -func (QueuedCommandHandled) queuedCommandResultHandled() bool { +func (QueuedCommandHandled) Handled() bool { return true } @@ -4712,7 +4712,7 @@ type QueuedCommandNotHandled struct { } func (QueuedCommandNotHandled) queuedCommandResult() {} -func (QueuedCommandNotHandled) queuedCommandResultHandled() bool { +func (QueuedCommandNotHandled) Handled() bool { return false } @@ -4854,7 +4854,7 @@ type RemoteControlConfigExistingMcSession struct { // removed. type RemoteControlStatus interface { remoteControlStatus() - remoteControlStatusState() RemoteControlStatusState + State() RemoteControlStatusState } type RawRemoteControlStatusData struct { @@ -4863,7 +4863,7 @@ type RawRemoteControlStatusData struct { } func (RawRemoteControlStatusData) remoteControlStatus() {} -func (r RawRemoteControlStatusData) remoteControlStatusState() RemoteControlStatusState { +func (r RawRemoteControlStatusData) State() RemoteControlStatusState { return r.Discriminator } @@ -4887,7 +4887,7 @@ type RemoteControlStatusActive struct { } func (RemoteControlStatusActive) remoteControlStatus() {} -func (RemoteControlStatusActive) remoteControlStatusState() RemoteControlStatusState { +func (RemoteControlStatusActive) State() RemoteControlStatusState { return RemoteControlStatusStateActive } @@ -4900,7 +4900,7 @@ type RemoteControlStatusConnecting struct { } func (RemoteControlStatusConnecting) remoteControlStatus() {} -func (RemoteControlStatusConnecting) remoteControlStatusState() RemoteControlStatusState { +func (RemoteControlStatusConnecting) State() RemoteControlStatusState { return RemoteControlStatusStateConnecting } @@ -4915,7 +4915,7 @@ type RemoteControlStatusError struct { } func (RemoteControlStatusError) remoteControlStatus() {} -func (RemoteControlStatusError) remoteControlStatusState() RemoteControlStatusState { +func (RemoteControlStatusError) State() RemoteControlStatusState { return RemoteControlStatusStateError } @@ -4926,7 +4926,7 @@ type RemoteControlStatusOff struct { } func (RemoteControlStatusOff) remoteControlStatus() {} -func (RemoteControlStatusOff) remoteControlStatusState() RemoteControlStatusState { +func (RemoteControlStatusOff) State() RemoteControlStatusState { return RemoteControlStatusStateOff } @@ -6046,7 +6046,7 @@ type SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource struct { // removed. type SessionOpenParams interface { sessionOpenParams() - sessionOpenParamsKind() SessionOpenParamsKind + Kind() SessionOpenParamsKind } type RawSessionOpenParamsData struct { @@ -6055,7 +6055,7 @@ type RawSessionOpenParamsData struct { } func (RawSessionOpenParamsData) sessionOpenParams() {} -func (r RawSessionOpenParamsData) sessionOpenParamsKind() SessionOpenParamsKind { +func (r RawSessionOpenParamsData) Kind() SessionOpenParamsKind { return r.Discriminator } @@ -6068,7 +6068,7 @@ type SessionsOpenAttach struct { } func (SessionsOpenAttach) sessionOpenParams() {} -func (SessionsOpenAttach) sessionOpenParamsKind() SessionOpenParamsKind { +func (SessionsOpenAttach) Kind() SessionOpenParamsKind { return SessionOpenParamsKindAttach } @@ -6094,7 +6094,7 @@ type SessionsOpenCloud struct { } func (SessionsOpenCloud) sessionOpenParams() {} -func (SessionsOpenCloud) sessionOpenParamsKind() SessionOpenParamsKind { +func (SessionsOpenCloud) Kind() SessionOpenParamsKind { return SessionOpenParamsKindCloud } @@ -6109,7 +6109,7 @@ type SessionsOpenCreate struct { } func (SessionsOpenCreate) sessionOpenParams() {} -func (SessionsOpenCreate) sessionOpenParamsKind() SessionOpenParamsKind { +func (SessionsOpenCreate) Kind() SessionOpenParamsKind { return SessionOpenParamsKindCreate } @@ -6137,7 +6137,7 @@ type SessionsOpenHandoff struct { } func (SessionsOpenHandoff) sessionOpenParams() {} -func (SessionsOpenHandoff) sessionOpenParamsKind() SessionOpenParamsKind { +func (SessionsOpenHandoff) Kind() SessionOpenParamsKind { return SessionOpenParamsKindHandoff } @@ -6154,7 +6154,7 @@ type SessionsOpenRemote struct { } func (SessionsOpenRemote) sessionOpenParams() {} -func (SessionsOpenRemote) sessionOpenParamsKind() SessionOpenParamsKind { +func (SessionsOpenRemote) Kind() SessionOpenParamsKind { return SessionOpenParamsKindRemote } @@ -6173,7 +6173,7 @@ type SessionsOpenResume struct { } func (SessionsOpenResume) sessionOpenParams() {} -func (SessionsOpenResume) sessionOpenParamsKind() SessionOpenParamsKind { +func (SessionsOpenResume) Kind() SessionOpenParamsKind { return SessionOpenParamsKindResume } @@ -6190,7 +6190,7 @@ type SessionsOpenResumeLast struct { } func (SessionsOpenResumeLast) sessionOpenParams() {} -func (SessionsOpenResumeLast) sessionOpenParamsKind() SessionOpenParamsKind { +func (SessionsOpenResumeLast) Kind() SessionOpenParamsKind { return SessionOpenParamsKindResumeLast } @@ -7059,7 +7059,7 @@ type SlashCommandInput struct { // or be removed. type SlashCommandInvocationResult interface { slashCommandInvocationResult() - slashCommandInvocationResultKind() SlashCommandInvocationResultKind + Kind() SlashCommandInvocationResultKind } type RawSlashCommandInvocationResultData struct { @@ -7068,7 +7068,7 @@ type RawSlashCommandInvocationResultData struct { } func (RawSlashCommandInvocationResultData) slashCommandInvocationResult() {} -func (r RawSlashCommandInvocationResultData) slashCommandInvocationResultKind() SlashCommandInvocationResultKind { +func (r RawSlashCommandInvocationResultData) Kind() SlashCommandInvocationResultKind { return r.Discriminator } @@ -7088,7 +7088,7 @@ type SlashCommandAgentPromptResult struct { } func (SlashCommandAgentPromptResult) slashCommandInvocationResult() {} -func (SlashCommandAgentPromptResult) slashCommandInvocationResultKind() SlashCommandInvocationResultKind { +func (SlashCommandAgentPromptResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindAgentPrompt } @@ -7104,7 +7104,7 @@ type SlashCommandCompletedResult struct { } func (SlashCommandCompletedResult) slashCommandInvocationResult() {} -func (SlashCommandCompletedResult) slashCommandInvocationResultKind() SlashCommandInvocationResultKind { +func (SlashCommandCompletedResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindCompleted } @@ -7124,7 +7124,7 @@ type SlashCommandSelectSubcommandResult struct { } func (SlashCommandSelectSubcommandResult) slashCommandInvocationResult() {} -func (SlashCommandSelectSubcommandResult) slashCommandInvocationResultKind() SlashCommandInvocationResultKind { +func (SlashCommandSelectSubcommandResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindSelectSubcommand } @@ -7144,7 +7144,7 @@ type SlashCommandTextResult struct { } func (SlashCommandTextResult) slashCommandInvocationResult() {} -func (SlashCommandTextResult) slashCommandInvocationResultKind() SlashCommandInvocationResultKind { +func (SlashCommandTextResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindText } @@ -7164,7 +7164,7 @@ type SlashCommandSelectSubcommandOption struct { // Experimental: TaskInfo is part of an experimental API and may change or be removed. type TaskInfo interface { taskInfo() - taskInfoType() TaskInfoType + Type() TaskInfoType } type RawTaskInfoData struct { @@ -7173,7 +7173,7 @@ type RawTaskInfoData struct { } func (RawTaskInfoData) taskInfo() {} -func (r RawTaskInfoData) taskInfoType() TaskInfoType { +func (r RawTaskInfoData) Type() TaskInfoType { return r.Discriminator } @@ -7220,7 +7220,7 @@ type TaskAgentInfo struct { } func (TaskAgentInfo) taskInfo() {} -func (TaskAgentInfo) taskInfoType() TaskInfoType { +func (TaskAgentInfo) Type() TaskInfoType { return TaskInfoTypeAgent } @@ -7253,7 +7253,7 @@ type TaskShellInfo struct { } func (TaskShellInfo) taskInfo() {} -func (TaskShellInfo) taskInfoType() TaskInfoType { +func (TaskShellInfo) Type() TaskInfoType { return TaskInfoTypeShell } @@ -7267,7 +7267,7 @@ type TaskList struct { // Experimental: TaskProgress is part of an experimental API and may change or be removed. type TaskProgress interface { taskProgress() - taskProgressType() TaskProgressType + Type() TaskProgressType } type RawTaskProgressData struct { @@ -7276,7 +7276,7 @@ type RawTaskProgressData struct { } func (RawTaskProgressData) taskProgress() {} -func (r RawTaskProgressData) taskProgressType() TaskProgressType { +func (r RawTaskProgressData) Type() TaskProgressType { return r.Discriminator } @@ -7291,7 +7291,7 @@ type TaskAgentProgress struct { } func (TaskAgentProgress) taskProgress() {} -func (TaskAgentProgress) taskProgressType() TaskProgressType { +func (TaskAgentProgress) Type() TaskProgressType { return TaskProgressTypeAgent } @@ -7306,7 +7306,7 @@ type TaskShellProgress struct { } func (TaskShellProgress) taskProgress() {} -func (TaskShellProgress) taskProgressType() TaskProgressType { +func (TaskShellProgress) Type() TaskProgressType { return TaskProgressTypeShell } @@ -7627,7 +7627,7 @@ type UIElicitationSchema struct { // or be removed. type UIElicitationSchemaProperty interface { uiElicitationSchemaProperty() - uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType + Type() UIElicitationSchemaPropertyType } type RawUIElicitationSchemaPropertyData struct { @@ -7636,7 +7636,7 @@ type RawUIElicitationSchemaPropertyData struct { } func (RawUIElicitationSchemaPropertyData) uiElicitationSchemaProperty() {} -func (r RawUIElicitationSchemaPropertyData) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { +func (r RawUIElicitationSchemaPropertyData) Type() UIElicitationSchemaPropertyType { return r.Discriminator } @@ -7659,7 +7659,7 @@ type UIElicitationArrayAnyOfField struct { } func (UIElicitationArrayAnyOfField) uiElicitationSchemaProperty() {} -func (UIElicitationArrayAnyOfField) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { +func (UIElicitationArrayAnyOfField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeArray } @@ -7682,7 +7682,7 @@ type UIElicitationArrayEnumField struct { } func (UIElicitationArrayEnumField) uiElicitationSchemaProperty() {} -func (UIElicitationArrayEnumField) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { +func (UIElicitationArrayEnumField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeArray } @@ -7699,7 +7699,7 @@ type UIElicitationSchemaPropertyBoolean struct { } func (UIElicitationSchemaPropertyBoolean) uiElicitationSchemaProperty() {} -func (UIElicitationSchemaPropertyBoolean) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { +func (UIElicitationSchemaPropertyBoolean) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeBoolean } @@ -7721,7 +7721,7 @@ type UIElicitationSchemaPropertyNumber struct { } func (UIElicitationSchemaPropertyNumber) uiElicitationSchemaProperty() {} -func (r UIElicitationSchemaPropertyNumber) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { +func (r UIElicitationSchemaPropertyNumber) Type() UIElicitationSchemaPropertyType { if r.Discriminator == "" { return UIElicitationSchemaPropertyTypeNumber } @@ -7747,7 +7747,7 @@ type UIElicitationSchemaPropertyString struct { } func (UIElicitationSchemaPropertyString) uiElicitationSchemaProperty() {} -func (UIElicitationSchemaPropertyString) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { +func (UIElicitationSchemaPropertyString) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeString } @@ -7768,7 +7768,7 @@ type UIElicitationStringEnumField struct { } func (UIElicitationStringEnumField) uiElicitationSchemaProperty() {} -func (UIElicitationStringEnumField) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { +func (UIElicitationStringEnumField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeString } @@ -7787,7 +7787,7 @@ type UIElicitationStringOneOfField struct { } func (UIElicitationStringOneOfField) uiElicitationSchemaProperty() {} -func (UIElicitationStringOneOfField) uiElicitationSchemaPropertyType() UIElicitationSchemaPropertyType { +func (UIElicitationStringOneOfField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeString } @@ -8081,7 +8081,7 @@ type UserSettingsReloadResult struct { // removed. type UserToolSessionApproval interface { userToolSessionApproval() - userToolSessionApprovalKind() UserToolSessionApprovalKind + Kind() UserToolSessionApprovalKind } type RawUserToolSessionApprovalData struct { @@ -8090,7 +8090,7 @@ type RawUserToolSessionApprovalData struct { } func (RawUserToolSessionApprovalData) userToolSessionApproval() {} -func (r RawUserToolSessionApprovalData) userToolSessionApprovalKind() UserToolSessionApprovalKind { +func (r RawUserToolSessionApprovalData) Kind() UserToolSessionApprovalKind { return r.Discriminator } @@ -8103,7 +8103,7 @@ type UserToolSessionApprovalCommands struct { } func (UserToolSessionApprovalCommands) userToolSessionApproval() {} -func (UserToolSessionApprovalCommands) userToolSessionApprovalKind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalCommands) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindCommands } @@ -8116,7 +8116,7 @@ type UserToolSessionApprovalCustomTool struct { } func (UserToolSessionApprovalCustomTool) userToolSessionApproval() {} -func (UserToolSessionApprovalCustomTool) userToolSessionApprovalKind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalCustomTool) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindCustomTool } @@ -8129,7 +8129,7 @@ type UserToolSessionApprovalExtensionManagement struct { } func (UserToolSessionApprovalExtensionManagement) userToolSessionApproval() {} -func (UserToolSessionApprovalExtensionManagement) userToolSessionApprovalKind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalExtensionManagement) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindExtensionManagement } @@ -8142,7 +8142,7 @@ type UserToolSessionApprovalExtensionPermissionAccess struct { } func (UserToolSessionApprovalExtensionPermissionAccess) userToolSessionApproval() {} -func (UserToolSessionApprovalExtensionPermissionAccess) userToolSessionApprovalKind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalExtensionPermissionAccess) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindExtensionPermissionAccess } @@ -8157,7 +8157,7 @@ type UserToolSessionApprovalMCP struct { } func (UserToolSessionApprovalMCP) userToolSessionApproval() {} -func (UserToolSessionApprovalMCP) userToolSessionApprovalKind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalMCP) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindMCP } @@ -8168,7 +8168,7 @@ type UserToolSessionApprovalMemory struct { } func (UserToolSessionApprovalMemory) userToolSessionApproval() {} -func (UserToolSessionApprovalMemory) userToolSessionApprovalKind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalMemory) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindMemory } @@ -8179,7 +8179,7 @@ type UserToolSessionApprovalRead struct { } func (UserToolSessionApprovalRead) userToolSessionApproval() {} -func (UserToolSessionApprovalRead) userToolSessionApprovalKind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalRead) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindRead } @@ -8190,7 +8190,7 @@ type UserToolSessionApprovalWrite struct { } func (UserToolSessionApprovalWrite) userToolSessionApproval() {} -func (UserToolSessionApprovalWrite) userToolSessionApprovalKind() UserToolSessionApprovalKind { +func (UserToolSessionApprovalWrite) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindWrite } diff --git a/go/rpc/zrpc_encoding.go b/go/rpc/zrpc_encoding.go index 8c28f5f73..bf455dc7e 100644 --- a/go/rpc/zrpc_encoding.go +++ b/go/rpc/zrpc_encoding.go @@ -67,7 +67,7 @@ func (r AgentRegistrySpawnError) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.agentRegistrySpawnResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -78,7 +78,7 @@ func (r AgentRegistrySpawnRegistryTimeout) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.agentRegistrySpawnResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -89,7 +89,7 @@ func (r AgentRegistrySpawnSpawned) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.agentRegistrySpawnResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -100,7 +100,7 @@ func (r AgentRegistrySpawnValidationError) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.agentRegistrySpawnResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -176,7 +176,7 @@ func (r AttachmentBlob) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.attachmentType(), + Type: r.Type(), alias: alias(r), }) } @@ -187,7 +187,7 @@ func (r AttachmentDirectory) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.attachmentType(), + Type: r.Type(), alias: alias(r), }) } @@ -198,7 +198,7 @@ func (r AttachmentExtensionContext) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.attachmentType(), + Type: r.Type(), alias: alias(r), }) } @@ -209,7 +209,7 @@ func (r AttachmentFile) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.attachmentType(), + Type: r.Type(), alias: alias(r), }) } @@ -220,7 +220,7 @@ func (r AttachmentGitHubReference) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.attachmentType(), + Type: r.Type(), alias: alias(r), }) } @@ -231,7 +231,7 @@ func (r AttachmentSelection) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.attachmentType(), + Type: r.Type(), alias: alias(r), }) } @@ -313,7 +313,7 @@ func (r APIKeyAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.authInfoType(), + Type: r.Type(), alias: alias(r), }) } @@ -324,7 +324,7 @@ func (r CopilotAPITokenAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.authInfoType(), + Type: r.Type(), alias: alias(r), }) } @@ -335,7 +335,7 @@ func (r EnvAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.authInfoType(), + Type: r.Type(), alias: alias(r), }) } @@ -346,7 +346,7 @@ func (r GhCLIAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.authInfoType(), + Type: r.Type(), alias: alias(r), }) } @@ -357,7 +357,7 @@ func (r HMACAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.authInfoType(), + Type: r.Type(), alias: alias(r), }) } @@ -368,7 +368,7 @@ func (r TokenAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.authInfoType(), + Type: r.Type(), alias: alias(r), }) } @@ -379,7 +379,7 @@ func (r UserAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.authInfoType(), + Type: r.Type(), alias: alias(r), }) } @@ -422,7 +422,7 @@ func (r QueuedCommandHandled) MarshalJSON() ([]byte, error) { Handled bool `json:"handled"` alias }{ - Handled: r.queuedCommandResultHandled(), + Handled: r.Handled(), alias: alias(r), }) } @@ -433,7 +433,7 @@ func (r QueuedCommandNotHandled) MarshalJSON() ([]byte, error) { Handled bool `json:"handled"` alias }{ - Handled: r.queuedCommandResultHandled(), + Handled: r.Handled(), alias: alias(r), }) } @@ -561,7 +561,7 @@ func (r ExternalToolTextResultForLlmContentAudio) MarshalJSON() ([]byte, error) Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.externalToolTextResultForLlmContentType(), + Type: r.Type(), alias: alias(r), }) } @@ -572,7 +572,7 @@ func (r ExternalToolTextResultForLlmContentImage) MarshalJSON() ([]byte, error) Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.externalToolTextResultForLlmContentType(), + Type: r.Type(), alias: alias(r), }) } @@ -657,7 +657,7 @@ func (r ExternalToolTextResultForLlmContentResource) MarshalJSON() ([]byte, erro Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.externalToolTextResultForLlmContentType(), + Type: r.Type(), alias: alias(r), }) } @@ -668,7 +668,7 @@ func (r ExternalToolTextResultForLlmContentResourceLink) MarshalJSON() ([]byte, Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.externalToolTextResultForLlmContentType(), + Type: r.Type(), alias: alias(r), }) } @@ -679,7 +679,7 @@ func (r ExternalToolTextResultForLlmContentTerminal) MarshalJSON() ([]byte, erro Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.externalToolTextResultForLlmContentType(), + Type: r.Type(), alias: alias(r), }) } @@ -690,7 +690,7 @@ func (r ExternalToolTextResultForLlmContentText) MarshalJSON() ([]byte, error) { Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.externalToolTextResultForLlmContentType(), + Type: r.Type(), alias: alias(r), }) } @@ -1201,7 +1201,7 @@ func (r PermissionDecisionApproved) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1289,7 +1289,7 @@ func (r UserToolSessionApprovalCommands) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.userToolSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1300,7 +1300,7 @@ func (r UserToolSessionApprovalCustomTool) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.userToolSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1311,7 +1311,7 @@ func (r UserToolSessionApprovalExtensionManagement) MarshalJSON() ([]byte, error Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.userToolSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1322,7 +1322,7 @@ func (r UserToolSessionApprovalExtensionPermissionAccess) MarshalJSON() ([]byte, Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.userToolSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1333,7 +1333,7 @@ func (r UserToolSessionApprovalMCP) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.userToolSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1344,7 +1344,7 @@ func (r UserToolSessionApprovalMemory) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.userToolSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1355,7 +1355,7 @@ func (r UserToolSessionApprovalRead) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.userToolSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1366,7 +1366,7 @@ func (r UserToolSessionApprovalWrite) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.userToolSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1397,7 +1397,7 @@ func (r PermissionDecisionApprovedForLocation) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1426,7 +1426,7 @@ func (r PermissionDecisionApprovedForSession) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1520,7 +1520,7 @@ func (r PermissionDecisionApproveForLocationApprovalCommands) MarshalJSON() ([]b Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForLocationApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1531,7 +1531,7 @@ func (r PermissionDecisionApproveForLocationApprovalCustomTool) MarshalJSON() ([ Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForLocationApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1542,7 +1542,7 @@ func (r PermissionDecisionApproveForLocationApprovalExtensionManagement) Marshal Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForLocationApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1553,7 +1553,7 @@ func (r PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) M Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForLocationApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1564,7 +1564,7 @@ func (r PermissionDecisionApproveForLocationApprovalMCP) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForLocationApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1575,7 +1575,7 @@ func (r PermissionDecisionApproveForLocationApprovalMCPSampling) MarshalJSON() ( Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForLocationApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1586,7 +1586,7 @@ func (r PermissionDecisionApproveForLocationApprovalMemory) MarshalJSON() ([]byt Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForLocationApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1597,7 +1597,7 @@ func (r PermissionDecisionApproveForLocationApprovalRead) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForLocationApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1608,7 +1608,7 @@ func (r PermissionDecisionApproveForLocationApprovalWrite) MarshalJSON() ([]byte Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForLocationApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1639,7 +1639,7 @@ func (r PermissionDecisionApproveForLocation) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1733,7 +1733,7 @@ func (r PermissionDecisionApproveForSessionApprovalCommands) MarshalJSON() ([]by Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1744,7 +1744,7 @@ func (r PermissionDecisionApproveForSessionApprovalCustomTool) MarshalJSON() ([] Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1755,7 +1755,7 @@ func (r PermissionDecisionApproveForSessionApprovalExtensionManagement) MarshalJ Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1766,7 +1766,7 @@ func (r PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) Ma Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1777,7 +1777,7 @@ func (r PermissionDecisionApproveForSessionApprovalMCP) MarshalJSON() ([]byte, e Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1788,7 +1788,7 @@ func (r PermissionDecisionApproveForSessionApprovalMCPSampling) MarshalJSON() ([ Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1799,7 +1799,7 @@ func (r PermissionDecisionApproveForSessionApprovalMemory) MarshalJSON() ([]byte Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1810,7 +1810,7 @@ func (r PermissionDecisionApproveForSessionApprovalRead) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1821,7 +1821,7 @@ func (r PermissionDecisionApproveForSessionApprovalWrite) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.permissionDecisionApproveForSessionApprovalKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1852,7 +1852,7 @@ func (r PermissionDecisionApproveForSession) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1863,7 +1863,7 @@ func (r PermissionDecisionApproveOnce) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1874,7 +1874,7 @@ func (r PermissionDecisionApprovePermanently) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1885,7 +1885,7 @@ func (r PermissionDecisionCancelled) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1896,7 +1896,7 @@ func (r PermissionDecisionDeniedByContentExclusionPolicy) MarshalJSON() ([]byte, Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1907,7 +1907,7 @@ func (r PermissionDecisionDeniedByPermissionRequestHook) MarshalJSON() ([]byte, Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1918,7 +1918,7 @@ func (r PermissionDecisionDeniedByRules) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1929,7 +1929,7 @@ func (r PermissionDecisionDeniedInteractivelyByUser) MarshalJSON() ([]byte, erro Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1940,7 +1940,7 @@ func (r PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) Marsha Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1951,7 +1951,7 @@ func (r PermissionDecisionReject) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1962,7 +1962,7 @@ func (r PermissionDecisionUserNotAvailable) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.permissionDecisionKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2076,7 +2076,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsCommands) MarshalJSON() ([]byt Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2087,7 +2087,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsCustomTool) MarshalJSON() ([]b Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2098,7 +2098,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsExtensionManagement) MarshalJS Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2109,7 +2109,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) Mar Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2120,7 +2120,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsMCP) MarshalJSON() ([]byte, er Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2131,7 +2131,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsMCPSampling) MarshalJSON() ([] Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2142,7 +2142,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsMemory) MarshalJSON() ([]byte, Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2153,7 +2153,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsRead) MarshalJSON() ([]byte, e Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2164,7 +2164,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsWrite) MarshalJSON() ([]byte, Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.permissionsLocationsAddToolApprovalDetailsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2260,7 +2260,7 @@ func (r ExtensionContextPushInput) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.pushAttachmentType(), + Type: r.Type(), alias: alias(r), }) } @@ -2271,7 +2271,7 @@ func (r PushAttachmentBlob) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.pushAttachmentType(), + Type: r.Type(), alias: alias(r), }) } @@ -2282,7 +2282,7 @@ func (r PushAttachmentDirectory) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.pushAttachmentType(), + Type: r.Type(), alias: alias(r), }) } @@ -2293,7 +2293,7 @@ func (r PushAttachmentFile) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.pushAttachmentType(), + Type: r.Type(), alias: alias(r), }) } @@ -2304,7 +2304,7 @@ func (r PushAttachmentGitHubReference) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.pushAttachmentType(), + Type: r.Type(), alias: alias(r), }) } @@ -2315,7 +2315,7 @@ func (r PushAttachmentSelection) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.pushAttachmentType(), + Type: r.Type(), alias: alias(r), }) } @@ -2379,7 +2379,7 @@ func (r RemoteControlStatusActive) MarshalJSON() ([]byte, error) { State RemoteControlStatusState `json:"state"` alias }{ - State: r.remoteControlStatusState(), + State: r.State(), alias: alias(r), }) } @@ -2390,7 +2390,7 @@ func (r RemoteControlStatusConnecting) MarshalJSON() ([]byte, error) { State RemoteControlStatusState `json:"state"` alias }{ - State: r.remoteControlStatusState(), + State: r.State(), alias: alias(r), }) } @@ -2401,7 +2401,7 @@ func (r RemoteControlStatusError) MarshalJSON() ([]byte, error) { State RemoteControlStatusState `json:"state"` alias }{ - State: r.remoteControlStatusState(), + State: r.State(), alias: alias(r), }) } @@ -2412,7 +2412,7 @@ func (r RemoteControlStatusOff) MarshalJSON() ([]byte, error) { State RemoteControlStatusState `json:"state"` alias }{ - State: r.remoteControlStatusState(), + State: r.State(), alias: alias(r), }) } @@ -2859,7 +2859,7 @@ func (r SessionsOpenAttach) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.sessionOpenParamsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2870,7 +2870,7 @@ func (r SessionsOpenCloud) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.sessionOpenParamsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2881,7 +2881,7 @@ func (r SessionsOpenCreate) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.sessionOpenParamsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2892,7 +2892,7 @@ func (r SessionsOpenHandoff) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.sessionOpenParamsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2903,7 +2903,7 @@ func (r SessionsOpenRemote) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.sessionOpenParamsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2914,7 +2914,7 @@ func (r SessionsOpenResume) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.sessionOpenParamsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2925,7 +2925,7 @@ func (r SessionsOpenResumeLast) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.sessionOpenParamsKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3007,7 +3007,7 @@ func (r SlashCommandAgentPromptResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.slashCommandInvocationResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3018,7 +3018,7 @@ func (r SlashCommandCompletedResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.slashCommandInvocationResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3029,7 +3029,7 @@ func (r SlashCommandSelectSubcommandResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.slashCommandInvocationResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3040,7 +3040,7 @@ func (r SlashCommandTextResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.slashCommandInvocationResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3092,7 +3092,7 @@ func (r TaskAgentInfo) MarshalJSON() ([]byte, error) { Type TaskInfoType `json:"type"` alias }{ - Type: r.taskInfoType(), + Type: r.Type(), alias: alias(r), }) } @@ -3103,7 +3103,7 @@ func (r TaskShellInfo) MarshalJSON() ([]byte, error) { Type TaskInfoType `json:"type"` alias }{ - Type: r.taskInfoType(), + Type: r.Type(), alias: alias(r), }) } @@ -3176,7 +3176,7 @@ func (r TaskAgentProgress) MarshalJSON() ([]byte, error) { Type TaskProgressType `json:"type"` alias }{ - Type: r.taskProgressType(), + Type: r.Type(), alias: alias(r), }) } @@ -3187,7 +3187,7 @@ func (r TaskShellProgress) MarshalJSON() ([]byte, error) { Type TaskProgressType `json:"type"` alias }{ - Type: r.taskProgressType(), + Type: r.Type(), alias: alias(r), }) } @@ -3474,7 +3474,7 @@ func (r UIElicitationArrayAnyOfField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.uiElicitationSchemaPropertyType(), + Type: r.Type(), alias: alias(r), }) } @@ -3485,7 +3485,7 @@ func (r UIElicitationArrayEnumField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.uiElicitationSchemaPropertyType(), + Type: r.Type(), alias: alias(r), }) } @@ -3496,7 +3496,7 @@ func (r UIElicitationSchemaPropertyBoolean) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.uiElicitationSchemaPropertyType(), + Type: r.Type(), alias: alias(r), }) } @@ -3507,7 +3507,7 @@ func (r UIElicitationSchemaPropertyNumber) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.uiElicitationSchemaPropertyType(), + Type: r.Type(), alias: alias(r), }) } @@ -3518,7 +3518,7 @@ func (r UIElicitationSchemaPropertyString) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.uiElicitationSchemaPropertyType(), + Type: r.Type(), alias: alias(r), }) } @@ -3529,7 +3529,7 @@ func (r UIElicitationStringEnumField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.uiElicitationSchemaPropertyType(), + Type: r.Type(), alias: alias(r), }) } @@ -3540,7 +3540,7 @@ func (r UIElicitationStringOneOfField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.uiElicitationSchemaPropertyType(), + Type: r.Type(), alias: alias(r), }) } diff --git a/go/rpc/zsession_encoding.go b/go/rpc/zsession_encoding.go index a9bcd3d83..c9091edc5 100644 --- a/go/rpc/zsession_encoding.go +++ b/go/rpc/zsession_encoding.go @@ -714,7 +714,7 @@ func (r ToolExecutionCompleteContentAudio) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.toolExecutionCompleteContentType(), + Type: r.Type(), alias: alias(r), }) } @@ -725,7 +725,7 @@ func (r ToolExecutionCompleteContentImage) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.toolExecutionCompleteContentType(), + Type: r.Type(), alias: alias(r), }) } @@ -798,7 +798,7 @@ func (r ToolExecutionCompleteContentResource) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.toolExecutionCompleteContentType(), + Type: r.Type(), alias: alias(r), }) } @@ -809,7 +809,7 @@ func (r ToolExecutionCompleteContentResourceLink) MarshalJSON() ([]byte, error) Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.toolExecutionCompleteContentType(), + Type: r.Type(), alias: alias(r), }) } @@ -820,7 +820,7 @@ func (r ToolExecutionCompleteContentTerminal) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.toolExecutionCompleteContentType(), + Type: r.Type(), alias: alias(r), }) } @@ -831,7 +831,7 @@ func (r ToolExecutionCompleteContentText) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.toolExecutionCompleteContentType(), + Type: r.Type(), alias: alias(r), }) } @@ -934,7 +934,7 @@ func (r SystemNotificationAgentCompleted) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.systemNotificationType(), + Type: r.Type(), alias: alias(r), }) } @@ -945,7 +945,7 @@ func (r SystemNotificationAgentIdle) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.systemNotificationType(), + Type: r.Type(), alias: alias(r), }) } @@ -956,7 +956,7 @@ func (r SystemNotificationInstructionDiscovered) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.systemNotificationType(), + Type: r.Type(), alias: alias(r), }) } @@ -967,7 +967,7 @@ func (r SystemNotificationNewInboxMessage) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.systemNotificationType(), + Type: r.Type(), alias: alias(r), }) } @@ -978,7 +978,7 @@ func (r SystemNotificationShellCompleted) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.systemNotificationType(), + Type: r.Type(), alias: alias(r), }) } @@ -989,7 +989,7 @@ func (r SystemNotificationShellDetachedCompleted) MarshalJSON() ([]byte, error) Type SystemNotificationType `json:"type"` alias }{ - Type: r.systemNotificationType(), + Type: r.Type(), alias: alias(r), }) } @@ -1109,7 +1109,7 @@ func (r PermissionRequestCustomTool) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.permissionRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1120,7 +1120,7 @@ func (r PermissionRequestExtensionManagement) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.permissionRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1131,7 +1131,7 @@ func (r PermissionRequestExtensionPermissionAccess) MarshalJSON() ([]byte, error Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.permissionRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1142,7 +1142,7 @@ func (r PermissionRequestHook) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.permissionRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1153,7 +1153,7 @@ func (r PermissionRequestMCP) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.permissionRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1164,7 +1164,7 @@ func (r PermissionRequestMemory) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.permissionRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1175,7 +1175,7 @@ func (r PermissionRequestRead) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.permissionRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1186,7 +1186,7 @@ func (r PermissionRequestShell) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.permissionRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1197,7 +1197,7 @@ func (r PermissionRequestURL) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.permissionRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1208,7 +1208,7 @@ func (r PermissionRequestWrite) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.permissionRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1314,7 +1314,7 @@ func (r PermissionPromptRequestCommands) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.permissionPromptRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1325,7 +1325,7 @@ func (r PermissionPromptRequestCustomTool) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.permissionPromptRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1336,7 +1336,7 @@ func (r PermissionPromptRequestExtensionManagement) MarshalJSON() ([]byte, error Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.permissionPromptRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1347,7 +1347,7 @@ func (r PermissionPromptRequestExtensionPermissionAccess) MarshalJSON() ([]byte, Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.permissionPromptRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1358,7 +1358,7 @@ func (r PermissionPromptRequestHook) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.permissionPromptRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1369,7 +1369,7 @@ func (r PermissionPromptRequestMCP) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.permissionPromptRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1380,7 +1380,7 @@ func (r PermissionPromptRequestMemory) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.permissionPromptRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1391,7 +1391,7 @@ func (r PermissionPromptRequestPath) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.permissionPromptRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1402,7 +1402,7 @@ func (r PermissionPromptRequestRead) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.permissionPromptRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1413,7 +1413,7 @@ func (r PermissionPromptRequestURL) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.permissionPromptRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1424,7 +1424,7 @@ func (r PermissionPromptRequestWrite) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.permissionPromptRequestKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1548,7 +1548,7 @@ func (r PermissionApproved) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.permissionResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1579,7 +1579,7 @@ func (r PermissionApprovedForLocation) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.permissionResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1608,7 +1608,7 @@ func (r PermissionApprovedForSession) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.permissionResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1619,7 +1619,7 @@ func (r PermissionCancelled) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.permissionResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1630,7 +1630,7 @@ func (r PermissionDeniedByContentExclusionPolicy) MarshalJSON() ([]byte, error) Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.permissionResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1641,7 +1641,7 @@ func (r PermissionDeniedByPermissionRequestHook) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.permissionResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1652,7 +1652,7 @@ func (r PermissionDeniedByRules) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.permissionResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1663,7 +1663,7 @@ func (r PermissionDeniedInteractivelyByUser) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.permissionResultKind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1674,7 +1674,7 @@ func (r PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser) MarshalJSON() Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.permissionResultKind(), + Kind: r.Kind(), alias: alias(r), }) } diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go index 101a76581..5148d46c3 100644 --- a/go/rpc/zsession_events.go +++ b/go/rpc/zsession_events.go @@ -1914,7 +1914,7 @@ type MCPServersLoadedServer struct { // Derived user-facing permission prompt details for UI consumers type PermissionPromptRequest interface { permissionPromptRequest() - permissionPromptRequestKind() PermissionPromptRequestKind + Kind() PermissionPromptRequestKind } type RawPermissionPromptRequest struct { @@ -1923,7 +1923,7 @@ type RawPermissionPromptRequest struct { } func (RawPermissionPromptRequest) permissionPromptRequest() {} -func (r RawPermissionPromptRequest) permissionPromptRequestKind() PermissionPromptRequestKind { +func (r RawPermissionPromptRequest) Kind() PermissionPromptRequestKind { return r.Discriminator } @@ -1944,7 +1944,7 @@ type PermissionPromptRequestCommands struct { } func (PermissionPromptRequestCommands) permissionPromptRequest() {} -func (PermissionPromptRequestCommands) permissionPromptRequestKind() PermissionPromptRequestKind { +func (PermissionPromptRequestCommands) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindCommands } @@ -1961,7 +1961,7 @@ type PermissionPromptRequestCustomTool struct { } func (PermissionPromptRequestCustomTool) permissionPromptRequest() {} -func (PermissionPromptRequestCustomTool) permissionPromptRequestKind() PermissionPromptRequestKind { +func (PermissionPromptRequestCustomTool) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindCustomTool } @@ -1976,7 +1976,7 @@ type PermissionPromptRequestExtensionManagement struct { } func (PermissionPromptRequestExtensionManagement) permissionPromptRequest() {} -func (PermissionPromptRequestExtensionManagement) permissionPromptRequestKind() PermissionPromptRequestKind { +func (PermissionPromptRequestExtensionManagement) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindExtensionManagement } @@ -1991,7 +1991,7 @@ type PermissionPromptRequestExtensionPermissionAccess struct { } func (PermissionPromptRequestExtensionPermissionAccess) permissionPromptRequest() {} -func (PermissionPromptRequestExtensionPermissionAccess) permissionPromptRequestKind() PermissionPromptRequestKind { +func (PermissionPromptRequestExtensionPermissionAccess) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindExtensionPermissionAccess } @@ -2008,7 +2008,7 @@ type PermissionPromptRequestHook struct { } func (PermissionPromptRequestHook) permissionPromptRequest() {} -func (PermissionPromptRequestHook) permissionPromptRequestKind() PermissionPromptRequestKind { +func (PermissionPromptRequestHook) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindHook } @@ -2027,7 +2027,7 @@ type PermissionPromptRequestMCP struct { } func (PermissionPromptRequestMCP) permissionPromptRequest() {} -func (PermissionPromptRequestMCP) permissionPromptRequestKind() PermissionPromptRequestKind { +func (PermissionPromptRequestMCP) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindMCP } @@ -2050,7 +2050,7 @@ type PermissionPromptRequestMemory struct { } func (PermissionPromptRequestMemory) permissionPromptRequest() {} -func (PermissionPromptRequestMemory) permissionPromptRequestKind() PermissionPromptRequestKind { +func (PermissionPromptRequestMemory) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindMemory } @@ -2065,7 +2065,7 @@ type PermissionPromptRequestPath struct { } func (PermissionPromptRequestPath) permissionPromptRequest() {} -func (PermissionPromptRequestPath) permissionPromptRequestKind() PermissionPromptRequestKind { +func (PermissionPromptRequestPath) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindPath } @@ -2080,7 +2080,7 @@ type PermissionPromptRequestRead struct { } func (PermissionPromptRequestRead) permissionPromptRequest() {} -func (PermissionPromptRequestRead) permissionPromptRequestKind() PermissionPromptRequestKind { +func (PermissionPromptRequestRead) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindRead } @@ -2095,7 +2095,7 @@ type PermissionPromptRequestURL struct { } func (PermissionPromptRequestURL) permissionPromptRequest() {} -func (PermissionPromptRequestURL) permissionPromptRequestKind() PermissionPromptRequestKind { +func (PermissionPromptRequestURL) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindURL } @@ -2116,14 +2116,14 @@ type PermissionPromptRequestWrite struct { } func (PermissionPromptRequestWrite) permissionPromptRequest() {} -func (PermissionPromptRequestWrite) permissionPromptRequestKind() PermissionPromptRequestKind { +func (PermissionPromptRequestWrite) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindWrite } // Details of the permission being requested type PermissionRequest interface { permissionRequest() - permissionRequestKind() PermissionRequestKind + Kind() PermissionRequestKind } type RawPermissionRequest struct { @@ -2132,7 +2132,7 @@ type RawPermissionRequest struct { } func (RawPermissionRequest) permissionRequest() {} -func (r RawPermissionRequest) permissionRequestKind() PermissionRequestKind { +func (r RawPermissionRequest) Kind() PermissionRequestKind { return r.Discriminator } @@ -2149,7 +2149,7 @@ type PermissionRequestCustomTool struct { } func (PermissionRequestCustomTool) permissionRequest() {} -func (PermissionRequestCustomTool) permissionRequestKind() PermissionRequestKind { +func (PermissionRequestCustomTool) Kind() PermissionRequestKind { return PermissionRequestKindCustomTool } @@ -2164,7 +2164,7 @@ type PermissionRequestExtensionManagement struct { } func (PermissionRequestExtensionManagement) permissionRequest() {} -func (PermissionRequestExtensionManagement) permissionRequestKind() PermissionRequestKind { +func (PermissionRequestExtensionManagement) Kind() PermissionRequestKind { return PermissionRequestKindExtensionManagement } @@ -2179,7 +2179,7 @@ type PermissionRequestExtensionPermissionAccess struct { } func (PermissionRequestExtensionPermissionAccess) permissionRequest() {} -func (PermissionRequestExtensionPermissionAccess) permissionRequestKind() PermissionRequestKind { +func (PermissionRequestExtensionPermissionAccess) Kind() PermissionRequestKind { return PermissionRequestKindExtensionPermissionAccess } @@ -2196,7 +2196,7 @@ type PermissionRequestHook struct { } func (PermissionRequestHook) permissionRequest() {} -func (PermissionRequestHook) permissionRequestKind() PermissionRequestKind { +func (PermissionRequestHook) Kind() PermissionRequestKind { return PermissionRequestKindHook } @@ -2217,7 +2217,7 @@ type PermissionRequestMCP struct { } func (PermissionRequestMCP) permissionRequest() {} -func (PermissionRequestMCP) permissionRequestKind() PermissionRequestKind { +func (PermissionRequestMCP) Kind() PermissionRequestKind { return PermissionRequestKindMCP } @@ -2240,7 +2240,7 @@ type PermissionRequestMemory struct { } func (PermissionRequestMemory) permissionRequest() {} -func (PermissionRequestMemory) permissionRequestKind() PermissionRequestKind { +func (PermissionRequestMemory) Kind() PermissionRequestKind { return PermissionRequestKindMemory } @@ -2255,7 +2255,7 @@ type PermissionRequestRead struct { } func (PermissionRequestRead) permissionRequest() {} -func (PermissionRequestRead) permissionRequestKind() PermissionRequestKind { +func (PermissionRequestRead) Kind() PermissionRequestKind { return PermissionRequestKindRead } @@ -2282,7 +2282,7 @@ type PermissionRequestShell struct { } func (PermissionRequestShell) permissionRequest() {} -func (PermissionRequestShell) permissionRequestKind() PermissionRequestKind { +func (PermissionRequestShell) Kind() PermissionRequestKind { return PermissionRequestKindShell } @@ -2297,7 +2297,7 @@ type PermissionRequestURL struct { } func (PermissionRequestURL) permissionRequest() {} -func (PermissionRequestURL) permissionRequestKind() PermissionRequestKind { +func (PermissionRequestURL) Kind() PermissionRequestKind { return PermissionRequestKindURL } @@ -2318,7 +2318,7 @@ type PermissionRequestWrite struct { } func (PermissionRequestWrite) permissionRequest() {} -func (PermissionRequestWrite) permissionRequestKind() PermissionRequestKind { +func (PermissionRequestWrite) Kind() PermissionRequestKind { return PermissionRequestKindWrite } @@ -2339,7 +2339,7 @@ type PermissionRequestShellPossibleURL struct { // The result of the permission request type PermissionResult interface { permissionResult() - permissionResultKind() PermissionResultKind + Kind() PermissionResultKind } type RawPermissionResult struct { @@ -2348,7 +2348,7 @@ type RawPermissionResult struct { } func (RawPermissionResult) permissionResult() {} -func (r RawPermissionResult) permissionResultKind() PermissionResultKind { +func (r RawPermissionResult) Kind() PermissionResultKind { return r.Discriminator } @@ -2357,7 +2357,7 @@ type PermissionApproved struct { } func (PermissionApproved) permissionResult() {} -func (PermissionApproved) permissionResultKind() PermissionResultKind { +func (PermissionApproved) Kind() PermissionResultKind { return PermissionResultKindApproved } @@ -2370,7 +2370,7 @@ type PermissionApprovedForLocation struct { } func (PermissionApprovedForLocation) permissionResult() {} -func (PermissionApprovedForLocation) permissionResultKind() PermissionResultKind { +func (PermissionApprovedForLocation) Kind() PermissionResultKind { return PermissionResultKindApprovedForLocation } @@ -2381,7 +2381,7 @@ type PermissionApprovedForSession struct { } func (PermissionApprovedForSession) permissionResult() {} -func (PermissionApprovedForSession) permissionResultKind() PermissionResultKind { +func (PermissionApprovedForSession) Kind() PermissionResultKind { return PermissionResultKindApprovedForSession } @@ -2392,7 +2392,7 @@ type PermissionCancelled struct { } func (PermissionCancelled) permissionResult() {} -func (PermissionCancelled) permissionResultKind() PermissionResultKind { +func (PermissionCancelled) Kind() PermissionResultKind { return PermissionResultKindCancelled } @@ -2405,7 +2405,7 @@ type PermissionDeniedByContentExclusionPolicy struct { } func (PermissionDeniedByContentExclusionPolicy) permissionResult() {} -func (PermissionDeniedByContentExclusionPolicy) permissionResultKind() PermissionResultKind { +func (PermissionDeniedByContentExclusionPolicy) Kind() PermissionResultKind { return PermissionResultKindDeniedByContentExclusionPolicy } @@ -2418,7 +2418,7 @@ type PermissionDeniedByPermissionRequestHook struct { } func (PermissionDeniedByPermissionRequestHook) permissionResult() {} -func (PermissionDeniedByPermissionRequestHook) permissionResultKind() PermissionResultKind { +func (PermissionDeniedByPermissionRequestHook) Kind() PermissionResultKind { return PermissionResultKindDeniedByPermissionRequestHook } @@ -2429,7 +2429,7 @@ type PermissionDeniedByRules struct { } func (PermissionDeniedByRules) permissionResult() {} -func (PermissionDeniedByRules) permissionResultKind() PermissionResultKind { +func (PermissionDeniedByRules) Kind() PermissionResultKind { return PermissionResultKindDeniedByRules } @@ -2442,7 +2442,7 @@ type PermissionDeniedInteractivelyByUser struct { } func (PermissionDeniedInteractivelyByUser) permissionResult() {} -func (PermissionDeniedInteractivelyByUser) permissionResultKind() PermissionResultKind { +func (PermissionDeniedInteractivelyByUser) Kind() PermissionResultKind { return PermissionResultKindDeniedInteractivelyByUser } @@ -2451,7 +2451,7 @@ type PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser struct { } func (PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser) permissionResult() {} -func (PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser) permissionResultKind() PermissionResultKind { +func (PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser) Kind() PermissionResultKind { return PermissionResultKindDeniedNoApprovalRuleAndCouldNotRequestFromUser } @@ -2541,7 +2541,7 @@ type SystemMessageMetadata struct { // Structured metadata identifying what triggered this notification type SystemNotification interface { systemNotification() - systemNotificationType() SystemNotificationType + Type() SystemNotificationType } type RawSystemNotification struct { @@ -2550,7 +2550,7 @@ type RawSystemNotification struct { } func (RawSystemNotification) systemNotification() {} -func (r RawSystemNotification) systemNotificationType() SystemNotificationType { +func (r RawSystemNotification) Type() SystemNotificationType { return r.Discriminator } @@ -2569,7 +2569,7 @@ type SystemNotificationAgentCompleted struct { } func (SystemNotificationAgentCompleted) systemNotification() {} -func (SystemNotificationAgentCompleted) systemNotificationType() SystemNotificationType { +func (SystemNotificationAgentCompleted) Type() SystemNotificationType { return SystemNotificationTypeAgentCompleted } @@ -2584,7 +2584,7 @@ type SystemNotificationAgentIdle struct { } func (SystemNotificationAgentIdle) systemNotification() {} -func (SystemNotificationAgentIdle) systemNotificationType() SystemNotificationType { +func (SystemNotificationAgentIdle) Type() SystemNotificationType { return SystemNotificationTypeAgentIdle } @@ -2601,7 +2601,7 @@ type SystemNotificationInstructionDiscovered struct { } func (SystemNotificationInstructionDiscovered) systemNotification() {} -func (SystemNotificationInstructionDiscovered) systemNotificationType() SystemNotificationType { +func (SystemNotificationInstructionDiscovered) Type() SystemNotificationType { return SystemNotificationTypeInstructionDiscovered } @@ -2618,7 +2618,7 @@ type SystemNotificationNewInboxMessage struct { } func (SystemNotificationNewInboxMessage) systemNotification() {} -func (SystemNotificationNewInboxMessage) systemNotificationType() SystemNotificationType { +func (SystemNotificationNewInboxMessage) Type() SystemNotificationType { return SystemNotificationTypeNewInboxMessage } @@ -2633,7 +2633,7 @@ type SystemNotificationShellCompleted struct { } func (SystemNotificationShellCompleted) systemNotification() {} -func (SystemNotificationShellCompleted) systemNotificationType() SystemNotificationType { +func (SystemNotificationShellCompleted) Type() SystemNotificationType { return SystemNotificationTypeShellCompleted } @@ -2646,14 +2646,14 @@ type SystemNotificationShellDetachedCompleted struct { } func (SystemNotificationShellDetachedCompleted) systemNotification() {} -func (SystemNotificationShellDetachedCompleted) systemNotificationType() SystemNotificationType { +func (SystemNotificationShellDetachedCompleted) Type() SystemNotificationType { return SystemNotificationTypeShellDetachedCompleted } // A content block within a tool result, which may be text, terminal output, image, audio, or a resource type ToolExecutionCompleteContent interface { toolExecutionCompleteContent() - toolExecutionCompleteContentType() ToolExecutionCompleteContentType + Type() ToolExecutionCompleteContentType } type RawToolExecutionCompleteContent struct { @@ -2662,7 +2662,7 @@ type RawToolExecutionCompleteContent struct { } func (RawToolExecutionCompleteContent) toolExecutionCompleteContent() {} -func (r RawToolExecutionCompleteContent) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { +func (r RawToolExecutionCompleteContent) Type() ToolExecutionCompleteContentType { return r.Discriminator } @@ -2675,7 +2675,7 @@ type ToolExecutionCompleteContentAudio struct { } func (ToolExecutionCompleteContentAudio) toolExecutionCompleteContent() {} -func (ToolExecutionCompleteContentAudio) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { +func (ToolExecutionCompleteContentAudio) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeAudio } @@ -2688,7 +2688,7 @@ type ToolExecutionCompleteContentImage struct { } func (ToolExecutionCompleteContentImage) toolExecutionCompleteContent() {} -func (ToolExecutionCompleteContentImage) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { +func (ToolExecutionCompleteContentImage) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeImage } @@ -2699,7 +2699,7 @@ type ToolExecutionCompleteContentResource struct { } func (ToolExecutionCompleteContentResource) toolExecutionCompleteContent() {} -func (ToolExecutionCompleteContentResource) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { +func (ToolExecutionCompleteContentResource) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeResource } @@ -2722,7 +2722,7 @@ type ToolExecutionCompleteContentResourceLink struct { } func (ToolExecutionCompleteContentResourceLink) toolExecutionCompleteContent() {} -func (ToolExecutionCompleteContentResourceLink) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { +func (ToolExecutionCompleteContentResourceLink) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeResourceLink } @@ -2737,7 +2737,7 @@ type ToolExecutionCompleteContentTerminal struct { } func (ToolExecutionCompleteContentTerminal) toolExecutionCompleteContent() {} -func (ToolExecutionCompleteContentTerminal) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { +func (ToolExecutionCompleteContentTerminal) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeTerminal } @@ -2748,7 +2748,7 @@ type ToolExecutionCompleteContentText struct { } func (ToolExecutionCompleteContentText) toolExecutionCompleteContent() {} -func (ToolExecutionCompleteContentText) toolExecutionCompleteContentType() ToolExecutionCompleteContentType { +func (ToolExecutionCompleteContentText) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeText } diff --git a/scripts/codegen/go.ts b/scripts/codegen/go.ts index e8436a4e7..5149c4c8e 100644 --- a/scripts/codegen/go.ts +++ b/scripts/codegen/go.ts @@ -1741,10 +1741,18 @@ function goDiscriminatorMethodName( const collidesWithVariantField = variants.some((variant) => { const resolved = resolveSchema(variant.schema, ctx.definitions) ?? variant.schema; const objectSchema = resolveObjectSchema(resolved, ctx.definitions) ?? resolved; + const variantPreExisting = ctx.generatedNames.has(variant.typeName); return Object.keys(objectSchema.properties ?? {}).some((propName) => { const propGoName = toGoFieldName(propName); if (propName === discriminatorProp) { - return propGoName === discGoName || (variant.discriminatorValues.length > 1 && discGoName === "Discriminator"); + // The flat-union variant emission elides single-value discriminators + // and renames multi-value ones to ``Discriminator``, so a natural-name + // collision is only possible when the variant struct is a pre-existing + // type (already in ``ctx.generatedNames``) that retained the discriminator + // as a struct field with its natural Go name. The ``Discriminator``-rename + // collision case is independent and detected by the second clause. + return (variantPreExisting && propGoName === discGoName) + || (variant.discriminatorValues.length > 1 && discGoName === "Discriminator"); } return propGoName === discGoName; });