From fe86013ce377237cd599d9295674acc59ae1a631 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 13 Aug 2026 21:08:45 +0000 Subject: [PATCH] Update @github/copilot to 1.0.80-0 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code --- dotnet/src/Generated/Rpc.cs | 1228 +++++- dotnet/src/Generated/SessionEvents.cs | 761 +++- go/rpc/zrpc.go | 1658 ++++++-- go/rpc/zrpc_encoding.go | 731 +++- go/rpc/zsession_encoding.go | 46 + go/rpc/zsession_events.go | 238 +- go/zsession_events.go | 35 + java/pom.xml | 2 +- java/scripts/codegen/package-lock.json | 72 +- java/scripts/codegen/package.json | 2 +- .../generated/AgentInterruptedActivity.java | 39 + .../AgentInterruptedCancelPhase.java | 35 + .../generated/AgentInterruptedEvent.java | 66 + .../generated/AssistantMessageEvent.java | 1 + .../AssistantMessageServerTools.java | 5 + .../generated/AssistantReasoningEvent.java | 1 + .../generated/AssistantUsageEvent.java | 17 + .../generated/AssistantUsageTransport.java | 35 + .../generated/ExitPlanModeRequestedEvent.java | 4 +- .../generated/FactoryRunUpdatedEvent.java | 1 + .../generated/ModelCallFailureEvent.java | 1 + .../copilot/generated/ModelChangeSource.java | 53 + .../generated/SandboxDecisionEvent.java | 38 + .../copilot/generated/SessionEvent.java | 4 + .../generated/SessionModelChangeEvent.java | 4 +- .../generated/ToolExecutionCompleteEvent.java | 1 + ...ToolExecutionCompleteUIResourceMetaUI.java | 2 + ...lExecutionCompleteUIResourceMetaUICsp.java | 4 + .../generated/ToolExecutionStartEvent.java | 1 + .../copilot/generated/rpc/ApiKeyAuthInfo.java | 51 + .../copilot/generated/rpc/AuthInfo.java | 40 + .../generated/rpc/AuthValidationError.java | 29 + .../rpc/CopilotApiTokenAuthInfo.java | 44 + .../generated/rpc/CopilotUserResponse.java | 79 + .../rpc/CopilotUserResponseEndpoints.java | 35 + .../CopilotUserResponseQuotaSnapshots.java | 31 + ...CopilotUserResponseQuotaSnapshotsChat.java | 49 + ...UserResponseQuotaSnapshotsCompletions.java | 49 + ...onseQuotaSnapshotsPremiumInteractions.java | 49 + .../copilot/generated/rpc/EnvAuthInfo.java | 65 + .../generated/rpc/FactoryAgentSummary.java | 15 + .../generated/rpc/FactoryCurrentPhase.java | 2 + .../generated/rpc/FactoryDeclaredLimits.java | 4 + .../rpc/FactoryPhaseObservation.java | 13 + .../generated/rpc/FactoryProgressPage.java | 5 + .../generated/rpc/FactoryRunConsumed.java | 3 + .../generated/rpc/FactoryRunSummary.java | 19 + .../generated/rpc/FactoryRunTerminal.java | 4 + .../copilot/generated/rpc/GhCliAuthInfo.java | 58 + .../copilot/generated/rpc/HMACAuthInfo.java | 51 + .../LlmInferenceHttpRequestStartRequest.java | 1 + .../LlmInferenceHttpResponseStartParams.java | 1 + .../generated/rpc/McpElicitationFormMode.java | 33 + .../generated/rpc/McpFailedServer.java | 29 + .../rpc/McpOauthProbeNeedsAuthReason.java | 37 + .../generated/rpc/McpOauthProbeResult.java | 37 + .../rpc/McpOauthProbeResultAuthenticated.java | 52 + .../rpc/McpOauthProbeResultFailed.java | 59 + .../rpc/McpOauthProbeResultNeedsAuth.java | 79 + .../McpOauthProbeResultNoAuthRequired.java | 52 + .../generated/rpc/McpTaskMetadata.java | 27 + .../github/copilot/generated/rpc/Model.java | 4 + .../generated/rpc/ModelChangeSource.java | 53 + ...pdateAdditionalContentExclusionPolicy.java | 2 + ...eAdditionalContentExclusionPolicyRule.java | 3 + ...ionalContentExclusionPolicyRuleSource.java | 2 + ...igureAdditionalContentExclusionPolicy.java | 2 + ...eAdditionalContentExclusionPolicyRule.java | 3 + ...ionalContentExclusionPolicyRuleSource.java | 2 + .../rpc/PluginsBuiltinSetParams.java | 31 + .../rpc/RemoteSessionHostStatus.java | 39 + .../rpc/RemoteSessionMetadataValue.java | 6 +- .../copilot/generated/rpc/SandboxConfig.java | 2 +- .../generated/rpc/ServerPluginsApi.java | 3 + .../rpc/ServerPluginsBuiltinApi.java | 40 + .../generated/rpc/SessionAuthStatus.java | 37 + .../generated/rpc/SessionCanvasApi.java | 3 + .../rpc/SessionCanvasProviderApi.java | 65 + .../SessionCanvasProviderRegisterParams.java | 37 + ...SessionCanvasProviderUnregisterParams.java | 32 + .../rpc/SessionFactoryGetRunDetailResult.java | 22 + .../SessionFactoryGetRunProgressResult.java | 5 + .../rpc/SessionFactoryListRunsResult.java | 1 + .../rpc/SessionFsSqliteTransactionError.java | 2 + .../rpc/SessionFsSqliteTransactionParams.java | 1 + .../rpc/SessionFsSqliteTransactionResult.java | 2 + .../generated/rpc/SessionGitHubAuthApi.java | 104 + ...onGitHubAuthGetAllAuthAvailableParams.java | 30 + ...ionGitHubAuthGetCurrentAuthInfoParams.java | 30 + ...SessionGitHubAuthLastAuthErrorsParams.java | 30 + .../rpc/SessionGitHubAuthLoginParams.java | 38 + .../rpc/SessionGitHubAuthLogoutParams.java | 30 + .../SessionGitHubAuthLogoutUserParams.java | 32 + ...ionGitHubAuthRefreshCopilotUserParams.java | 30 + .../SessionGitHubAuthSwitchToAuthParams.java | 34 + .../rpc/SessionLimitPredictionTierOption.java | 1 + .../generated/rpc/SessionManagedSettings.java | 1 + .../generated/rpc/SessionMcpOauthApi.java | 16 + .../rpc/SessionMcpOauthProbeParams.java | 32 + .../rpc/SessionMcpReloadWithConfigResult.java | 4 +- .../rpc/SessionModelPriceCategory.java | 2 + .../rpc/SessionModelSwitchToParams.java | 2 + ...tionsAdditionalContentExclusionPolicy.java | 2 + ...sAdditionalContentExclusionPolicyRule.java | 3 + ...ionalContentExclusionPolicyRuleSource.java | 2 + .../rpc/SessionQueueDuplicateAtParams.java | 1 + .../rpc/SessionQueueInsertAtParams.java | 1 + .../rpc/SessionQueueRemoveAtParams.java | 1 + .../rpc/SessionQueueSendNowParams.java | 1 + .../rpc/SessionQueueSetDrainPausedParams.java | 1 + .../rpc/SessionQueueUpdateTextParams.java | 3 + ...ttingsBuiltInToolAvailabilitySnapshot.java | 2 + ...essionSettingsEvaluatePredicateResult.java | 1 + .../rpc/SessionSettingsJobSnapshot.java | 3 + .../rpc/SessionSettingsModelSnapshot.java | 4 + ...ssionSettingsOnlineEvaluationSnapshot.java | 2 + .../rpc/SessionSettingsRepoSnapshot.java | 12 + .../rpc/SessionSettingsSnapshotResult.java | 9 + .../SessionSettingsValidationSnapshot.java | 9 + .../rpc/SessionTasksStartAgentParams.java | 2 +- .../rpc/SessionUiElicitationParams.java | 9 +- .../rpc/SessionUiElicitationResult.java | 4 +- .../SessionWorkspacesAddSummaryResult.java | 2 + .../rpc/SessionWorkspacesEnsureResult.java | 16 + .../SessionWorkspacesGetWorkspaceResult.java | 16 + ...sionWorkspacesTruncateSummariesResult.java | 16 + ...SessionWorkspacesUpdateMetadataResult.java | 16 + .../copilot/generated/rpc/TokenAuthInfo.java | 51 + .../generated/rpc/UIElicitationResponse.java | 4 +- .../copilot/generated/rpc/UserAuthInfo.java | 51 + nodejs/package-lock.json | 72 +- nodejs/package.json | 2 +- nodejs/samples/package-lock.json | 2 +- nodejs/src/generated/rpc.ts | 1374 ++++++- nodejs/src/generated/session-events.ts | 254 +- python/copilot/generated/rpc.py | 3633 +++++++++++++---- python/copilot/generated/session_events.py | 338 +- rust/src/generated/api_types.rs | 1107 ++++- rust/src/generated/rpc.rs | 385 ++ rust/src/generated/session_events.rs | 352 +- test/harness/package-lock.json | 72 +- test/harness/package.json | 2 +- 142 files changed, 13276 insertions(+), 1563 deletions(-) create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/AgentInterruptedActivity.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/AgentInterruptedCancelPhase.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/AgentInterruptedEvent.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageTransport.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/ModelChangeSource.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/SandboxDecisionEvent.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/ApiKeyAuthInfo.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthInfo.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthValidationError.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotApiTokenAuthInfo.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponse.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseEndpoints.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshots.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshotsChat.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshotsCompletions.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshotsPremiumInteractions.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/EnvAuthInfo.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/GhCliAuthInfo.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/HMACAuthInfo.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpElicitationFormMode.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpFailedServer.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeNeedsAuthReason.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResult.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultAuthenticated.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultFailed.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultNeedsAuth.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultNoAuthRequired.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpTaskMetadata.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelChangeSource.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/PluginsBuiltinSetParams.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionHostStatus.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsBuiltinApi.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAuthStatus.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasProviderApi.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasProviderRegisterParams.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasProviderUnregisterParams.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthGetAllAuthAvailableParams.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthGetCurrentAuthInfoParams.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLastAuthErrorsParams.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLoginParams.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLogoutParams.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLogoutUserParams.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthRefreshCopilotUserParams.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthSwitchToAuthParams.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthProbeParams.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/TokenAuthInfo.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/UserAuthInfo.java diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs index 71d49d526..a7836b1ee 100644 --- a/dotnet/src/Generated/Rpc.cs +++ b/dotnet/src/Generated/Rpc.cs @@ -299,6 +299,10 @@ public sealed class Model [JsonPropertyName("capabilities")] public ModelCapabilities Capabilities { get => field ??= new(); set; } + /// Default reasoning effort level (only present if model supports reasoning effort). + [JsonPropertyName("defaultReasoningEffort")] + public string? DefaultReasoningEffort { get; set; } + /// Model identifier (e.g., "claude-sonnet-4.5"). [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; @@ -319,6 +323,10 @@ public sealed class Model [JsonPropertyName("policy")] public ModelPolicy? Policy { get; set; } + /// Context-window tiers this model offers, when the provider advertises them independently of tiered token pricing. Copilot models carry their tiers in `billing.tokenPrices`; a provider that has no pricing to publish (an agent host reached over AHP, for example) declares them here instead, so the model picker can still offer the tier toggle. + [JsonPropertyName("supportedContextTiers")] + public IList? SupportedContextTiers { get; set; } + /// Supported reasoning effort levels (only present if model supports reasoning effort). [JsonPropertyName("supportedReasoningEfforts")] public IList? SupportedReasoningEfforts { get; set; } @@ -483,23 +491,23 @@ public partial class AuthInfo [Experimental(Diagnostics.Experimental)] public sealed class CopilotUserResponseEndpoints { - /// Gets or sets the api value. + /// Copilot API endpoint URL. [JsonPropertyName("api")] public string? Api { get; set; } - /// Gets or sets the exp value. + /// Experimental-service endpoint URL. [JsonPropertyName("exp")] public string? Exp { get; set; } - /// Gets or sets the origin-tracker value. + /// Origin-tracker endpoint URL. [JsonPropertyName("origin-tracker")] public string? OriginTracker { get; set; } - /// Gets or sets the proxy value. + /// Copilot proxy endpoint URL. [JsonPropertyName("proxy")] public string? Proxy { get; set; } - /// Gets or sets the telemetry value. + /// Copilot telemetry endpoint URL. [JsonPropertyName("telemetry")] public string? Telemetry { get; set; } } @@ -507,11 +515,11 @@ public sealed class CopilotUserResponseEndpoints /// RPC data type for CopilotUserResponseOrganizationListItem operations. public sealed class CopilotUserResponseOrganizationListItem { - /// Gets or sets the login value. + /// GitHub login of the organization. [JsonPropertyName("login")] public string? Login { get; set; } - /// Gets or sets the name value. + /// Display name of the organization. [JsonPropertyName("name")] public string? Name { get; set; } } @@ -1416,6 +1424,15 @@ internal sealed class PluginsDisableRequest public IList Names { get => field ??= []; set; } } +/// Trusted built-in plugin directories to use for this runtime process. +[Experimental(Diagnostics.Experimental)] +internal sealed class PluginsBuiltinSetRequest +{ + /// Complete replacement set of trusted built-in plugin directories. Every entry must be an absolute local filesystem path no longer than 4096 characters. + [JsonPropertyName("paths")] + public IList Paths { get => field ??= []; set; } +} + /// Registered marketplace summary. [Experimental(Diagnostics.Experimental)] public sealed class MarketplaceInfo @@ -2114,7 +2131,7 @@ public sealed class LlmInferenceHttpResponseStartResult [Experimental(Diagnostics.Experimental)] internal sealed class LlmInferenceHttpResponseStartRequest { - /// Gets or sets the headers value. + /// HTTP response headers, preserving multiple values per name. [JsonPropertyName("headers")] public IDictionary> Headers { get => field ??= new Dictionary>(); set; } @@ -2228,6 +2245,14 @@ public sealed class RemoteSessionMetadataValue [JsonPropertyName("context")] public SessionContext? Context { get; set; } + /// Host-supplied human description of what the session is doing right now ("running tests", "waiting for approval"). Optional in the protocol and absent on hosts that do not publish it, so never rely on it -- it enriches `hostStatus`, it does not replace it. + [JsonPropertyName("hostActivity")] + public string? HostActivity { get; set; } + + /// Live status as the owning host reports it in its session listing, so a row for a session running elsewhere can show that it is running. Absent for hosts that publish no such status (the cloud task managers), which read as idle. + [JsonPropertyName("hostStatus")] + public RemoteSessionHostStatus? HostStatus { get; set; } + /// Always true for remote sessions. [JsonPropertyName("isRemote")] public bool IsRemote { get; set; } @@ -2464,6 +2489,16 @@ public partial class SessionListEntry [JsonPropertyName("context")] public SessionContext? Context { get; set; } + /// Host-supplied human description of what the session is doing right now ("running tests", "waiting for approval"). Optional in the protocol and absent on hosts that do not publish it, so never rely on it -- it enriches `hostStatus`, it does not replace it. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("hostActivity")] + public string? HostActivity { get; set; } + + /// Live status as the owning host reports it in its session listing, so a row for a session running elsewhere can show that it is running. Absent for hosts that publish no such status (the cloud task managers), which read as idle. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("hostStatus")] + public RemoteSessionHostStatus? HostStatus { get; set; } + /// True for detached maintenance sessions that should be hidden from normal resume lists. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("isDetached")] @@ -3889,6 +3924,119 @@ internal sealed class SessionSetCredentialsParams public string SessionId { get; set; } = string.Empty; } +/// Identifies the target session. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionGitHubAuthGetCurrentAuthInfoRequest +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Identifies the target session. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionGitHubAuthGetAllAuthAvailableRequest +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Identifies the target session. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionGitHubAuthRefreshCopilotUserRequest +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Internal GitHub login parameters. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionAuthLoginRequest +{ + /// GitHub host URL. + [JsonPropertyName("host")] + public string Host { get; set; } = string.Empty; + + /// GitHub login. + [JsonPropertyName("login")] + public string Login { get; set; } = string.Empty; + + /// Whether to persist the token after login. + [JsonPropertyName("persist")] + public bool? Persist { get; set; } + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; + + /// GitHub authentication token. + [JsonPropertyName("token")] + public string Token { get; set; } = string.Empty; +} + +/// Parameters for switching the session's active authentication. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionAuthSwitchRequest +{ + /// Authentication information to activate. + [JsonPropertyName("authInfo")] + public AuthInfo AuthInfo { get => field ??= new(); set; } + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; + + /// Optional token paired with the authentication information. + [JsonPropertyName("token")] + public string? Token { get; set; } +} + +/// Identifies the target session. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionGitHubAuthLogoutRequest +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Parameters identifying a GitHub authentication to log out. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionAuthLogoutUserRequest +{ + /// Authentication information to log out. + [JsonPropertyName("authInfo")] + public AuthInfo AuthInfo { get => field ??= new(); set; } + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Validation error from an authentication attempt. +[Experimental(Diagnostics.Experimental)] +public sealed class AuthValidationError +{ + /// Optional message returned by GitHub. + [JsonPropertyName("githubMessage")] + public string? GitHubMessage { get; set; } + + /// Authentication validation error message. + [JsonPropertyName("message")] + public string Message { get; set; } = string.Empty; +} + +/// Identifies the target session. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionGitHubAuthLastAuthErrorsRequest +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// A file included in the redacted debug bundle. [Experimental(Diagnostics.Experimental)] public sealed class DebugCollectLogsCollectedEntry @@ -4271,6 +4419,40 @@ internal sealed class CanvasActionInvokeRequest public string SessionId { get; set; } = string.Empty; } +/// Internal canvas provider registration parameters. +[Experimental(Diagnostics.Experimental)] +internal sealed class CanvasProviderRegisterRequest +{ + /// Canvas contributions supplied by the provider. + [JsonPropertyName("canvases")] + public IList Canvases { get => field ??= []; set; } + + /// Connection identifier for callback routing. + [JsonPropertyName("connectionId")] + public string ConnectionId { get; set; } = string.Empty; + + /// Provider metadata supplied by the host. + [JsonPropertyName("info")] + public JsonElement Info { get; set; } + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Internal canvas provider unregistration parameters. +[Experimental(Diagnostics.Experimental)] +internal sealed class CanvasProviderUnregisterRequest +{ + /// Connection identifier to unregister. + [JsonPropertyName("connectionId")] + public string ConnectionId { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// Machine-readable factory run failure. /// Polymorphic base type discriminated by type. [Experimental(Diagnostics.Experimental)] @@ -4501,19 +4683,19 @@ internal sealed class FactoryGetRunRequest [Experimental(Diagnostics.Experimental)] public sealed class FactoryDeclaredLimits { - /// Gets or sets the maxAiCredits value. + /// Maximum AI credits consumed by subagents and descendants. [JsonPropertyName("maxAiCredits")] public double? MaxAiCredits { get; set; } - /// Gets or sets the maxConcurrentSubagents value. + /// Maximum concurrently active subagents. [JsonPropertyName("maxConcurrentSubagents")] public long? MaxConcurrentSubagents { get; set; } - /// Gets or sets the maxTotalSubagents value. + /// Maximum total subagents spawned by the run. [JsonPropertyName("maxTotalSubagents")] public long? MaxTotalSubagents { get; set; } - /// Gets or sets the timeoutSeconds value. + /// Maximum accumulated active execution time in seconds. [JsonPropertyName("timeoutSeconds")] public double? TimeoutSeconds { get; set; } } @@ -4522,15 +4704,15 @@ public sealed class FactoryDeclaredLimits [Experimental(Diagnostics.Experimental)] public sealed class FactoryRunConsumed { - /// Gets or sets the activeMs value. + /// Accumulated active execution time in milliseconds. [JsonPropertyName("activeMs")] public long ActiveMs { get; set; } - /// Gets or sets the nanoAiu value. + /// AI usage consumed by the run in nano-AIU. [JsonPropertyName("nanoAiu")] public long NanoAiu { get; set; } - /// Gets or sets the subagents value. + /// Total subagents spawned by the run. [JsonPropertyName("subagents")] public long Subagents { get; set; } } @@ -4539,11 +4721,11 @@ public sealed class FactoryRunConsumed [Experimental(Diagnostics.Experimental)] public sealed class FactoryCurrentPhase { - /// Gets or sets the id value. + /// Current phase identifier. [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; - /// Gets or sets the ordinal value. + /// Zero-based declared phase ordinal, or null for an undeclared phase. [JsonPropertyName("ordinal")] public long? Ordinal { get; set; } } @@ -4552,19 +4734,19 @@ public sealed class FactoryCurrentPhase [Experimental(Diagnostics.Experimental)] public sealed class FactoryRunTerminal { - /// Gets or sets the error value. + /// Human-readable terminal error. [JsonPropertyName("error")] public string? Error { get; set; } - /// Gets or sets the failure value. + /// Machine-readable terminal failure. [JsonPropertyName("failure")] public FactoryRunFailure? Failure { get; set; } - /// Gets or sets the reason value. + /// Human-readable terminal reason. [JsonPropertyName("reason")] public string? Reason { get; set; } - /// Gets or sets the resultPreview value. + /// Prompt-safe preview of the completed result. [JsonPropertyName("resultPreview")] public string? ResultPreview { get; set; } } @@ -4573,79 +4755,79 @@ public sealed class FactoryRunTerminal [Experimental(Diagnostics.Experimental)] public sealed class FactoryRunSummary { - /// Gets or sets the activeSegmentStartedAt value. + /// Epoch milliseconds when the current active segment started, or null while inactive. [JsonPropertyName("activeSegmentStartedAt")] public long? ActiveSegmentStartedAt { get; set; } - /// Gets or sets the approved value. + /// Approved effective resource ceilings, or null until approved. [JsonPropertyName("approved")] public FactoryDeclaredLimits? Approved { get; set; } - /// Gets or sets the completedAt value. + /// Epoch milliseconds when the run completed, or null while nonterminal. [JsonPropertyName("completedAt")] public long? CompletedAt { get; set; } - /// Gets or sets the consumed value. + /// Durable resource consumption. [JsonPropertyName("consumed")] public FactoryRunConsumed Consumed { get => field ??= new(); set; } - /// Gets or sets the createdAt value. + /// Epoch milliseconds when the run was created. [JsonPropertyName("createdAt")] public long CreatedAt { get; set; } - /// Gets or sets the currentPhase value. + /// Current phase identity, or null before any phase is entered. [JsonPropertyName("currentPhase")] public FactoryCurrentPhase? CurrentPhase { get; set; } - /// Gets or sets the declaredLimits value. + /// Resource ceilings declared by the factory. [JsonPropertyName("declaredLimits")] public FactoryDeclaredLimits DeclaredLimits { get => field ??= new(); set; } - /// Gets or sets the declaredPhaseCount value. + /// Number of phases declared by the factory. [JsonPropertyName("declaredPhaseCount")] public long DeclaredPhaseCount { get; set; } - /// Gets or sets the description value. + /// Human-readable factory description. [JsonPropertyName("description")] public string Description { get; set; } = string.Empty; - /// Gets or sets the factoryName value. + /// Registered factory name. [JsonPropertyName("factoryName")] public string FactoryName { get; set; } = string.Empty; - /// Gets or sets the liveAgentCount value. + /// Number of direct factory agents currently live. [JsonPropertyName("liveAgentCount")] public long LiveAgentCount { get; set; } - /// Gets or sets the observedAt value. + /// Epoch milliseconds when this live-overlay snapshot was observed. [JsonPropertyName("observedAt")] public long ObservedAt { get; set; } - /// Gets or sets the revision value. + /// Monotonic durable run revision. [JsonPropertyName("revision")] public long Revision { get; set; } - /// Gets or sets the runId value. + /// Factory run identifier. [JsonPropertyName("runId")] public string RunId { get; set; } = string.Empty; - /// Gets or sets the startedAt value. + /// Epoch milliseconds when execution first started, or null before start. [JsonPropertyName("startedAt")] public long? StartedAt { get; set; } - /// Gets or sets the status value. + /// Current factory run status. [JsonPropertyName("status")] public FactoryRunStatus Status { get; set; } - /// Gets or sets the terminal value. + /// Terminal run outcome, or null while nonterminal. [JsonPropertyName("terminal")] public FactoryRunTerminal? Terminal { get; set; } - /// Gets or sets the totalSpawnedAgentCount value. + /// Total direct factory agents spawned across all attempts. [JsonPropertyName("totalSpawnedAgentCount")] public long TotalSpawnedAgentCount { get; set; } - /// Gets or sets the updatedAt value. + /// Epoch milliseconds when the durable run was last updated. [JsonPropertyName("updatedAt")] public long UpdatedAt { get; set; } } @@ -4670,7 +4852,7 @@ public sealed class FactoryListRunsResult [JsonPropertyName("omittedOlder")] public long? OmittedOlder { get; set; } - /// Gets or sets the runs value. + /// Factory run summaries in durable creation order. [JsonPropertyName("runs")] public IList Runs { get => field ??= []; set; } } @@ -4700,55 +4882,59 @@ internal sealed class FactoryListRunsRequest [Experimental(Diagnostics.Experimental)] public sealed class FactoryAgentSummary { - /// Gets or sets the activeMs value. + /// Accumulated active agent time in milliseconds. [JsonPropertyName("activeMs")] public long ActiveMs { get; set; } - /// Gets or sets the activity value. + /// Prompt-safe live activity text. [JsonPropertyName("activity")] public string? Activity { get; set; } - /// Gets or sets the agentId value. + /// Stable direct-agent identifier. [JsonPropertyName("agentId")] public string AgentId { get; set; } = string.Empty; - /// Gets or sets the agentType value. + /// Registered agent type. [JsonPropertyName("agentType")] public string AgentType { get; set; } = string.Empty; - /// Gets or sets the completedAt value. + /// Epoch milliseconds when the agent completed. [JsonPropertyName("completedAt")] public long? CompletedAt { get; set; } - /// Gets or sets the label value. + /// Friendly, non-unique name intended for display. + [JsonPropertyName("displayName")] + public string? DisplayName { get; set; } + + /// Friendly, non-unique name intended for display. [JsonPropertyName("label")] public string Label { get; set; } = string.Empty; - /// Gets or sets the phaseId value. + /// Phase identifier active when the agent was launched, or null. [JsonPropertyName("phaseId")] public string? PhaseId { get; set; } - /// Gets or sets the requestedModel value. + /// Model requested when the agent was launched. [JsonPropertyName("requestedModel")] public string? RequestedModel { get; set; } - /// Gets or sets the resolvedModel value. + /// Concrete model resolved for the agent. [JsonPropertyName("resolvedModel")] public string? ResolvedModel { get; set; } - /// Gets or sets the runId value. + /// Owning factory run identifier. [JsonPropertyName("runId")] public string RunId { get; set; } = string.Empty; - /// Gets or sets the startedAt value. + /// Epoch milliseconds when the agent started. [JsonPropertyName("startedAt")] public long? StartedAt { get; set; } - /// Gets or sets the status value. + /// Current durable or live agent status. [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; - /// Gets or sets the toolCallId value. + /// Tool-call identifier that launched the agent. [JsonPropertyName("toolCallId")] public string ToolCallId { get; set; } = string.Empty; } @@ -4757,55 +4943,55 @@ public sealed class FactoryAgentSummary [Experimental(Diagnostics.Experimental)] public sealed class FactoryPhaseObservation { - /// Gets or sets the accumulatedActiveMs value. + /// Completed active time accumulated by this phase in milliseconds. [JsonPropertyName("accumulatedActiveMs")] public long AccumulatedActiveMs { get; set; } - /// Gets or sets the completedAt value. + /// Epoch milliseconds when this phase completed; for a skipped phase, the synthetic skip timestamp (equal to `startedAt`). [JsonPropertyName("completedAt")] public long? CompletedAt { get; set; } - /// Gets or sets the currentActiveMs value. + /// Current live active time for this phase in milliseconds. [JsonPropertyName("currentActiveMs")] public long CurrentActiveMs { get; set; } - /// Gets or sets the detail value. + /// Optional human-readable phase detail. [JsonPropertyName("detail")] public string? Detail { get; set; } - /// Gets or sets the entryCount value. + /// Number of times execution entered this phase. [JsonPropertyName("entryCount")] public long EntryCount { get; set; } - /// Gets or sets the id value. + /// Phase identifier. [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; - /// Gets or sets the lastEnteredRunAttempt value. + /// Most recent run attempt that entered this phase, or `0` if the phase has never been entered. [JsonPropertyName("lastEnteredRunAttempt")] public long LastEnteredRunAttempt { get; set; } - /// Gets or sets the liveAgentCount value. + /// Direct agents in this phase that are currently live. [JsonPropertyName("liveAgentCount")] public long LiveAgentCount { get; set; } - /// Gets or sets the ordinal value. + /// Zero-based declared phase ordinal, or null for an undeclared phase. [JsonPropertyName("ordinal")] public long? Ordinal { get; set; } - /// Gets or sets the startedAt value. + /// Epoch milliseconds when this phase first started; for a skipped phase, the synthetic skip timestamp (equal to `completedAt`). [JsonPropertyName("startedAt")] public long? StartedAt { get; set; } - /// Gets or sets the status value. + /// Derived lifecycle state of the phase. [JsonPropertyName("status")] public FactoryPhaseStatus Status { get; set; } - /// Gets or sets the title value. + /// Human-readable phase title. [JsonPropertyName("title")] public string Title { get; set; } = string.Empty; - /// Gets or sets the totalAgentCount value. + /// Total direct agents associated with this phase. [JsonPropertyName("totalAgentCount")] public long TotalAgentCount { get; set; } } @@ -4843,23 +5029,23 @@ public sealed class FactoryProgressLine [Experimental(Diagnostics.Experimental)] public sealed class FactoryProgressPage { - /// Gets or sets the hasMoreNewer value. + /// Whether progress records newer than this page exist. [JsonPropertyName("hasMoreNewer")] public bool HasMoreNewer { get; set; } - /// Gets or sets the hasMoreOlder value. + /// Whether progress records older than this page exist. [JsonPropertyName("hasMoreOlder")] public bool HasMoreOlder { get; set; } - /// Gets or sets the newestSeq value. + /// Newest sequence number in this page, or null when empty. [JsonPropertyName("newestSeq")] public long? NewestSeq { get; set; } - /// Gets or sets the oldestSeq value. + /// Oldest sequence number in this page, or null when empty. [JsonPropertyName("oldestSeq")] public long? OldestSeq { get; set; } - /// Gets or sets the records value. + /// Progress records in sequence order. [JsonPropertyName("records")] public IList Records { get => field ??= []; set; } @@ -4872,91 +5058,91 @@ public sealed class FactoryProgressPage [Experimental(Diagnostics.Experimental)] public sealed class FactoryRunDetail { - /// Gets or sets the activeSegmentStartedAt value. + /// Epoch milliseconds when the current active segment started, or null while inactive. [JsonPropertyName("activeSegmentStartedAt")] public long? ActiveSegmentStartedAt { get; set; } - /// Gets or sets the agents value. + /// Durable identities and live statuses for direct factory agents. [JsonPropertyName("agents")] public IList Agents { get => field ??= []; set; } - /// Gets or sets the approved value. + /// Approved effective resource ceilings, or null until approved. [JsonPropertyName("approved")] public FactoryDeclaredLimits? Approved { get; set; } - /// Gets or sets the completedAt value. + /// Epoch milliseconds when the run completed, or null while nonterminal. [JsonPropertyName("completedAt")] public long? CompletedAt { get; set; } - /// Gets or sets the consumed value. + /// Durable resource consumption. [JsonPropertyName("consumed")] public FactoryRunConsumed Consumed { get => field ??= new(); set; } - /// Gets or sets the createdAt value. + /// Epoch milliseconds when the run was created. [JsonPropertyName("createdAt")] public long CreatedAt { get; set; } - /// Gets or sets the currentPhase value. + /// Current phase identity, or null before any phase is entered. [JsonPropertyName("currentPhase")] public FactoryCurrentPhase? CurrentPhase { get; set; } - /// Gets or sets the declaredLimits value. + /// Resource ceilings declared by the factory. [JsonPropertyName("declaredLimits")] public FactoryDeclaredLimits DeclaredLimits { get => field ??= new(); set; } - /// Gets or sets the declaredPhaseCount value. + /// Number of phases declared by the factory. [JsonPropertyName("declaredPhaseCount")] public long DeclaredPhaseCount { get; set; } - /// Gets or sets the description value. + /// Human-readable factory description. [JsonPropertyName("description")] public string Description { get; set; } = string.Empty; - /// Gets or sets the factoryName value. + /// Registered factory name. [JsonPropertyName("factoryName")] public string FactoryName { get; set; } = string.Empty; - /// Gets or sets the liveAgentCount value. + /// Number of direct factory agents currently live. [JsonPropertyName("liveAgentCount")] public long LiveAgentCount { get; set; } - /// Gets or sets the observedAt value. + /// Epoch milliseconds when this live-overlay snapshot was observed. [JsonPropertyName("observedAt")] public long ObservedAt { get; set; } - /// Gets or sets the phases value. + /// Lifecycle and timing observations for each factory phase. [JsonPropertyName("phases")] public IList Phases { get => field ??= []; set; } - /// Gets or sets the progress value. + /// Bidirectional page of durable factory progress. [JsonPropertyName("progress")] public FactoryProgressPage Progress { get => field ??= new(); set; } - /// Gets or sets the revision value. + /// Monotonic durable run revision. [JsonPropertyName("revision")] public long Revision { get; set; } - /// Gets or sets the runId value. + /// Factory run identifier. [JsonPropertyName("runId")] public string RunId { get; set; } = string.Empty; - /// Gets or sets the startedAt value. + /// Epoch milliseconds when execution first started, or null before start. [JsonPropertyName("startedAt")] public long? StartedAt { get; set; } - /// Gets or sets the status value. + /// Current factory run status. [JsonPropertyName("status")] public FactoryRunStatus Status { get; set; } - /// Gets or sets the terminal value. + /// Terminal run outcome, or null while nonterminal. [JsonPropertyName("terminal")] public FactoryRunTerminal? Terminal { get; set; } - /// Gets or sets the totalSpawnedAgentCount value. + /// Total direct factory agents spawned across all attempts. [JsonPropertyName("totalSpawnedAgentCount")] public long TotalSpawnedAgentCount { get; set; } - /// Gets or sets the updatedAt value. + /// Epoch milliseconds when the durable run was last updated. [JsonPropertyName("updatedAt")] public long UpdatedAt { get; set; } } @@ -5308,6 +5494,10 @@ internal sealed class ModelSwitchToRequest [JsonPropertyName("sessionId")] public string SessionId { get; set; } = string.Empty; + /// Origin to record on the effective `session.model_change` event. Defaults to `sdk` when omitted. + [JsonPropertyName("source")] + public ModelChangeSource? Source { get; set; } + /// Output verbosity level to request for supported models. [JsonPropertyName("verbosity")] public Verbosity? Verbosity { get; set; } @@ -5339,11 +5529,11 @@ internal sealed class ModelSetReasoningEffortRequest [Experimental(Diagnostics.Experimental)] public sealed class SessionModelPriceCategory { - /// Gets or sets the id value. + /// CAPI model identifier. [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; - /// Gets or sets the priceCategory value. + /// Cost category assigned to the model. [JsonPropertyName("priceCategory")] public ModelPickerPriceCategory PriceCategory { get; set; } } @@ -5590,27 +5780,27 @@ internal sealed class SessionPlanReadSqlTodosWithDependenciesRequest /// RPC data type for WorkspacesGetWorkspaceResultWorkspace operations. public sealed class WorkspacesGetWorkspaceResultWorkspace { - /// Gets or sets the branch value. + /// Current Git branch. [JsonPropertyName("branch")] public string? Branch { get; set; } - /// Gets or sets the chronicle_sync_dismissed value. + /// Whether the per-session Chronicle upgrade prompt was dismissed for the workspace. [JsonPropertyName("chronicle_sync_dismissed")] public bool? ChronicleSyncDismissed { get; set; } - /// Gets or sets the client_name value. + /// Name of the client that created the workspace. [JsonPropertyName("client_name")] public string? ClientName { get; set; } - /// Gets or sets the created_at value. + /// Timestamp when the workspace was created. [JsonPropertyName("created_at")] public DateTimeOffset? CreatedAt { get; set; } - /// Gets or sets the cwd value. + /// Current working directory associated with the workspace. [JsonPropertyName("cwd")] public string? Cwd { get; set; } - /// Gets or sets the git_root value. + /// Git repository root associated with the workspace. [JsonPropertyName("git_root")] public string? GitRoot { get; set; } @@ -5618,45 +5808,45 @@ public sealed class WorkspacesGetWorkspaceResultWorkspace [JsonPropertyName("host_type")] public WorkspacesWorkspaceDetailsHostType? HostType { get; set; } - /// Gets or sets the id value. + /// Stable workspace identifier. [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("id")] public string Id { get; set; } = string.Empty; - /// Gets or sets the mc_last_event_id value. + /// Most recent Mission Control event identifier observed for the workspace. [JsonPropertyName("mc_last_event_id")] public string? McLastEventId { get; set; } - /// Gets or sets the mc_session_id value. + /// Mission Control session identifier associated with the workspace. [JsonPropertyName("mc_session_id")] public string? McSessionId { get; set; } - /// Gets or sets the mc_task_id value. + /// Mission Control task identifier associated with the workspace. [JsonPropertyName("mc_task_id")] public string? McTaskId { get; set; } - /// Gets or sets the name value. + /// Workspace display name. [JsonPropertyName("name")] public string? Name { get; set; } - /// Gets or sets the remote_steerable value. + /// Whether the workspace session can be steered remotely. [JsonPropertyName("remote_steerable")] public bool? RemoteSteerable { get; set; } - /// Gets or sets the repository value. + /// Repository identifier associated with the workspace. [JsonPropertyName("repository")] public string? Repository { get; set; } - /// Gets or sets the summary_count value. + /// Number of persisted summaries in the workspace. [JsonPropertyName("summary_count")] public long? SummaryCount { get; set; } - /// Gets or sets the updated_at value. + /// Timestamp when the workspace was last updated. [JsonPropertyName("updated_at")] public DateTimeOffset? UpdatedAt { get; set; } - /// Gets or sets the user_named value. + /// Whether the workspace name was explicitly chosen by the user. [JsonPropertyName("user_named")] public bool? UserNamed { get; set; } } @@ -5827,12 +6017,12 @@ internal sealed class WorkspacesReadCheckpointRequest public string SessionId { get; set; } = string.Empty; } -/// RPC data type for WorkspacesAddSummaryResultSummary operations. +/// Metadata for the persisted summary. public sealed class WorkspacesAddSummaryResultSummary { } -/// RPC data type for WorkspacesAddSummaryResultWorkspace operations. +/// Refreshed metadata for the containing workspace. public sealed class WorkspacesAddSummaryResultWorkspace { } @@ -5841,11 +6031,11 @@ public sealed class WorkspacesAddSummaryResultWorkspace [Experimental(Diagnostics.Experimental)] public sealed class WorkspacesAddSummaryResult { - /// Gets or sets the summary value. + /// Metadata for the persisted summary. [JsonPropertyName("summary")] public WorkspacesAddSummaryResultSummary? Summary { get; set; } - /// Gets or sets the workspace value. + /// Refreshed metadata for the containing workspace. [JsonPropertyName("workspace")] public WorkspacesAddSummaryResultWorkspace? Workspace { get; set; } } @@ -6322,7 +6512,7 @@ internal sealed class TasksStartAgentRequest [JsonPropertyName("model")] public string? Model { get; set; } - /// Short name for the agent, used to generate a human-readable ID. + /// Friendly, non-unique name used when displaying the agent. [JsonPropertyName("name")] public string Name { get; set; } = string.Empty; @@ -6389,6 +6579,11 @@ public partial class TaskInfoAgent : TaskInfo [JsonPropertyName("description")] public required string Description { get; set; } + /// Friendly, non-unique name intended for display. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("displayName")] + public string? DisplayName { get; set; } + /// Error message when the task failed. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("error")] @@ -7150,6 +7345,19 @@ public sealed class McpAllowedServer public string? RedactedNote { get; set; } } +/// MCP server whose connection attempt failed. +[Experimental(Diagnostics.Experimental)] +public sealed class McpFailedServer +{ + /// The captured connection failure detail. + [JsonPropertyName("error")] + public string? Error { get; set; } + + /// The config key of the server that failed to connect. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; +} + /// MCP server filtered by policy, with name, reason, and optional redacted reason. [Experimental(Diagnostics.Experimental)] public sealed class McpFilteredServer @@ -7183,6 +7391,10 @@ internal sealed class McpStartServersResult [JsonPropertyName("allowedServers")] public IList? AllowedServers { get; set; } + /// Servers whose connection attempt failed. + [JsonPropertyName("failedServers")] + public IList? FailedServers { get; set; } + /// Servers filtered out before startup. [JsonPropertyName("filteredServers")] public IList FilteredServers { get => field ??= []; set; } @@ -7572,6 +7784,106 @@ internal sealed class McpOauthLoginRequest public string SessionId { get; set; } = string.Empty; } +/// Passive MCP OAuth probe result. `authenticated` means the server accepted the probe request while an OAuth-origin access token was attached; it does not prove the server required or independently validated that token. The probe does not make a second unauthenticated request. Failed is an expected probe-domain outcome; JSON-RPC errors are reserved for API-call failures. +/// Polymorphic base type discriminated by status. +[Experimental(Diagnostics.Experimental)] +[JsonPolymorphic( + TypeDiscriminatorPropertyName = "status", + UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] +[JsonDerivedType(typeof(McpOauthProbeResultNoAuthRequired), "no-auth-required")] +[JsonDerivedType(typeof(McpOauthProbeResultAuthenticated), "authenticated")] +[JsonDerivedType(typeof(McpOauthProbeResultNeedsAuth), "needs-auth")] +[JsonDerivedType(typeof(McpOauthProbeResultFailed), "failed")] +public partial class McpOauthProbeResult +{ + /// The type discriminator. + [JsonPropertyName("status")] + public virtual string Status { get; set; } = string.Empty; +} + + +/// The no-auth-required variant of . +[Experimental(Diagnostics.Experimental)] +public partial class McpOauthProbeResultNoAuthRequired : McpOauthProbeResult +{ + /// + [JsonIgnore] + public override string Status => "no-auth-required"; + + /// HTTP response returned by the server. + [JsonPropertyName("httpResponse")] + public required McpOauthHttpResponse HttpResponse { get; set; } +} + +/// The authenticated variant of . +[Experimental(Diagnostics.Experimental)] +public partial class McpOauthProbeResultAuthenticated : McpOauthProbeResult +{ + /// + [JsonIgnore] + public override string Status => "authenticated"; + + /// HTTP response returned by the server. + [JsonPropertyName("httpResponse")] + public required McpOauthHttpResponse HttpResponse { get; set; } +} + +/// The needs-auth variant of . +[Experimental(Diagnostics.Experimental)] +public partial class McpOauthProbeResultNeedsAuth : McpOauthProbeResult +{ + /// + [JsonIgnore] + public override string Status => "needs-auth"; + + /// HTTP 401 or 403 response returned by the server. + [JsonPropertyName("httpResponse")] + public required McpOauthHttpResponse HttpResponse { get; set; } + + /// Why authentication is needed. + [JsonPropertyName("reason")] + public required McpOauthProbeNeedsAuthReason Reason { get; set; } + + /// Parsed WWW-Authenticate challenge parameters, when present and parseable. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("wwwAuthenticateParams")] + public McpOauthWWWAuthenticateParams? WwwAuthenticateParams { get; set; } +} + +/// The failed variant of . +[Experimental(Diagnostics.Experimental)] +public partial class McpOauthProbeResultFailed : McpOauthProbeResult +{ + /// + [JsonIgnore] + public override string Status => "failed"; + + /// Human-readable probe failure detail. + [JsonPropertyName("error")] + public required string Error { get; set; } + + /// HTTP response returned by the server, when the probe reached the server and captured the complete response. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("httpResponse")] + public McpOauthHttpResponse? HttpResponse { get; set; } +} + +/// Remote MCP server name for a passive OAuth status probe. +[Experimental(Diagnostics.Experimental)] +internal sealed class McpOauthProbeRequest +{ + /// Name of the configured remote MCP server to probe. + [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; +} + /// Indicates whether the pending MCP OAuth response was accepted. [Experimental(Diagnostics.Experimental)] public sealed class McpOauthRespondResult @@ -8500,11 +8812,11 @@ public sealed class SessionUpdateOptionsResult [Experimental(Diagnostics.Experimental)] public sealed class OptionsUpdateAdditionalContentExclusionPolicyRuleSource { - /// Gets or sets the name value. + /// Name of the policy source. [JsonPropertyName("name")] public string Name { get; set; } = string.Empty; - /// Gets or sets the type value. + /// Type of the policy source. [JsonPropertyName("type")] public string Type { get; set; } = string.Empty; } @@ -8513,15 +8825,15 @@ public sealed class OptionsUpdateAdditionalContentExclusionPolicyRuleSource [Experimental(Diagnostics.Experimental)] public sealed class OptionsUpdateAdditionalContentExclusionPolicyRule { - /// Gets or sets the ifAnyMatch value. + /// Conditions of which at least one must match. [JsonPropertyName("ifAnyMatch")] public IList? IfAnyMatch { get; set; } - /// Gets or sets the ifNoneMatch value. + /// Conditions none of which may match. [JsonPropertyName("ifNoneMatch")] public IList? IfNoneMatch { get; set; } - /// Gets or sets the paths value. + /// Path patterns covered by this rule. [JsonPropertyName("paths")] public IList Paths { get => field ??= []; set; } @@ -8534,11 +8846,11 @@ public sealed class OptionsUpdateAdditionalContentExclusionPolicyRule [Experimental(Diagnostics.Experimental)] public sealed class OptionsUpdateAdditionalContentExclusionPolicy { - /// Gets or sets the last_updated_at value. + /// Opaque policy update timestamp supplied by the host. [JsonPropertyName("last_updated_at")] public JsonElement LastUpdatedAt { get; set; } - /// Gets or sets the rules value. + /// Content-exclusion rules to apply. [JsonPropertyName("rules")] public IList Rules { get => field ??= []; set; } @@ -8778,7 +9090,7 @@ public sealed class SandboxConfig [JsonPropertyName("addCurrentWorkingDirectory")] public bool? AddCurrentWorkingDirectory { get; set; } - /// Whether to auto-grant read access to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Default: true (enabled by default; set to false to opt out). + /// Whether to auto-grant read access to the tool directories discovered on PATH and in toolchain environment variables (GOROOT, CARGO_HOME, JAVA_HOME, VIRTUAL_ENV, and similar), and to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Set to false to disable every grant listed above: user-installed toolchains (rustup, nvm, pyenv, conda, pipx) then need explicit userPolicy.filesystem entries — readonlyPaths to read them, plus readwriteFiles for a relocated CARGO_HOME's .package-cache and .global-cache, which Cargo locks on every build. Only these developer-tool grants are affected: the working directory (see addCurrentWorkingDirectory), temporary storage, session log paths, and system locations follow their own rules and stay granted, so commands still run. Default: true (enabled by default; set to false to opt out). [JsonPropertyName("allowDevToolAccess")] public bool? AllowDevToolAccess { get; set; } @@ -10216,10 +10528,19 @@ internal sealed class UIEphemeralQueryRequest public string SessionId { get; set; } = string.Empty; } +/// MCP response metadata. +public sealed class UIElicitationResponseMeta +{ +} + /// The elicitation response (accept with form values, decline, or cancel). [Experimental(Diagnostics.Experimental)] public sealed class UIElicitationResponse { + /// MCP response metadata. + [JsonPropertyName("_meta")] + public UIElicitationResponseMeta? Meta { get; set; } + /// The user's response: accept (submitted), decline (rejected), or cancel (dismissed). [JsonPropertyName("action")] public UIElicitationResponseAction Action { get; set; } @@ -10229,6 +10550,11 @@ public sealed class UIElicitationResponse public IDictionary? Content { get; set; } } +/// MCP request metadata. +public sealed class UIElicitationRequestMeta +{ +} + /// JSON Schema describing the form fields to present to the user. [Experimental(Diagnostics.Experimental)] public sealed class UIElicitationSchema @@ -10246,14 +10572,31 @@ public sealed class UIElicitationSchema public string Type { get; set; } = string.Empty; } +/// Metadata controlling an MCP task's lifetime. +[Experimental(Diagnostics.Experimental)] +public sealed class McpTaskMetadata +{ + /// Task time-to-live. + [JsonPropertyName("ttl")] + public long? Ttl { get; set; } +} + /// Prompt message and JSON schema describing the form fields to elicit from the user. [Experimental(Diagnostics.Experimental)] internal sealed class UIElicitationRequest { + /// MCP request metadata. + [JsonPropertyName("_meta")] + public UIElicitationRequestMeta? Meta { get; set; } + /// Message describing what information is needed from the user. [JsonPropertyName("message")] public string Message { get; set; } = string.Empty; + /// Elicitation mode. Omitted and form are equivalent for structured elicitation. + [JsonPropertyName("mode")] + public McpElicitationFormMode? Mode { get; set; } + /// JSON Schema describing the form fields to present to the user. [JsonPropertyName("requestedSchema")] public UIElicitationSchema RequestedSchema { get => field ??= new(); set; } @@ -10261,6 +10604,10 @@ internal sealed class UIElicitationRequest /// Target session identifier. [JsonPropertyName("sessionId")] public string SessionId { get; set; } = string.Empty; + + /// MCP task metadata. + [JsonPropertyName("task")] + public McpTaskMetadata? Task { get; set; } } /// Indicates whether the elicitation response was accepted; false if it was already resolved by another client. @@ -10497,11 +10844,11 @@ public sealed class PermissionsConfigureResult [Experimental(Diagnostics.Experimental)] public sealed class PermissionsConfigureAdditionalContentExclusionPolicyRuleSource { - /// Gets or sets the name value. + /// Name of the policy source. [JsonPropertyName("name")] public string Name { get; set; } = string.Empty; - /// Gets or sets the type value. + /// Type of the policy source. [JsonPropertyName("type")] public string Type { get; set; } = string.Empty; } @@ -10510,15 +10857,15 @@ public sealed class PermissionsConfigureAdditionalContentExclusionPolicyRuleSour [Experimental(Diagnostics.Experimental)] public sealed class PermissionsConfigureAdditionalContentExclusionPolicyRule { - /// Gets or sets the ifAnyMatch value. + /// Conditions of which at least one must match. [JsonPropertyName("ifAnyMatch")] public IList? IfAnyMatch { get; set; } - /// Gets or sets the ifNoneMatch value. + /// Conditions none of which may match. [JsonPropertyName("ifNoneMatch")] public IList? IfNoneMatch { get; set; } - /// Gets or sets the paths value. + /// Path patterns covered by this rule. [JsonPropertyName("paths")] public IList Paths { get => field ??= []; set; } @@ -10531,11 +10878,11 @@ public sealed class PermissionsConfigureAdditionalContentExclusionPolicyRule [Experimental(Diagnostics.Experimental)] public sealed class PermissionsConfigureAdditionalContentExclusionPolicy { - /// Gets or sets the last_updated_at value. + /// Opaque policy update timestamp supplied by the host. [JsonPropertyName("last_updated_at")] public JsonElement LastUpdatedAt { get; set; } - /// Gets or sets the rules value. + /// Content-exclusion rules to apply. [JsonPropertyName("rules")] public IList Rules { get => field ??= []; set; } @@ -10710,6 +11057,7 @@ public partial class PermissionDecisionApproveOnce : PermissionDecision [JsonDerivedType(typeof(PermissionDecisionApproveForSessionApprovalExtensionManagement), "extension-management")] [JsonDerivedType(typeof(PermissionDecisionApproveForSessionApprovalFactory), "factory")] [JsonDerivedType(typeof(PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess), "extension-permission-access")] +[JsonDerivedType(typeof(PermissionDecisionApproveForSessionApprovalExtensionEnvAccess), "extension-env-access")] public partial class PermissionDecisionApproveForSessionApproval { /// The type discriminator. @@ -10852,6 +11200,24 @@ public partial class PermissionDecisionApproveForSessionApprovalExtensionPermiss public required string ExtensionName { get; set; } } +/// Session-scoped approval details for an extension's access to sensitive environment variables, keyed by extension name and the exact set of variable names. +/// The extension-env-access variant of . +[Experimental(Diagnostics.Experimental)] +public partial class PermissionDecisionApproveForSessionApprovalExtensionEnvAccess : PermissionDecisionApproveForSessionApproval +{ + /// + [JsonIgnore] + public override string Kind => "extension-env-access"; + + /// Names of the sensitive environment variables this approval covers. Values are never persisted. + [JsonPropertyName("environmentVariables")] + public required IList EnvironmentVariables { get; set; } + + /// Extension name. + [JsonPropertyName("extensionName")] + public required string ExtensionName { get; set; } +} + /// Permission-decision request variant to approve for the rest of the session, with optional tool approval or URL domain. /// The approve-for-session variant of . [Experimental(Diagnostics.Experimental)] @@ -10888,6 +11254,7 @@ public partial class PermissionDecisionApproveForSession : PermissionDecision [JsonDerivedType(typeof(PermissionDecisionApproveForLocationApprovalExtensionManagement), "extension-management")] [JsonDerivedType(typeof(PermissionDecisionApproveForLocationApprovalFactory), "factory")] [JsonDerivedType(typeof(PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess), "extension-permission-access")] +[JsonDerivedType(typeof(PermissionDecisionApproveForLocationApprovalExtensionEnvAccess), "extension-env-access")] public partial class PermissionDecisionApproveForLocationApproval { /// The type discriminator. @@ -11030,6 +11397,24 @@ public partial class PermissionDecisionApproveForLocationApprovalExtensionPermis public required string ExtensionName { get; set; } } +/// Location-scoped approval details for an extension's access to sensitive environment variables, keyed by extension name and the exact set of variable names. +/// The extension-env-access variant of . +[Experimental(Diagnostics.Experimental)] +public partial class PermissionDecisionApproveForLocationApprovalExtensionEnvAccess : PermissionDecisionApproveForLocationApproval +{ + /// + [JsonIgnore] + public override string Kind => "extension-env-access"; + + /// Names of the sensitive environment variables this approval covers. Values are never persisted. + [JsonPropertyName("environmentVariables")] + public required IList EnvironmentVariables { get; set; } + + /// Extension name. + [JsonPropertyName("extensionName")] + public required string ExtensionName { get; set; } +} + /// Permission-decision request variant to approve and persist a permission for a project location, with approval details and location key. /// The approve-for-location variant of . [Experimental(Diagnostics.Experimental)] @@ -11671,6 +12056,7 @@ public sealed class PermissionsLocationsAddToolApprovalResult [JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsExtensionManagement), "extension-management")] [JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsFactory), "factory")] [JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess), "extension-permission-access")] +[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess), "extension-env-access")] public partial class PermissionsLocationsAddToolApprovalDetails { /// The type discriminator. @@ -11813,6 +12199,24 @@ public partial class PermissionsLocationsAddToolApprovalDetailsExtensionPermissi public required string ExtensionName { get; set; } } +/// Location-persisted tool approval details for an extension's access to sensitive environment variables, keyed by extension name and the exact set of variable names. +/// The extension-env-access variant of . +[Experimental(Diagnostics.Experimental)] +public partial class PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess : PermissionsLocationsAddToolApprovalDetails +{ + /// + [JsonIgnore] + public override string Kind => "extension-env-access"; + + /// Names of the sensitive environment variables this approval covers. Values are never persisted. + [JsonPropertyName("environmentVariables")] + public required IList EnvironmentVariables { get; set; } + + /// Extension name. + [JsonPropertyName("extensionName")] + public required string ExtensionName { get; set; } +} + /// Location-scoped tool approval to persist. [Experimental(Diagnostics.Experimental)] internal sealed class PermissionLocationAddToolApprovalParams @@ -12457,11 +12861,11 @@ internal sealed class MetadataRecomputeContextTokensRequest [Experimental(Diagnostics.Experimental)] public sealed class SessionSettingsBuiltInToolAvailabilitySnapshot { - /// Gets or sets the createPullRequest value. + /// Whether the create-pull-request tool is available. [JsonPropertyName("createPullRequest")] public bool? CreatePullRequest { get; set; } - /// Gets or sets the reportProgress value. + /// Whether the report-progress tool is available. [JsonPropertyName("reportProgress")] public bool? ReportProgress { get; set; } } @@ -12470,15 +12874,15 @@ public sealed class SessionSettingsBuiltInToolAvailabilitySnapshot [Experimental(Diagnostics.Experimental)] public sealed class SessionSettingsJobSnapshot { - /// Gets or sets the builtInToolAvailability value. + /// Availability of job-specific built-in tools. [JsonPropertyName("builtInToolAvailability")] public SessionSettingsBuiltInToolAvailabilitySnapshot? BuiltInToolAvailability { get; set; } - /// Gets or sets the eventType value. + /// GitHub Actions event type for the job. [JsonPropertyName("eventType")] public string? EventType { get; set; } - /// Gets or sets the isTriggerJob value. + /// Whether this is the workflow's trigger job. [JsonPropertyName("isTriggerJob")] public bool? IsTriggerJob { get; set; } } @@ -12487,19 +12891,19 @@ public sealed class SessionSettingsJobSnapshot [Experimental(Diagnostics.Experimental)] public sealed class SessionSettingsModelSnapshot { - /// Gets or sets the callbackUrl value. + /// Agent service callback URL for job and progress updates. [JsonPropertyName("callbackUrl")] public string? CallbackUrl { get; set; } - /// Gets or sets the defaultReasoningEffort value. + /// Default reasoning effort for the selected model. [JsonPropertyName("defaultReasoningEffort")] public string? DefaultReasoningEffort { get; set; } - /// Gets or sets the instanceId value. + /// Agent job identifier for the session. [JsonPropertyName("instanceId")] public string? InstanceId { get; set; } - /// Gets or sets the model value. + /// Selected model identifier. [JsonPropertyName("model")] public string? Model { get; set; } } @@ -12508,11 +12912,11 @@ public sealed class SessionSettingsModelSnapshot [Experimental(Diagnostics.Experimental)] public sealed class SessionSettingsOnlineEvaluationSnapshot { - /// Gets or sets the disableOnlineEvaluation value. + /// Whether online evaluation is disabled. [JsonPropertyName("disableOnlineEvaluation")] public bool? DisableOnlineEvaluation { get; set; } - /// Gets or sets the enableOnlineEvaluationOutputFile value. + /// Whether online-evaluation output-file generation is enabled. [JsonPropertyName("enableOnlineEvaluationOutputFile")] public bool? EnableOnlineEvaluationOutputFile { get; set; } } @@ -12521,51 +12925,51 @@ public sealed class SessionSettingsOnlineEvaluationSnapshot [Experimental(Diagnostics.Experimental)] public sealed class SessionSettingsRepoSnapshot { - /// Gets or sets the branch value. + /// Checked-out repository branch. [JsonPropertyName("branch")] public string? Branch { get; set; } - /// Gets or sets the commit value. + /// Checked-out commit SHA. [JsonPropertyName("commit")] public string? Commit { get; set; } - /// Gets or sets the host value. + /// GitHub server host name. [JsonPropertyName("host")] public string? Host { get; set; } - /// Gets or sets the hostProtocol value. + /// Protocol used to access the GitHub host. [JsonPropertyName("hostProtocol")] public string? HostProtocol { get; set; } - /// Gets or sets the id value. + /// GitHub repository database ID. [JsonPropertyName("id")] public double? Id { get; set; } - /// Gets or sets the name value. + /// Repository name. [JsonPropertyName("name")] public string? Name { get; set; } - /// Gets or sets the ownerId value. + /// GitHub repository owner database ID. [JsonPropertyName("ownerId")] public double? OwnerId { get; set; } - /// Gets or sets the ownerName value. + /// Repository owner login. [JsonPropertyName("ownerName")] public string? OwnerName { get; set; } - /// Gets or sets the prCommitCount value. + /// Number of commits in the pull request. [JsonPropertyName("prCommitCount")] public double? PrCommitCount { get; set; } - /// Gets or sets the readWrite value. + /// Whether the repository is writable. [JsonPropertyName("readWrite")] public bool? ReadWrite { get; set; } - /// Gets or sets the secretScanningUrl value. + /// GitHub secret-scanning service URL. [JsonPropertyName("secretScanningUrl")] public string? SecretScanningUrl { get; set; } - /// Gets or sets the serverUrl value. + /// GitHub server base URL. [JsonPropertyName("serverUrl")] public string? ServerUrl { get; set; } } @@ -12574,39 +12978,39 @@ public sealed class SessionSettingsRepoSnapshot [Experimental(Diagnostics.Experimental)] public sealed class SessionSettingsValidationSnapshot { - /// Gets or sets the advisoryEnabled value. + /// Whether advisory validation is enabled. [JsonPropertyName("advisoryEnabled")] public bool? AdvisoryEnabled { get; set; } - /// Gets or sets the codeqlEnabled value. + /// Whether CodeQL validation is enabled. [JsonPropertyName("codeqlEnabled")] public bool? CodeqlEnabled { get; set; } - /// Gets or sets the codeReviewEnabled value. + /// Whether code-review validation is enabled. [JsonPropertyName("codeReviewEnabled")] public bool? CodeReviewEnabled { get; set; } - /// Gets or sets the codeReviewModel value. + /// Model used for code-review validation. [JsonPropertyName("codeReviewModel")] public string? CodeReviewModel { get; set; } - /// Gets or sets the dependabotTimeout value. + /// Dependabot validation timeout budget in seconds. [JsonPropertyName("dependabotTimeout")] public double? DependabotTimeout { get; set; } - /// Gets or sets the memoryStoreEnabled value. + /// Whether the memory-store tool is enabled. [JsonPropertyName("memoryStoreEnabled")] public bool? MemoryStoreEnabled { get; set; } - /// Gets or sets the memoryVoteEnabled value. + /// Whether the memory-vote tool is enabled. [JsonPropertyName("memoryVoteEnabled")] public bool? MemoryVoteEnabled { get; set; } - /// Gets or sets the secretScanningEnabled value. + /// Whether secret-scanning validation is enabled. [JsonPropertyName("secretScanningEnabled")] public bool? SecretScanningEnabled { get; set; } - /// Gets or sets the timeout value. + /// General validation timeout budget in seconds. [JsonPropertyName("timeout")] public double? Timeout { get; set; } } @@ -12615,39 +13019,39 @@ public sealed class SessionSettingsValidationSnapshot [Experimental(Diagnostics.Experimental)] internal sealed class SessionSettingsSnapshot { - /// Gets or sets the clientName value. + /// Name of the SDK client that created the session. [JsonPropertyName("clientName")] public string? ClientName { get; set; } - /// Gets or sets the job value. + /// Redacted job settings. [JsonPropertyName("job")] public SessionSettingsJobSnapshot Job { get => field ??= new(); set; } - /// Gets or sets the model value. + /// Redacted model routing settings. [JsonPropertyName("model")] public SessionSettingsModelSnapshot Model { get => field ??= new(); set; } - /// Gets or sets the onlineEvaluation value. + /// Online-evaluation settings safe for SDK consumers. [JsonPropertyName("onlineEvaluation")] public SessionSettingsOnlineEvaluationSnapshot OnlineEvaluation { get => field ??= new(); set; } - /// Gets or sets the repo value. + /// Redacted repository and host settings. [JsonPropertyName("repo")] public SessionSettingsRepoSnapshot Repo { get => field ??= new(); set; } - /// Gets or sets the startTimeMs value. + /// Session start time as Unix epoch milliseconds. [JsonPropertyName("startTimeMs")] public double? StartTimeMs { get; set; } - /// Gets or sets the timeoutMs value. + /// Session timeout in milliseconds. [JsonPropertyName("timeoutMs")] public double? TimeoutMs { get; set; } - /// Gets or sets the validation value. + /// Redacted validation and memory-tool settings. [JsonPropertyName("validation")] public SessionSettingsValidationSnapshot Validation { get => field ??= new(); set; } - /// Gets or sets the version value. + /// Agent runtime version selector copied from the session settings, such as `latest` or a runtime release identifier. [JsonPropertyName("version")] public string? Version { get; set; } } @@ -12665,7 +13069,7 @@ internal sealed class SessionSettingsSnapshotRequest [Experimental(Diagnostics.Experimental)] internal sealed class SessionSettingsEvaluatePredicateResult { - /// Gets or sets the enabled value. + /// Whether the named settings predicate evaluated to enabled. [JsonPropertyName("enabled")] public bool Enabled { get; set; } } @@ -13391,7 +13795,7 @@ public sealed class QueueInsertMessage [Experimental(Diagnostics.Experimental)] internal sealed class QueueInsertAtRequest { - /// Gets or sets the message value. + /// Queued message contents and delivery metadata. [JsonPropertyName("message")] public QueueInsertMessage Message { get => field ??= new(); set; } @@ -13417,7 +13821,7 @@ public sealed class QueueRemoveAtResult [Experimental(Diagnostics.Experimental)] internal sealed class QueueRemoveAtRequest { - /// Gets or sets the id value. + /// Stable opaque ID of the queued item to remove. [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; @@ -13439,15 +13843,15 @@ public sealed class QueueUpdateTextResult [Experimental(Diagnostics.Experimental)] internal sealed class QueueUpdateTextRequest { - /// Gets or sets the displayPrompt value. + /// Optional replacement prompt displayed to the user. [JsonPropertyName("displayPrompt")] public string? DisplayPrompt { get; set; } - /// Gets or sets the id value. + /// Stable opaque ID of the queued item to edit. [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; - /// Gets or sets the prompt value. + /// Replacement prompt sent to the model. [JsonPropertyName("prompt")] public string Prompt { get; set; } = string.Empty; @@ -13469,7 +13873,7 @@ public sealed class QueueDuplicateAtResult [Experimental(Diagnostics.Experimental)] internal sealed class QueueDuplicateAtRequest { - /// Gets or sets the id value. + /// Stable opaque ID of the queued item to duplicate. [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; @@ -13482,7 +13886,7 @@ internal sealed class QueueDuplicateAtRequest [Experimental(Diagnostics.Experimental)] internal sealed class QueueSetDrainPausedRequest { - /// Gets or sets the paused value. + /// Whether queued-lane draining should be paused. [JsonPropertyName("paused")] public bool Paused { get; set; } @@ -13504,7 +13908,7 @@ public sealed class QueueSendNowResult [Experimental(Diagnostics.Experimental)] internal sealed class QueueSendNowRequest { - /// Gets or sets the id value. + /// Stable opaque ID of the queued item to steer into the live turn. [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; @@ -13986,7 +14390,7 @@ public sealed class SessionLimitPredictionTierOption [JsonPropertyName("cap")] public double Cap { get; set; } - /// Gets or sets the tier value. + /// Semantic usage tier. [JsonPropertyName("tier")] public SessionLimitPredictionTier Tier { get; set; } } @@ -14831,11 +15235,11 @@ public sealed class SessionFsSqliteQueryRequest [Experimental(Diagnostics.Experimental)] public sealed class SessionFsSqliteTransactionError { - /// Gets or sets the errorClass value. + /// Machine-readable classification of the transaction failure. [JsonPropertyName("errorClass")] public SessionFsSqliteTransactionErrorClass ErrorClass { get; set; } - /// Gets or sets the message value. + /// Human-readable transaction failure message. [JsonPropertyName("message")] public string Message { get; set; } = string.Empty; } @@ -14844,11 +15248,11 @@ public sealed class SessionFsSqliteTransactionError [Experimental(Diagnostics.Experimental)] public sealed class SessionFsSqliteTransactionResult { - /// Gets or sets the error value. + /// Classified transaction failure, when execution did not succeed. [JsonPropertyName("error")] public SessionFsSqliteTransactionError? Error { get; set; } - /// Gets or sets the results value. + /// Per-statement query results in input order. [JsonPropertyName("results")] public IList Results { get => field ??= []; set; } } @@ -14878,7 +15282,7 @@ public sealed class SessionFsSqliteTransactionRequest [JsonPropertyName("sessionId")] public string SessionId { get; set; } = string.Empty; - /// Gets or sets the statements value. + /// Ordered SQL statements to execute in one transaction. [JsonPropertyName("statements")] public IList Statements { get => field ??= []; set; } } @@ -15110,7 +15514,7 @@ public sealed class LlmInferenceHttpRequestStartRequest [JsonPropertyName("agentInvocationId")] public string? AgentInvocationId { get; set; } - /// Gets or sets the headers value. + /// HTTP request headers, preserving multiple values per name. [JsonPropertyName("headers")] public IDictionary> Headers { get => field ??= new Dictionary>(); set; } @@ -16492,6 +16896,75 @@ public override void Write(Utf8JsonWriter writer, SessionContextHostType value, } +/// What a remote host says one of its sessions is doing right now. Deliberately coarse: this is what a host can report for EVERY session in a catalogue listing, without a client subscribing to each one. AHP's `SessionSummary.status` is the source today; `input-needed` covers both a permission prompt and an `ask_user` question, since the summary does not say which. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct RemoteSessionHostStatus : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public RemoteSessionHostStatus(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// No turn is running. + public static RemoteSessionHostStatus Idle { get; } = new("idle"); + + /// A turn is running. + public static RemoteSessionHostStatus Working { get; } = new("working"); + + /// The session is blocked on the user: a permission prompt or an `ask_user` question. + public static RemoteSessionHostStatus InputNeeded { get; } = new("input-needed"); + + /// The session ended its last turn in an error. + public static RemoteSessionHostStatus Error { get; } = new("error"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(RemoteSessionHostStatus left, RemoteSessionHostStatus right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(RemoteSessionHostStatus left, RemoteSessionHostStatus right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is RemoteSessionHostStatus other && Equals(other); + + /// + public bool Equals(RemoteSessionHostStatus 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 RemoteSessionHostStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, RemoteSessionHostStatus value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(RemoteSessionHostStatus)); + } + } +} + + /// Whether the remote task originated from CCA or CLI `--remote`. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] @@ -19048,6 +19521,72 @@ public override void Write(Utf8JsonWriter writer, McpOauthLoginGrantType value, } +/// Why a passive MCP OAuth probe determined authentication is needed. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct McpOauthProbeNeedsAuthReason : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public McpOauthProbeNeedsAuthReason(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// No token was sent and the server requires authentication. + public static McpOauthProbeNeedsAuthReason Initial { get; } = new("initial"); + + /// A cached token was sent and rejected. + public static McpOauthProbeNeedsAuthReason Refresh { get; } = new("refresh"); + + /// The server returned a 403 insufficient_scope challenge, indicating additional scopes or audience are needed. + public static McpOauthProbeNeedsAuthReason Upscope { get; } = new("upscope"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(McpOauthProbeNeedsAuthReason left, McpOauthProbeNeedsAuthReason right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(McpOauthProbeNeedsAuthReason left, McpOauthProbeNeedsAuthReason right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is McpOauthProbeNeedsAuthReason other && Equals(other); + + /// + public bool Equals(McpOauthProbeNeedsAuthReason 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 McpOauthProbeNeedsAuthReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, McpOauthProbeNeedsAuthReason value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpOauthProbeNeedsAuthReason)); + } + } +} + + /// Allowed values for the `McpAppsSetHostContextDetailsAvailableDisplayMode` enumeration. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] @@ -20824,6 +21363,66 @@ public override void Write(Utf8JsonWriter writer, UIElicitationResponseAction va } +/// Structured MCP elicitation mode. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct McpElicitationFormMode : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public McpElicitationFormMode(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Gets the form value. + public static McpElicitationFormMode Form { get; } = new("form"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(McpElicitationFormMode left, McpElicitationFormMode right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(McpElicitationFormMode left, McpElicitationFormMode right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is McpElicitationFormMode other && Equals(other); + + /// + public bool Equals(McpElicitationFormMode 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 McpElicitationFormMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, McpElicitationFormMode value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpElicitationFormMode)); + } + } +} + + /// User's choice for auto-mode switching: yes (allow this turn), yes_always (allow + persist as setting), or no (decline). [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] @@ -23895,6 +24494,12 @@ public async Task DisableAsync(IList names, CancellationToken cancellati await CopilotClient.InvokeRpcAsync(_rpc, "plugins.disable", [request], cancellationToken); } + /// Builtin APIs. + public ServerPluginsBuiltinApi Builtin => + field ?? + Interlocked.CompareExchange(ref field, new(_rpc), null) ?? + field; + /// Marketplaces APIs. public ServerPluginsMarketplacesApi Marketplaces => field ?? @@ -23902,6 +24507,29 @@ public async Task DisableAsync(IList names, CancellationToken cancellati field; } +/// Provides server-scoped PluginsBuiltin APIs. +[Experimental(Diagnostics.Experimental)] +public sealed class ServerPluginsBuiltinApi +{ + private readonly JsonRpc _rpc; + + internal ServerPluginsBuiltinApi(JsonRpc rpc) + { + _rpc = rpc; + } + + /// Replaces this server's trusted built-in plugin directories while no sessions are active. + /// Complete replacement set of trusted built-in plugin directories. Every entry must be an absolute local filesystem path no longer than 4096 characters. + /// The to monitor for cancellation requests. The default is . + public async Task SetAsync(IList paths, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(paths); + + var request = new PluginsBuiltinSetRequest { Paths = paths }; + await CopilotClient.InvokeRpcAsync(_rpc, "plugins.builtin.set", [request], cancellationToken); + } +} + /// Provides server-scoped PluginsMarketplaces APIs. [Experimental(Diagnostics.Experimental)] public sealed class ServerPluginsMarketplacesApi @@ -24268,7 +24896,7 @@ public async Task SetProviderAsync(CancellationTo /// Delivers the response head (status + headers) for an in-flight request, correlated by the requestId the runtime supplied in httpRequestStart. Must be called exactly once per request before any httpResponseChunk frames. /// Matches the requestId from the originating httpRequestStart frame. /// HTTP status code. - /// The headers parameter. + /// HTTP response headers, preserving multiple values per name. /// Optional HTTP status reason phrase. /// The to monitor for cancellation requests. The default is . /// Whether the start frame was accepted. @@ -25119,6 +25747,105 @@ public async Task SetCredentialsAsync(AuthInfo? cre var request = new SessionSetCredentialsParams { SessionId = _session.SessionId, Credentials = credentials }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.gitHubAuth.setCredentials", [request], cancellationToken); } + + /// Gets the current authentication information for internal session hosts. + /// The to monitor for cancellation requests. The default is . + /// Current authentication information, or null when no authentication is active. + internal async Task GetCurrentAuthInfoAsync(CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var request = new SessionGitHubAuthGetCurrentAuthInfoRequest { SessionId = _session.SessionId }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.gitHubAuth.getCurrentAuthInfo", [request], cancellationToken); + } + + /// Gets all authentication accounts available to the internal session host. + /// The to monitor for cancellation requests. The default is . + /// Authentication accounts available to the internal session host. + internal async Task> GetAllAuthAvailableAsync(CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var request = new SessionGitHubAuthGetAllAuthAvailableRequest { SessionId = _session.SessionId }; + return await CopilotClient.InvokeRpcAsync>(_session.Rpc, "session.gitHubAuth.getAllAuthAvailable", [request], cancellationToken); + } + + /// Refreshes Copilot account metadata for the current authentication. + /// The to monitor for cancellation requests. The default is . + /// Current authentication information, or null when no authentication is active. + internal async Task RefreshCopilotUserAsync(CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var request = new SessionGitHubAuthRefreshCopilotUserRequest { SessionId = _session.SessionId }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.gitHubAuth.refreshCopilotUser", [request], cancellationToken); + } + + /// Logs in a GitHub user through the internal session host. + /// GitHub host URL. + /// GitHub login. + /// GitHub authentication token. + /// Whether to persist the token after login. + /// The to monitor for cancellation requests. The default is . + /// Initial authentication info for the session. + internal async Task LoginAsync(string host, string login, string token, bool? persist = null, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(host); + ArgumentNullException.ThrowIfNull(login); + ArgumentNullException.ThrowIfNull(token); + _session.ThrowIfDisposed(); + + var request = new SessionAuthLoginRequest { SessionId = _session.SessionId, Host = host, Login = login, Token = token, Persist = persist }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.gitHubAuth.login", [request], cancellationToken); + } + + /// Switches the session to another available authentication. + /// Authentication information to activate. + /// Optional token paired with the authentication information. + /// The to monitor for cancellation requests. The default is . + internal async Task SwitchToAuthAsync(AuthInfo authInfo, string? token = null, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(authInfo); + _session.ThrowIfDisposed(); + + var request = new SessionAuthSwitchRequest { SessionId = _session.SessionId, AuthInfo = authInfo, Token = token }; + await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.gitHubAuth.switchToAuth", [request], cancellationToken); + } + + /// Logs out the session's current GitHub authentication. + /// The to monitor for cancellation requests. The default is . + /// Whether the current authentication was logged out. + internal async Task LogoutAsync(CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var request = new SessionGitHubAuthLogoutRequest { SessionId = _session.SessionId }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.gitHubAuth.logout", [request], cancellationToken); + } + + /// Logs out a specific GitHub authentication. + /// Authentication information to log out. + /// The to monitor for cancellation requests. The default is . + /// Whether the requested authentication was logged out. + internal async Task LogoutUserAsync(AuthInfo authInfo, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(authInfo); + _session.ThrowIfDisposed(); + + var request = new SessionAuthLogoutUserRequest { SessionId = _session.SessionId, AuthInfo = authInfo }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.gitHubAuth.logoutUser", [request], cancellationToken); + } + + /// Gets validation errors from the most recent authentication attempt. + /// The to monitor for cancellation requests. The default is . + /// Validation errors from the most recent authentication attempt. + internal async Task> LastAuthErrorsAsync(CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var request = new SessionGitHubAuthLastAuthErrorsRequest { SessionId = _session.SessionId }; + return await CopilotClient.InvokeRpcAsync>(_session.Rpc, "session.gitHubAuth.lastAuthErrors", [request], cancellationToken); + } } /// Provides session-scoped Debug APIs. @@ -25215,6 +25942,12 @@ public async Task CloseAsync(string instanceId, CancellationToken cancellationTo field ?? Interlocked.CompareExchange(ref field, new(_session), null) ?? field; + + /// Provider APIs. + public CanvasProviderApi Provider => + field ?? + Interlocked.CompareExchange(ref field, new(_session), null) ?? + field; } /// Provides session-scoped CanvasAction APIs. @@ -25245,6 +25978,46 @@ public async Task InvokeAsync(string instanceId, strin } } +/// Provides session-scoped CanvasProvider APIs. +[Experimental(Diagnostics.Experimental)] +public sealed class CanvasProviderApi +{ + private readonly CopilotSession _session; + + internal CanvasProviderApi(CopilotSession session) + { + _session = session; + } + + /// Registers an internal canvas provider connection and its contributions. + /// Connection identifier for callback routing. + /// Provider metadata supplied by the host. + /// Canvas contributions supplied by the provider. + /// The to monitor for cancellation requests. The default is . + internal async Task RegisterAsync(string connectionId, object info, IList canvases, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(connectionId); + ArgumentNullException.ThrowIfNull(info); + ArgumentNullException.ThrowIfNull(canvases); + _session.ThrowIfDisposed(); + + var request = new CanvasProviderRegisterRequest { SessionId = _session.SessionId, ConnectionId = connectionId, Info = CopilotClient.ToJsonElementForWire(info)!.Value, Canvases = canvases.Select(static v => CopilotClient.ToJsonElementForWire(v)!.Value).ToList() }; + await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.canvas.provider.register", [request], cancellationToken); + } + + /// Unregisters an internal canvas provider connection. + /// Connection identifier to unregister. + /// The to monitor for cancellation requests. The default is . + internal async Task UnregisterAsync(string connectionId, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(connectionId); + _session.ThrowIfDisposed(); + + var request = new CanvasProviderUnregisterRequest { SessionId = _session.SessionId, ConnectionId = connectionId }; + await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.canvas.provider.unregister", [request], cancellationToken); + } +} + /// Provides session-scoped Factory APIs. [Experimental(Diagnostics.Experimental)] public sealed class FactoryApi @@ -25476,15 +26249,16 @@ public async Task GetCurrentAsync(CancellationToken cancellationTo /// Output verbosity level to request for supported models. /// Override individual model capabilities resolved by the runtime. /// Explicit context tier for the selected model. `"default"` / `"long_context"` apply the requested tier; omit this field to use normal model behavior with no explicit tier. + /// Origin to record on the effective `session.model_change` event. Defaults to `sdk` when omitted. /// When true, defer this switch (enqueue it) if another model change is already queued, even when no turn is active — so it drains last (FIFO) and wins over the already-queued change. Intended for genuine user-initiated model selections; internal restore/reapply switches omit it and apply immediately when no turn is active. When no other model change is queued this has no effect (a switch still applies immediately unless a turn is active). /// The to monitor for cancellation requests. The default is . /// The model identifier active on the session after the switch. - public async Task SwitchToAsync(string modelId, string? reasoningEffort = null, ReasoningSummary? reasoningSummary = null, Verbosity? verbosity = null, ModelCapabilitiesOverride? modelCapabilities = null, ContextTier? contextTier = null, bool? deferIfModelChangeQueued = null, CancellationToken cancellationToken = default) + public async Task SwitchToAsync(string modelId, string? reasoningEffort = null, ReasoningSummary? reasoningSummary = null, Verbosity? verbosity = null, ModelCapabilitiesOverride? modelCapabilities = null, ContextTier? contextTier = null, ModelChangeSource? source = null, bool? deferIfModelChangeQueued = null, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(modelId); _session.ThrowIfDisposed(); - var request = new ModelSwitchToRequest { SessionId = _session.SessionId, ModelId = modelId, ReasoningEffort = reasoningEffort, ReasoningSummary = reasoningSummary, Verbosity = verbosity, ModelCapabilities = modelCapabilities, ContextTier = contextTier, DeferIfModelChangeQueued = deferIfModelChangeQueued }; + var request = new ModelSwitchToRequest { SessionId = _session.SessionId, ModelId = modelId, ReasoningEffort = reasoningEffort, ReasoningSummary = reasoningSummary, Verbosity = verbosity, ModelCapabilities = modelCapabilities, ContextTier = contextTier, Source = source, DeferIfModelChangeQueued = deferIfModelChangeQueued }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.model.switchTo", [request], cancellationToken); } @@ -26052,7 +26826,7 @@ internal TasksApi(CopilotSession session) /// Starts a background agent task in the session. /// Type of agent to start (e.g., 'explore', 'task', 'general-purpose'). /// Task prompt for the agent. - /// Short name for the agent, used to generate a human-readable ID. + /// Friendly, non-unique name used when displaying the agent. /// Short description of the task. /// Optional model override. /// The to monitor for cancellation requests. The default is . @@ -26575,6 +27349,19 @@ public async Task LoginAsync(string serverName, bool? force return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.oauth.login", [request], cancellationToken); } + /// Passively probes a configured remote MCP server to classify whether OAuth is required or a cached/override token is accepted. Does not start OAuth, emit pending OAuth requests, or mutate MCP connection state. + /// Name of the configured remote MCP server to probe. + /// The to monitor for cancellation requests. The default is . + /// Passive MCP OAuth probe result. `authenticated` means the server accepted the probe request while an OAuth-origin access token was attached; it does not prove the server required or independently validated that token. The probe does not make a second unauthenticated request. Failed is an expected probe-domain outcome; JSON-RPC errors are reserved for API-call failures. + public async Task ProbeAsync(string serverName, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(serverName); + _session.ThrowIfDisposed(); + + var request = new McpOauthProbeRequest { SessionId = _session.SessionId, ServerName = serverName }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.oauth.probe", [request], cancellationToken); + } + /// Responds to a pending MCP OAuth authorization request by its request id. /// OAuth request identifier from the mcp.oauth_required event. /// The to monitor for cancellation requests. The default is . @@ -27231,15 +28018,18 @@ public async Task EphemeralQueryAsync(string question, C /// 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. + /// Elicitation mode. Omitted and form are equivalent for structured elicitation. + /// MCP request metadata. + /// MCP task metadata. /// The to monitor for cancellation requests. The default is . /// The elicitation response (accept with form values, decline, or cancel). - public async Task ElicitationAsync(string message, UIElicitationSchema requestedSchema, CancellationToken cancellationToken = default) + public async Task ElicitationAsync(string message, UIElicitationSchema requestedSchema, McpElicitationFormMode? mode = null, UIElicitationRequestMeta? _meta = null, McpTaskMetadata? task = null, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(message); ArgumentNullException.ThrowIfNull(requestedSchema); _session.ThrowIfDisposed(); - var request = new UIElicitationRequest { SessionId = _session.SessionId, Message = message, RequestedSchema = requestedSchema }; + var request = new UIElicitationRequest { SessionId = _session.SessionId, Message = message, RequestedSchema = requestedSchema, Mode = mode, Meta = _meta, Task = task }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.ui.elicitation", [request], cancellationToken); } @@ -28138,7 +28928,7 @@ public async Task MoveItemAsync(string id, long toPosition, /// Inserts a new queued message at a public visible position. /// Zero-based position in the public visible queue. Values outside the queue clamp to an end. - /// The message parameter. + /// Queued message contents and delivery metadata. /// The to monitor for cancellation requests. The default is . /// Result of inserting a queued message. public async Task InsertAtAsync(long position, QueueInsertMessage message, CancellationToken cancellationToken = default) @@ -28151,7 +28941,7 @@ public async Task InsertAtAsync(long position, QueueInsertM } /// Removes an addressable queued item by its stable id. - /// The id parameter. + /// Stable opaque ID of the queued item to remove. /// The to monitor for cancellation requests. The default is . /// Result of removing a queued item. public async Task RemoveAtAsync(string id, CancellationToken cancellationToken = default) @@ -28164,9 +28954,9 @@ public async Task RemoveAtAsync(string id, CancellationToke } /// Updates the text of an addressable single-message queue item. - /// The id parameter. - /// The prompt parameter. - /// The displayPrompt parameter. + /// Stable opaque ID of the queued item to edit. + /// Replacement prompt sent to the model. + /// Optional replacement prompt displayed to the user. /// The to monitor for cancellation requests. The default is . /// Result of editing a queued message. public async Task UpdateTextAsync(string id, string prompt, string? displayPrompt = null, CancellationToken cancellationToken = default) @@ -28180,7 +28970,7 @@ public async Task UpdateTextAsync(string id, string promp } /// Duplicates an addressable queued item immediately after its source. - /// The id parameter. + /// Stable opaque ID of the queued item to duplicate. /// The to monitor for cancellation requests. The default is . /// Result of duplicating a queued item. public async Task DuplicateAtAsync(string id, CancellationToken cancellationToken = default) @@ -28193,7 +28983,7 @@ public async Task DuplicateAtAsync(string id, Cancellati } /// Acquires or releases the queued-lane drain pause. - /// The paused parameter. + /// Whether queued-lane draining should be paused. /// The to monitor for cancellation requests. The default is . public async Task SetDrainPausedAsync(bool paused, CancellationToken cancellationToken = default) { @@ -28204,7 +28994,7 @@ public async Task SetDrainPausedAsync(bool paused, CancellationToken cancellatio } /// Moves an addressable queued message into the live turn's steering lane. - /// The id parameter. + /// Stable opaque ID of the queued item to steer into the live turn. /// The to monitor for cancellation requests. The default is . /// Result of trying to steer a queued message into a live turn. public async Task SendNowAsync(string id, CancellationToken cancellationToken = default) @@ -29006,6 +29796,10 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.AbortData), TypeInfoPropertyName = "SessionEventsAbortData")] [JsonSerializable(typeof(GitHub.Copilot.AbortEvent), TypeInfoPropertyName = "SessionEventsAbortEvent")] [JsonSerializable(typeof(GitHub.Copilot.AbortReason), TypeInfoPropertyName = "SessionEventsAbortReason")] +[JsonSerializable(typeof(GitHub.Copilot.AgentInterruptedActivity), TypeInfoPropertyName = "SessionEventsAgentInterruptedActivity")] +[JsonSerializable(typeof(GitHub.Copilot.AgentInterruptedCancelPhase), TypeInfoPropertyName = "SessionEventsAgentInterruptedCancelPhase")] +[JsonSerializable(typeof(GitHub.Copilot.AgentInterruptedData), TypeInfoPropertyName = "SessionEventsAgentInterruptedData")] +[JsonSerializable(typeof(GitHub.Copilot.AgentInterruptedEvent), TypeInfoPropertyName = "SessionEventsAgentInterruptedEvent")] [JsonSerializable(typeof(GitHub.Copilot.AssistantIdleData), TypeInfoPropertyName = "SessionEventsAssistantIdleData")] [JsonSerializable(typeof(GitHub.Copilot.AssistantIdleEvent), TypeInfoPropertyName = "SessionEventsAssistantIdleEvent")] [JsonSerializable(typeof(GitHub.Copilot.AssistantIntentData), TypeInfoPropertyName = "SessionEventsAssistantIntentData")] @@ -29040,6 +29834,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.AssistantUsageCopilotUsageTokenDetail), TypeInfoPropertyName = "SessionEventsAssistantUsageCopilotUsageTokenDetail")] [JsonSerializable(typeof(GitHub.Copilot.AssistantUsageData), TypeInfoPropertyName = "SessionEventsAssistantUsageData")] [JsonSerializable(typeof(GitHub.Copilot.AssistantUsageEvent), TypeInfoPropertyName = "SessionEventsAssistantUsageEvent")] +[JsonSerializable(typeof(GitHub.Copilot.AssistantUsageTransport), TypeInfoPropertyName = "SessionEventsAssistantUsageTransport")] [JsonSerializable(typeof(GitHub.Copilot.Attachment), TypeInfoPropertyName = "SessionEventsAttachment")] [JsonSerializable(typeof(GitHub.Copilot.AttachmentBlob), TypeInfoPropertyName = "SessionEventsAttachmentBlob")] [JsonSerializable(typeof(GitHub.Copilot.AttachmentDirectory), TypeInfoPropertyName = "SessionEventsAttachmentDirectory")] @@ -29181,6 +29976,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.ModelCallFailureTransport), TypeInfoPropertyName = "SessionEventsModelCallFailureTransport")] [JsonSerializable(typeof(GitHub.Copilot.ModelCallStartData), TypeInfoPropertyName = "SessionEventsModelCallStartData")] [JsonSerializable(typeof(GitHub.Copilot.ModelCallStartEvent), TypeInfoPropertyName = "SessionEventsModelCallStartEvent")] +[JsonSerializable(typeof(GitHub.Copilot.ModelChangeSource), TypeInfoPropertyName = "SessionEventsModelChangeSource")] [JsonSerializable(typeof(GitHub.Copilot.OmittedBinaryOmittedReason), TypeInfoPropertyName = "SessionEventsOmittedBinaryOmittedReason")] [JsonSerializable(typeof(GitHub.Copilot.OmittedBinaryResult), TypeInfoPropertyName = "SessionEventsOmittedBinaryResult")] [JsonSerializable(typeof(GitHub.Copilot.OmittedBinaryType), TypeInfoPropertyName = "SessionEventsOmittedBinaryType")] @@ -29193,6 +29989,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequest), TypeInfoPropertyName = "SessionEventsPermissionPromptRequest")] [JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestCommands), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestCommands")] [JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestCustomTool), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestCustomTool")] +[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestExtensionEnvAccess), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestExtensionEnvAccess")] [JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestExtensionManagement), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestExtensionManagement")] [JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestExtensionPermissionAccess), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestExtensionPermissionAccess")] [JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestFactory), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestFactory")] @@ -29204,8 +30001,10 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestRead), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestRead")] [JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestUrl), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestUrl")] [JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestWrite), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestWrite")] +[JsonSerializable(typeof(GitHub.Copilot.PermissionRecommendation), TypeInfoPropertyName = "SessionEventsPermissionRecommendation")] [JsonSerializable(typeof(GitHub.Copilot.PermissionRequest), TypeInfoPropertyName = "SessionEventsPermissionRequest")] [JsonSerializable(typeof(GitHub.Copilot.PermissionRequestCustomTool), TypeInfoPropertyName = "SessionEventsPermissionRequestCustomTool")] +[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestExtensionEnvAccess), TypeInfoPropertyName = "SessionEventsPermissionRequestExtensionEnvAccess")] [JsonSerializable(typeof(GitHub.Copilot.PermissionRequestExtensionManagement), TypeInfoPropertyName = "SessionEventsPermissionRequestExtensionManagement")] [JsonSerializable(typeof(GitHub.Copilot.PermissionRequestExtensionPermissionAccess), TypeInfoPropertyName = "SessionEventsPermissionRequestExtensionPermissionAccess")] [JsonSerializable(typeof(GitHub.Copilot.PermissionRequestFactory), TypeInfoPropertyName = "SessionEventsPermissionRequestFactory")] @@ -29234,6 +30033,8 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.SamplingCompletedEvent), TypeInfoPropertyName = "SessionEventsSamplingCompletedEvent")] [JsonSerializable(typeof(GitHub.Copilot.SamplingRequestedData), TypeInfoPropertyName = "SessionEventsSamplingRequestedData")] [JsonSerializable(typeof(GitHub.Copilot.SamplingRequestedEvent), TypeInfoPropertyName = "SessionEventsSamplingRequestedEvent")] +[JsonSerializable(typeof(GitHub.Copilot.SandboxDecisionData), TypeInfoPropertyName = "SessionEventsSandboxDecisionData")] +[JsonSerializable(typeof(GitHub.Copilot.SandboxDecisionEvent), TypeInfoPropertyName = "SessionEventsSandboxDecisionEvent")] [JsonSerializable(typeof(GitHub.Copilot.ScheduleOrigin), TypeInfoPropertyName = "SessionEventsScheduleOrigin")] [JsonSerializable(typeof(GitHub.Copilot.SessionEvent), TypeInfoPropertyName = "SessionEventsSessionEvent")] [JsonSerializable(typeof(GitHub.Copilot.SessionLimitsConfig), TypeInfoPropertyName = "SessionEventsSessionLimitsConfig")] @@ -29337,6 +30138,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApproval), TypeInfoPropertyName = "SessionEventsUserToolSessionApproval")] [JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalCommands), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalCommands")] [JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalCustomTool), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalCustomTool")] +[JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalExtensionEnvAccess), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalExtensionEnvAccess")] [JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalExtensionManagement), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalExtensionManagement")] [JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalExtensionPermissionAccess), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalExtensionPermissionAccess")] [JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalFactory), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalFactory")] @@ -29377,6 +30179,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(AllowAllPermissionSetResult))] [JsonSerializable(typeof(AllowAllPermissionState))] [JsonSerializable(typeof(AuthInfo))] +[JsonSerializable(typeof(AuthValidationError))] [JsonSerializable(typeof(BuiltInModelCatalog))] [JsonSerializable(typeof(BuiltInModelCatalogEntry))] [JsonSerializable(typeof(CancelUserRequestedShellCommandResult))] @@ -29393,6 +30196,8 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(CanvasProviderInvokeActionRequest))] [JsonSerializable(typeof(CanvasProviderOpenRequest))] [JsonSerializable(typeof(CanvasProviderOpenResult))] +[JsonSerializable(typeof(CanvasProviderRegisterRequest))] +[JsonSerializable(typeof(CanvasProviderUnregisterRequest))] [JsonSerializable(typeof(CanvasSessionContext))] [JsonSerializable(typeof(CapiSessionOptions))] [JsonSerializable(typeof(CommandList))] @@ -29514,6 +30319,8 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(HistoryTruncateResult))] [JsonSerializable(typeof(IDictionary))] [JsonSerializable(typeof(IList))] +[JsonSerializable(typeof(IList))] +[JsonSerializable(typeof(IList))] [JsonSerializable(typeof(InstalledPlugin))] [JsonSerializable(typeof(InstalledPluginInfo))] [JsonSerializable(typeof(InstructionDiscoveryPath))] @@ -29579,6 +30386,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(McpExecuteSamplingParams))] [JsonSerializable(typeof(McpExecuteSamplingRequest))] [JsonSerializable(typeof(McpExecuteSamplingResult))] +[JsonSerializable(typeof(McpFailedServer))] [JsonSerializable(typeof(McpFilteredServer))] [JsonSerializable(typeof(McpHeadersHandlePendingHeadersRefreshRequest))] [JsonSerializable(typeof(McpHeadersHandlePendingHeadersRefreshRequestRequest))] @@ -29594,6 +30402,8 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(McpOauthLoginRequest))] [JsonSerializable(typeof(McpOauthLoginResult))] [JsonSerializable(typeof(McpOauthPendingRequestResponse))] +[JsonSerializable(typeof(McpOauthProbeRequest))] +[JsonSerializable(typeof(McpOauthProbeResult))] [JsonSerializable(typeof(McpOauthRespondRequest))] [JsonSerializable(typeof(McpOauthRespondResult))] [JsonSerializable(typeof(McpRegisterExternalClientRequest))] @@ -29621,6 +30431,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(McpStartServerRequest))] [JsonSerializable(typeof(McpStartServersResult))] [JsonSerializable(typeof(McpStopServerRequest))] +[JsonSerializable(typeof(McpTaskMetadata))] [JsonSerializable(typeof(McpToolUi))] [JsonSerializable(typeof(McpTools))] [JsonSerializable(typeof(McpUnregisterExternalClientRequest))] @@ -29737,6 +30548,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(PluginUpdateAllEntry))] [JsonSerializable(typeof(PluginUpdateAllResult))] [JsonSerializable(typeof(PluginUpdateResult))] +[JsonSerializable(typeof(PluginsBuiltinSetRequest))] [JsonSerializable(typeof(PluginsDisableRequest))] [JsonSerializable(typeof(PluginsEnableRequest))] [JsonSerializable(typeof(PluginsInstallRequest))] @@ -29848,7 +30660,10 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(SessionAgentListRequest))] [JsonSerializable(typeof(SessionAgentListRequestWithSession))] [JsonSerializable(typeof(SessionAgentReloadRequest))] +[JsonSerializable(typeof(SessionAuthLoginRequest))] +[JsonSerializable(typeof(SessionAuthLogoutUserRequest))] [JsonSerializable(typeof(SessionAuthStatus))] +[JsonSerializable(typeof(SessionAuthSwitchRequest))] [JsonSerializable(typeof(SessionBulkDeleteResult))] [JsonSerializable(typeof(SessionCancelAllBackgroundAgentsRequest))] [JsonSerializable(typeof(SessionCanvasListOpenRequest))] @@ -29890,7 +30705,12 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(SessionFsStatRequest))] [JsonSerializable(typeof(SessionFsStatResult))] [JsonSerializable(typeof(SessionFsWriteFileRequest))] +[JsonSerializable(typeof(SessionGitHubAuthGetAllAuthAvailableRequest))] +[JsonSerializable(typeof(SessionGitHubAuthGetCurrentAuthInfoRequest))] [JsonSerializable(typeof(SessionGitHubAuthGetStatusRequest))] +[JsonSerializable(typeof(SessionGitHubAuthLastAuthErrorsRequest))] +[JsonSerializable(typeof(SessionGitHubAuthLogoutRequest))] +[JsonSerializable(typeof(SessionGitHubAuthRefreshCopilotUserRequest))] [JsonSerializable(typeof(SessionHistoryAbortManualCompactionRequest))] [JsonSerializable(typeof(SessionHistoryCancelBackgroundCompactionRequest))] [JsonSerializable(typeof(SessionHistoryCompactRequest))] @@ -30084,7 +30904,9 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(ToolsListRequest))] [JsonSerializable(typeof(ToolsUpdateSubagentSettingsResult))] [JsonSerializable(typeof(UIElicitationRequest))] +[JsonSerializable(typeof(UIElicitationRequestMeta))] [JsonSerializable(typeof(UIElicitationResponse))] +[JsonSerializable(typeof(UIElicitationResponseMeta))] [JsonSerializable(typeof(UIElicitationResult))] [JsonSerializable(typeof(UIElicitationSchema))] [JsonSerializable(typeof(UIEphemeralQueryRequest))] diff --git a/dotnet/src/Generated/SessionEvents.cs b/dotnet/src/Generated/SessionEvents.cs index 90eb08263..44208bd75 100644 --- a/dotnet/src/Generated/SessionEvents.cs +++ b/dotnet/src/Generated/SessionEvents.cs @@ -25,6 +25,7 @@ namespace GitHub.Copilot; TypeDiscriminatorPropertyName = "type", IgnoreUnrecognizedTypeDiscriminators = true)] [JsonDerivedType(typeof(AbortEvent), "abort")] +[JsonDerivedType(typeof(AgentInterruptedEvent), "agent.interrupted")] [JsonDerivedType(typeof(AssistantIdleEvent), "assistant.idle")] [JsonDerivedType(typeof(AssistantIntentEvent), "assistant.intent")] [JsonDerivedType(typeof(AssistantMessageEvent), "assistant.message")] @@ -71,6 +72,7 @@ namespace GitHub.Copilot; [JsonDerivedType(typeof(PermissionRequestedEvent), "permission.requested")] [JsonDerivedType(typeof(SamplingCompletedEvent), "sampling.completed")] [JsonDerivedType(typeof(SamplingRequestedEvent), "sampling.requested")] +[JsonDerivedType(typeof(SandboxDecisionEvent), "sandbox.decision")] [JsonDerivedType(typeof(SessionLimitsExhaustedCompletedEvent), "session_limits_exhausted.completed")] [JsonDerivedType(typeof(SessionLimitsExhaustedRequestedEvent), "session_limits_exhausted.requested")] [JsonDerivedType(typeof(SessionAutoModeResolvedEvent), "session.auto_mode_resolved")] @@ -623,6 +625,19 @@ public sealed partial class AssistantTurnRetryEvent : SessionEvent public required AssistantTurnRetryData Data { get; set; } } +/// Metadata for work the user interrupted while the agent was running. +/// Represents the agent.interrupted event. +public sealed partial class AgentInterruptedEvent : SessionEvent +{ + /// + [JsonIgnore] + public override string Type => "agent.interrupted"; + + /// The agent.interrupted event payload. + [JsonPropertyName("data")] + public required AgentInterruptedData Data { get; set; } +} + /// Agent intent description for current activity or plan. /// Represents the assistant.intent event. public sealed partial class AssistantIntentEvent : SessionEvent @@ -909,6 +924,19 @@ public sealed partial class SkillInvokedEvent : SessionEvent public required SkillInvokedData Data { get; set; } } +/// Payload of `sandbox.decision`, a bounded governance record of what the process sandbox was configured to do and whether it took effect. Discriminated by `kind`. +/// Represents the sandbox.decision event. +public sealed partial class SandboxDecisionEvent : SessionEvent +{ + /// + [JsonIgnore] + public override string Type => "sandbox.decision"; + + /// The sandbox.decision event payload. + [JsonPropertyName("data")] + public required SandboxDecisionData Data { get; set; } +} + /// Sub-agent startup details including parent tool call and agent information. /// Represents the subagent.started event. public sealed partial class SubagentStartedEvent : SessionEvent @@ -2087,6 +2115,11 @@ public sealed partial class SessionModelChangeData [JsonPropertyName("reasoningSummary")] public ReasoningSummary? ReasoningSummary { get; set; } + /// Origin of the effective model change, when known. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("source")] + public ModelChangeSource? Source { get; set; } + /// Output verbosity level after the model change, if applicable. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("verbosity")] @@ -2711,6 +2744,74 @@ public sealed partial class AssistantTurnRetryData public required string TurnId { get; set; } } +/// Metadata for work the user interrupted while the agent was running. +public sealed partial class AgentInterruptedData +{ + /// What the agent was doing when the user interrupted it. + [JsonPropertyName("activity")] + public required AgentInterruptedActivity Activity { get; set; } + + /// For an interrupted model call: the provider endpoint the request targeted. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("apiEndpoint")] + public string? ApiEndpoint { get; set; } + + /// For an interrupted model call: whether the user interrupted before any token arrived or while the response was streaming. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("cancelPhase")] + public AgentInterruptedCancelPhase? CancelPhase { get; set; } + + /// How long the interrupted work had been running, in milliseconds. + [JsonConverter(typeof(MillisecondsTimeSpanConverter))] + [JsonPropertyName("elapsedMs")] + public required TimeSpan Elapsed { get; set; } + + /// For an interrupted background-agent batch: how many background sub-agents the stop swept. Counts accepted cancellations, so an agent cancelled as a cascade of its interrupted parent is covered by that parent rather than counted again. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("interruptedAgentCount")] + public long? InterruptedAgentCount { get; set; } + + /// For an interrupted model call: the model the request targeted. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("model")] + public string? Model { get; set; } + + /// For a mid-stream interrupt: the observed time to first observable output, in milliseconds. Deliberately distinct from the `ttftMs` reported on a successful model call, which measures time to first stream event. + [JsonConverter(typeof(MillisecondsTimeSpanConverter))] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("outputTtftMs")] + public TimeSpan? OutputTtft { get; set; } + + /// For an interrupted model call: the reasoning effort the request asked for. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("reasoningEffort")] + public string? ReasoningEffort { get; set; } + + /// Subset of `toolNames` whose tool metadata marks the tool name as safe to record unhashed in telemetry. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("safeToolNames")] + public string[]? SafeToolNames { get; set; } + + /// Tool call identifiers that were still running. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("toolCallIds")] + public string[]? ToolCallIds { get; set; } + + /// Names of the tools that were still running. More than one when the model requested a parallel fan-out. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("toolNames")] + public string[]? ToolNames { get; set; } + + /// For an interrupted model call: the transport the request used. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("transport")] + public ModelCallFailureTransport? Transport { get; set; } + + /// Zero-based agentic-loop iteration the interrupt landed in. + [JsonPropertyName("turn")] + public required long Turn { get; set; } +} + /// Agent intent description for current activity or plan. public sealed partial class AssistantIntentData { @@ -2746,7 +2847,7 @@ public sealed partial class AssistantReasoningData [JsonPropertyName("reasoningId")] public required string ReasoningId { get; set; } - /// Gets or sets the rte value. + /// Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("rte")] public bool? Rte { get; set; } @@ -2885,7 +2986,7 @@ public sealed partial class AssistantMessageData [JsonPropertyName("requestId")] public string? RequestId { get; set; } - /// Gets or sets the rte value. + /// Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("rte")] public bool? Rte { get; set; } @@ -2970,6 +3071,11 @@ public sealed partial class AssistantIdleData /// LLM API call usage metrics including tokens, costs, quotas, and billing information. public sealed partial class AssistantUsageData { + /// Number of accepted speculative prediction tokens. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("acceptedPredictionTokens")] + public long? AcceptedPredictionTokens { get; set; } + /// Completion ID from the model provider (e.g., chatcmpl-abc123). [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("apiCallId")] @@ -3049,6 +3155,26 @@ public sealed partial class AssistantUsageData [JsonPropertyName("interTokenLatencyMs")] public TimeSpan? InterTokenLatency { get; set; } + /// Whether Auto mode was selected for this model call. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("isAuto")] + public bool? IsAuto { get; set; } + + /// Whether this model call used a bring-your-own-key provider. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("isByok")] + public bool? IsByok { get; set; } + + /// Requested maximum output tokens used for this model call. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("maxOutputTokens")] + public long? MaxOutputTokens { get; set; } + + /// Effective maximum prompt-token limit used for this model call. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("maxPromptTokens")] + public long? MaxPromptTokens { get; set; } + /// Model identifier used for this API call. [JsonPropertyName("model")] public required string Model { get; set; } @@ -3089,12 +3215,22 @@ public sealed partial class AssistantUsageData [JsonPropertyName("reasoningEffort")] public string? ReasoningEffort { get; set; } + /// Reasoning summary mode used for this model call, if applicable. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("reasoningSummary")] + public ReasoningSummary? ReasoningSummary { get; set; } + /// Number of output tokens used for reasoning (e.g., chain-of-thought). [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("reasoningTokens")] public long? ReasoningTokens { get; set; } - /// Gets or sets the rte value. + /// Number of rejected speculative prediction tokens. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("rejectedPredictionTokens")] + public long? RejectedPredictionTokens { get; set; } + + /// Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("rte")] public bool? Rte { get; set; } @@ -3121,6 +3257,11 @@ public sealed partial class AssistantUsageData [JsonInclude] [JsonPropertyName("toolTokenCount")] internal long? ToolTokenCount { get; set; } + + /// Transport used for this model call (http or websocket). + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("transport")] + public AssistantUsageTransport? Transport { get; set; } } /// Failed LLM API call metadata for telemetry. @@ -3218,7 +3359,7 @@ public sealed partial class ModelCallFailureData [JsonPropertyName("requestFingerprint")] public ModelCallFailureRequestFingerprint? RequestFingerprint { get; set; } - /// Gets or sets the rte value. + /// Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("rte")] public bool? Rte { get; set; } @@ -3324,7 +3465,7 @@ public sealed partial class ToolExecutionStartData [JsonPropertyName("parentToolCallId")] public string? ParentToolCallId { get; set; } - /// Gets or sets the rte value. + /// Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("rte")] public bool? Rte { get; set; } @@ -3420,7 +3561,7 @@ public sealed partial class ToolExecutionCompleteData [JsonPropertyName("result")] public ToolExecutionCompleteResult? Result { get; set; } - /// Gets or sets the rte value. + /// Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("rte")] public bool? Rte { get; set; } @@ -3517,6 +3658,8 @@ public sealed partial class SkillInvokedData public SkillInvokedTrigger? Trigger { get; set; } } +public sealed partial class SandboxDecisionData { } + /// Sub-agent startup details including parent tool call and agent information. public sealed partial class SubagentStartedData { @@ -4377,6 +4520,11 @@ public sealed partial class ExitPlanModeRequestedData [JsonPropertyName("actions")] public required ExitPlanModeAction[] Actions { get; set; } + /// Model the session had selected when the plan was authored, when one is known. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("model")] + public string? Model { get; set; } + /// Full content of the plan file. [JsonPropertyName("planContent")] public required string PlanContent { get; set; } @@ -4443,7 +4591,7 @@ public sealed partial class FactoryRunUpdatedData [JsonPropertyName("revision")] public required long Revision { get; set; } - /// Gets or sets the runId value. + /// Factory run identifier. [JsonPropertyName("runId")] public required string RunId { get; set; } } @@ -5706,26 +5854,26 @@ public sealed partial class Citations [Experimental(Diagnostics.Experimental)] public sealed partial class AssistantMessageServerTools { - /// Gets or sets the advisorModel value. + /// Advisor model identifier associated with the server-tool payload. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("advisorModel")] public string? AdvisorModel { get; set; } - /// Gets or sets the functionCallNamespaces value. + /// Provider function-call namespaces keyed by function-call identifier. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("functionCallNamespaces")] public IDictionary? FunctionCallNamespaces { get; set; } - /// Gets or sets the items value. + /// Provider-native server-tool call and output items preserved verbatim for replay. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("items")] public JsonElement[]? Items { get; set; } - /// Gets or sets the provider value. + /// Model provider that produced this server-tool payload. [JsonPropertyName("provider")] public required string Provider { get; set; } - /// Gets or sets the rawContentBlocks value. + /// Raw provider content blocks retained for verbatim round-tripping. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("rawContentBlocks")] public JsonElement[]? RawContentBlocks { get; set; } @@ -6533,22 +6681,22 @@ public partial class ToolExecutionCompleteContent /// Nested data type for ToolExecutionCompleteUIResourceMetaUICsp. public sealed partial class ToolExecutionCompleteUIResourceMetaUICsp { - /// Gets or sets the baseUriDomains value. + /// Domains the UI resource may use as document base URIs. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("baseUriDomains")] public string[]? BaseUriDomains { get; set; } - /// Gets or sets the connectDomains value. + /// Domains the UI resource may connect to. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("connectDomains")] public string[]? ConnectDomains { get; set; } - /// Gets or sets the frameDomains value. + /// Domains the UI resource may embed as nested frames. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("frameDomains")] public string[]? FrameDomains { get; set; } - /// Gets or sets the resourceDomains value. + /// Domains from which the UI resource may load scripts, styles, images, and other resources. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("resourceDomains")] public string[]? ResourceDomains { get; set; } @@ -6612,7 +6760,7 @@ public sealed partial class ToolExecutionCompleteUIResourceMetaUI [JsonPropertyName("csp")] public ToolExecutionCompleteUIResourceMetaUICsp? Csp { get; set; } - /// Gets or sets the domain value. + /// Optional dedicated origin for the rendered MCP Apps UI resource. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("domain")] public string? Domain { get; set; } @@ -6622,7 +6770,7 @@ public sealed partial class ToolExecutionCompleteUIResourceMetaUI [JsonPropertyName("permissions")] public ToolExecutionCompleteUIResourceMetaUIPermissions? Permissions { get; set; } - /// Gets or sets the prefersBorder value. + /// Whether the host should render a border around the MCP Apps UI resource. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("prefersBorder")] public bool? PrefersBorder { get; set; } @@ -6799,7 +6947,7 @@ public sealed partial class SystemNotificationAgentCompleted : SystemNotificatio [JsonIgnore] public override string Type => "agent_completed"; - /// Unique identifier of the background agent. + /// Unique task identifier. [JsonPropertyName("agentId")] public required string AgentId { get; set; } @@ -6812,6 +6960,11 @@ public sealed partial class SystemNotificationAgentCompleted : SystemNotificatio [JsonPropertyName("description")] public string? Description { get; set; } + /// Friendly, non-unique name intended for display. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("displayName")] + public string? DisplayName { get; set; } + /// The full prompt given to the background agent. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("prompt")] @@ -6830,7 +6983,7 @@ public sealed partial class SystemNotificationAgentIdle : SystemNotification [JsonIgnore] public override string Type => "agent_idle"; - /// Unique identifier of the background agent. + /// Unique task identifier. [JsonPropertyName("agentId")] public required string AgentId { get; set; } @@ -6842,6 +6995,11 @@ public sealed partial class SystemNotificationAgentIdle : SystemNotification [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("description")] public string? Description { get; set; } + + /// Friendly, non-unique name intended for display. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("displayName")] + public string? DisplayName { get; set; } } /// System notification metadata for a new inbox message, including entry ID, sender details, and summary. @@ -7239,6 +7397,12 @@ public sealed partial class PermissionRequestMcp : PermissionRequest [JsonPropertyName("args")] public JsonElement? Args { get; set; } + /// Advisory runtime permission recommendation. The SDK host remains responsible for deciding the request and may reject it. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("permissionRecommendation")] + public PermissionRecommendation? PermissionRecommendation { get; set; } + /// Whether this MCP tool is read-only (no side effects). [JsonPropertyName("readOnly")] public required bool ReadOnly { get; set; } @@ -7458,22 +7622,22 @@ public sealed partial class PermissionRequestFactory : PermissionRequest [JsonPropertyName("canPersistApproval")] public required bool CanPersistApproval { get; set; } - /// Gets or sets the declaredMaxAiCredits value. + /// Factory-declared AI-credit limit before any run/resume caller override is applied. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("declaredMaxAiCredits")] public double? DeclaredMaxAiCredits { get; set; } - /// Gets or sets the declaredMaxConcurrentSubagents value. + /// Factory-declared concurrent-subagent limit before any run/resume caller override is applied. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("declaredMaxConcurrentSubagents")] public long? DeclaredMaxConcurrentSubagents { get; set; } - /// Gets or sets the declaredMaxTotalSubagents value. + /// Factory-declared total-subagent limit before any run/resume caller override is applied. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("declaredMaxTotalSubagents")] public long? DeclaredMaxTotalSubagents { get; set; } - /// Gets or sets the declaredTimeoutSeconds value. + /// Factory-declared active-time limit in seconds before any run/resume caller override is applied. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("declaredTimeoutSeconds")] public double? DeclaredTimeoutSeconds { get; set; } @@ -7542,6 +7706,28 @@ public sealed partial class PermissionRequestExtensionPermissionAccess : Permiss public string? ToolCallId { get; set; } } +/// Extension sensitive environment variable access request. +/// The extension-env-access variant of . +public sealed partial class PermissionRequestExtensionEnvAccess : PermissionRequest +{ + /// + [JsonIgnore] + public override string Kind => "extension-env-access"; + + /// Names of the sensitive environment variables the extension is requesting. Values never appear here. + [JsonPropertyName("environmentVariables")] + public required string[] EnvironmentVariables { get; set; } + + /// Name of the extension requesting environment variable access. + [JsonPropertyName("extensionName")] + public required string ExtensionName { get; set; } + + /// Tool call ID that triggered this permission request. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("toolCallId")] + public string? ToolCallId { get; set; } +} + /// Details of the permission being requested. /// Polymorphic base type discriminated by kind. [JsonPolymorphic( @@ -7558,6 +7744,7 @@ public sealed partial class PermissionRequestExtensionPermissionAccess : Permiss [JsonDerivedType(typeof(PermissionRequestExtensionManagement), "extension-management")] [JsonDerivedType(typeof(PermissionRequestFactory), "factory")] [JsonDerivedType(typeof(PermissionRequestExtensionPermissionAccess), "extension-permission-access")] +[JsonDerivedType(typeof(PermissionRequestExtensionEnvAccess), "extension-env-access")] public partial class PermissionRequest { /// The type discriminator. @@ -7740,6 +7927,12 @@ public sealed partial class PermissionPromptRequestMcp : PermissionPromptRequest [JsonPropertyName("autoApproval")] public PermissionAutoApproval? AutoApproval { get; set; } + /// Advisory runtime permission recommendation. The host remains responsible for deciding the request and may reject it. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("permissionRecommendation")] + public PermissionRecommendation? PermissionRecommendation { get; set; } + /// Name of the MCP server providing the tool. [JsonPropertyName("serverName")] public required string ServerName { get; set; } @@ -8001,22 +8194,22 @@ public sealed partial class PermissionPromptRequestFactory : PermissionPromptReq [JsonPropertyName("canPersistApproval")] public required bool CanPersistApproval { get; set; } - /// Gets or sets the declaredMaxAiCredits value. + /// Factory-declared AI-credit limit before any run/resume caller override is applied. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("declaredMaxAiCredits")] public double? DeclaredMaxAiCredits { get; set; } - /// Gets or sets the declaredMaxConcurrentSubagents value. + /// Factory-declared concurrent-subagent limit before any run/resume caller override is applied. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("declaredMaxConcurrentSubagents")] public long? DeclaredMaxConcurrentSubagents { get; set; } - /// Gets or sets the declaredMaxTotalSubagents value. + /// Factory-declared total-subagent limit before any run/resume caller override is applied. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("declaredMaxTotalSubagents")] public long? DeclaredMaxTotalSubagents { get; set; } - /// Gets or sets the declaredTimeoutSeconds value. + /// Factory-declared active-time limit in seconds before any run/resume caller override is applied. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("declaredTimeoutSeconds")] public double? DeclaredTimeoutSeconds { get; set; } @@ -8096,6 +8289,34 @@ public sealed partial class PermissionPromptRequestExtensionPermissionAccess : P public string? ToolCallId { get; set; } } +/// Extension sensitive environment variable access prompt. +/// The extension-env-access variant of . +public sealed partial class PermissionPromptRequestExtensionEnvAccess : PermissionPromptRequest +{ + /// + [JsonIgnore] + public override string Kind => "extension-env-access"; + + /// Auto-approval judge information for this request; present only when auto mode is enabled. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("autoApproval")] + public PermissionAutoApproval? AutoApproval { get; set; } + + /// Names of the sensitive environment variables the extension is requesting. Values never appear here. + [JsonPropertyName("environmentVariables")] + public required string[] EnvironmentVariables { get; set; } + + /// Name of the extension requesting environment variable access. + [JsonPropertyName("extensionName")] + public required string ExtensionName { get; set; } + + /// Tool call ID that triggered this permission request. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("toolCallId")] + public string? ToolCallId { get; set; } +} + /// Derived user-facing permission prompt details for UI consumers. /// Polymorphic base type discriminated by kind. [JsonPolymorphic( @@ -8113,6 +8334,7 @@ public sealed partial class PermissionPromptRequestExtensionPermissionAccess : P [JsonDerivedType(typeof(PermissionPromptRequestExtensionManagement), "extension-management")] [JsonDerivedType(typeof(PermissionPromptRequestFactory), "factory")] [JsonDerivedType(typeof(PermissionPromptRequestExtensionPermissionAccess), "extension-permission-access")] +[JsonDerivedType(typeof(PermissionPromptRequestExtensionEnvAccess), "extension-env-access")] public partial class PermissionPromptRequest { /// The type discriminator. @@ -8241,6 +8463,23 @@ public sealed partial class UserToolSessionApprovalExtensionPermissionAccess : U public required string ExtensionName { get; set; } } +/// Session-scoped tool-approval rule for an extension's access to sensitive environment variables, keyed by extension name and the exact set of variable names. +/// The extension-env-access variant of . +public sealed partial class UserToolSessionApprovalExtensionEnvAccess : UserToolSessionApproval +{ + /// + [JsonIgnore] + public override string Kind => "extension-env-access"; + + /// Names of the sensitive environment variables this approval covers. Values are never persisted. + [JsonPropertyName("environmentVariables")] + public required string[] EnvironmentVariables { get; set; } + + /// Extension name. + [JsonPropertyName("extensionName")] + public required string ExtensionName { get; set; } +} + /// The approval to add as a session-scoped rule. /// Polymorphic base type discriminated by kind. [JsonPolymorphic( @@ -8255,6 +8494,7 @@ public sealed partial class UserToolSessionApprovalExtensionPermissionAccess : U [JsonDerivedType(typeof(UserToolSessionApprovalExtensionManagement), "extension-management")] [JsonDerivedType(typeof(UserToolSessionApprovalFactory), "factory")] [JsonDerivedType(typeof(UserToolSessionApprovalExtensionPermissionAccess), "extension-permission-access")] +[JsonDerivedType(typeof(UserToolSessionApprovalExtensionEnvAccess), "extension-env-access")] public partial class UserToolSessionApproval { /// The type discriminator. @@ -9242,6 +9482,94 @@ public override void Write(Utf8JsonWriter writer, AutopilotObjectiveChangedStatu } } +/// Origin of an effective session model change. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct ModelChangeSource : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public ModelChangeSource(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The user selected a model directly with `/model <id>`. + public static ModelChangeSource ModelCommand { get; } = new("model_command"); + + /// The user selected the model with `/settings`. + public static ModelChangeSource SettingsCommand { get; } = new("settings_command"); + + /// The user selected the model with the `/config` alias. + public static ModelChangeSource ConfigCommand { get; } = new("config_command"); + + /// The user selected the model in the model picker, including the picker opened by bare `/model`. + public static ModelChangeSource ModelPicker { get; } = new("model_picker"); + + /// Organization-managed settings selected the model. + public static ModelChangeSource ManagedSettings { get; } = new("managed_settings"); + + /// Repository settings selected the model. + public static ModelChangeSource RepoSettings { get; } = new("repo_settings"); + + /// Startup model resolution selected the model. + public static ModelChangeSource Startup { get; } = new("startup"); + + /// Selecting an agent selected its configured model. + public static ModelChangeSource Agent { get; } = new("agent"); + + /// Entering, leaving, or reconfiguring plan mode selected the model. + public static ModelChangeSource PlanMode { get; } = new("plan_mode"); + + /// The runtime selected the model automatically, such as rate-limit recovery or refusal fallback. + public static ModelChangeSource Automatic { get; } = new("automatic"); + + /// An SDK or RPC caller selected the model. + public static ModelChangeSource Sdk { get; } = new("sdk"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(ModelChangeSource left, ModelChangeSource right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(ModelChangeSource left, ModelChangeSource right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is ModelChangeSource other && Equals(other); + + /// + public bool Equals(ModelChangeSource 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 ModelChangeSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, ModelChangeSource value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelChangeSource)); + } + } +} + /// The session mode the agent is operating in. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -10008,6 +10336,195 @@ public override void Write(Utf8JsonWriter writer, UserMessageDelivery value, Jso } } +/// What the agent was doing when the user interrupted it. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct AgentInterruptedActivity : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public AgentInterruptedActivity(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// A request to the model was open. + public static AgentInterruptedActivity ModelCall { get; } = new("model_call"); + + /// The turn was sleeping between retry attempts. + public static AgentInterruptedActivity RetryBackoff { get; } = new("retry_backoff"); + + /// One or more tools were executing. + public static AgentInterruptedActivity ToolCall { get; } = new("tool_call"); + + /// Background sub-agents were running while the main loop was idle. + public static AgentInterruptedActivity BackgroundAgent { get; } = new("background_agent"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AgentInterruptedActivity left, AgentInterruptedActivity right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AgentInterruptedActivity left, AgentInterruptedActivity right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is AgentInterruptedActivity other && Equals(other); + + /// + public bool Equals(AgentInterruptedActivity 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 AgentInterruptedActivity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, AgentInterruptedActivity value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentInterruptedActivity)); + } + } +} + +/// Where the interruption landed relative to the first streamed token. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct AgentInterruptedCancelPhase : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public AgentInterruptedCancelPhase(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// No output had been produced when the request was cancelled. + public static AgentInterruptedCancelPhase PreFirstToken { get; } = new("pre_first_token"); + + /// The response was already streaming when the request was cancelled. + public static AgentInterruptedCancelPhase MidStream { get; } = new("mid_stream"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AgentInterruptedCancelPhase left, AgentInterruptedCancelPhase right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AgentInterruptedCancelPhase left, AgentInterruptedCancelPhase right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is AgentInterruptedCancelPhase other && Equals(other); + + /// + public bool Equals(AgentInterruptedCancelPhase 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 AgentInterruptedCancelPhase Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, AgentInterruptedCancelPhase value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentInterruptedCancelPhase)); + } + } +} + +/// Transport used for a failed model call. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct ModelCallFailureTransport : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public ModelCallFailureTransport(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// HTTP transport, including SSE streams. + public static ModelCallFailureTransport Http { get; } = new("http"); + + /// WebSocket transport. + public static ModelCallFailureTransport Websocket { get; } = new("websocket"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(ModelCallFailureTransport left, ModelCallFailureTransport right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(ModelCallFailureTransport left, ModelCallFailureTransport right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is ModelCallFailureTransport other && Equals(other); + + /// + public bool Equals(ModelCallFailureTransport 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 ModelCallFailureTransport Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, ModelCallFailureTransport value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelCallFailureTransport)); + } + } +} + /// Tool call type: "function" for standard tool calls, "custom" for grammar-based tool calls. Defaults to "function" when absent. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -10201,6 +10718,67 @@ public override void Write(Utf8JsonWriter writer, AssistantUsageApiEndpoint valu } } +/// Transport used for a successful model call. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct AssistantUsageTransport : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public AssistantUsageTransport(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// HTTP transport, including SSE streams. + public static AssistantUsageTransport Http { get; } = new("http"); + + /// WebSocket transport. + public static AssistantUsageTransport Websocket { get; } = new("websocket"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AssistantUsageTransport left, AssistantUsageTransport right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AssistantUsageTransport left, AssistantUsageTransport right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is AssistantUsageTransport other && Equals(other); + + /// + public bool Equals(AssistantUsageTransport 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 AssistantUsageTransport Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, AssistantUsageTransport value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AssistantUsageTransport)); + } + } +} + /// For HTTP 400 failures only: whether the response carried a structured CAPI error envelope (structured_error, a deterministic validation failure) or no error body (bodyless, the transient gateway/proxy signature). Absent for non-400 failures. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -10387,67 +10965,6 @@ public override void Write(Utf8JsonWriter writer, ModelCallFailureSource value, } } -/// Transport used for a failed model call. -[JsonConverter(typeof(Converter))] -[DebuggerDisplay("{Value,nq}")] -public readonly struct ModelCallFailureTransport : IEquatable -{ - private readonly string? _value; - - /// Initializes a new instance of the struct. - /// The value to associate with this . - [JsonConstructor] - public ModelCallFailureTransport(string value) - { - ArgumentException.ThrowIfNullOrWhiteSpace(value); - _value = value; - } - - /// Gets the value associated with this . - public string Value => _value ?? string.Empty; - - /// HTTP transport, including SSE streams. - public static ModelCallFailureTransport Http { get; } = new("http"); - - /// WebSocket transport. - public static ModelCallFailureTransport Websocket { get; } = new("websocket"); - - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(ModelCallFailureTransport left, ModelCallFailureTransport right) => left.Equals(right); - - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(ModelCallFailureTransport left, ModelCallFailureTransport right) => !(left == right); - - /// - public override bool Equals(object? obj) => obj is ModelCallFailureTransport other && Equals(other); - - /// - public bool Equals(ModelCallFailureTransport 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 ModelCallFailureTransport Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); - } - - /// - public override void Write(Utf8JsonWriter writer, ModelCallFailureTransport value, JsonSerializerOptions options) - { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelCallFailureTransport)); - } - } -} - /// Finite reason code describing why the current turn was aborted. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -11195,6 +11712,65 @@ public override void Write(Utf8JsonWriter writer, SystemNotificationFactoryCompl } } +/// Advisory recommendation the runtime attaches to a permission request whose origin it can vouch for by construction. Unlike the auto-approval judge this does not depend on auto mode and does not evaluate what the tool call does; its absence simply means the runtime has no opinion and the request follows the host's normal approval flow. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct PermissionRecommendation : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public PermissionRecommendation(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The runtime vouches for the request's origin and recommends approving it without prompting. The host still owns the decision and may deny it; deny rules, managed policy, and the auto-approval safety judge all outrank this recommendation. + public static PermissionRecommendation Approve { get; } = new("approve"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(PermissionRecommendation left, PermissionRecommendation right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(PermissionRecommendation left, PermissionRecommendation right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is PermissionRecommendation other && Equals(other); + + /// + public bool Equals(PermissionRecommendation 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 PermissionRecommendation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, PermissionRecommendation value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionRecommendation)); + } + } +} + /// Whether this is a store or vote memory operation. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -12849,6 +13425,8 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] [JsonSerializable(typeof(AbortData))] [JsonSerializable(typeof(AbortEvent))] +[JsonSerializable(typeof(AgentInterruptedData))] +[JsonSerializable(typeof(AgentInterruptedEvent))] [JsonSerializable(typeof(AssistantIdleData))] [JsonSerializable(typeof(AssistantIdleEvent))] [JsonSerializable(typeof(AssistantIntentData))] @@ -13003,6 +13581,7 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu [JsonSerializable(typeof(PermissionPromptRequest))] [JsonSerializable(typeof(PermissionPromptRequestCommands))] [JsonSerializable(typeof(PermissionPromptRequestCustomTool))] +[JsonSerializable(typeof(PermissionPromptRequestExtensionEnvAccess))] [JsonSerializable(typeof(PermissionPromptRequestExtensionManagement))] [JsonSerializable(typeof(PermissionPromptRequestExtensionPermissionAccess))] [JsonSerializable(typeof(PermissionPromptRequestFactory))] @@ -13015,6 +13594,7 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu [JsonSerializable(typeof(PermissionPromptRequestWrite))] [JsonSerializable(typeof(PermissionRequest))] [JsonSerializable(typeof(PermissionRequestCustomTool))] +[JsonSerializable(typeof(PermissionRequestExtensionEnvAccess))] [JsonSerializable(typeof(PermissionRequestExtensionManagement))] [JsonSerializable(typeof(PermissionRequestExtensionPermissionAccess))] [JsonSerializable(typeof(PermissionRequestFactory))] @@ -13047,6 +13627,8 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu [JsonSerializable(typeof(SamplingCompletedEvent))] [JsonSerializable(typeof(SamplingRequestedData))] [JsonSerializable(typeof(SamplingRequestedEvent))] +[JsonSerializable(typeof(SandboxDecisionData))] +[JsonSerializable(typeof(SandboxDecisionEvent))] [JsonSerializable(typeof(SessionAutoModeResolvedData))] [JsonSerializable(typeof(SessionAutoModeResolvedEvent))] [JsonSerializable(typeof(SessionAutopilotObjectiveChangedData))] @@ -13235,6 +13817,7 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu [JsonSerializable(typeof(UserToolSessionApproval))] [JsonSerializable(typeof(UserToolSessionApprovalCommands))] [JsonSerializable(typeof(UserToolSessionApprovalCustomTool))] +[JsonSerializable(typeof(UserToolSessionApprovalExtensionEnvAccess))] [JsonSerializable(typeof(UserToolSessionApprovalExtensionManagement))] [JsonSerializable(typeof(UserToolSessionApprovalExtensionPermissionAccess))] [JsonSerializable(typeof(UserToolSessionApprovalFactory))] diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go index 622c7a0cb..3206f8318 100644 --- a/go/rpc/zrpc.go +++ b/go/rpc/zrpc.go @@ -1025,6 +1025,21 @@ func (UserAuthInfo) Type() AuthInfoType { return AuthInfoTypeUser } +// Validation error from an authentication attempt. +// Experimental: AuthValidationError is part of an experimental API and may change or be +// removed. +type AuthValidationError struct { + // Optional message returned by GitHub + GitHubMessage *string `json:"githubMessage,omitempty"` + // Authentication validation error message + Message string `json:"message"` +} + +// Validation errors from the most recent authentication attempt. +// Experimental: AuthValidationErrors is part of an experimental API and may change or be +// removed. +type AuthValidationErrors []AuthValidationError + // The running runtime's complete catalog of well-known built-in model IDs, including // supported models and additional IDs with built-in metadata. // Experimental: BuiltInModelCatalog is part of an experimental API and may change or be @@ -1220,6 +1235,26 @@ type CanvasProviderOpenResult struct { URL *string `json:"url,omitempty"` } +// Internal canvas provider registration parameters. +// Experimental: CanvasProviderRegisterRequest is part of an experimental API and may change +// or be removed. +type CanvasProviderRegisterRequest struct { + // Canvas contributions supplied by the provider + Canvases []any `json:"canvases"` + // Connection identifier for callback routing + ConnectionID string `json:"connectionId"` + // Provider metadata supplied by the host + Info any `json:"info"` +} + +// Internal canvas provider unregistration parameters. +// Experimental: CanvasProviderUnregisterRequest is part of an experimental API and may +// change or be removed. +type CanvasProviderUnregisterRequest struct { + // Connection identifier to unregister + ConnectionID string `json:"connectionId"` +} + // Session context supplied by the runtime. // Experimental: CanvasSessionContext is part of an experimental API and may change or be // removed. @@ -1547,16 +1582,23 @@ type CopilotUserResponse struct { // Experimental: CopilotUserResponseEndpoints is part of an experimental API and may change // or be removed. type CopilotUserResponseEndpoints struct { - API *string `json:"api,omitempty"` - Exp *string `json:"exp,omitempty"` + // Copilot API endpoint URL. + API *string `json:"api,omitempty"` + // Experimental-service endpoint URL. + Exp *string `json:"exp,omitempty"` + // Origin-tracker endpoint URL. OriginTracker *string `json:"origin-tracker,omitempty"` - Proxy *string `json:"proxy,omitempty"` - Telemetry *string `json:"telemetry,omitempty"` + // Copilot proxy endpoint URL. + Proxy *string `json:"proxy,omitempty"` + // Copilot telemetry endpoint URL. + Telemetry *string `json:"telemetry,omitempty"` } type CopilotUserResponseOrganizationListItem struct { + // GitHub login of the organization. Login *string `json:"login,omitempty"` - Name *string `json:"name,omitempty"` + // Display name of the organization. + Name *string `json:"name,omitempty"` } // Quota snapshot map from the raw Copilot user-response passthrough, with chat, @@ -2492,19 +2534,34 @@ type FactoryAgentResult struct { // Experimental: FactoryAgentSummary is part of an experimental API and may change or be // removed. type FactoryAgentSummary struct { - ActiveMs int64 `json:"activeMs"` - Activity *string `json:"activity,omitempty"` - AgentID string `json:"agentId"` - AgentType string `json:"agentType"` - CompletedAt *int64 `json:"completedAt,omitempty"` - Label string `json:"label"` - PhaseID *string `json:"phaseId"` + // Accumulated active agent time in milliseconds. + ActiveMs int64 `json:"activeMs"` + // Prompt-safe live activity text. + Activity *string `json:"activity,omitempty"` + // Stable direct-agent identifier. + AgentID string `json:"agentId"` + // Registered agent type. + AgentType string `json:"agentType"` + // Epoch milliseconds when the agent completed. + CompletedAt *int64 `json:"completedAt,omitempty"` + // Friendly, non-unique name intended for display + DisplayName *string `json:"displayName,omitempty"` + // Friendly, non-unique name intended for display + Label string `json:"label"` + // Phase identifier active when the agent was launched, or null. + PhaseID *string `json:"phaseId"` + // Model requested when the agent was launched. RequestedModel *string `json:"requestedModel,omitempty"` - ResolvedModel *string `json:"resolvedModel,omitempty"` - RunID string `json:"runId"` - StartedAt *int64 `json:"startedAt,omitempty"` - Status string `json:"status"` - ToolCallID string `json:"toolCallId"` + // Concrete model resolved for the agent. + ResolvedModel *string `json:"resolvedModel,omitempty"` + // Owning factory run identifier. + RunID string `json:"runId"` + // Epoch milliseconds when the agent started. + StartedAt *int64 `json:"startedAt,omitempty"` + // Current durable or live agent status. + Status string `json:"status"` + // Tool-call identifier that launched the agent. + ToolCallID string `json:"toolCallId"` } // Parameters for cancelling a factory run. @@ -2519,7 +2576,9 @@ type FactoryCancelRequest struct { // Experimental: FactoryCurrentPhase is part of an experimental API and may change or be // removed. type FactoryCurrentPhase struct { - ID string `json:"id"` + // Current phase identifier. + ID string `json:"id"` + // Zero-based declared phase ordinal, or null for an undeclared phase. Ordinal *int64 `json:"ordinal"` } @@ -2527,10 +2586,14 @@ type FactoryCurrentPhase struct { // Experimental: FactoryDeclaredLimits is part of an experimental API and may change or be // removed. type FactoryDeclaredLimits struct { - MaxAiCredits *float64 `json:"maxAiCredits,omitempty"` - MaxConcurrentSubagents *int64 `json:"maxConcurrentSubagents,omitempty"` - MaxTotalSubagents *int64 `json:"maxTotalSubagents,omitempty"` - TimeoutSeconds *float64 `json:"timeoutSeconds,omitempty"` + // Maximum AI credits consumed by subagents and descendants. + MaxAiCredits *float64 `json:"maxAiCredits,omitempty"` + // Maximum concurrently active subagents. + MaxConcurrentSubagents *int64 `json:"maxConcurrentSubagents,omitempty"` + // Maximum total subagents spawned by the run. + MaxTotalSubagents *int64 `json:"maxTotalSubagents,omitempty"` + // Maximum accumulated active execution time in seconds. + TimeoutSeconds *float64 `json:"timeoutSeconds,omitempty"` } // Parameters sent to the owning extension to execute a factory closure. @@ -2640,8 +2703,9 @@ type FactoryListRunsResult struct { // Oldest terminal-run cursor in this page, or null when the terminal window is empty. OldestSeq *int64 `json:"oldestSeq,omitempty"` // Number of terminal runs older than this page. - OmittedOlder *int64 `json:"omittedOlder,omitempty"` - Runs []FactoryRunSummary `json:"runs"` + OmittedOlder *int64 `json:"omittedOlder,omitempty"` + // Factory run summaries in durable creation order. + Runs []FactoryRunSummary `json:"runs"` } // One ordered factory progress line. @@ -2671,19 +2735,35 @@ type FactoryLogRequest struct { // Experimental: FactoryPhaseObservation is part of an experimental API and may change or be // removed. type FactoryPhaseObservation struct { - AccumulatedActiveMs int64 `json:"accumulatedActiveMs"` - CompletedAt *int64 `json:"completedAt,omitempty"` - CurrentActiveMs int64 `json:"currentActiveMs"` - Detail *string `json:"detail,omitempty"` - EntryCount int64 `json:"entryCount"` - ID string `json:"id"` - LastEnteredRunAttempt int64 `json:"lastEnteredRunAttempt"` - LiveAgentCount int64 `json:"liveAgentCount"` - Ordinal *int64 `json:"ordinal"` - StartedAt *int64 `json:"startedAt,omitempty"` - Status FactoryPhaseStatus `json:"status"` - Title string `json:"title"` - TotalAgentCount int64 `json:"totalAgentCount"` + // Completed active time accumulated by this phase in milliseconds. + AccumulatedActiveMs int64 `json:"accumulatedActiveMs"` + // Epoch milliseconds when this phase completed; for a skipped phase, the synthetic skip + // timestamp (equal to `startedAt`). + CompletedAt *int64 `json:"completedAt,omitempty"` + // Current live active time for this phase in milliseconds. + CurrentActiveMs int64 `json:"currentActiveMs"` + // Optional human-readable phase detail. + Detail *string `json:"detail,omitempty"` + // Number of times execution entered this phase. + EntryCount int64 `json:"entryCount"` + // Phase identifier. + ID string `json:"id"` + // Most recent run attempt that entered this phase, or `0` if the phase has never been + // entered. + LastEnteredRunAttempt int64 `json:"lastEnteredRunAttempt"` + // Direct agents in this phase that are currently live. + LiveAgentCount int64 `json:"liveAgentCount"` + // Zero-based declared phase ordinal, or null for an undeclared phase. + Ordinal *int64 `json:"ordinal"` + // Epoch milliseconds when this phase first started; for a skipped phase, the synthetic skip + // timestamp (equal to `completedAt`). + StartedAt *int64 `json:"startedAt,omitempty"` + // Derived lifecycle state of the phase. + Status FactoryPhaseStatus `json:"status"` + // Human-readable phase title. + Title string `json:"title"` + // Total direct agents associated with this phase. + TotalAgentCount int64 `json:"totalAgentCount"` } // One durable factory progress record. @@ -2708,11 +2788,16 @@ type FactoryProgressLine struct { // Experimental: FactoryProgressPage is part of an experimental API and may change or be // removed. type FactoryProgressPage struct { - HasMoreNewer bool `json:"hasMoreNewer"` - HasMoreOlder bool `json:"hasMoreOlder"` - NewestSeq *int64 `json:"newestSeq"` - OldestSeq *int64 `json:"oldestSeq"` - Records []FactoryProgressLine `json:"records"` + // Whether progress records newer than this page exist. + HasMoreNewer bool `json:"hasMoreNewer"` + // Whether progress records older than this page exist. + HasMoreOlder bool `json:"hasMoreOlder"` + // Newest sequence number in this page, or null when empty. + NewestSeq *int64 `json:"newestSeq"` + // Oldest sequence number in this page, or null when empty. + OldestSeq *int64 `json:"oldestSeq"` + // Progress records in sequence order. + Records []FactoryProgressLine `json:"records"` // Run revision reflected by this page. Revision int64 `json:"revision"` } @@ -2741,8 +2826,11 @@ type FactoryResumeResult struct { // Experimental: FactoryRunConsumed is part of an experimental API and may change or be // removed. type FactoryRunConsumed struct { - ActiveMs int64 `json:"activeMs"` - NanoAiu int64 `json:"nanoAiu"` + // Accumulated active execution time in milliseconds. + ActiveMs int64 `json:"activeMs"` + // AI usage consumed by the run in nano-AIU. + NanoAiu int64 `json:"nanoAiu"` + // Total subagents spawned by the run. Subagents int64 `json:"subagents"` } @@ -2750,28 +2838,50 @@ type FactoryRunConsumed struct { // Experimental: FactoryRunDetail is part of an experimental API and may change or be // removed. type FactoryRunDetail struct { - ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"` - Agents []FactoryAgentSummary `json:"agents"` - Approved *FactoryDeclaredLimits `json:"approved"` - CompletedAt *int64 `json:"completedAt"` - Consumed FactoryRunConsumed `json:"consumed"` - CreatedAt int64 `json:"createdAt"` - CurrentPhase *FactoryCurrentPhase `json:"currentPhase"` - DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"` - DeclaredPhaseCount int64 `json:"declaredPhaseCount"` - Description string `json:"description"` - FactoryName string `json:"factoryName"` - LiveAgentCount int64 `json:"liveAgentCount"` - ObservedAt int64 `json:"observedAt"` - Phases []FactoryPhaseObservation `json:"phases"` - Progress FactoryProgressPage `json:"progress"` - Revision int64 `json:"revision"` - RunID string `json:"runId"` - StartedAt *int64 `json:"startedAt"` - Status FactoryRunStatus `json:"status"` - Terminal *FactoryRunTerminal `json:"terminal"` - TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"` - UpdatedAt int64 `json:"updatedAt"` + // Epoch milliseconds when the current active segment started, or null while inactive. + ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"` + // Durable identities and live statuses for direct factory agents. + Agents []FactoryAgentSummary `json:"agents"` + // Approved effective resource ceilings, or null until approved. + Approved *FactoryDeclaredLimits `json:"approved"` + // Epoch milliseconds when the run completed, or null while nonterminal. + CompletedAt *int64 `json:"completedAt"` + // Durable resource consumption. + Consumed FactoryRunConsumed `json:"consumed"` + // Epoch milliseconds when the run was created. + CreatedAt int64 `json:"createdAt"` + // Current phase identity, or null before any phase is entered. + CurrentPhase *FactoryCurrentPhase `json:"currentPhase"` + // Resource ceilings declared by the factory. + DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"` + // Number of phases declared by the factory. + DeclaredPhaseCount int64 `json:"declaredPhaseCount"` + // Human-readable factory description. + Description string `json:"description"` + // Registered factory name. + FactoryName string `json:"factoryName"` + // Number of direct factory agents currently live. + LiveAgentCount int64 `json:"liveAgentCount"` + // Epoch milliseconds when this live-overlay snapshot was observed. + ObservedAt int64 `json:"observedAt"` + // Lifecycle and timing observations for each factory phase. + Phases []FactoryPhaseObservation `json:"phases"` + // Bidirectional page of durable factory progress. + Progress FactoryProgressPage `json:"progress"` + // Monotonic durable run revision. + Revision int64 `json:"revision"` + // Factory run identifier. + RunID string `json:"runId"` + // Epoch milliseconds when execution first started, or null before start. + StartedAt *int64 `json:"startedAt"` + // Current factory run status. + Status FactoryRunStatus `json:"status"` + // Terminal run outcome, or null while nonterminal. + Terminal *FactoryRunTerminal `json:"terminal"` + // Total direct factory agents spawned across all attempts. + TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"` + // Epoch milliseconds when the durable run was last updated. + UpdatedAt int64 `json:"updatedAt"` } // Machine-readable factory run failure. @@ -2898,35 +3008,58 @@ type FactoryRunResult struct { // Experimental: FactoryRunSummary is part of an experimental API and may change or be // removed. type FactoryRunSummary struct { - ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"` - Approved *FactoryDeclaredLimits `json:"approved"` - CompletedAt *int64 `json:"completedAt"` - Consumed FactoryRunConsumed `json:"consumed"` - CreatedAt int64 `json:"createdAt"` - CurrentPhase *FactoryCurrentPhase `json:"currentPhase"` - DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"` - DeclaredPhaseCount int64 `json:"declaredPhaseCount"` - Description string `json:"description"` - FactoryName string `json:"factoryName"` - LiveAgentCount int64 `json:"liveAgentCount"` - ObservedAt int64 `json:"observedAt"` - Revision int64 `json:"revision"` - RunID string `json:"runId"` - StartedAt *int64 `json:"startedAt"` - Status FactoryRunStatus `json:"status"` - Terminal *FactoryRunTerminal `json:"terminal"` - TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"` - UpdatedAt int64 `json:"updatedAt"` + // Epoch milliseconds when the current active segment started, or null while inactive. + ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"` + // Approved effective resource ceilings, or null until approved. + Approved *FactoryDeclaredLimits `json:"approved"` + // Epoch milliseconds when the run completed, or null while nonterminal. + CompletedAt *int64 `json:"completedAt"` + // Durable resource consumption. + Consumed FactoryRunConsumed `json:"consumed"` + // Epoch milliseconds when the run was created. + CreatedAt int64 `json:"createdAt"` + // Current phase identity, or null before any phase is entered. + CurrentPhase *FactoryCurrentPhase `json:"currentPhase"` + // Resource ceilings declared by the factory. + DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"` + // Number of phases declared by the factory. + DeclaredPhaseCount int64 `json:"declaredPhaseCount"` + // Human-readable factory description. + Description string `json:"description"` + // Registered factory name. + FactoryName string `json:"factoryName"` + // Number of direct factory agents currently live. + LiveAgentCount int64 `json:"liveAgentCount"` + // Epoch milliseconds when this live-overlay snapshot was observed. + ObservedAt int64 `json:"observedAt"` + // Monotonic durable run revision. + Revision int64 `json:"revision"` + // Factory run identifier. + RunID string `json:"runId"` + // Epoch milliseconds when execution first started, or null before start. + StartedAt *int64 `json:"startedAt"` + // Current factory run status. + Status FactoryRunStatus `json:"status"` + // Terminal run outcome, or null while nonterminal. + Terminal *FactoryRunTerminal `json:"terminal"` + // Total direct factory agents spawned across all attempts. + TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"` + // Epoch milliseconds when the durable run was last updated. + UpdatedAt int64 `json:"updatedAt"` } // Prompt-safe terminal factory outcome. // Experimental: FactoryRunTerminal is part of an experimental API and may change or be // removed. type FactoryRunTerminal struct { - Error *string `json:"error,omitempty"` - Failure FactoryRunFailure `json:"failure,omitempty"` - Reason *string `json:"reason,omitempty"` - ResultPreview *string `json:"resultPreview,omitempty"` + // Human-readable terminal error. + Error *string `json:"error,omitempty"` + // Machine-readable terminal failure. + Failure FactoryRunFailure `json:"failure,omitempty"` + // Human-readable terminal reason. + Reason *string `json:"reason,omitempty"` + // Prompt-safe preview of the completed result. + ResultPreview *string `json:"resultPreview,omitempty"` } // Content filtering mode to apply to all tools, or a map of tool name to content filtering @@ -3429,9 +3562,12 @@ type InstalledPluginSource struct { // Experimental: InstalledPluginSourceGitHub is part of an experimental API and may change // or be removed. type InstalledPluginSourceGitHub struct { + // Optional repository-relative path to the plugin. Path *string `json:"path,omitempty"` - Ref *string `json:"ref,omitempty"` - Repo string `json:"repo"` + // Optional Git ref to resolve. + Ref *string `json:"ref,omitempty"` + // GitHub repository in `owner/repo` form. + Repo string `json:"repo"` // Optional full 40-character hexadecimal commit SHA. Sha *string `json:"sha,omitempty"` // Constant value. Always "github". @@ -3442,6 +3578,7 @@ type InstalledPluginSourceGitHub struct { // Experimental: InstalledPluginSourceLocal is part of an experimental API and may change or // be removed. type InstalledPluginSourceLocal struct { + // Local filesystem path to the plugin. Path string `json:"path"` // Constant value. Always "local". Source InstalledPluginSourceLocalSource `json:"source"` @@ -3452,13 +3589,16 @@ type InstalledPluginSourceLocal struct { // Experimental: InstalledPluginSourceURL is part of an experimental API and may change or // be removed. type InstalledPluginSourceURL struct { + // Optional source-relative path to the plugin. Path *string `json:"path,omitempty"` - Ref *string `json:"ref,omitempty"` + // Optional Git ref to resolve. + Ref *string `json:"ref,omitempty"` // Optional full 40-character hexadecimal commit SHA. Sha *string `json:"sha,omitempty"` // Constant value. Always "url". Source InstalledPluginSourceURLSource `json:"source"` - URL string `json:"url"` + // URL of the plugin source. + URL string `json:"url"` } // Canonical file or directory where custom instructions can be discovered or created, with @@ -3627,8 +3767,9 @@ type LlmInferenceHTTPRequestStartRequest struct { // covers auxiliary calls that have no model call id). Otherwise, first-party CAPI requests // fall back to the runtime's agent task id — the same value the runtime emits as the // `X-Agent-Task-Id` header — while custom-provider requests fall back to the model call id. - AgentInvocationID *string `json:"agentInvocationId,omitempty"` - Headers map[string][]string `json:"headers"` + AgentInvocationID *string `json:"agentInvocationId,omitempty"` + // HTTP request headers, preserving multiple values per name. + Headers map[string][]string `json:"headers"` // Coarse classification of the interaction that produced this request. Open string for // forward-compatibility; known values include `conversation-agent`, // `conversation-subagent`, `conversation-sampling`, `conversation-background`, @@ -3713,6 +3854,7 @@ type LlmInferenceHTTPResponseChunkResult struct { // Experimental: LlmInferenceHTTPResponseStartRequest is part of an experimental API and may // change or be removed. type LlmInferenceHTTPResponseStartRequest struct { + // HTTP response headers, preserving multiple values per name. Headers map[string][]string `json:"headers"` // Matches the requestId from the originating httpRequestStart frame. RequestID string `json:"requestId"` @@ -4103,7 +4245,7 @@ type MCPCancelSamplingExecutionResult struct { // removed. type MCPConfigAddRequest struct { // MCP server configuration (stdio process or remote HTTP/SSE) - Config MCPServerConfig `json:"config"` + Config MCPSerializableServerConfig `json:"config"` // Unique name for the MCP server Name string `json:"name"` } @@ -4146,7 +4288,7 @@ type MCPConfigEnableResult struct { // Experimental: MCPConfigList is part of an experimental API and may change or be removed. type MCPConfigList struct { // All MCP servers from user config, keyed by name - Servers map[string]MCPServerConfig `json:"servers"` + Servers map[string]MCPSerializableServerConfig `json:"servers"` } // Experimental: MCPConfigReloadResult is part of an experimental API and may change or be @@ -4172,7 +4314,7 @@ type MCPConfigRemoveResult struct { // removed. type MCPConfigUpdateRequest struct { // MCP server configuration (stdio process or remote HTTP/SSE) - Config MCPServerConfig `json:"config"` + Config MCPSerializableServerConfig `json:"config"` // Name of the MCP server to update Name string `json:"name"` } @@ -4269,6 +4411,15 @@ type MCPExecuteSamplingRequest struct { type MCPExecuteSamplingResult struct { } +// MCP server whose connection attempt failed. +// Experimental: MCPFailedServer is part of an experimental API and may change or be removed. +type MCPFailedServer struct { + // The captured connection failure detail. + Error *string `json:"error,omitempty"` + // The config key of the server that failed to connect. + Name string `json:"name"` +} + // MCP server filtered by policy, with name, reason, and optional redacted reason. // Experimental: MCPFilteredServer is part of an experimental API and may change or be // removed. @@ -4515,6 +4666,83 @@ func (MCPOauthPendingRequestResponseToken) Kind() MCPOauthPendingRequestResponse return MCPOauthPendingRequestResponseKindToken } +// Remote MCP server name for a passive OAuth status probe. +// Experimental: MCPOauthProbeRequest is part of an experimental API and may change or be +// removed. +type MCPOauthProbeRequest struct { + // Name of the configured remote MCP server to probe. + ServerName string `json:"serverName"` +} + +// Passive MCP OAuth probe result. `authenticated` means the server accepted the probe +// request while an OAuth-origin access token was attached; it does not prove the server +// required or independently validated that token. The probe does not make a second +// unauthenticated request. Failed is an expected probe-domain outcome; JSON-RPC errors are +// reserved for API-call failures. +// Experimental: MCPOauthProbeResult is part of an experimental API and may change or be +// removed. +type MCPOauthProbeResult interface { + mcpOauthProbeResult() + Status() MCPOauthProbeResultStatus +} + +type RawMCPOauthProbeResultData struct { + Discriminator MCPOauthProbeResultStatus + Raw json.RawMessage +} + +func (RawMCPOauthProbeResultData) mcpOauthProbeResult() {} +func (r RawMCPOauthProbeResultData) Status() MCPOauthProbeResultStatus { + return r.Discriminator +} + +type MCPOauthProbeResultAuthenticated struct { + // HTTP response returned by the server. + HTTPResponse MCPOauthHTTPResponse `json:"httpResponse"` +} + +func (MCPOauthProbeResultAuthenticated) mcpOauthProbeResult() {} +func (MCPOauthProbeResultAuthenticated) Status() MCPOauthProbeResultStatus { + return MCPOauthProbeResultStatusAuthenticated +} + +type MCPOauthProbeResultFailed struct { + // Human-readable probe failure detail. + Error string `json:"error"` + // HTTP response returned by the server, when the probe reached the server and captured the + // complete response. + HTTPResponse *MCPOauthHTTPResponse `json:"httpResponse,omitempty"` +} + +func (MCPOauthProbeResultFailed) mcpOauthProbeResult() {} +func (MCPOauthProbeResultFailed) Status() MCPOauthProbeResultStatus { + return MCPOauthProbeResultStatusFailed +} + +type MCPOauthProbeResultNeedsAuth struct { + // HTTP 401 or 403 response returned by the server. + HTTPResponse MCPOauthHTTPResponse `json:"httpResponse"` + // Why authentication is needed. + Reason MCPOauthProbeNeedsAuthReason `json:"reason"` + // Parsed WWW-Authenticate challenge parameters, when present and parseable. + WwwAuthenticateParams *MCPOauthWwwAuthenticateParams `json:"wwwAuthenticateParams,omitempty"` +} + +func (MCPOauthProbeResultNeedsAuth) mcpOauthProbeResult() {} +func (MCPOauthProbeResultNeedsAuth) Status() MCPOauthProbeResultStatus { + return MCPOauthProbeResultStatusNeedsAuth +} + +type MCPOauthProbeResultNoAuthRequired struct { + // HTTP response returned by the server. + HTTPResponse MCPOauthHTTPResponse `json:"httpResponse"` +} + +func (MCPOauthProbeResultNoAuthRequired) mcpOauthProbeResult() {} +func (MCPOauthProbeResultNoAuthRequired) Status() MCPOauthProbeResultStatus { + return MCPOauthProbeResultStatusNoAuthRequired +} + // Pending MCP OAuth request id to respond to. // Experimental: MCPOauthRespondRequest is part of an experimental API and may change or be // removed. @@ -4555,6 +4783,25 @@ type MCPRegisterExternalClientRequest struct { Transport any `json:"transport"` } +// In-process MCP reload configuration. +// Experimental: MCPReloadConfig is part of an experimental API and may change or be removed. +type MCPReloadConfig struct { + ActiveGitHubToken *string `json:"activeGitHubToken,omitempty"` + // Server names the CLI enabled for this session via `--enable-mcp-server`. + CLIEnabledServers []string `json:"cliEnabledServers,omitzero"` + ConfigFilter any `json:"configFilter,omitempty"` + DisabledServers []string `json:"disabledServers,omitzero"` + EnabledServers []string `json:"enabledServers,omitzero"` + ForceRestart *bool `json:"forceRestart,omitempty"` + GitHubMCPToolOptions any `json:"githubMcpToolOptions,omitempty"` + GitHubMCPUserOverride *bool `json:"githubMcpUserOverride,omitempty"` + IncludeWorkspaceSources *bool `json:"includeWorkspaceSources,omitempty"` + Mcp3pEnabled *bool `json:"mcp3pEnabled,omitempty"` + MCPServers map[string]MCPServerConfig `json:"mcpServers"` + SecretStore any `json:"secretStore,omitempty"` + UseCachedToolSnapshots *bool `json:"useCachedToolSnapshots,omitempty"` +} + // Opaque MCP reload configuration. // Experimental: MCPReloadWithConfigRequest is part of an experimental API and may change or // be removed. @@ -4742,11 +4989,34 @@ type MCPResourceTemplate struct { type MCPRestartServerRequest struct { // Replacement MCP server configuration (stdio process or remote HTTP/SSE). Omit to restart // the server with its already-registered configuration (config-free restart-by-name). - Config MCPServerConfig `json:"config,omitempty"` + Config MCPSerializableServerConfig `json:"config,omitempty"` // Name of the MCP server to restart ServerName string `json:"serverName"` } +// Telemetry-obfuscation policy for an MCP server's tools. +// Experimental: MCPSafeForTelemetry is part of an experimental API and may change or be +// removed. +type MCPSafeForTelemetry interface { + mcpSafeForTelemetry() +} + +type MCPSafeForTelemetryBoolean bool + +func (MCPSafeForTelemetryBoolean) mcpSafeForTelemetry() {} + +func (MCPSafeForTelemetryFields) mcpSafeForTelemetry() {} + +// Per-field MCP telemetry-obfuscation policy. +// Experimental: MCPSafeForTelemetryFields is part of an experimental API and may change or +// be removed. +type MCPSafeForTelemetryFields struct { + // Whether MCP tool input names may be included in telemetry without obfuscation. + InputsNames bool `json:"inputsNames"` + // Whether the MCP tool name may be included in telemetry without obfuscation. + Name bool `json:"name"` +} + // 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. @@ -4763,56 +5033,18 @@ type MCPSamplingExecutionResult struct { Result *MCPExecuteSamplingResult `json:"result,omitempty"` } -// MCP server status entry, including config source/plugin source and any connection error. -// Experimental: MCPServer is part of an experimental API and may change or be removed. -type MCPServer struct { - // Error message if the server failed to connect - Error *string `json:"error,omitempty"` - // Server name (config key) - Name string `json:"name"` - // Configuration source: user, workspace, plugin, or builtin - Source *MCPServerSource `json:"source,omitempty"` - // Plugin name that provided this server, when source is plugin. - SourcePlugin *string `json:"sourcePlugin,omitempty"` - // Plugin version that provided this server, when source is plugin. - SourcePluginVersion *string `json:"sourcePluginVersion,omitempty"` - // Connection status: connected, failed, needs-auth, pending, disabled, stopped, or - // not_configured - Status MCPServerStatus `json:"status"` -} - -// Set to `true` to use defaults, or provide an object with additional auth or OIDC settings. -// Experimental: MCPServerAuthConfig is part of an experimental API and may change or be -// removed. -type MCPServerAuthConfig interface { - mcpServerAuthConfig() -} - -type MCPServerAuthConfigBoolean bool - -func (MCPServerAuthConfigBoolean) mcpServerAuthConfig() {} - -func (MCPServerAuthConfigRedirectPort) mcpServerAuthConfig() {} - -// Authentication settings with optional redirect port configuration. -// Experimental: MCPServerAuthConfigRedirectPort is part of an experimental API and may -// change or be removed. -type MCPServerAuthConfigRedirectPort struct { - // Fixed port for the OAuth redirect callback server. - RedirectPort *int32 `json:"redirectPort,omitempty"` -} - -// MCP server configuration (stdio process or remote HTTP/SSE) -// Experimental: MCPServerConfig is part of an experimental API and may change or be removed. -type MCPServerConfig interface { - mcpServerConfig() +// Serializable MCP server configuration (stdio process or remote HTTP/SSE) +// Experimental: MCPSerializableServerConfig is part of an experimental API and may change +// or be removed. +type MCPSerializableServerConfig interface { + mcpSerializableServerConfig() } -type RawMCPServerConfigData struct { +type RawMCPSerializableServerConfigData struct { Raw json.RawMessage } -func (RawMCPServerConfigData) mcpServerConfig() {} +func (RawMCPSerializableServerConfigData) mcpSerializableServerConfig() {} // Remote MCP server configuration accessed over HTTP or SSE. // Experimental: MCPServerConfigHTTP is part of an experimental API and may change or be @@ -4820,20 +5052,34 @@ func (RawMCPServerConfigData) mcpServerConfig() {} type MCPServerConfigHTTP struct { // Set to `true` to use defaults, or provide an object with additional auth or OIDC settings. Auth MCPServerAuthConfig `json:"auth,omitempty"` + // Configuration warnings recorded while loading the server. + ConfigWarnings []string `json:"configWarnings,omitzero"` // Controls if tools provided by this server can be loaded on demand via tool search (auto) // or always included in the initial tool list (never) DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` + // Whether secret masking is disabled for calls to this server. + DisableSecretMasking *bool `json:"disableSecretMasking,omitempty"` // Set to true to disable persisted MCP tool snapshots for this server. Live tool discovery // is unaffected. DisableToolCache *bool `json:"disableToolCache,omitempty"` + // Optional human-readable server name. + DisplayName *string `json:"displayName,omitempty"` + // Event types this server receives as Copilot notifications. + Events []string `json:"events,omitzero"` + // Tool names excluded after the include filter is applied. + ExcludeTools []string `json:"excludeTools,omitzero"` // Content filtering mode to apply to all tools, or a map of tool name to content filtering // mode. FilterMapping FilterMapping `json:"filterMapping,omitempty"` // HTTP headers to include in requests to the remote MCP server. Headers map[string]string `json:"headers,omitzero"` + // Dynamic-header refresh cache lifetime in milliseconds. + HeadersRefreshTtlMs *int64 `json:"headersRefreshTtlMs,omitempty"` // Whether this server is a built-in fallback used when the user has not configured their // own server. IsDefaultServer *bool `json:"isDefaultServer,omitempty"` + // Copilot notification types this server may send to the host. + Notifications []string `json:"notifications,omitzero"` // OAuth client ID for a pre-registered remote MCP OAuth client. OauthClientID *string `json:"oauthClientId,omitempty"` // OAuth grant type to use when authenticating to the remote MCP server. @@ -4842,7 +5088,19 @@ type MCPServerConfigHTTP struct { OauthPublicClient *bool `json:"oauthPublicClient,omitempty"` // Set to `true` to use defaults, or provide an object with additional auth or OIDC settings. Oidc MCPServerAuthConfig `json:"oidc,omitempty"` - // Timeout in milliseconds for tool calls to this server. + // Telemetry-obfuscation policy for this server's tools. + SafeForTelemetry MCPSafeForTelemetry `json:"safeForTelemetry,omitempty"` + // The origin of this server configuration. + Source *MCPServerSource `json:"source,omitempty"` + // Source file path recorded while loading the config. + SourcePath *string `json:"sourcePath,omitempty"` + // Plugin that provided this server. + SourcePlugin *string `json:"sourcePlugin,omitempty"` + // Whether the providing plugin uses the Open Plugin Spec. + SourcePluginSpec *bool `json:"sourcePluginSpec,omitempty"` + // Version of the plugin that provided this server. + SourcePluginVersion *string `json:"sourcePluginVersion,omitempty"` + // Timeout in milliseconds for tool discovery and tool calls. Timeout *int64 `json:"timeout,omitempty"` // Tools to include. Defaults to all tools if not specified. Tools []string `json:"tools,omitzero"` @@ -4852,7 +5110,7 @@ type MCPServerConfigHTTP struct { URL string `json:"url"` } -func (MCPServerConfigHTTP) mcpServerConfig() {} +func (MCPServerConfigHTTP) mcpSerializableServerConfig() {} // Stdio MCP server configuration launched as a child process. // Experimental: MCPServerConfigStdio is part of an experimental API and may change or be @@ -4864,30 +5122,163 @@ type MCPServerConfigStdio struct { Auth MCPServerAuthConfig `json:"auth,omitempty"` // Executable command used to start the Stdio MCP server process. Command string `json:"command"` + // Configuration warnings recorded while loading the server. + ConfigWarnings []string `json:"configWarnings,omitzero"` // Working directory for the Stdio MCP server process. Cwd *string `json:"cwd,omitempty"` // Controls if tools provided by this server can be loaded on demand via tool search (auto) // or always included in the initial tool list (never) DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` + // Whether secret masking is disabled for calls to this server. + DisableSecretMasking *bool `json:"disableSecretMasking,omitempty"` // Set to true to disable persisted MCP tool snapshots for this server. Live tool discovery // is unaffected. DisableToolCache *bool `json:"disableToolCache,omitempty"` + // Optional human-readable server name. + DisplayName *string `json:"displayName,omitempty"` // Environment variables to pass to the Stdio MCP server process. Env map[string]string `json:"env,omitzero"` + // Event types this server receives as Copilot notifications. + Events []string `json:"events,omitzero"` + // Tool names excluded after the include filter is applied. + ExcludeTools []string `json:"excludeTools,omitzero"` // Content filtering mode to apply to all tools, or a map of tool name to content filtering // mode. FilterMapping FilterMapping `json:"filterMapping,omitempty"` // Whether this server is a built-in fallback used when the user has not configured their // own server. IsDefaultServer *bool `json:"isDefaultServer,omitempty"` + // Copilot notification types this server may send to the host. + Notifications []string `json:"notifications,omitzero"` // Set to `true` to use defaults, or provide an object with additional auth or OIDC settings. Oidc MCPServerAuthConfig `json:"oidc,omitempty"` - // Timeout in milliseconds for tool calls to this server. + // Telemetry-obfuscation policy for this server's tools. + SafeForTelemetry MCPSafeForTelemetry `json:"safeForTelemetry,omitempty"` + // The origin of this server configuration. + Source *MCPServerSource `json:"source,omitempty"` + // Source file path recorded while loading the config. + SourcePath *string `json:"sourcePath,omitempty"` + // Plugin that provided this server. + SourcePlugin *string `json:"sourcePlugin,omitempty"` + // Whether the providing plugin uses the Open Plugin Spec. + SourcePluginSpec *bool `json:"sourcePluginSpec,omitempty"` + // Version of the plugin that provided this server. + SourcePluginVersion *string `json:"sourcePluginVersion,omitempty"` + // Timeout in milliseconds for tool discovery and tool calls. Timeout *int64 `json:"timeout,omitempty"` // Tools to include. Defaults to all tools if not specified. Tools []string `json:"tools,omitzero"` + // Local transport type. Defaults to stdio when omitted. + Type *MCPServerConfigStdioType `json:"type,omitempty"` } +func (MCPServerConfigStdio) mcpSerializableServerConfig() {} + +// MCP server status entry, including config source/plugin source and any connection error. +// Experimental: MCPServer is part of an experimental API and may change or be removed. +type MCPServer struct { + // Error message if the server failed to connect + Error *string `json:"error,omitempty"` + // Server name (config key) + Name string `json:"name"` + // Configuration source: user, workspace, plugin, or builtin + Source *MCPServerSource `json:"source,omitempty"` + // Plugin name that provided this server, when source is plugin. + SourcePlugin *string `json:"sourcePlugin,omitempty"` + // Plugin version that provided this server, when source is plugin. + SourcePluginVersion *string `json:"sourcePluginVersion,omitempty"` + // Connection status: connected, failed, needs-auth, pending, disabled, stopped, or + // not_configured + Status MCPServerStatus `json:"status"` +} + +// Set to `true` to use defaults, or provide an object with additional auth or OIDC settings. +// Experimental: MCPServerAuthConfig is part of an experimental API and may change or be +// removed. +type MCPServerAuthConfig interface { + mcpServerAuthConfig() +} + +type MCPServerAuthConfigBoolean bool + +func (MCPServerAuthConfigBoolean) mcpServerAuthConfig() {} + +func (MCPServerAuthConfigRedirectPort) mcpServerAuthConfig() {} + +// Authentication settings with optional redirect port configuration. +// Experimental: MCPServerAuthConfigRedirectPort is part of an experimental API and may +// change or be removed. +type MCPServerAuthConfigRedirectPort struct { + // Fixed port for the OAuth redirect callback server. + RedirectPort *int32 `json:"redirectPort,omitempty"` +} + +// MCP server configuration (stdio, remote HTTP/SSE, or in-process) +// Experimental: MCPServerConfig is part of an experimental API and may change or be removed. +type MCPServerConfig interface { + mcpServerConfig() +} + +type RawMCPServerConfigData struct { + Raw json.RawMessage +} + +func (RawMCPServerConfigData) mcpServerConfig() {} +func (MCPServerConfigHTTP) mcpServerConfig() {} + +// In-process MCP server configuration used by embedded SDK clients. +// Experimental: MCPServerConfigMemory is part of an experimental API and may change or be +// removed. +type MCPServerConfigMemory struct { + // Configuration warnings recorded while loading the server. + ConfigWarnings []string `json:"configWarnings,omitzero"` + // Controls whether tools can be loaded on demand. + DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` + // Whether secret masking is disabled for calls to this server. + DisableSecretMasking *bool `json:"disableSecretMasking,omitempty"` + // Whether persisted tool snapshots are disabled. + DisableToolCache *bool `json:"disableToolCache,omitempty"` + // Optional human-readable server name. + DisplayName *string `json:"displayName,omitempty"` + // Event types this server receives as Copilot notifications. + Events []string `json:"events,omitzero"` + // Tool names excluded after the include filter is applied. + ExcludeTools []string `json:"excludeTools,omitzero"` + // Content filtering mode to apply to this server's tools. + FilterMapping FilterMapping `json:"filterMapping,omitempty"` + // Whether this server is a built-in fallback. + IsDefaultServer *bool `json:"isDefaultServer,omitempty"` + // Copilot notification types this server may send to the host. + Notifications []string `json:"notifications,omitzero"` + // Set to `true` to use default OIDC settings. + Oidc MCPServerAuthConfig `json:"oidc,omitempty"` + // Telemetry-obfuscation policy for this server's tools. + SafeForTelemetry MCPSafeForTelemetry `json:"safeForTelemetry,omitempty"` + // In-process MCP server instance. This value cannot cross a JSON-RPC boundary. + // Internal: ServerInstance is part of the SDK's internal API surface and is not intended + // for external use. + ServerInstance any `json:"serverInstance"` + // The origin of this server configuration. + Source *MCPServerSource `json:"source,omitempty"` + // Source file path recorded while loading the config. + SourcePath *string `json:"sourcePath,omitempty"` + // Plugin that provided this server. + SourcePlugin *string `json:"sourcePlugin,omitempty"` + // Whether the providing plugin uses the Open Plugin Spec. + SourcePluginSpec *bool `json:"sourcePluginSpec,omitempty"` + // Version of the plugin that provided this server. + SourcePluginVersion *string `json:"sourcePluginVersion,omitempty"` + // Timeout in milliseconds for tool discovery and tool calls. + Timeout *int64 `json:"timeout,omitempty"` + // Tools to include. Defaults to all tools if not specified. + Tools []string `json:"tools,omitzero"` + // Internal: Type is part of the SDK's internal API surface and is not intended for external + // use. + Type MCPServerConfigMemoryType `json:"type"` +} + +func (MCPServerConfigMemory) mcpServerConfig() {} + func (MCPServerConfigStdio) mcpServerConfig() {} // Recorded MCP server connection failure. @@ -4944,7 +5335,7 @@ type MCPSetEnvValueModeResult struct { type MCPStartServerRequest struct { // MCP server configuration (stdio process or remote HTTP/SSE). Omit to start the server // with its already-registered configuration (config-free start-by-name). - Config MCPServerConfig `json:"config,omitempty"` + Config MCPSerializableServerConfig `json:"config,omitempty"` // Name of the MCP server to start ServerName string `json:"serverName"` } @@ -4955,6 +5346,8 @@ type MCPStartServerRequest struct { type MCPStartServersResult struct { // Non-default servers allowed by policy AllowedServers []MCPAllowedServer `json:"allowedServers,omitzero"` + // Servers whose connection attempt failed. + FailedServers []MCPFailedServer `json:"failedServers,omitzero"` // Servers filtered out before startup FilteredServers []MCPFilteredServer `json:"filteredServers"` } @@ -4967,6 +5360,13 @@ type MCPStopServerRequest struct { ServerName string `json:"serverName"` } +// Metadata controlling an MCP task's lifetime. +// Experimental: MCPTaskMetadata is part of an experimental API and may change or be removed. +type MCPTaskMetadata struct { + // Task time-to-live. + Ttl *int64 `json:"ttl,omitempty"` +} + // MCP tool metadata with tool name, optional description, and normalized MCP Apps discovery // metadata. // Experimental: MCPTools is part of an experimental API and may change or be removed. @@ -5179,6 +5579,8 @@ type Model struct { Billing *ModelBilling `json:"billing,omitempty"` // Model capabilities and limits Capabilities ModelCapabilities `json:"capabilities"` + // Default reasoning effort level (only present if model supports reasoning effort) + DefaultReasoningEffort *string `json:"defaultReasoningEffort,omitempty"` // Model identifier (e.g., "claude-sonnet-4.5") ID string `json:"id"` // Model capability category for grouping in the model picker @@ -5189,6 +5591,11 @@ type Model struct { Name string `json:"name"` // Policy state (if applicable) Policy *ModelPolicy `json:"policy,omitempty"` + // Context-window tiers this model offers, when the provider advertises them independently + // of tiered token pricing. Copilot models carry their tiers in `billing.tokenPrices`; a + // provider that has no pricing to publish (an agent host reached over AHP, for example) + // declares them here instead, so the model picker can still offer the tier toggle. + SupportedContextTiers []string `json:"supportedContextTiers,omitzero"` // Supported reasoning effort levels (only present if model supports reasoning effort) SupportedReasoningEfforts []string `json:"supportedReasoningEfforts,omitzero"` } @@ -5451,6 +5858,9 @@ type ModelSwitchToRequest struct { ReasoningEffort *string `json:"reasoningEffort,omitempty"` // Reasoning summary mode to request for supported model clients ReasoningSummary *ReasoningSummary `json:"reasoningSummary,omitempty"` + // Origin to record on the effective `session.model_change` event. Defaults to `sdk` when + // omitted. + Source *ModelChangeSource `json:"source,omitempty"` // Output verbosity level to request for supported models Verbosity *Verbosity `json:"verbosity,omitempty"` } @@ -5573,8 +5983,10 @@ type OpenCanvasInstance struct { // 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"` + // Opaque policy update timestamp supplied by the host. + LastUpdatedAt any `json:"last_updated_at"` + // Content-exclusion rules to apply. + Rules []OptionsUpdateAdditionalContentExclusionPolicyRule `json:"rules"` // Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. Scope OptionsUpdateAdditionalContentExclusionPolicyScope `json:"scope"` } @@ -5584,9 +5996,12 @@ type OptionsUpdateAdditionalContentExclusionPolicy struct { // Experimental: OptionsUpdateAdditionalContentExclusionPolicyRule is part of an // experimental API and may change or be removed. type OptionsUpdateAdditionalContentExclusionPolicyRule struct { - IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + // Conditions of which at least one must match. + IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + // Conditions none of which may match. IfNoneMatch []string `json:"ifNoneMatch,omitzero"` - Paths []string `json:"paths"` + // Path patterns covered by this rule. + Paths []string `json:"paths"` // Source descriptor for a `session.options.update` content-exclusion rule, with source name // and type. Source OptionsUpdateAdditionalContentExclusionPolicyRuleSource `json:"source"` @@ -5597,7 +6012,9 @@ type OptionsUpdateAdditionalContentExclusionPolicyRule struct { // Experimental: OptionsUpdateAdditionalContentExclusionPolicyRuleSource is part of an // experimental API and may change or be removed. type OptionsUpdateAdditionalContentExclusionPolicyRuleSource struct { + // Name of the policy source. Name string `json:"name"` + // Type of the policy source. Type string `json:"type"` } @@ -5901,6 +6318,24 @@ func (PermissionDecisionApproveForLocationApprovalCustomTool) Kind() PermissionD return PermissionDecisionApproveForLocationApprovalKindCustomTool } +// Location-scoped approval details for an extension's access to sensitive environment +// variables, keyed by extension name and the exact set of variable names. +// Experimental: PermissionDecisionApproveForLocationApprovalExtensionEnvAccess is part of +// an experimental API and may change or be removed. +type PermissionDecisionApproveForLocationApprovalExtensionEnvAccess struct { + // Names of the sensitive environment variables this approval covers. Values are never + // persisted. + EnvironmentVariables []string `json:"environmentVariables"` + // Extension name. + ExtensionName string `json:"extensionName"` +} + +func (PermissionDecisionApproveForLocationApprovalExtensionEnvAccess) permissionDecisionApproveForLocationApproval() { +} +func (PermissionDecisionApproveForLocationApprovalExtensionEnvAccess) Kind() PermissionDecisionApproveForLocationApprovalKind { + return PermissionDecisionApproveForLocationApprovalKindExtensionEnvAccess +} + // Location-scoped approval details for extension-management operations, optionally narrowed // by operation. // Experimental: PermissionDecisionApproveForLocationApprovalExtensionManagement is part of @@ -6061,6 +6496,24 @@ func (PermissionDecisionApproveForSessionApprovalCustomTool) Kind() PermissionDe return PermissionDecisionApproveForSessionApprovalKindCustomTool } +// Session-scoped approval details for an extension's access to sensitive environment +// variables, keyed by extension name and the exact set of variable names. +// Experimental: PermissionDecisionApproveForSessionApprovalExtensionEnvAccess is part of an +// experimental API and may change or be removed. +type PermissionDecisionApproveForSessionApprovalExtensionEnvAccess struct { + // Names of the sensitive environment variables this approval covers. Values are never + // persisted. + EnvironmentVariables []string `json:"environmentVariables"` + // Extension name. + ExtensionName string `json:"extensionName"` +} + +func (PermissionDecisionApproveForSessionApprovalExtensionEnvAccess) permissionDecisionApproveForSessionApproval() { +} +func (PermissionDecisionApproveForSessionApprovalExtensionEnvAccess) Kind() PermissionDecisionApproveForSessionApprovalKind { + return PermissionDecisionApproveForSessionApprovalKindExtensionEnvAccess +} + // Session-scoped approval details for extension-management operations, optionally narrowed // by operation. // Experimental: PermissionDecisionApproveForSessionApprovalExtensionManagement is part of @@ -6380,8 +6833,10 @@ type PermissionRulesSet struct { // Experimental: PermissionsConfigureAdditionalContentExclusionPolicy is part of an // experimental API and may change or be removed. type PermissionsConfigureAdditionalContentExclusionPolicy struct { - LastUpdatedAt any `json:"last_updated_at"` - Rules []PermissionsConfigureAdditionalContentExclusionPolicyRule `json:"rules"` + // Opaque policy update timestamp supplied by the host. + LastUpdatedAt any `json:"last_updated_at"` + // Content-exclusion rules to apply. + Rules []PermissionsConfigureAdditionalContentExclusionPolicyRule `json:"rules"` // Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` // enumeration. Scope PermissionsConfigureAdditionalContentExclusionPolicyScope `json:"scope"` @@ -6392,9 +6847,12 @@ type PermissionsConfigureAdditionalContentExclusionPolicy struct { // Experimental: PermissionsConfigureAdditionalContentExclusionPolicyRule is part of an // experimental API and may change or be removed. type PermissionsConfigureAdditionalContentExclusionPolicyRule struct { - IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + // Conditions of which at least one must match. + IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + // Conditions none of which may match. IfNoneMatch []string `json:"ifNoneMatch,omitzero"` - Paths []string `json:"paths"` + // Path patterns covered by this rule. + Paths []string `json:"paths"` // Source descriptor for a `session.permissions.configure` content-exclusion rule, with // source name and type. Source PermissionsConfigureAdditionalContentExclusionPolicyRuleSource `json:"source"` @@ -6405,7 +6863,9 @@ type PermissionsConfigureAdditionalContentExclusionPolicyRule struct { // Experimental: PermissionsConfigureAdditionalContentExclusionPolicyRuleSource is part of // an experimental API and may change or be removed. type PermissionsConfigureAdditionalContentExclusionPolicyRuleSource struct { + // Name of the policy source. Name string `json:"name"` + // Type of the policy source. Type string `json:"type"` } @@ -6505,6 +6965,24 @@ func (PermissionsLocationsAddToolApprovalDetailsCustomTool) Kind() PermissionsLo return PermissionsLocationsAddToolApprovalDetailsKindCustomTool } +// Location-persisted tool approval details for an extension's access to sensitive +// environment variables, keyed by extension name and the exact set of variable names. +// Experimental: PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess is part of an +// experimental API and may change or be removed. +type PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess struct { + // Names of the sensitive environment variables this approval covers. Values are never + // persisted. + EnvironmentVariables []string `json:"environmentVariables"` + // Extension name. + ExtensionName string `json:"extensionName"` +} + +func (PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess) permissionsLocationsAddToolApprovalDetails() { +} +func (PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess) Kind() PermissionsLocationsAddToolApprovalDetailsKind { + return PermissionsLocationsAddToolApprovalDetailsKindExtensionEnvAccess +} + // Location-persisted tool approval details for extension-management operations, optionally // narrowed by operation. // Experimental: PermissionsLocationsAddToolApprovalDetailsExtensionManagement is part of an @@ -6912,6 +7390,20 @@ type PluginListResult struct { Plugins []InstalledPluginInfo `json:"plugins"` } +// Trusted built-in plugin directories to use for this runtime process. +// Experimental: PluginsBuiltinSetRequest is part of an experimental API and may change or +// be removed. +type PluginsBuiltinSetRequest struct { + // Complete replacement set of trusted built-in plugin directories. Every entry must be an + // absolute local filesystem path no longer than 4096 characters. + Paths []string `json:"paths"` +} + +// Experimental: PluginsBuiltinSetResult is part of an experimental API and may change or be +// removed. +type PluginsBuiltinSetResult struct { +} + // Plugin names (or specs) to disable. // Experimental: PluginsDisableRequest is part of an experimental API and may change or be // removed. @@ -7687,6 +8179,7 @@ type QueueDeferSessionIdleRequest struct { // Experimental: QueueDuplicateAtRequest is part of an experimental API and may change or be // removed. type QueueDuplicateAtRequest struct { + // Stable opaque ID of the queued item to duplicate. ID string `json:"id"` } @@ -7738,6 +8231,7 @@ type QueueHasPendingResult struct { // Experimental: QueueInsertAtRequest is part of an experimental API and may change or be // removed. type QueueInsertAtRequest struct { + // Queued message contents and delivery metadata. Message QueueInsertMessage `json:"message"` // Zero-based position in the public visible queue. Values outside the queue clamp to an end. Position int64 `json:"position"` @@ -7840,6 +8334,7 @@ type QueuePendingItemsResult struct { // Experimental: QueueRemoveAtRequest is part of an experimental API and may change or be // removed. type QueueRemoveAtRequest struct { + // Stable opaque ID of the queued item to remove. ID string `json:"id"` } @@ -7864,6 +8359,7 @@ type QueueRemoveMostRecentResult struct { // Experimental: QueueSendNowRequest is part of an experimental API and may change or be // removed. type QueueSendNowRequest struct { + // Stable opaque ID of the queued item to steer into the live turn. ID string `json:"id"` } @@ -7884,6 +8380,7 @@ type QueueSendNowResult struct { // Experimental: QueueSetDrainPausedRequest is part of an experimental API and may change or // be removed. type QueueSetDrainPausedRequest struct { + // Whether queued-lane draining should be paused. Paused bool `json:"paused"` } @@ -7905,9 +8402,12 @@ type QueueSnapshotResult struct { // Experimental: QueueUpdateTextRequest is part of an experimental API and may change or be // removed. type QueueUpdateTextRequest struct { + // Optional replacement prompt displayed to the user. DisplayPrompt *string `json:"displayPrompt,omitempty"` - ID string `json:"id"` - Prompt string `json:"prompt"` + // Stable opaque ID of the queued item to edit. + ID string `json:"id"` + // Replacement prompt sent to the model. + Prompt string `json:"prompt"` } // Result of editing a queued message. @@ -8062,9 +8562,8 @@ type RemoteControlStatusActive struct { // 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. + // excluded from the public SDK surface. Retained as an optional compatibility field; native + // remote control does not populate or consume it. // Internal: PromptManager is part of the SDK's internal API surface and is not intended for // external use. PromptManager any `json:"promptManager,omitempty"` @@ -8233,13 +8732,21 @@ type RuntimeShutdownResult struct { type SandboxConfig struct { // Whether to auto-add the current working directory to readwritePaths. Default: true. AddCurrentWorkingDirectory *bool `json:"addCurrentWorkingDirectory,omitempty"` - // Whether to auto-grant read access to common developer-tool caches, registries, and - // toolchains in their default home locations (cargo, go, npm, Maven, and more), plus - // read-write access to (and, on Unix, up-front creation of) the scratch caches builds write - // on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so - // builds work without extra configuration; a relocated CARGO_HOME additionally gets its - // Cargo lock files granted read-write. Default: true (enabled by default; set to false to - // opt out). + // Whether to auto-grant read access to the tool directories discovered on PATH and in + // toolchain environment variables (GOROOT, CARGO_HOME, JAVA_HOME, VIRTUAL_ENV, and + // similar), and to common developer-tool caches, registries, and toolchains in their + // default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, + // on Unix, up-front creation of) the scratch caches builds write on every run (go-build, + // ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra + // configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted + // read-write. Set to false to disable every grant listed above: user-installed toolchains + // (rustup, nvm, pyenv, conda, pipx) then need explicit userPolicy.filesystem entries — + // readonlyPaths to read them, plus readwriteFiles for a relocated CARGO_HOME's + // .package-cache and .global-cache, which Cargo locks on every build. Only these + // developer-tool grants are affected: the working directory (see + // addCurrentWorkingDirectory), temporary storage, session log paths, and system locations + // follow their own rules and stay granted, so commands still run. Default: true (enabled by + // default; set to false to opt out). AllowDevToolAccess *bool `json:"allowDevToolAccess,omitempty"` // Credential-injection capability flags. Auth *SandboxConfigAuth `json:"auth,omitempty"` @@ -8745,6 +9252,74 @@ type SessionAgentListRequest struct { type SessionAgentSetPromptResult struct { } +// Initial authentication info for the session. +// Experimental: SessionAuthInfoResult is part of an experimental API and may change or be +// removed. +type SessionAuthInfoResult interface { + sessionAuthInfoResult() + sessionAuthInfoResultType() SessionAuthInfoResultType +} + +type RawSessionAuthInfoResultData struct { + Discriminator SessionAuthInfoResultType + Raw json.RawMessage +} + +func (RawSessionAuthInfoResultData) sessionAuthInfoResult() {} +func (r RawSessionAuthInfoResultData) sessionAuthInfoResultType() SessionAuthInfoResultType { + return r.Discriminator +} +func (APIKeyAuthInfo) sessionAuthInfoResult() {} +func (APIKeyAuthInfo) sessionAuthInfoResultType() SessionAuthInfoResultType { + return SessionAuthInfoResultTypeAPIKey +} +func (CopilotAPITokenAuthInfo) sessionAuthInfoResult() {} +func (CopilotAPITokenAuthInfo) sessionAuthInfoResultType() SessionAuthInfoResultType { + return SessionAuthInfoResultTypeCopilotAPIToken +} +func (EnvAuthInfo) sessionAuthInfoResult() {} +func (EnvAuthInfo) sessionAuthInfoResultType() SessionAuthInfoResultType { + return SessionAuthInfoResultTypeEnv +} +func (GhCLIAuthInfo) sessionAuthInfoResult() {} +func (GhCLIAuthInfo) sessionAuthInfoResultType() SessionAuthInfoResultType { + return SessionAuthInfoResultTypeGhCLI +} +func (HMACAuthInfo) sessionAuthInfoResult() {} +func (HMACAuthInfo) sessionAuthInfoResultType() SessionAuthInfoResultType { + return SessionAuthInfoResultTypeHMAC +} +func (TokenAuthInfo) sessionAuthInfoResult() {} +func (TokenAuthInfo) sessionAuthInfoResultType() SessionAuthInfoResultType { + return SessionAuthInfoResultTypeToken +} +func (UserAuthInfo) sessionAuthInfoResult() {} +func (UserAuthInfo) sessionAuthInfoResultType() SessionAuthInfoResultType { + return SessionAuthInfoResultTypeUser +} + +// Internal GitHub login parameters. +// Experimental: SessionAuthLoginRequest is part of an experimental API and may change or be +// removed. +type SessionAuthLoginRequest struct { + // GitHub host URL + Host string `json:"host"` + // GitHub login + Login string `json:"login"` + // Whether to persist the token after login + Persist *bool `json:"persist,omitempty"` + // GitHub authentication token + Token string `json:"token"` +} + +// Parameters identifying a GitHub authentication to log out. +// Experimental: SessionAuthLogoutUserRequest is part of an experimental API and may change +// or be removed. +type SessionAuthLogoutUserRequest struct { + // Authentication information to log out + AuthInfo AuthInfo `json:"authInfo"` +} + // Authentication status and account metadata for the session. // Experimental: SessionAuthStatus is part of an experimental API and may change or be // removed. @@ -8763,6 +9338,16 @@ type SessionAuthStatus struct { StatusMessage *string `json:"statusMessage,omitempty"` } +// Parameters for switching the session's active authentication. +// Experimental: SessionAuthSwitchRequest is part of an experimental API and may change or +// be removed. +type SessionAuthSwitchRequest struct { + // Authentication information to activate + AuthInfo AuthInfo `json:"authInfo"` + // Optional token paired with the authentication information + Token *string `json:"token,omitempty"` +} + // Map of sessionId -> bytes freed by removing the session's workspace directory. // Experimental: SessionBulkDeleteResult is part of an experimental API and may change or be // removed. @@ -8783,6 +9368,16 @@ type SessionCancelAllBackgroundAgentsResult int64 type SessionCanvasCloseResult struct { } +// Experimental: SessionCanvasProviderRegisterResult is part of an experimental API and may +// change or be removed. +type SessionCanvasProviderRegisterResult struct { +} + +// Experimental: SessionCanvasProviderUnregisterResult is part of an experimental API and +// may change or be removed. +type SessionCanvasProviderUnregisterResult struct { +} + // Experimental: SessionCommandsListRequest is part of an experimental API and may change or // be removed. type SessionCommandsListRequest struct { @@ -9223,8 +9818,10 @@ type SessionFSSqliteQueryResult struct { // Experimental: SessionFSSqliteTransactionError is part of an experimental API and may // change or be removed. type SessionFSSqliteTransactionError struct { + // Machine-readable classification of the transaction failure. ErrorClass SessionFSSqliteTransactionErrorClass `json:"errorClass"` - Message string `json:"message"` + // Human-readable transaction failure message. + Message string `json:"message"` } // Statements to execute atomically. Providers apply busy handling for every call. @@ -9232,7 +9829,8 @@ type SessionFSSqliteTransactionError struct { // change or be removed. type SessionFSSqliteTransactionRequest struct { // Target session identifier - SessionID string `json:"sessionId"` + SessionID string `json:"sessionId"` + // Ordered SQL statements to execute in one transaction. Statements []SessionFSSqliteTransactionStatement `json:"statements"` } @@ -9240,8 +9838,10 @@ type SessionFSSqliteTransactionRequest struct { // Experimental: SessionFSSqliteTransactionResult is part of an experimental API and may // change or be removed. type SessionFSSqliteTransactionResult struct { - Error *SessionFSSqliteTransactionError `json:"error,omitempty"` - Results []SessionFSSqliteQueryResult `json:"results"` + // Classified transaction failure, when execution did not succeed. + Error *SessionFSSqliteTransactionError `json:"error,omitempty"` + // Per-statement query results in input order. + Results []SessionFSSqliteQueryResult `json:"results"` } // One statement in an atomic SQLite transaction. @@ -9298,6 +9898,26 @@ type SessionFSWriteFileRequest struct { SessionID string `json:"sessionId"` } +// Authentication accounts available to the internal session host. +// Experimental: SessionGitHubAuthGetAllAuthAvailableResult is part of an experimental API +// and may change or be removed. +type SessionGitHubAuthGetAllAuthAvailableResult []SessionAuthStatus + +// Whether the current authentication was logged out. +// Experimental: SessionGitHubAuthLogoutResult is part of an experimental API and may change +// or be removed. +type SessionGitHubAuthLogoutResult bool + +// Whether the requested authentication was logged out. +// Experimental: SessionGitHubAuthLogoutUserResult is part of an experimental API and may +// change or be removed. +type SessionGitHubAuthLogoutUserResult bool + +// Experimental: SessionGitHubAuthSwitchToAuthResult is part of an experimental API and may +// change or be removed. +type SessionGitHubAuthSwitchToAuthResult struct { +} + // Experimental: SessionHistoryCompactRequest is part of an experimental API and may change // or be removed. type SessionHistoryCompactRequest struct { @@ -9359,9 +9979,12 @@ type SessionInstalledPluginSource struct { // Experimental: SessionInstalledPluginSourceGitHub is part of an experimental API and may // change or be removed. type SessionInstalledPluginSourceGitHub struct { + // Optional repository-relative path to the plugin. Path *string `json:"path,omitempty"` - Ref *string `json:"ref,omitempty"` - Repo string `json:"repo"` + // Optional Git ref to resolve. + Ref *string `json:"ref,omitempty"` + // GitHub repository in `owner/repo` form. + Repo string `json:"repo"` // Optional full 40-character hexadecimal commit SHA. Sha *string `json:"sha,omitempty"` // Constant value. Always "github". @@ -9372,6 +9995,7 @@ type SessionInstalledPluginSourceGitHub struct { // Experimental: SessionInstalledPluginSourceLocal is part of an experimental API and may // change or be removed. type SessionInstalledPluginSourceLocal struct { + // Local filesystem path to the plugin. Path string `json:"path"` // Constant value. Always "local". Source SessionInstalledPluginSourceLocalSource `json:"source"` @@ -9382,13 +10006,16 @@ type SessionInstalledPluginSourceLocal struct { // Experimental: SessionInstalledPluginSourceURL is part of an experimental API and may // change or be removed. type SessionInstalledPluginSourceURL struct { + // Optional source-relative path to the plugin. Path *string `json:"path,omitempty"` - Ref *string `json:"ref,omitempty"` + // Optional Git ref to resolve. + Ref *string `json:"ref,omitempty"` // Optional full 40-character hexadecimal commit SHA. Sha *string `json:"sha,omitempty"` // Constant value. Always "url". Source SessionInstalledPluginSourceURLSource `json:"source"` - URL string `json:"url"` + // URL of the plugin source. + URL string `json:"url"` } // Baseline data provenance for a prediction. @@ -9485,7 +10112,8 @@ func (SessionLimitPredictionResultUnavailable) Kind() SessionLimitPredictionResu // change or be removed. type SessionLimitPredictionTierOption struct { // AI-credit cap for this tier. - Cap float64 `json:"cap"` + Cap float64 `json:"cap"` + // Semantic usage tier. Tier SessionLimitPredictionTier `json:"tier"` } @@ -9525,6 +10153,14 @@ func (LocalSessionMetadataValue) sessionListEntryIsRemote() bool { type RemoteSessionMetadataValue struct { // Most recent working directory context. Context *SessionContext `json:"context,omitempty"` + // Host-supplied human description of what the session is doing right now ("running tests", + // "waiting for approval"). Optional in the protocol and absent on hosts that do not publish + // it, so never rely on it -- it enriches `hostStatus`, it does not replace it. + HostActivity *string `json:"hostActivity,omitempty"` + // Live status as the owning host reports it in its session listing, so a row for a session + // running elsewhere can show that it is running. Absent for hosts that publish no such + // status (the cloud task managers), which read as idle. + HostStatus *RemoteSessionHostStatus `json:"hostStatus,omitempty"` // Last-modified time as an ISO 8601 timestamp. ModifiedTime string `json:"modifiedTime"` // Optional human-friendly name set via /rename. @@ -9608,6 +10244,7 @@ type SessionManagedPermissions struct { // Experimental: SessionManagedSettings is part of an experimental API and may change or be // removed. type SessionManagedSettings struct { + // Managed permission policy injected by the SDK host. Permissions *SessionManagedPermissions `json:"permissions,omitempty"` } @@ -9739,7 +10376,9 @@ type SessionModelListRequest struct { // Experimental: SessionModelPriceCategory is part of an experimental API and may change or // be removed. type SessionModelPriceCategory struct { - ID string `json:"id"` + // CAPI model identifier. + ID string `json:"id"` + // Cost category assigned to the model. PriceCategory ModelPickerPriceCategory `json:"priceCategory"` } @@ -9948,8 +10587,10 @@ type SessionOpenOptions struct { // 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"` + // Opaque policy update timestamp supplied by the host. + LastUpdatedAt any `json:"last_updated_at"` + // Content-exclusion rules to apply. + Rules []SessionOpenOptionsAdditionalContentExclusionPolicyRule `json:"rules"` // Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` // enumeration. Scope SessionOpenOptionsAdditionalContentExclusionPolicyScope `json:"scope"` @@ -9960,9 +10601,12 @@ type SessionOpenOptionsAdditionalContentExclusionPolicy struct { // Experimental: SessionOpenOptionsAdditionalContentExclusionPolicyRule is part of an // experimental API and may change or be removed. type SessionOpenOptionsAdditionalContentExclusionPolicyRule struct { - IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + // Conditions of which at least one must match. + IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + // Conditions none of which may match. IfNoneMatch []string `json:"ifNoneMatch,omitzero"` - Paths []string `json:"paths"` + // Path patterns covered by this rule. + Paths []string `json:"paths"` // Source descriptor for a `sessions.open` content-exclusion rule, with source name and type. Source SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource `json:"source"` } @@ -9971,7 +10615,9 @@ type SessionOpenOptionsAdditionalContentExclusionPolicyRule struct { // Experimental: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource is part of an // experimental API and may change or be removed. type SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource struct { + // Name of the policy source. Name string `json:"name"` + // Type of the policy source. Type string `json:"type"` } @@ -10363,8 +11009,10 @@ type SessionSetCredentialsResult struct { // Experimental: SessionSettingsBuiltInToolAvailabilitySnapshot is part of an experimental // API and may change or be removed. type SessionSettingsBuiltInToolAvailabilitySnapshot struct { + // Whether the create-pull-request tool is available. CreatePullRequest *bool `json:"createPullRequest,omitempty"` - ReportProgress *bool `json:"reportProgress,omitempty"` + // Whether the report-progress tool is available. + ReportProgress *bool `json:"reportProgress,omitempty"` } // Named Rust-owned settings predicate to evaluate for this session. @@ -10381,6 +11029,7 @@ type SessionSettingsEvaluatePredicateRequest struct { // Experimental: SessionSettingsEvaluatePredicateResult is part of an experimental API and // may change or be removed. type SessionSettingsEvaluatePredicateResult struct { + // Whether the named settings predicate evaluated to enabled. Enabled bool `json:"enabled"` } @@ -10388,26 +11037,35 @@ type SessionSettingsEvaluatePredicateResult struct { // Experimental: SessionSettingsJobSnapshot is part of an experimental API and may change or // be removed. type SessionSettingsJobSnapshot struct { + // Availability of job-specific built-in tools. BuiltInToolAvailability *SessionSettingsBuiltInToolAvailabilitySnapshot `json:"builtInToolAvailability,omitempty"` - EventType *string `json:"eventType,omitempty"` - IsTriggerJob *bool `json:"isTriggerJob,omitempty"` + // GitHub Actions event type for the job. + EventType *string `json:"eventType,omitempty"` + // Whether this is the workflow's trigger job. + IsTriggerJob *bool `json:"isTriggerJob,omitempty"` } // Redacted model routing settings for a session. // Experimental: SessionSettingsModelSnapshot is part of an experimental API and may change // or be removed. type SessionSettingsModelSnapshot struct { - CallbackURL *string `json:"callbackUrl,omitempty"` + // Agent service callback URL for job and progress updates. + CallbackURL *string `json:"callbackUrl,omitempty"` + // Default reasoning effort for the selected model. DefaultReasoningEffort *string `json:"defaultReasoningEffort,omitempty"` - InstanceID *string `json:"instanceId,omitempty"` - Model *string `json:"model,omitempty"` + // Agent job identifier for the session. + InstanceID *string `json:"instanceId,omitempty"` + // Selected model identifier. + Model *string `json:"model,omitempty"` } // Online-evaluation settings safe to expose across the SDK boundary. // Experimental: SessionSettingsOnlineEvaluationSnapshot is part of an experimental API and // may change or be removed. type SessionSettingsOnlineEvaluationSnapshot struct { - DisableOnlineEvaluation *bool `json:"disableOnlineEvaluation,omitempty"` + // Whether online evaluation is disabled. + DisableOnlineEvaluation *bool `json:"disableOnlineEvaluation,omitempty"` + // Whether online-evaluation output-file generation is enabled. EnableOnlineEvaluationOutputFile *bool `json:"enableOnlineEvaluationOutputFile,omitempty"` } @@ -10415,18 +11073,30 @@ type SessionSettingsOnlineEvaluationSnapshot struct { // Experimental: SessionSettingsRepoSnapshot is part of an experimental API and may change // or be removed. type SessionSettingsRepoSnapshot struct { - Branch *string `json:"branch,omitempty"` - Commit *string `json:"commit,omitempty"` - Host *string `json:"host,omitempty"` - HostProtocol *string `json:"hostProtocol,omitempty"` - ID *float64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - OwnerID *float64 `json:"ownerId,omitempty"` - OwnerName *string `json:"ownerName,omitempty"` - PrCommitCount *float64 `json:"prCommitCount,omitempty"` - ReadWrite *bool `json:"readWrite,omitempty"` - SecretScanningURL *string `json:"secretScanningUrl,omitempty"` - ServerURL *string `json:"serverUrl,omitempty"` + // Checked-out repository branch. + Branch *string `json:"branch,omitempty"` + // Checked-out commit SHA. + Commit *string `json:"commit,omitempty"` + // GitHub server host name. + Host *string `json:"host,omitempty"` + // Protocol used to access the GitHub host. + HostProtocol *string `json:"hostProtocol,omitempty"` + // GitHub repository database ID. + ID *float64 `json:"id,omitempty"` + // Repository name. + Name *string `json:"name,omitempty"` + // GitHub repository owner database ID. + OwnerID *float64 `json:"ownerId,omitempty"` + // Repository owner login. + OwnerName *string `json:"ownerName,omitempty"` + // Number of commits in the pull request. + PrCommitCount *float64 `json:"prCommitCount,omitempty"` + // Whether the repository is writable. + ReadWrite *bool `json:"readWrite,omitempty"` + // GitHub secret-scanning service URL. + SecretScanningURL *string `json:"secretScanningUrl,omitempty"` + // GitHub server base URL. + ServerURL *string `json:"serverUrl,omitempty"` } // Redacted, serializable view of session runtime settings for SDK boundary consumers. @@ -10434,30 +11104,49 @@ type SessionSettingsRepoSnapshot struct { // Experimental: SessionSettingsSnapshot is part of an experimental API and may change or be // removed. type SessionSettingsSnapshot struct { - ClientName *string `json:"clientName,omitempty"` - Job SessionSettingsJobSnapshot `json:"job"` - Model SessionSettingsModelSnapshot `json:"model"` + // Name of the SDK client that created the session. + ClientName *string `json:"clientName,omitempty"` + // Redacted job settings. + Job SessionSettingsJobSnapshot `json:"job"` + // Redacted model routing settings. + Model SessionSettingsModelSnapshot `json:"model"` + // Online-evaluation settings safe for SDK consumers. OnlineEvaluation SessionSettingsOnlineEvaluationSnapshot `json:"onlineEvaluation"` - Repo SessionSettingsRepoSnapshot `json:"repo"` - StartTimeMs *float64 `json:"startTimeMs,omitempty"` - TimeoutMs *float64 `json:"timeoutMs,omitempty"` - Validation SessionSettingsValidationSnapshot `json:"validation"` - Version *string `json:"version,omitempty"` + // Redacted repository and host settings. + Repo SessionSettingsRepoSnapshot `json:"repo"` + // Session start time as Unix epoch milliseconds. + StartTimeMs *float64 `json:"startTimeMs,omitempty"` + // Session timeout in milliseconds. + TimeoutMs *float64 `json:"timeoutMs,omitempty"` + // Redacted validation and memory-tool settings. + Validation SessionSettingsValidationSnapshot `json:"validation"` + // Agent runtime version selector copied from the session settings, such as `latest` or a + // runtime release identifier. + Version *string `json:"version,omitempty"` } // Redacted validation and memory-tool settings for a session. // Experimental: SessionSettingsValidationSnapshot is part of an experimental API and may // change or be removed. type SessionSettingsValidationSnapshot struct { - AdvisoryEnabled *bool `json:"advisoryEnabled,omitempty"` - CodeqlEnabled *bool `json:"codeqlEnabled,omitempty"` - CodeReviewEnabled *bool `json:"codeReviewEnabled,omitempty"` - CodeReviewModel *string `json:"codeReviewModel,omitempty"` - DependabotTimeout *float64 `json:"dependabotTimeout,omitempty"` - MemoryStoreEnabled *bool `json:"memoryStoreEnabled,omitempty"` - MemoryVoteEnabled *bool `json:"memoryVoteEnabled,omitempty"` - SecretScanningEnabled *bool `json:"secretScanningEnabled,omitempty"` - Timeout *float64 `json:"timeout,omitempty"` + // Whether advisory validation is enabled. + AdvisoryEnabled *bool `json:"advisoryEnabled,omitempty"` + // Whether CodeQL validation is enabled. + CodeqlEnabled *bool `json:"codeqlEnabled,omitempty"` + // Whether code-review validation is enabled. + CodeReviewEnabled *bool `json:"codeReviewEnabled,omitempty"` + // Model used for code-review validation. + CodeReviewModel *string `json:"codeReviewModel,omitempty"` + // Dependabot validation timeout budget in seconds. + DependabotTimeout *float64 `json:"dependabotTimeout,omitempty"` + // Whether the memory-store tool is enabled. + MemoryStoreEnabled *bool `json:"memoryStoreEnabled,omitempty"` + // Whether the memory-vote tool is enabled. + MemoryVoteEnabled *bool `json:"memoryVoteEnabled,omitempty"` + // Whether secret-scanning validation is enabled. + SecretScanningEnabled *bool `json:"secretScanningEnabled,omitempty"` + // General validation timeout budget in seconds. + Timeout *float64 `json:"timeout,omitempty"` } // UUID prefix to resolve to a unique session ID. @@ -11504,6 +12193,8 @@ type TaskAgentInfo struct { CompletedAt *time.Time `json:"completedAt,omitempty"` // Short description of the task Description string `json:"description"` + // Friendly, non-unique name intended for display + DisplayName *string `json:"displayName,omitempty"` // Error message when the task failed Error *string `json:"error,omitempty"` // Whether task execution is synchronously awaited or managed in the background @@ -11762,7 +12453,7 @@ type TasksStartAgentRequest struct { Description *string `json:"description,omitempty"` // Optional model override Model *string `json:"model,omitempty"` - // Short name for the agent, used to generate a human-readable ID + // Friendly, non-unique name used when displaying the agent Name string `json:"name"` // Task prompt for the agent Prompt string `json:"prompt"` @@ -11908,8 +12599,14 @@ func (UIElicitationStringValue) uiElicitationFieldValue() {} type UIElicitationRequest struct { // Message describing what information is needed from the user Message string `json:"message"` + // MCP request metadata. + Meta map[string]any `json:"_meta,omitzero"` + // Elicitation mode. Omitted and form are equivalent for structured elicitation. + Mode *MCPElicitationFormMode `json:"mode,omitempty"` // JSON Schema describing the form fields to present to the user RequestedSchema UIElicitationSchema `json:"requestedSchema"` + // MCP task metadata. + Task *MCPTaskMetadata `json:"task,omitempty"` } // The elicitation response (accept with form values, decline, or cancel) @@ -11920,6 +12617,8 @@ type UIElicitationResponse struct { Action UIElicitationResponseAction `json:"action"` // The form values submitted by the user (present when action is 'accept') Content map[string]UIElicitationFieldValue `json:"content,omitzero"` + // MCP response metadata. + Meta map[string]any `json:"_meta,omitzero"` } // The form values submitted by the user (present when action is 'accept') @@ -12540,6 +13239,23 @@ func (UserToolSessionApprovalCustomTool) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindCustomTool } +// Session-scoped tool-approval rule for an extension's access to sensitive environment +// variables, keyed by extension name and the exact set of variable names. +// Experimental: UserToolSessionApprovalExtensionEnvAccess is part of an experimental API +// and may change or be removed. +type UserToolSessionApprovalExtensionEnvAccess struct { + // Names of the sensitive environment variables this approval covers. Values are never + // persisted. + EnvironmentVariables []string `json:"environmentVariables"` + // Extension name + ExtensionName string `json:"extensionName"` +} + +func (UserToolSessionApprovalExtensionEnvAccess) userToolSessionApproval() {} +func (UserToolSessionApprovalExtensionEnvAccess) Kind() UserToolSessionApprovalKind { + return UserToolSessionApprovalKindExtensionEnvAccess +} + // Session-scoped tool-approval rule for extension-management operations, optionally // narrowed by operation. // Experimental: UserToolSessionApprovalExtensionManagement is part of an experimental API @@ -12727,7 +13443,9 @@ type WorkspacesAddSummaryRequest struct { // Experimental: WorkspacesAddSummaryResult is part of an experimental API and may change or // be removed. type WorkspacesAddSummaryResult struct { - Summary any `json:"summary,omitempty"` + // Metadata for the persisted summary. + Summary any `json:"summary,omitempty"` + // Refreshed metadata for the containing workspace. Workspace any `json:"workspace,omitempty"` } @@ -12801,24 +13519,40 @@ type WorkspacesGetWorkspaceResult struct { } type WorkspacesGetWorkspaceResultWorkspace struct { - Branch *string `json:"branch,omitempty"` - ChronicleSyncDismissed *bool `json:"chronicle_sync_dismissed,omitempty"` - ClientName *string `json:"client_name,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - Cwd *string `json:"cwd,omitempty"` - GitRoot *string `json:"git_root,omitempty"` + // Current Git branch. + Branch *string `json:"branch,omitempty"` + // Whether the per-session Chronicle upgrade prompt was dismissed for the workspace. + ChronicleSyncDismissed *bool `json:"chronicle_sync_dismissed,omitempty"` + // Name of the client that created the workspace. + ClientName *string `json:"client_name,omitempty"` + // Timestamp when the workspace was created. + CreatedAt *time.Time `json:"created_at,omitempty"` + // Current working directory associated with the workspace. + Cwd *string `json:"cwd,omitempty"` + // Git repository root associated with the workspace. + GitRoot *string `json:"git_root,omitempty"` // Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. - HostType *WorkspacesWorkspaceDetailsHostType `json:"host_type,omitempty"` - ID string `json:"id"` - McLastEventID *string `json:"mc_last_event_id,omitempty"` - McSessionID *string `json:"mc_session_id,omitempty"` - McTaskID *string `json:"mc_task_id,omitempty"` - Name *string `json:"name,omitempty"` - RemoteSteerable *bool `json:"remote_steerable,omitempty"` - Repository *string `json:"repository,omitempty"` - SummaryCount *int64 `json:"summary_count,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - UserNamed *bool `json:"user_named,omitempty"` + HostType *WorkspacesWorkspaceDetailsHostType `json:"host_type,omitempty"` + // Stable workspace identifier. + ID string `json:"id"` + // Most recent Mission Control event identifier observed for the workspace. + McLastEventID *string `json:"mc_last_event_id,omitempty"` + // Mission Control session identifier associated with the workspace. + McSessionID *string `json:"mc_session_id,omitempty"` + // Mission Control task identifier associated with the workspace. + McTaskID *string `json:"mc_task_id,omitempty"` + // Workspace display name. + Name *string `json:"name,omitempty"` + // Whether the workspace session can be steered remotely. + RemoteSteerable *bool `json:"remote_steerable,omitempty"` + // Repository identifier associated with the workspace. + Repository *string `json:"repository,omitempty"` + // Number of persisted summaries in the workspace. + SummaryCount *int64 `json:"summary_count,omitempty"` + // Timestamp when the workspace was last updated. + UpdatedAt *time.Time `json:"updated_at,omitempty"` + // Whether the workspace name was explicitly chosen by the user. + UserNamed *bool `json:"user_named,omitempty"` } // Workspace checkpoints in chronological order; empty when the workspace is not enabled. @@ -13959,6 +14693,15 @@ const ( MCPAppsSetHostContextDetailsThemeLight MCPAppsSetHostContextDetailsTheme = "light" ) +// Structured MCP elicitation mode. +// Experimental: MCPElicitationFormMode is part of an experimental API and may change or be +// removed. +type MCPElicitationFormMode string + +const ( + MCPElicitationFormModeForm MCPElicitationFormMode = "form" +) + // Kind discriminator for MCPHeadersHandlePendingHeadersRefreshRequest. type MCPHeadersHandlePendingHeadersRefreshRequestKind string @@ -13988,6 +14731,31 @@ const ( MCPOauthPendingRequestResponseKindToken MCPOauthPendingRequestResponseKind = "token" ) +// Why a passive MCP OAuth probe determined authentication is needed. +// Experimental: MCPOauthProbeNeedsAuthReason is part of an experimental API and may change +// or be removed. +type MCPOauthProbeNeedsAuthReason string + +const ( + // No token was sent and the server requires authentication. + MCPOauthProbeNeedsAuthReasonInitial MCPOauthProbeNeedsAuthReason = "initial" + // A cached token was sent and rejected. + MCPOauthProbeNeedsAuthReasonRefresh MCPOauthProbeNeedsAuthReason = "refresh" + // The server returned a 403 insufficient_scope challenge, indicating additional scopes or + // audience are needed. + MCPOauthProbeNeedsAuthReasonUpscope MCPOauthProbeNeedsAuthReason = "upscope" +) + +// Status discriminator for MCPOauthProbeResult. +type MCPOauthProbeResultStatus string + +const ( + MCPOauthProbeResultStatusAuthenticated MCPOauthProbeResultStatus = "authenticated" + MCPOauthProbeResultStatusFailed MCPOauthProbeResultStatus = "failed" + MCPOauthProbeResultStatusNeedsAuth MCPOauthProbeResultStatus = "needs-auth" + MCPOauthProbeResultStatusNoAuthRequired MCPOauthProbeResultStatus = "no-auth-required" +) + // 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. @@ -14041,6 +14809,27 @@ const ( MCPServerConfigHTTPTypeSSE MCPServerConfigHTTPType = "sse" ) +// In-process MCP transport type. +// Experimental: MCPServerConfigMemoryType is part of an experimental API and may change or +// be removed. +type MCPServerConfigMemoryType string + +const ( + MCPServerConfigMemoryTypeMemory MCPServerConfigMemoryType = "memory" +) + +// Local MCP transport type. +// Experimental: MCPServerConfigStdioType is part of an experimental API and may change or +// be removed. +type MCPServerConfigStdioType string + +const ( + // Legacy alias for the local stdio transport. + MCPServerConfigStdioTypeLocal MCPServerConfigStdioType = "local" + // Server communicates over stdio with a local child process. + MCPServerConfigStdioTypeStdio MCPServerConfigStdioType = "stdio" +) + // Configuration source: user, workspace, plugin, or builtin // Experimental: MCPServerSource is part of an experimental API and may change or be removed. type MCPServerSource string @@ -14135,6 +14924,38 @@ const ( MetadataSnapshotRemoteMetadataTaskTypeCLI MetadataSnapshotRemoteMetadataTaskType = "cli" ) +// Origin of an effective session model change. +// Experimental: ModelChangeSource is part of an experimental API and may change or be +// removed. +type ModelChangeSource string + +const ( + // Selecting an agent selected its configured model. + ModelChangeSourceAgent ModelChangeSource = "agent" + // The runtime selected the model automatically, such as rate-limit recovery or refusal + // fallback. + ModelChangeSourceAutomatic ModelChangeSource = "automatic" + // The user selected the model with the `/config` alias. + ModelChangeSourceConfigCommand ModelChangeSource = "config_command" + // Organization-managed settings selected the model. + ModelChangeSourceManagedSettings ModelChangeSource = "managed_settings" + // The user selected a model directly with `/model `. + ModelChangeSourceModelCommand ModelChangeSource = "model_command" + // The user selected the model in the model picker, including the picker opened by bare + // `/model`. + ModelChangeSourceModelPicker ModelChangeSource = "model_picker" + // Entering, leaving, or reconfiguring plan mode selected the model. + ModelChangeSourcePlanMode ModelChangeSource = "plan_mode" + // Repository settings selected the model. + ModelChangeSourceRepoSettings ModelChangeSource = "repo_settings" + // An SDK or RPC caller selected the model. + ModelChangeSourceSDK ModelChangeSource = "sdk" + // The user selected the model with `/settings`. + ModelChangeSourceSettingsCommand ModelChangeSource = "settings_command" + // Startup model resolution selected the model. + ModelChangeSourceStartup ModelChangeSource = "startup" +) + // Model capability category for grouping in the model picker // Experimental: ModelPickerCategory is part of an experimental API and may change or be // removed. @@ -14268,6 +15089,7 @@ type PermissionDecisionApproveForLocationApprovalKind string const ( PermissionDecisionApproveForLocationApprovalKindCommands PermissionDecisionApproveForLocationApprovalKind = "commands" PermissionDecisionApproveForLocationApprovalKindCustomTool PermissionDecisionApproveForLocationApprovalKind = "custom-tool" + PermissionDecisionApproveForLocationApprovalKindExtensionEnvAccess PermissionDecisionApproveForLocationApprovalKind = "extension-env-access" PermissionDecisionApproveForLocationApprovalKindExtensionManagement PermissionDecisionApproveForLocationApprovalKind = "extension-management" PermissionDecisionApproveForLocationApprovalKindExtensionPermissionAccess PermissionDecisionApproveForLocationApprovalKind = "extension-permission-access" PermissionDecisionApproveForLocationApprovalKindFactory PermissionDecisionApproveForLocationApprovalKind = "factory" @@ -14284,6 +15106,7 @@ type PermissionDecisionApproveForSessionApprovalKind string const ( PermissionDecisionApproveForSessionApprovalKindCommands PermissionDecisionApproveForSessionApprovalKind = "commands" PermissionDecisionApproveForSessionApprovalKindCustomTool PermissionDecisionApproveForSessionApprovalKind = "custom-tool" + PermissionDecisionApproveForSessionApprovalKindExtensionEnvAccess PermissionDecisionApproveForSessionApprovalKind = "extension-env-access" PermissionDecisionApproveForSessionApprovalKindExtensionManagement PermissionDecisionApproveForSessionApprovalKind = "extension-management" PermissionDecisionApproveForSessionApprovalKindExtensionPermissionAccess PermissionDecisionApproveForSessionApprovalKind = "extension-permission-access" PermissionDecisionApproveForSessionApprovalKindFactory PermissionDecisionApproveForSessionApprovalKind = "factory" @@ -14408,6 +15231,7 @@ type PermissionsLocationsAddToolApprovalDetailsKind string const ( PermissionsLocationsAddToolApprovalDetailsKindCommands PermissionsLocationsAddToolApprovalDetailsKind = "commands" PermissionsLocationsAddToolApprovalDetailsKindCustomTool PermissionsLocationsAddToolApprovalDetailsKind = "custom-tool" + PermissionsLocationsAddToolApprovalDetailsKindExtensionEnvAccess PermissionsLocationsAddToolApprovalDetailsKind = "extension-env-access" PermissionsLocationsAddToolApprovalDetailsKindExtensionManagement PermissionsLocationsAddToolApprovalDetailsKind = "extension-management" PermissionsLocationsAddToolApprovalDetailsKindExtensionPermissionAccess PermissionsLocationsAddToolApprovalDetailsKind = "extension-permission-access" PermissionsLocationsAddToolApprovalDetailsKindFactory PermissionsLocationsAddToolApprovalDetailsKind = "factory" @@ -14610,6 +15434,26 @@ const ( RemoteControlStatusStateOff RemoteControlStatusState = "off" ) +// What a remote host says one of its sessions is doing right now. Deliberately coarse: this +// is what a host can report for EVERY session in a catalogue listing, without a client +// subscribing to each one. AHP's `SessionSummary.status` is the source today; +// `input-needed` covers both a permission prompt and an `ask_user` question, since the +// summary does not say which. +// Experimental: RemoteSessionHostStatus is part of an experimental API and may change or be +// removed. +type RemoteSessionHostStatus string + +const ( + // The session ended its last turn in an error. + RemoteSessionHostStatusError RemoteSessionHostStatus = "error" + // No turn is running. + RemoteSessionHostStatusIdle RemoteSessionHostStatus = "idle" + // The session is blocked on the user: a permission prompt or an `ask_user` question. + RemoteSessionHostStatusInputNeeded RemoteSessionHostStatus = "input-needed" + // A turn is running. + RemoteSessionHostStatusWorking RemoteSessionHostStatus = "working" +) + // Whether the remote task originated from CCA or CLI `--remote`. // Experimental: RemoteSessionMetadataTaskType is part of an experimental API and may change // or be removed. @@ -14665,6 +15509,19 @@ const ( SendModeImmediate SendMode = "immediate" ) +// Type discriminator for SessionAuthInfoResult. +type SessionAuthInfoResultType string + +const ( + SessionAuthInfoResultTypeAPIKey SessionAuthInfoResultType = "api-key" + SessionAuthInfoResultTypeCopilotAPIToken SessionAuthInfoResultType = "copilot-api-token" + SessionAuthInfoResultTypeEnv SessionAuthInfoResultType = "env" + SessionAuthInfoResultTypeGhCLI SessionAuthInfoResultType = "gh-cli" + SessionAuthInfoResultTypeHMAC SessionAuthInfoResultType = "hmac" + SessionAuthInfoResultTypeToken SessionAuthInfoResultType = "token" + SessionAuthInfoResultTypeUser SessionAuthInfoResultType = "user" +) + // Session capability enabled for this session // Experimental: SessionCapability is part of an experimental API and may change or be // removed. @@ -15413,6 +16270,7 @@ type UserToolSessionApprovalKind string const ( UserToolSessionApprovalKindCommands UserToolSessionApprovalKind = "commands" UserToolSessionApprovalKindCustomTool UserToolSessionApprovalKind = "custom-tool" + UserToolSessionApprovalKindExtensionEnvAccess UserToolSessionApprovalKind = "extension-env-access" UserToolSessionApprovalKindExtensionManagement UserToolSessionApprovalKind = "extension-management" UserToolSessionApprovalKindExtensionPermissionAccess UserToolSessionApprovalKind = "extension-permission-access" UserToolSessionApprovalKindFactory UserToolSessionApprovalKind = "factory" @@ -16196,6 +17054,33 @@ func (a *ServerPluginsAPI) UpdateAll(ctx context.Context) (*PluginUpdateAllResul return &result, nil } +// Experimental: ServerPluginsBuiltinAPI contains experimental APIs that may change or be +// removed. +type ServerPluginsBuiltinAPI serverAPI + +// Set replaces this server's trusted built-in plugin directories while no sessions are +// active. +// +// RPC method: plugins.builtin.set. +// +// Parameters: Trusted built-in plugin directories to use for this runtime process. +func (a *ServerPluginsBuiltinAPI) Set(ctx context.Context, params *PluginsBuiltinSetRequest) (*PluginsBuiltinSetResult, error) { + raw, err := a.client.Request(ctx, "plugins.builtin.set", params) + if err != nil { + return nil, err + } + var result PluginsBuiltinSetResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Experimental: Builtin returns experimental APIs that may change or be removed. +func (s *ServerPluginsAPI) Builtin() *ServerPluginsBuiltinAPI { + return (*ServerPluginsBuiltinAPI)(s) +} + // Experimental: ServerPluginsMarketplacesAPI contains experimental APIs that may change or // be removed. type ServerPluginsMarketplacesAPI serverAPI @@ -19419,6 +20304,35 @@ func (a *MCPOauthAPI) Login(ctx context.Context, params *MCPOauthLoginRequest) ( return &result, nil } +// Probe passively probes a configured remote MCP server to classify whether OAuth is +// required or a cached/override token is accepted. Does not start OAuth, emit pending OAuth +// requests, or mutate MCP connection state. +// +// RPC method: session.mcp.oauth.probe. +// +// Parameters: Remote MCP server name for a passive OAuth status probe. +// +// Returns: Passive MCP OAuth probe result. `authenticated` means the server accepted the +// probe request while an OAuth-origin access token was attached; it does not prove the +// server required or independently validated that token. The probe does not make a second +// unauthenticated request. Failed is an expected probe-domain outcome; JSON-RPC errors are +// reserved for API-call failures. +func (a *MCPOauthAPI) Probe(ctx context.Context, params *MCPOauthProbeRequest) (MCPOauthProbeResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["serverName"] = params.ServerName + } + raw, err := a.client.Request(ctx, "session.mcp.oauth.probe", req) + if err != nil { + return nil, err + } + result, err := unmarshalMCPOauthProbeResult(raw) + if err != nil { + return nil, err + } + return result, nil +} + // Responds to a pending MCP OAuth authorization request by its request id. // // RPC method: session.mcp.oauth.respond. @@ -19921,6 +20835,9 @@ func (a *ModelAPI) SwitchTo(ctx context.Context, params *ModelSwitchToRequest) ( if params.ReasoningSummary != nil { req["reasoningSummary"] = *params.ReasoningSummary } + if params.Source != nil { + req["source"] = *params.Source + } if params.Verbosity != nil { req["verbosity"] = *params.Verbosity } @@ -22004,7 +22921,16 @@ func (a *UIAPI) Elicitation(ctx context.Context, params *UIElicitationRequest) ( req := map[string]any{"sessionId": a.sessionID} if params != nil { req["message"] = params.Message + if params.Meta != nil { + req["_meta"] = params.Meta + } + if params.Mode != nil { + req["mode"] = *params.Mode + } req["requestedSchema"] = params.RequestedSchema + if params.Task != nil { + req["task"] = *params.Task + } } raw, err := a.client.Request(ctx, "session.ui.elicitation", req) if err != nil { @@ -23058,6 +23984,252 @@ type internalSessionAPI struct { sessionID string } +// Experimental: InternalCanvasAPI contains experimental APIs that may change or be removed. +type InternalCanvasAPI internalSessionAPI + +// Experimental: InternalCanvasProviderAPI contains experimental APIs that may change or be +// removed. +type InternalCanvasProviderAPI internalSessionAPI + +// Registers an internal canvas provider connection and its contributions. +// +// RPC method: session.canvas.provider.register. +// +// Parameters: Internal canvas provider registration parameters. +// Internal: Register is part of the SDK's internal handshake/plumbing; external callers +// should not use it. +func (a *InternalCanvasProviderAPI) Register(ctx context.Context, params *CanvasProviderRegisterRequest) (*SessionCanvasProviderRegisterResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["canvases"] = params.Canvases + req["connectionId"] = params.ConnectionID + req["info"] = params.Info + } + raw, err := a.client.Request(ctx, "session.canvas.provider.register", req) + if err != nil { + return nil, err + } + var result SessionCanvasProviderRegisterResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Unregisters an internal canvas provider connection. +// +// RPC method: session.canvas.provider.unregister. +// +// Parameters: Internal canvas provider unregistration parameters. +// Internal: Unregister is part of the SDK's internal handshake/plumbing; external callers +// should not use it. +func (a *InternalCanvasProviderAPI) Unregister(ctx context.Context, params *CanvasProviderUnregisterRequest) (*SessionCanvasProviderUnregisterResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["connectionId"] = params.ConnectionID + } + raw, err := a.client.Request(ctx, "session.canvas.provider.unregister", req) + if err != nil { + return nil, err + } + var result SessionCanvasProviderUnregisterResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Experimental: Provider returns experimental APIs that may change or be removed. +func (s *InternalCanvasAPI) Provider() *InternalCanvasProviderAPI { + return (*InternalCanvasProviderAPI)(s) +} + +// Experimental: InternalGitHubAuthAPI contains experimental APIs that may change or be +// removed. +type InternalGitHubAuthAPI internalSessionAPI + +// GetAllAuthAvailable gets all authentication accounts available to the internal session +// host. +// +// RPC method: session.gitHubAuth.getAllAuthAvailable. +// +// Returns: Authentication accounts available to the internal session host. +// Internal: GetAllAuthAvailable is part of the SDK's internal handshake/plumbing; external +// callers should not use it. +func (a *InternalGitHubAuthAPI) GetAllAuthAvailable(ctx context.Context) (*SessionGitHubAuthGetAllAuthAvailableResult, error) { + req := map[string]any{"sessionId": a.sessionID} + raw, err := a.client.Request(ctx, "session.gitHubAuth.getAllAuthAvailable", req) + if err != nil { + return nil, err + } + var result SessionGitHubAuthGetAllAuthAvailableResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// GetCurrentAuthInfo gets the current authentication information for internal session hosts. +// +// RPC method: session.gitHubAuth.getCurrentAuthInfo. +// +// Returns: Current authentication information, or null when no authentication is active. +// Internal: GetCurrentAuthInfo is part of the SDK's internal handshake/plumbing; external +// callers should not use it. +func (a *InternalGitHubAuthAPI) GetCurrentAuthInfo(ctx context.Context) (AuthInfo, error) { + req := map[string]any{"sessionId": a.sessionID} + raw, err := a.client.Request(ctx, "session.gitHubAuth.getCurrentAuthInfo", req) + if err != nil { + return nil, err + } + result, err := unmarshalAuthInfo(raw) + if err != nil { + return nil, err + } + return result, nil +} + +// LastAuthErrors gets validation errors from the most recent authentication attempt. +// +// RPC method: session.gitHubAuth.lastAuthErrors. +// +// Returns: Validation errors from the most recent authentication attempt. +// Internal: LastAuthErrors is part of the SDK's internal handshake/plumbing; external +// callers should not use it. +func (a *InternalGitHubAuthAPI) LastAuthErrors(ctx context.Context) (*AuthValidationErrors, error) { + req := map[string]any{"sessionId": a.sessionID} + raw, err := a.client.Request(ctx, "session.gitHubAuth.lastAuthErrors", req) + if err != nil { + return nil, err + } + var result AuthValidationErrors + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Login logs in a GitHub user through the internal session host. +// +// RPC method: session.gitHubAuth.login. +// +// Parameters: Internal GitHub login parameters. +// +// Returns: Initial authentication info for the session. +// Internal: Login is part of the SDK's internal handshake/plumbing; external callers should +// not use it. +func (a *InternalGitHubAuthAPI) Login(ctx context.Context, params *SessionAuthLoginRequest) (AuthInfo, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["host"] = params.Host + req["login"] = params.Login + if params.Persist != nil { + req["persist"] = *params.Persist + } + req["token"] = params.Token + } + raw, err := a.client.Request(ctx, "session.gitHubAuth.login", req) + if err != nil { + return nil, err + } + result, err := unmarshalAuthInfo(raw) + if err != nil { + return nil, err + } + return result, nil +} + +// Logout logs out the session's current GitHub authentication. +// +// RPC method: session.gitHubAuth.logout. +// +// Returns: Whether the current authentication was logged out. +// Internal: Logout is part of the SDK's internal handshake/plumbing; external callers +// should not use it. +func (a *InternalGitHubAuthAPI) Logout(ctx context.Context) (*SessionGitHubAuthLogoutResult, error) { + req := map[string]any{"sessionId": a.sessionID} + raw, err := a.client.Request(ctx, "session.gitHubAuth.logout", req) + if err != nil { + return nil, err + } + var result SessionGitHubAuthLogoutResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// LogoutUser logs out a specific GitHub authentication. +// +// RPC method: session.gitHubAuth.logoutUser. +// +// Parameters: Parameters identifying a GitHub authentication to log out. +// +// Returns: Whether the requested authentication was logged out. +// Internal: LogoutUser is part of the SDK's internal handshake/plumbing; external callers +// should not use it. +func (a *InternalGitHubAuthAPI) LogoutUser(ctx context.Context, params *SessionAuthLogoutUserRequest) (*SessionGitHubAuthLogoutUserResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["authInfo"] = params.AuthInfo + } + raw, err := a.client.Request(ctx, "session.gitHubAuth.logoutUser", req) + if err != nil { + return nil, err + } + var result SessionGitHubAuthLogoutUserResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// RefreshCopilotUser refreshes Copilot account metadata for the current authentication. +// +// RPC method: session.gitHubAuth.refreshCopilotUser. +// +// Returns: Current authentication information, or null when no authentication is active. +// Internal: RefreshCopilotUser is part of the SDK's internal handshake/plumbing; external +// callers should not use it. +func (a *InternalGitHubAuthAPI) RefreshCopilotUser(ctx context.Context) (AuthInfo, error) { + req := map[string]any{"sessionId": a.sessionID} + raw, err := a.client.Request(ctx, "session.gitHubAuth.refreshCopilotUser", req) + if err != nil { + return nil, err + } + result, err := unmarshalAuthInfo(raw) + if err != nil { + return nil, err + } + return result, nil +} + +// SwitchToAuth switches the session to another available authentication. +// +// RPC method: session.gitHubAuth.switchToAuth. +// +// Parameters: Parameters for switching the session's active authentication. +// Internal: SwitchToAuth is part of the SDK's internal handshake/plumbing; external callers +// should not use it. +func (a *InternalGitHubAuthAPI) SwitchToAuth(ctx context.Context, params *SessionAuthSwitchRequest) (*SessionGitHubAuthSwitchToAuthResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["authInfo"] = params.AuthInfo + if params.Token != nil { + req["token"] = *params.Token + } + } + raw, err := a.client.Request(ctx, "session.gitHubAuth.switchToAuth", req) + if err != nil { + return nil, err + } + var result SessionGitHubAuthSwitchToAuthResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // Experimental: InternalMCPAPI contains experimental APIs that may change or be removed. type InternalMCPAPI internalSessionAPI @@ -23617,10 +24789,12 @@ type InternalSessionRPC struct { // Reuse a single struct instead of allocating one for each service on the heap. common internalSessionAPI - MCP *InternalMCPAPI - Queue *InternalQueueAPI - Schedule *InternalScheduleAPI - Settings *InternalSettingsAPI + Canvas *InternalCanvasAPI + GitHubAuth *InternalGitHubAuthAPI + MCP *InternalMCPAPI + Queue *InternalQueueAPI + Schedule *InternalScheduleAPI + Settings *InternalSettingsAPI } // SendSystemNotification queues or sends an internal system notification to the session @@ -23658,6 +24832,8 @@ func (a *InternalSessionRPC) SendSystemNotification(ctx context.Context, params func NewInternalSessionRPC(client *jsonrpc2.Client, sessionID string) *InternalSessionRPC { r := &InternalSessionRPC{} r.common = internalSessionAPI{client: client, sessionID: sessionID} + r.Canvas = (*InternalCanvasAPI)(&r.common) + r.GitHubAuth = (*InternalGitHubAuthAPI)(&r.common) r.MCP = (*InternalMCPAPI)(&r.common) r.Queue = (*InternalQueueAPI)(&r.common) r.Schedule = (*InternalScheduleAPI)(&r.common) diff --git a/go/rpc/zrpc_encoding.go b/go/rpc/zrpc_encoding.go index 29c253e1c..da6446f2e 100644 --- a/go/rpc/zrpc_encoding.go +++ b/go/rpc/zrpc_encoding.go @@ -1334,7 +1334,7 @@ func matchesMCPServerConfigStdio(data []byte) bool { return rawGroup0.URL == nil } -func unmarshalMCPServerConfig(data []byte) (MCPServerConfig, error) { +func unmarshalMCPSerializableServerConfig(data []byte) (MCPSerializableServerConfig, error) { if string(data) == "null" { return nil, nil } @@ -1352,10 +1352,10 @@ func unmarshalMCPServerConfig(data []byte) (MCPServerConfig, error) { } return &d, nil } - return &RawMCPServerConfigData{Raw: data}, nil + return &RawMCPSerializableServerConfigData{Raw: data}, nil } -func (r RawMCPServerConfigData) MarshalJSON() ([]byte, error) { +func (r RawMCPSerializableServerConfigData) MarshalJSON() ([]byte, error) { if r.Raw != nil { return r.Raw, nil } @@ -1381,22 +1381,54 @@ func unmarshalMCPServerAuthConfig(data []byte) (MCPServerAuthConfig, error) { return nil, errors.New("data did not match any union variant for MCPServerAuthConfig") } +func unmarshalMCPSafeForTelemetry(data []byte) (MCPSafeForTelemetry, error) { + if string(data) == "null" { + return nil, nil + } + { + var value bool + if err := json.Unmarshal(data, &value); err == nil { + return MCPSafeForTelemetryBoolean(value), nil + } + } + { + var value MCPSafeForTelemetryFields + if err := json.Unmarshal(data, &value); err == nil { + return &value, nil + } + } + return nil, errors.New("data did not match any union variant for MCPSafeForTelemetry") +} + func (r *MCPServerConfigHTTP) UnmarshalJSON(data []byte) error { type rawMCPServerConfigHTTP struct { - Auth json.RawMessage `json:"auth,omitempty"` - DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` - DisableToolCache *bool `json:"disableToolCache,omitempty"` - FilterMapping json.RawMessage `json:"filterMapping,omitempty"` - Headers map[string]string `json:"headers,omitzero"` - IsDefaultServer *bool `json:"isDefaultServer,omitempty"` - OauthClientID *string `json:"oauthClientId,omitempty"` - OauthGrantType *MCPServerConfigHTTPOauthGrantType `json:"oauthGrantType,omitempty"` - OauthPublicClient *bool `json:"oauthPublicClient,omitempty"` - Oidc json.RawMessage `json:"oidc,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - Tools []string `json:"tools,omitzero"` - Type *MCPServerConfigHTTPType `json:"type,omitempty"` - URL string `json:"url"` + Auth json.RawMessage `json:"auth,omitempty"` + ConfigWarnings []string `json:"configWarnings,omitzero"` + DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` + DisableSecretMasking *bool `json:"disableSecretMasking,omitempty"` + DisableToolCache *bool `json:"disableToolCache,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Events []string `json:"events,omitzero"` + ExcludeTools []string `json:"excludeTools,omitzero"` + FilterMapping json.RawMessage `json:"filterMapping,omitempty"` + Headers map[string]string `json:"headers,omitzero"` + HeadersRefreshTtlMs *int64 `json:"headersRefreshTtlMs,omitempty"` + IsDefaultServer *bool `json:"isDefaultServer,omitempty"` + Notifications []string `json:"notifications,omitzero"` + OauthClientID *string `json:"oauthClientId,omitempty"` + OauthGrantType *MCPServerConfigHTTPOauthGrantType `json:"oauthGrantType,omitempty"` + OauthPublicClient *bool `json:"oauthPublicClient,omitempty"` + Oidc json.RawMessage `json:"oidc,omitempty"` + SafeForTelemetry json.RawMessage `json:"safeForTelemetry,omitempty"` + Source *MCPServerSource `json:"source,omitempty"` + SourcePath *string `json:"sourcePath,omitempty"` + SourcePlugin *string `json:"sourcePlugin,omitempty"` + SourcePluginSpec *bool `json:"sourcePluginSpec,omitempty"` + SourcePluginVersion *string `json:"sourcePluginVersion,omitempty"` + Timeout *int64 `json:"timeout,omitempty"` + Tools []string `json:"tools,omitzero"` + Type *MCPServerConfigHTTPType `json:"type,omitempty"` + URL string `json:"url"` } var raw rawMCPServerConfigHTTP if err := json.Unmarshal(data, &raw); err != nil { @@ -1409,8 +1441,13 @@ func (r *MCPServerConfigHTTP) UnmarshalJSON(data []byte) error { } r.Auth = value } + r.ConfigWarnings = raw.ConfigWarnings r.DeferTools = raw.DeferTools + r.DisableSecretMasking = raw.DisableSecretMasking r.DisableToolCache = raw.DisableToolCache + r.DisplayName = raw.DisplayName + r.Events = raw.Events + r.ExcludeTools = raw.ExcludeTools if raw.FilterMapping != nil { value, err := unmarshalFilterMapping(raw.FilterMapping) if err != nil { @@ -1419,7 +1456,9 @@ func (r *MCPServerConfigHTTP) UnmarshalJSON(data []byte) error { r.FilterMapping = value } r.Headers = raw.Headers + r.HeadersRefreshTtlMs = raw.HeadersRefreshTtlMs r.IsDefaultServer = raw.IsDefaultServer + r.Notifications = raw.Notifications r.OauthClientID = raw.OauthClientID r.OauthGrantType = raw.OauthGrantType r.OauthPublicClient = raw.OauthPublicClient @@ -1430,6 +1469,18 @@ func (r *MCPServerConfigHTTP) UnmarshalJSON(data []byte) error { } r.Oidc = value } + if raw.SafeForTelemetry != nil { + value, err := unmarshalMCPSafeForTelemetry(raw.SafeForTelemetry) + if err != nil { + return err + } + r.SafeForTelemetry = value + } + r.Source = raw.Source + r.SourcePath = raw.SourcePath + r.SourcePlugin = raw.SourcePlugin + r.SourcePluginSpec = raw.SourcePluginSpec + r.SourcePluginVersion = raw.SourcePluginVersion r.Timeout = raw.Timeout r.Tools = raw.Tools r.Type = raw.Type @@ -1439,18 +1490,31 @@ func (r *MCPServerConfigHTTP) UnmarshalJSON(data []byte) error { func (r *MCPServerConfigStdio) UnmarshalJSON(data []byte) error { type rawMCPServerConfigStdio struct { - Args []string `json:"args,omitzero"` - Auth json.RawMessage `json:"auth,omitempty"` - Command string `json:"command"` - Cwd *string `json:"cwd,omitempty"` - DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` - DisableToolCache *bool `json:"disableToolCache,omitempty"` - Env map[string]string `json:"env,omitzero"` - FilterMapping json.RawMessage `json:"filterMapping,omitempty"` - IsDefaultServer *bool `json:"isDefaultServer,omitempty"` - Oidc json.RawMessage `json:"oidc,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - Tools []string `json:"tools,omitzero"` + Args []string `json:"args,omitzero"` + Auth json.RawMessage `json:"auth,omitempty"` + Command string `json:"command"` + ConfigWarnings []string `json:"configWarnings,omitzero"` + Cwd *string `json:"cwd,omitempty"` + DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` + DisableSecretMasking *bool `json:"disableSecretMasking,omitempty"` + DisableToolCache *bool `json:"disableToolCache,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Env map[string]string `json:"env,omitzero"` + Events []string `json:"events,omitzero"` + ExcludeTools []string `json:"excludeTools,omitzero"` + FilterMapping json.RawMessage `json:"filterMapping,omitempty"` + IsDefaultServer *bool `json:"isDefaultServer,omitempty"` + Notifications []string `json:"notifications,omitzero"` + Oidc json.RawMessage `json:"oidc,omitempty"` + SafeForTelemetry json.RawMessage `json:"safeForTelemetry,omitempty"` + Source *MCPServerSource `json:"source,omitempty"` + SourcePath *string `json:"sourcePath,omitempty"` + SourcePlugin *string `json:"sourcePlugin,omitempty"` + SourcePluginSpec *bool `json:"sourcePluginSpec,omitempty"` + SourcePluginVersion *string `json:"sourcePluginVersion,omitempty"` + Timeout *int64 `json:"timeout,omitempty"` + Tools []string `json:"tools,omitzero"` + Type *MCPServerConfigStdioType `json:"type,omitempty"` } var raw rawMCPServerConfigStdio if err := json.Unmarshal(data, &raw); err != nil { @@ -1465,10 +1529,15 @@ func (r *MCPServerConfigStdio) UnmarshalJSON(data []byte) error { r.Auth = value } r.Command = raw.Command + r.ConfigWarnings = raw.ConfigWarnings r.Cwd = raw.Cwd r.DeferTools = raw.DeferTools + r.DisableSecretMasking = raw.DisableSecretMasking r.DisableToolCache = raw.DisableToolCache + r.DisplayName = raw.DisplayName r.Env = raw.Env + r.Events = raw.Events + r.ExcludeTools = raw.ExcludeTools if raw.FilterMapping != nil { value, err := unmarshalFilterMapping(raw.FilterMapping) if err != nil { @@ -1477,6 +1546,7 @@ func (r *MCPServerConfigStdio) UnmarshalJSON(data []byte) error { r.FilterMapping = value } r.IsDefaultServer = raw.IsDefaultServer + r.Notifications = raw.Notifications if raw.Oidc != nil { value, err := unmarshalMCPServerAuthConfig(raw.Oidc) if err != nil { @@ -1484,8 +1554,21 @@ func (r *MCPServerConfigStdio) UnmarshalJSON(data []byte) error { } r.Oidc = value } + if raw.SafeForTelemetry != nil { + value, err := unmarshalMCPSafeForTelemetry(raw.SafeForTelemetry) + if err != nil { + return err + } + r.SafeForTelemetry = value + } + r.Source = raw.Source + r.SourcePath = raw.SourcePath + r.SourcePlugin = raw.SourcePlugin + r.SourcePluginSpec = raw.SourcePluginSpec + r.SourcePluginVersion = raw.SourcePluginVersion r.Timeout = raw.Timeout r.Tools = raw.Tools + r.Type = raw.Type return nil } @@ -1499,7 +1582,7 @@ func (r *MCPConfigAddRequest) UnmarshalJSON(data []byte) error { return err } if raw.Config != nil { - value, err := unmarshalMCPServerConfig(raw.Config) + value, err := unmarshalMCPSerializableServerConfig(raw.Config) if err != nil { return err } @@ -1518,9 +1601,9 @@ func (r *MCPConfigList) UnmarshalJSON(data []byte) error { return err } if raw.Servers != nil { - r.Servers = make(map[string]MCPServerConfig, len(raw.Servers)) + r.Servers = make(map[string]MCPSerializableServerConfig, len(raw.Servers)) for key, rawValue := range raw.Servers { - value, err := unmarshalMCPServerConfig(rawValue) + value, err := unmarshalMCPSerializableServerConfig(rawValue) if err != nil { return err } @@ -1540,7 +1623,7 @@ func (r *MCPConfigUpdateRequest) UnmarshalJSON(data []byte) error { return err } if raw.Config != nil { - value, err := unmarshalMCPServerConfig(raw.Config) + value, err := unmarshalMCPSerializableServerConfig(raw.Config) if err != nil { return err } @@ -1716,6 +1799,328 @@ func (r *MCPOauthHandlePendingRequest) UnmarshalJSON(data []byte) error { return nil } +func unmarshalMCPOauthProbeResult(data []byte) (MCPOauthProbeResult, error) { + if string(data) == "null" { + return nil, nil + } + type rawUnion struct { + Status MCPOauthProbeResultStatus `json:"status"` + } + var raw rawUnion + if err := json.Unmarshal(data, &raw); err != nil { + return nil, err + } + + switch raw.Status { + case MCPOauthProbeResultStatusAuthenticated: + var d MCPOauthProbeResultAuthenticated + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case MCPOauthProbeResultStatusFailed: + var d MCPOauthProbeResultFailed + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case MCPOauthProbeResultStatusNeedsAuth: + var d MCPOauthProbeResultNeedsAuth + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case MCPOauthProbeResultStatusNoAuthRequired: + var d MCPOauthProbeResultNoAuthRequired + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + default: + return &RawMCPOauthProbeResultData{Discriminator: raw.Status, Raw: data}, nil + } +} + +func (r RawMCPOauthProbeResultData) MarshalJSON() ([]byte, error) { + if r.Raw != nil { + return r.Raw, nil + } + return json.Marshal(struct { + Status MCPOauthProbeResultStatus `json:"status"` + }{ + Status: r.Discriminator, + }) +} + +func (r MCPOauthProbeResultAuthenticated) MarshalJSON() ([]byte, error) { + type alias MCPOauthProbeResultAuthenticated + return json.Marshal(struct { + Status MCPOauthProbeResultStatus `json:"status"` + alias + }{ + Status: r.Status(), + alias: alias(r), + }) +} + +func (r MCPOauthProbeResultFailed) MarshalJSON() ([]byte, error) { + type alias MCPOauthProbeResultFailed + return json.Marshal(struct { + Status MCPOauthProbeResultStatus `json:"status"` + alias + }{ + Status: r.Status(), + alias: alias(r), + }) +} + +func (r MCPOauthProbeResultNeedsAuth) MarshalJSON() ([]byte, error) { + type alias MCPOauthProbeResultNeedsAuth + return json.Marshal(struct { + Status MCPOauthProbeResultStatus `json:"status"` + alias + }{ + Status: r.Status(), + alias: alias(r), + }) +} + +func (r MCPOauthProbeResultNoAuthRequired) MarshalJSON() ([]byte, error) { + type alias MCPOauthProbeResultNoAuthRequired + return json.Marshal(struct { + Status MCPOauthProbeResultStatus `json:"status"` + alias + }{ + Status: r.Status(), + alias: alias(r), + }) +} + +func matchesMCPServerConfigHTTP(data []byte) bool { + var rawGroup0 struct { + Command json.RawMessage `json:"command"` + ServerInstance json.RawMessage `json:"serverInstance"` + Type json.RawMessage `json:"type"` + URL json.RawMessage `json:"url"` + } + if err := json.Unmarshal(data, &rawGroup0); err != nil { + return false + } + if rawGroup0.URL == nil { + return false + } + if rawGroup0.Command != nil { + return false + } + if rawGroup0.ServerInstance != nil { + return false + } + return rawGroup0.Type == nil +} + +func matchesMCPServerConfigMemory(data []byte) bool { + var rawGroup0 struct { + Command json.RawMessage `json:"command"` + ServerInstance json.RawMessage `json:"serverInstance"` + Type json.RawMessage `json:"type"` + URL json.RawMessage `json:"url"` + } + if err := json.Unmarshal(data, &rawGroup0); err != nil { + return false + } + if rawGroup0.ServerInstance == nil { + return false + } + if rawGroup0.Type == nil { + return false + } + var rawGroup0String string + if err := json.Unmarshal(rawGroup0.Type, &rawGroup0String); err != nil { + return false + } + switch rawGroup0String { + case "memory": + default: + return false + } + if rawGroup0.Command != nil { + return false + } + return rawGroup0.URL == nil +} + +func matchesMCPServerConfigStdio(data []byte) bool { + var rawGroup0 struct { + Command json.RawMessage `json:"command"` + ServerInstance json.RawMessage `json:"serverInstance"` + Type json.RawMessage `json:"type"` + URL json.RawMessage `json:"url"` + } + if err := json.Unmarshal(data, &rawGroup0); err != nil { + return false + } + if rawGroup0.Command == nil { + return false + } + if rawGroup0.ServerInstance != nil { + return false + } + if rawGroup0.Type != nil { + return false + } + return rawGroup0.URL == nil +} + +func unmarshalMCPServerConfig(data []byte) (MCPServerConfig, error) { + if string(data) == "null" { + return nil, nil + } + if matchesMCPServerConfigHTTP(data) { + var d MCPServerConfigHTTP + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + } + if matchesMCPServerConfigMemory(data) { + var d MCPServerConfigMemory + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + } + if matchesMCPServerConfigStdio(data) { + var d MCPServerConfigStdio + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + } + return &RawMCPServerConfigData{Raw: data}, nil +} + +func (r RawMCPServerConfigData) MarshalJSON() ([]byte, error) { + if r.Raw != nil { + return r.Raw, nil + } + return []byte("null"), nil +} + +func (r *MCPServerConfigMemory) UnmarshalJSON(data []byte) error { + type rawMCPServerConfigMemory struct { + ConfigWarnings []string `json:"configWarnings,omitzero"` + DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` + DisableSecretMasking *bool `json:"disableSecretMasking,omitempty"` + DisableToolCache *bool `json:"disableToolCache,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Events []string `json:"events,omitzero"` + ExcludeTools []string `json:"excludeTools,omitzero"` + FilterMapping json.RawMessage `json:"filterMapping,omitempty"` + IsDefaultServer *bool `json:"isDefaultServer,omitempty"` + Notifications []string `json:"notifications,omitzero"` + Oidc json.RawMessage `json:"oidc,omitempty"` + SafeForTelemetry json.RawMessage `json:"safeForTelemetry,omitempty"` + ServerInstance any `json:"serverInstance"` + Source *MCPServerSource `json:"source,omitempty"` + SourcePath *string `json:"sourcePath,omitempty"` + SourcePlugin *string `json:"sourcePlugin,omitempty"` + SourcePluginSpec *bool `json:"sourcePluginSpec,omitempty"` + SourcePluginVersion *string `json:"sourcePluginVersion,omitempty"` + Timeout *int64 `json:"timeout,omitempty"` + Tools []string `json:"tools,omitzero"` + Type MCPServerConfigMemoryType `json:"type"` + } + var raw rawMCPServerConfigMemory + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + r.ConfigWarnings = raw.ConfigWarnings + r.DeferTools = raw.DeferTools + r.DisableSecretMasking = raw.DisableSecretMasking + r.DisableToolCache = raw.DisableToolCache + r.DisplayName = raw.DisplayName + r.Events = raw.Events + r.ExcludeTools = raw.ExcludeTools + if raw.FilterMapping != nil { + value, err := unmarshalFilterMapping(raw.FilterMapping) + if err != nil { + return err + } + r.FilterMapping = value + } + r.IsDefaultServer = raw.IsDefaultServer + r.Notifications = raw.Notifications + if raw.Oidc != nil { + value, err := unmarshalMCPServerAuthConfig(raw.Oidc) + if err != nil { + return err + } + r.Oidc = value + } + if raw.SafeForTelemetry != nil { + value, err := unmarshalMCPSafeForTelemetry(raw.SafeForTelemetry) + if err != nil { + return err + } + r.SafeForTelemetry = value + } + r.ServerInstance = raw.ServerInstance + r.Source = raw.Source + r.SourcePath = raw.SourcePath + r.SourcePlugin = raw.SourcePlugin + r.SourcePluginSpec = raw.SourcePluginSpec + r.SourcePluginVersion = raw.SourcePluginVersion + r.Timeout = raw.Timeout + r.Tools = raw.Tools + r.Type = raw.Type + return nil +} + +func (r *MCPReloadConfig) UnmarshalJSON(data []byte) error { + type rawMCPReloadConfig struct { + ActiveGitHubToken *string `json:"activeGitHubToken,omitempty"` + CLIEnabledServers []string `json:"cliEnabledServers,omitzero"` + ConfigFilter any `json:"configFilter,omitempty"` + DisabledServers []string `json:"disabledServers,omitzero"` + EnabledServers []string `json:"enabledServers,omitzero"` + ForceRestart *bool `json:"forceRestart,omitempty"` + GitHubMCPToolOptions any `json:"githubMcpToolOptions,omitempty"` + GitHubMCPUserOverride *bool `json:"githubMcpUserOverride,omitempty"` + IncludeWorkspaceSources *bool `json:"includeWorkspaceSources,omitempty"` + Mcp3pEnabled *bool `json:"mcp3pEnabled,omitempty"` + MCPServers map[string]json.RawMessage `json:"mcpServers"` + SecretStore any `json:"secretStore,omitempty"` + UseCachedToolSnapshots *bool `json:"useCachedToolSnapshots,omitempty"` + } + var raw rawMCPReloadConfig + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + r.ActiveGitHubToken = raw.ActiveGitHubToken + r.CLIEnabledServers = raw.CLIEnabledServers + r.ConfigFilter = raw.ConfigFilter + r.DisabledServers = raw.DisabledServers + r.EnabledServers = raw.EnabledServers + r.ForceRestart = raw.ForceRestart + r.GitHubMCPToolOptions = raw.GitHubMCPToolOptions + r.GitHubMCPUserOverride = raw.GitHubMCPUserOverride + r.IncludeWorkspaceSources = raw.IncludeWorkspaceSources + r.Mcp3pEnabled = raw.Mcp3pEnabled + if raw.MCPServers != nil { + r.MCPServers = make(map[string]MCPServerConfig, len(raw.MCPServers)) + for key, rawValue := range raw.MCPServers { + value, err := unmarshalMCPServerConfig(rawValue) + if err != nil { + return err + } + r.MCPServers[key] = value + } + } + r.SecretStore = raw.SecretStore + r.UseCachedToolSnapshots = raw.UseCachedToolSnapshots + return nil +} + func (r *MCPRestartServerRequest) UnmarshalJSON(data []byte) error { type rawMCPRestartServerRequest struct { Config json.RawMessage `json:"config,omitempty"` @@ -1726,7 +2131,7 @@ func (r *MCPRestartServerRequest) UnmarshalJSON(data []byte) error { return err } if raw.Config != nil { - value, err := unmarshalMCPServerConfig(raw.Config) + value, err := unmarshalMCPSerializableServerConfig(raw.Config) if err != nil { return err } @@ -1746,7 +2151,7 @@ func (r *MCPStartServerRequest) UnmarshalJSON(data []byte) error { return err } if raw.Config != nil { - value, err := unmarshalMCPServerConfig(raw.Config) + value, err := unmarshalMCPSerializableServerConfig(raw.Config) if err != nil { return err } @@ -1911,6 +2316,12 @@ func unmarshalUserToolSessionApproval(data []byte) (UserToolSessionApproval, err return nil, err } return &d, nil + case UserToolSessionApprovalKindExtensionEnvAccess: + var d UserToolSessionApprovalExtensionEnvAccess + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil case UserToolSessionApprovalKindExtensionManagement: var d UserToolSessionApprovalExtensionManagement if err := json.Unmarshal(data, &d); err != nil { @@ -1991,6 +2402,17 @@ func (r UserToolSessionApprovalCustomTool) MarshalJSON() ([]byte, error) { }) } +func (r UserToolSessionApprovalExtensionEnvAccess) MarshalJSON() ([]byte, error) { + type alias UserToolSessionApprovalExtensionEnvAccess + return json.Marshal(struct { + Kind UserToolSessionApprovalKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + func (r UserToolSessionApprovalExtensionManagement) MarshalJSON() ([]byte, error) { type alias UserToolSessionApprovalExtensionManagement return json.Marshal(struct { @@ -2153,6 +2575,12 @@ func unmarshalPermissionDecisionApproveForLocationApproval(data []byte) (Permiss return nil, err } return &d, nil + case PermissionDecisionApproveForLocationApprovalKindExtensionEnvAccess: + var d PermissionDecisionApproveForLocationApprovalExtensionEnvAccess + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil case PermissionDecisionApproveForLocationApprovalKindExtensionManagement: var d PermissionDecisionApproveForLocationApprovalExtensionManagement if err := json.Unmarshal(data, &d); err != nil { @@ -2239,6 +2667,17 @@ func (r PermissionDecisionApproveForLocationApprovalCustomTool) MarshalJSON() ([ }) } +func (r PermissionDecisionApproveForLocationApprovalExtensionEnvAccess) MarshalJSON() ([]byte, error) { + type alias PermissionDecisionApproveForLocationApprovalExtensionEnvAccess + return json.Marshal(struct { + Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + func (r PermissionDecisionApproveForLocationApprovalExtensionManagement) MarshalJSON() ([]byte, error) { type alias PermissionDecisionApproveForLocationApprovalExtensionManagement return json.Marshal(struct { @@ -2383,6 +2822,12 @@ func unmarshalPermissionDecisionApproveForSessionApproval(data []byte) (Permissi return nil, err } return &d, nil + case PermissionDecisionApproveForSessionApprovalKindExtensionEnvAccess: + var d PermissionDecisionApproveForSessionApprovalExtensionEnvAccess + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil case PermissionDecisionApproveForSessionApprovalKindExtensionManagement: var d PermissionDecisionApproveForSessionApprovalExtensionManagement if err := json.Unmarshal(data, &d); err != nil { @@ -2469,6 +2914,17 @@ func (r PermissionDecisionApproveForSessionApprovalCustomTool) MarshalJSON() ([] }) } +func (r PermissionDecisionApproveForSessionApprovalExtensionEnvAccess) MarshalJSON() ([]byte, error) { + type alias PermissionDecisionApproveForSessionApprovalExtensionEnvAccess + return json.Marshal(struct { + Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + func (r PermissionDecisionApproveForSessionApprovalExtensionManagement) MarshalJSON() ([]byte, error) { type alias PermissionDecisionApproveForSessionApprovalExtensionManagement return json.Marshal(struct { @@ -2745,6 +3201,12 @@ func unmarshalPermissionsLocationsAddToolApprovalDetails(data []byte) (Permissio return nil, err } return &d, nil + case PermissionsLocationsAddToolApprovalDetailsKindExtensionEnvAccess: + var d PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil case PermissionsLocationsAddToolApprovalDetailsKindExtensionManagement: var d PermissionsLocationsAddToolApprovalDetailsExtensionManagement if err := json.Unmarshal(data, &d); err != nil { @@ -2831,6 +3293,17 @@ func (r PermissionsLocationsAddToolApprovalDetailsCustomTool) MarshalJSON() ([]b }) } +func (r PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess) MarshalJSON() ([]byte, error) { + type alias PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess + return json.Marshal(struct { + Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + func (r PermissionsLocationsAddToolApprovalDetailsExtensionManagement) MarshalJSON() ([]byte, error) { type alias PermissionsLocationsAddToolApprovalDetailsExtensionManagement return json.Marshal(struct { @@ -3520,6 +3993,192 @@ func (r *SendRequest) UnmarshalJSON(data []byte) error { return nil } +func unmarshalSessionAuthInfoResult(data []byte) (SessionAuthInfoResult, error) { + if string(data) == "null" { + return nil, nil + } + type rawUnion struct { + Type SessionAuthInfoResultType `json:"type"` + } + var raw rawUnion + if err := json.Unmarshal(data, &raw); err != nil { + return nil, err + } + + switch raw.Type { + case SessionAuthInfoResultTypeAPIKey: + var d APIKeyAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SessionAuthInfoResultTypeCopilotAPIToken: + var d CopilotAPITokenAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SessionAuthInfoResultTypeEnv: + var d EnvAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SessionAuthInfoResultTypeGhCLI: + var d GhCLIAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SessionAuthInfoResultTypeHMAC: + var d HMACAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SessionAuthInfoResultTypeToken: + var d TokenAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SessionAuthInfoResultTypeUser: + var d UserAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + default: + return &RawSessionAuthInfoResultData{Discriminator: raw.Type, Raw: data}, nil + } +} + +func (r RawSessionAuthInfoResultData) MarshalJSON() ([]byte, error) { + if r.Raw != nil { + return r.Raw, nil + } + return json.Marshal(struct { + Type SessionAuthInfoResultType `json:"type"` + }{ + Type: r.Discriminator, + }) +} + +func (r APIKeyAuthInfo) MarshalJSON() ([]byte, error) { + type alias APIKeyAuthInfo + return json.Marshal(struct { + Type SessionAuthInfoResultType `json:"type"` + alias + }{ + Type: r.sessionAuthInfoResultType(), + alias: alias(r), + }) +} + +func (r CopilotAPITokenAuthInfo) MarshalJSON() ([]byte, error) { + type alias CopilotAPITokenAuthInfo + return json.Marshal(struct { + Type SessionAuthInfoResultType `json:"type"` + alias + }{ + Type: r.sessionAuthInfoResultType(), + alias: alias(r), + }) +} + +func (r EnvAuthInfo) MarshalJSON() ([]byte, error) { + type alias EnvAuthInfo + return json.Marshal(struct { + Type SessionAuthInfoResultType `json:"type"` + alias + }{ + Type: r.sessionAuthInfoResultType(), + alias: alias(r), + }) +} + +func (r GhCLIAuthInfo) MarshalJSON() ([]byte, error) { + type alias GhCLIAuthInfo + return json.Marshal(struct { + Type SessionAuthInfoResultType `json:"type"` + alias + }{ + Type: r.sessionAuthInfoResultType(), + alias: alias(r), + }) +} + +func (r HMACAuthInfo) MarshalJSON() ([]byte, error) { + type alias HMACAuthInfo + return json.Marshal(struct { + Type SessionAuthInfoResultType `json:"type"` + alias + }{ + Type: r.sessionAuthInfoResultType(), + alias: alias(r), + }) +} + +func (r TokenAuthInfo) MarshalJSON() ([]byte, error) { + type alias TokenAuthInfo + return json.Marshal(struct { + Type SessionAuthInfoResultType `json:"type"` + alias + }{ + Type: r.sessionAuthInfoResultType(), + alias: alias(r), + }) +} + +func (r UserAuthInfo) MarshalJSON() ([]byte, error) { + type alias UserAuthInfo + return json.Marshal(struct { + Type SessionAuthInfoResultType `json:"type"` + alias + }{ + Type: r.sessionAuthInfoResultType(), + alias: alias(r), + }) +} + +func (r *SessionAuthLogoutUserRequest) UnmarshalJSON(data []byte) error { + type rawSessionAuthLogoutUserRequest struct { + AuthInfo json.RawMessage `json:"authInfo"` + } + var raw rawSessionAuthLogoutUserRequest + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw.AuthInfo != nil { + value, err := unmarshalAuthInfo(raw.AuthInfo) + if err != nil { + return err + } + r.AuthInfo = value + } + return nil +} + +func (r *SessionAuthSwitchRequest) UnmarshalJSON(data []byte) error { + type rawSessionAuthSwitchRequest struct { + AuthInfo json.RawMessage `json:"authInfo"` + Token *string `json:"token,omitempty"` + } + var raw rawSessionAuthSwitchRequest + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw.AuthInfo != nil { + value, err := unmarshalAuthInfo(raw.AuthInfo) + if err != nil { + return err + } + r.AuthInfo = value + } + r.Token = raw.Token + return nil +} + func (r SessionInstalledPluginSource) MarshalJSON() ([]byte, error) { if r.SessionInstalledPluginSourceGitHub != nil { return json.Marshal(r.SessionInstalledPluginSourceGitHub) @@ -4652,6 +5311,7 @@ func (r *UIElicitationResponse) UnmarshalJSON(data []byte) error { type rawUIElicitationResponse struct { Action UIElicitationResponseAction `json:"action"` Content map[string]json.RawMessage `json:"content,omitzero"` + Meta map[string]any `json:"_meta,omitzero"` } var raw rawUIElicitationResponse if err := json.Unmarshal(data, &raw); err != nil { @@ -4668,5 +5328,6 @@ func (r *UIElicitationResponse) UnmarshalJSON(data []byte) error { r.Content[key] = value } } + r.Meta = raw.Meta return nil } diff --git a/go/rpc/zsession_encoding.go b/go/rpc/zsession_encoding.go index 05e466012..206255fbc 100644 --- a/go/rpc/zsession_encoding.go +++ b/go/rpc/zsession_encoding.go @@ -41,6 +41,12 @@ func (e *SessionEvent) UnmarshalJSON(data []byte) error { return err } e.Data = &d + case SessionEventTypeAgentInterrupted: + var d AgentInterruptedData + if err := json.Unmarshal(raw.Data, &d); err != nil { + return err + } + e.Data = &d case SessionEventTypeAssistantIdle: var d AssistantIdleData if err := json.Unmarshal(raw.Data, &d); err != nil { @@ -317,6 +323,12 @@ func (e *SessionEvent) UnmarshalJSON(data []byte) error { return err } e.Data = &d + case SessionEventTypeSandboxDecision: + var d SandboxDecisionData + if err := json.Unmarshal(raw.Data, &d); err != nil { + return err + } + e.Data = &d case SessionEventTypeSessionAutoModeResolved: var d SessionAutoModeResolvedData if err := json.Unmarshal(raw.Data, &d); err != nil { @@ -1537,6 +1549,12 @@ func unmarshalPermissionRequest(data []byte) (PermissionRequest, error) { return nil, err } return &d, nil + case PermissionRequestKindExtensionEnvAccess: + var d PermissionRequestExtensionEnvAccess + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil case PermissionRequestKindExtensionManagement: var d PermissionRequestExtensionManagement if err := json.Unmarshal(data, &d); err != nil { @@ -1624,6 +1642,17 @@ func (r PermissionRequestCustomTool) MarshalJSON() ([]byte, error) { }) } +func (r PermissionRequestExtensionEnvAccess) MarshalJSON() ([]byte, error) { + type alias PermissionRequestExtensionEnvAccess + return json.Marshal(struct { + Kind PermissionRequestKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + func (r PermissionRequestExtensionManagement) MarshalJSON() ([]byte, error) { type alias PermissionRequestExtensionManagement return json.Marshal(struct { @@ -1759,6 +1788,12 @@ func unmarshalPermissionPromptRequest(data []byte) (PermissionPromptRequest, err return nil, err } return &d, nil + case PermissionPromptRequestKindExtensionEnvAccess: + var d PermissionPromptRequestExtensionEnvAccess + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil case PermissionPromptRequestKindExtensionManagement: var d PermissionPromptRequestExtensionManagement if err := json.Unmarshal(data, &d); err != nil { @@ -1857,6 +1892,17 @@ func (r PermissionPromptRequestCustomTool) MarshalJSON() ([]byte, error) { }) } +func (r PermissionPromptRequestExtensionEnvAccess) MarshalJSON() ([]byte, error) { + type alias PermissionPromptRequestExtensionEnvAccess + return json.Marshal(struct { + Kind PermissionPromptRequestKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + func (r PermissionPromptRequestExtensionManagement) MarshalJSON() ([]byte, error) { type alias PermissionPromptRequestExtensionManagement return json.Marshal(struct { diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go index 05c8fd548..5faf38c94 100644 --- a/go/rpc/zsession_events.go +++ b/go/rpc/zsession_events.go @@ -54,6 +54,7 @@ type SessionEventType string const ( SessionEventTypeAbort SessionEventType = "abort" + SessionEventTypeAgentInterrupted SessionEventType = "agent.interrupted" SessionEventTypeAssistantIdle SessionEventType = "assistant.idle" SessionEventTypeAssistantIntent SessionEventType = "assistant.intent" SessionEventTypeAssistantMessage SessionEventType = "assistant.message" @@ -102,6 +103,7 @@ const ( SessionEventTypePermissionRequested SessionEventType = "permission.requested" SessionEventTypeSamplingCompleted SessionEventType = "sampling.completed" SessionEventTypeSamplingRequested SessionEventType = "sampling.requested" + SessionEventTypeSandboxDecision SessionEventType = "sandbox.decision" // Experimental: SessionEventTypeSessionAutoModeResolved identifies an experimental event // that may change or be removed. SessionEventTypeSessionAutoModeResolved SessionEventType = "session.auto_mode_resolved" @@ -218,7 +220,8 @@ type AssistantReasoningData struct { Content string `json:"content"` // Unique identifier for this reasoning block ReasoningID string `json:"reasoningId"` - Rte *bool `json:"rte,omitempty"` + // Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. + Rte *bool `json:"rte,omitempty"` } func (*AssistantReasoningData) sessionEventData() {} @@ -262,7 +265,8 @@ type AssistantMessageData struct { ReasoningWireField *string `json:"reasoningWireField,omitempty"` // GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs RequestID *string `json:"requestId,omitempty"` - Rte *bool `json:"rte,omitempty"` + // Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. + Rte *bool `json:"rte,omitempty"` // Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping ServerTools *AssistantMessageServerTools `json:"serverTools,omitempty"` // Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation @@ -681,8 +685,9 @@ func (*SessionManagedSettingsResolvedData) Type() SessionEventType { // Experimental: FactoryRunUpdatedData is part of an experimental API and may change or be removed. type FactoryRunUpdatedData struct { // Monotonic revision now available for the run. - Revision int64 `json:"revision"` - RunID string `json:"runId"` + Revision int64 `json:"revision"` + // Factory run identifier. + RunID string `json:"runId"` } func (*FactoryRunUpdatedData) sessionEventData() {} @@ -799,7 +804,8 @@ type ModelCallFailureData struct { ReasoningEffort *string `json:"reasoningEffort,omitempty"` // Content-free structural summary of the failing request. Contains only counts and shape flags (no prompt content), so it is safe for unrestricted telemetry. Populated only for client-error (4xx) failures. RequestFingerprint *ModelCallFailureRequestFingerprint `json:"requestFingerprint,omitempty"` - Rte *bool `json:"rte,omitempty"` + // Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. + Rte *bool `json:"rte,omitempty"` // Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation ServiceRequestID *string `json:"serviceRequestId,omitempty"` // Where the failed model call originated @@ -860,6 +866,8 @@ func (*SessionInfoData) Type() SessionEventType { return SessionEventTypeSession // LLM API call usage metrics including tokens, costs, quotas, and billing information type AssistantUsageData struct { + // Number of accepted speculative prediction tokens + AcceptedPredictionTokens *int64 `json:"acceptedPredictionTokens,omitempty"` // Completion ID from the model provider (e.g., chatcmpl-abc123) APICallID *string `json:"apiCallId,omitempty"` // API endpoint used for this model call, matching CAPI supported_endpoints vocabulary @@ -892,6 +900,14 @@ type AssistantUsageData struct { InteractionType *string `json:"interactionType,omitempty"` // Average inter-token latency in milliseconds. Only available for streaming requests InterTokenLatencyMs *float64 `json:"interTokenLatencyMs,omitempty"` + // Whether Auto mode was selected for this model call + IsAuto *bool `json:"isAuto,omitempty"` + // Whether this model call used a bring-your-own-key provider + IsByok *bool `json:"isByok,omitempty"` + // Requested maximum output tokens used for this model call + MaxOutputTokens *int64 `json:"maxOutputTokens,omitempty"` + // Effective maximum prompt-token limit used for this model call + MaxPromptTokens *int64 `json:"maxPromptTokens,omitempty"` // Model identifier used for this API call Model string `json:"model"` // Number of tool calls returned by the model @@ -909,9 +925,14 @@ type AssistantUsageData struct { QuotaSnapshots map[string]AssistantUsageQuotaSnapshot `json:"quotaSnapshots,omitzero"` // Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max") ReasoningEffort *string `json:"reasoningEffort,omitempty"` + // Reasoning summary mode used for this model call, if applicable + ReasoningSummary *ReasoningSummary `json:"reasoningSummary,omitempty"` // Number of output tokens used for reasoning (e.g., chain-of-thought) ReasoningTokens *int64 `json:"reasoningTokens,omitempty"` - Rte *bool `json:"rte,omitempty"` + // Number of rejected speculative prediction tokens + RejectedPredictionTokens *int64 `json:"rejectedPredictionTokens,omitempty"` + // Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. + Rte *bool `json:"rte,omitempty"` // Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation ServiceRequestID *string `json:"serviceRequestId,omitempty"` // Time to first token in milliseconds. Only available for streaming requests @@ -922,6 +943,8 @@ type AssistantUsageData struct { // Number of tokens used by tool definitions for this call // Internal: ToolTokenCount is part of the SDK's internal API surface and is not intended for external use. ToolTokenCount *int64 `json:"toolTokenCount,omitempty"` + // Transport used for this model call (http or websocket) + Transport *AssistantUsageTransport `json:"transport,omitempty"` } func (*AssistantUsageData) sessionEventData() {} @@ -1004,6 +1027,39 @@ type AssistantTurnRetryData struct { func (*AssistantTurnRetryData) sessionEventData() {} func (*AssistantTurnRetryData) Type() SessionEventType { return SessionEventTypeAssistantTurnRetry } +// Metadata for work the user interrupted while the agent was running +type AgentInterruptedData struct { + // What the agent was doing when the user interrupted it + Activity AgentInterruptedActivity `json:"activity"` + // For an interrupted model call: the provider endpoint the request targeted + APIEndpoint *string `json:"apiEndpoint,omitempty"` + // For an interrupted model call: whether the user interrupted before any token arrived or while the response was streaming + CancelPhase *AgentInterruptedCancelPhase `json:"cancelPhase,omitempty"` + // How long the interrupted work had been running, in milliseconds + ElapsedMs float64 `json:"elapsedMs"` + // For an interrupted background-agent batch: how many background sub-agents the stop swept. Counts accepted cancellations, so an agent cancelled as a cascade of its interrupted parent is covered by that parent rather than counted again. + InterruptedAgentCount *int64 `json:"interruptedAgentCount,omitempty"` + // For an interrupted model call: the model the request targeted + Model *string `json:"model,omitempty"` + // For a mid-stream interrupt: the observed time to first observable output, in milliseconds. Deliberately distinct from the `ttftMs` reported on a successful model call, which measures time to first stream event. + OutputTtftMs *float64 `json:"outputTtftMs,omitempty"` + // For an interrupted model call: the reasoning effort the request asked for + ReasoningEffort *string `json:"reasoningEffort,omitempty"` + // Subset of `toolNames` whose tool metadata marks the tool name as safe to record unhashed in telemetry. + SafeToolNames []string `json:"safeToolNames,omitzero"` + // Tool call identifiers that were still running + ToolCallIDs []string `json:"toolCallIds,omitzero"` + // Names of the tools that were still running. More than one when the model requested a parallel fan-out. + ToolNames []string `json:"toolNames,omitzero"` + // For an interrupted model call: the transport the request used + Transport *ModelCallFailureTransport `json:"transport,omitempty"` + // Zero-based agentic-loop iteration the interrupt landed in + Turn int64 `json:"turn"` +} + +func (*AgentInterruptedData) sessionEventData() {} +func (*AgentInterruptedData) Type() SessionEventType { return SessionEventTypeAgentInterrupted } + // Model API dispatch metadata for internal telemetry type ModelCallStartData struct { // Model identifier used for this API call, when known @@ -1038,6 +1094,8 @@ type SessionModelChangeData struct { ReasoningEffort *string `json:"reasoningEffort,omitempty"` // Reasoning summary mode after the model change, if applicable ReasoningSummary *ReasoningSummary `json:"reasoningSummary,omitempty"` + // Origin of the effective model change, when known. + Source *ModelChangeSource `json:"source,omitempty"` // Output verbosity level after the model change, if applicable Verbosity *Verbosity `json:"verbosity,omitempty"` } @@ -1147,6 +1205,13 @@ type SessionIdleData struct { func (*SessionIdleData) sessionEventData() {} func (*SessionIdleData) Type() SessionEventType { return SessionEventTypeSessionIdle } +// Payload of `sandbox.decision`, a bounded governance record of what the process sandbox was configured to do and whether it took effect. Discriminated by `kind`. +type SandboxDecisionData struct { +} + +func (*SandboxDecisionData) sessionEventData() {} +func (*SandboxDecisionData) Type() SessionEventType { return SessionEventTypeSandboxDecision } + // Payload of `session.canvas.closed` with the closed canvas instance ID, provider ID, and canvas ID. // Experimental: SessionCanvasClosedData is part of an experimental API and may change or be removed. type SessionCanvasClosedData struct { @@ -1373,6 +1438,8 @@ func (*ToolSearchActivatedData) Type() SessionEventType { return SessionEventTyp type ExitPlanModeRequestedData struct { // Available actions the user can take Actions []ExitPlanModeAction `json:"actions"` + // Model the session had selected when the plan was authored, when one is known + Model *string `json:"model,omitempty"` // Full content of the plan file PlanContent string `json:"planContent"` // Recommended action to preselect for the user @@ -2002,7 +2069,8 @@ type ToolExecutionCompleteData struct { ParentToolCallID *string `json:"parentToolCallId,omitempty"` // Tool execution result on success Result *ToolExecutionCompleteResult `json:"result,omitempty"` - Rte *bool `json:"rte,omitempty"` + // Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. + Rte *bool `json:"rte,omitempty"` // Whether this tool execution ran inside a sandbox container Sandboxed *bool `json:"sandboxed,omitempty"` // Whether the tool execution completed successfully @@ -2050,7 +2118,8 @@ type ToolExecutionStartData struct { // Tool call ID of the parent tool invocation when this event originates from a sub-agent // Deprecated: ParentToolCallID is deprecated. ParentToolCallID *string `json:"parentToolCallId,omitempty"` - Rte *bool `json:"rte,omitempty"` + // Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. + Rte *bool `json:"rte,omitempty"` // Shell-tool path hints derived from the command at start time for shell tools (bash/powershell/local_shell). Produced by the same shell-aware extractor as PermissionRequestShell.possiblePaths, so it is present even when the command is auto-approved and no permission request fires. Absent for non-shell tools. ShellToolInfo *ToolExecutionStartShellToolInfo `json:"shellToolInfo,omitempty"` // Unique identifier for this tool call @@ -2214,11 +2283,16 @@ func (*SessionWorkspaceFileChangedData) Type() SessionEventType { // Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping // Experimental: AssistantMessageServerTools is part of an experimental API and may change or be removed. type AssistantMessageServerTools struct { - AdvisorModel *string `json:"advisorModel,omitempty"` + // Advisor model identifier associated with the server-tool payload. + AdvisorModel *string `json:"advisorModel,omitempty"` + // Provider function-call namespaces keyed by function-call identifier. FunctionCallNamespaces map[string]string `json:"functionCallNamespaces,omitzero"` - Items []any `json:"items,omitzero"` - Provider string `json:"provider"` - RawContentBlocks []any `json:"rawContentBlocks,omitzero"` + // Provider-native server-tool call and output items preserved verbatim for replay. + Items []any `json:"items,omitzero"` + // Model provider that produced this server-tool payload. + Provider string `json:"provider"` + // Raw provider content blocks retained for verbatim round-tripping. + RawContentBlocks []any `json:"rawContentBlocks,omitzero"` } // A tool invocation request from the assistant @@ -2763,6 +2837,24 @@ func (PermissionPromptRequestCustomTool) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindCustomTool } +// Extension sensitive environment variable access prompt +type PermissionPromptRequestExtensionEnvAccess struct { + // Auto-approval judge information for this request; present only when auto mode is enabled. + // Experimental: AutoApproval is part of an experimental API and may change or be removed. + AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` + // Names of the sensitive environment variables the extension is requesting. Values never appear here. + EnvironmentVariables []string `json:"environmentVariables"` + // Name of the extension requesting environment variable access + ExtensionName string `json:"extensionName"` + // Tool call ID that triggered this permission request + ToolCallID *string `json:"toolCallId,omitempty"` +} + +func (PermissionPromptRequestExtensionEnvAccess) permissionPromptRequest() {} +func (PermissionPromptRequestExtensionEnvAccess) Kind() PermissionPromptRequestKind { + return PermissionPromptRequestKindExtensionEnvAccess +} + // Extension management permission prompt type PermissionPromptRequestExtensionManagement struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2807,11 +2899,15 @@ type PermissionPromptRequestFactory struct { // Experimental: AutoApproval is part of an experimental API and may change or be removed. AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` // Whether this factory is eligible for persistent approval - CanPersistApproval bool `json:"canPersistApproval"` - DeclaredMaxAiCredits *float64 `json:"declaredMaxAiCredits,omitempty"` - DeclaredMaxConcurrentSubagents *int64 `json:"declaredMaxConcurrentSubagents,omitempty"` - DeclaredMaxTotalSubagents *int64 `json:"declaredMaxTotalSubagents,omitempty"` - DeclaredTimeoutSeconds *float64 `json:"declaredTimeoutSeconds,omitempty"` + CanPersistApproval bool `json:"canPersistApproval"` + // Factory-declared AI-credit limit before any run/resume caller override is applied. + DeclaredMaxAiCredits *float64 `json:"declaredMaxAiCredits,omitempty"` + // Factory-declared concurrent-subagent limit before any run/resume caller override is applied. + DeclaredMaxConcurrentSubagents *int64 `json:"declaredMaxConcurrentSubagents,omitempty"` + // Factory-declared total-subagent limit before any run/resume caller override is applied. + DeclaredMaxTotalSubagents *int64 `json:"declaredMaxTotalSubagents,omitempty"` + // Factory-declared active-time limit in seconds before any run/resume caller override is applied. + DeclaredTimeoutSeconds *float64 `json:"declaredTimeoutSeconds,omitempty"` // Factory description Description string `json:"description"` // Whether managed policy requires a human response and forbids host auto-approval @@ -2866,6 +2962,9 @@ type PermissionPromptRequestMCP struct { // Auto-approval judge information for this request; present only when auto mode is enabled. // Experimental: AutoApproval is part of an experimental API and may change or be removed. AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` + // Advisory runtime permission recommendation. The host remains responsible for deciding the request and may reject it. + // Experimental: PermissionRecommendation is part of an experimental API and may change or be removed. + PermissionRecommendation *PermissionRecommendation `json:"permissionRecommendation,omitempty"` // Name of the MCP server providing the tool ServerName string `json:"serverName"` // Tool call ID that triggered this permission request @@ -3033,6 +3132,21 @@ func (PermissionRequestCustomTool) Kind() PermissionRequestKind { return PermissionRequestKindCustomTool } +// Extension sensitive environment variable access request +type PermissionRequestExtensionEnvAccess struct { + // Names of the sensitive environment variables the extension is requesting. Values never appear here. + EnvironmentVariables []string `json:"environmentVariables"` + // Name of the extension requesting environment variable access + ExtensionName string `json:"extensionName"` + // Tool call ID that triggered this permission request + ToolCallID *string `json:"toolCallId,omitempty"` +} + +func (PermissionRequestExtensionEnvAccess) permissionRequest() {} +func (PermissionRequestExtensionEnvAccess) Kind() PermissionRequestKind { + return PermissionRequestKindExtensionEnvAccess +} + // Extension management permission request type PermissionRequestExtensionManagement struct { // Name of the extension being managed @@ -3072,11 +3186,15 @@ type PermissionRequestFactory struct { // Canonical key used for scoped factory approvals ApprovalKey string `json:"approvalKey"` // Whether this factory is eligible for persistent approval - CanPersistApproval bool `json:"canPersistApproval"` - DeclaredMaxAiCredits *float64 `json:"declaredMaxAiCredits,omitempty"` - DeclaredMaxConcurrentSubagents *int64 `json:"declaredMaxConcurrentSubagents,omitempty"` - DeclaredMaxTotalSubagents *int64 `json:"declaredMaxTotalSubagents,omitempty"` - DeclaredTimeoutSeconds *float64 `json:"declaredTimeoutSeconds,omitempty"` + CanPersistApproval bool `json:"canPersistApproval"` + // Factory-declared AI-credit limit before any run/resume caller override is applied. + DeclaredMaxAiCredits *float64 `json:"declaredMaxAiCredits,omitempty"` + // Factory-declared concurrent-subagent limit before any run/resume caller override is applied. + DeclaredMaxConcurrentSubagents *int64 `json:"declaredMaxConcurrentSubagents,omitempty"` + // Factory-declared total-subagent limit before any run/resume caller override is applied. + DeclaredMaxTotalSubagents *int64 `json:"declaredMaxTotalSubagents,omitempty"` + // Factory-declared active-time limit in seconds before any run/resume caller override is applied. + DeclaredTimeoutSeconds *float64 `json:"declaredTimeoutSeconds,omitempty"` // Factory description Description string `json:"description"` // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. @@ -3129,6 +3247,9 @@ type PermissionRequestMCP struct { Args any `json:"args,omitempty"` // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` + // Advisory runtime permission recommendation. The SDK host remains responsible for deciding the request and may reject it. + // Experimental: PermissionRecommendation is part of an experimental API and may change or be removed. + PermissionRecommendation *PermissionRecommendation `json:"permissionRecommendation,omitempty"` // Whether this MCP tool is read-only (no side effects) ReadOnly bool `json:"readOnly"` // Name of the MCP server providing the tool @@ -3617,12 +3738,14 @@ func (r RawSystemNotification) Type() SystemNotificationType { // System notification metadata for a background agent that completed or failed, including agent ID, type, status, description, and prompt. type SystemNotificationAgentCompleted struct { - // Unique identifier of the background agent + // Unique task identifier AgentID string `json:"agentId"` // Type of the agent (e.g., explore, task, general-purpose) AgentType string `json:"agentType"` // Human-readable description of the agent task Description *string `json:"description,omitempty"` + // Friendly, non-unique name intended for display + DisplayName *string `json:"displayName,omitempty"` // The full prompt given to the background agent Prompt *string `json:"prompt,omitempty"` // Whether the agent completed successfully or failed @@ -3636,12 +3759,14 @@ func (SystemNotificationAgentCompleted) Type() SystemNotificationType { // System notification metadata for a background agent that became idle, including agent ID, type, and description. type SystemNotificationAgentIdle struct { - // Unique identifier of the background agent + // Unique task identifier AgentID string `json:"agentId"` // Type of the agent (e.g., explore, task, general-purpose) AgentType string `json:"agentType"` // Human-readable description of the agent task Description *string `json:"description,omitempty"` + // Friendly, non-unique name intended for display + DisplayName *string `json:"displayName,omitempty"` } func (SystemNotificationAgentIdle) systemNotification() {} @@ -3968,18 +4093,24 @@ type ToolExecutionCompleteUIResourceMeta struct { // MCP Apps UI resource metadata for a completed tool result, including CSP, permissions, domain, and border preference. type ToolExecutionCompleteUIResourceMetaUI struct { // CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. - Csp *ToolExecutionCompleteUIResourceMetaUICsp `json:"csp,omitempty"` - Domain *string `json:"domain,omitempty"` + Csp *ToolExecutionCompleteUIResourceMetaUICsp `json:"csp,omitempty"` + // Optional dedicated origin for the rendered MCP Apps UI resource. + Domain *string `json:"domain,omitempty"` // Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. - Permissions *ToolExecutionCompleteUIResourceMetaUIPermissions `json:"permissions,omitempty"` - PrefersBorder *bool `json:"prefersBorder,omitempty"` + Permissions *ToolExecutionCompleteUIResourceMetaUIPermissions `json:"permissions,omitempty"` + // Whether the host should render a border around the MCP Apps UI resource. + PrefersBorder *bool `json:"prefersBorder,omitempty"` } // CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. type ToolExecutionCompleteUIResourceMetaUICsp struct { - BaseURIDomains []string `json:"baseUriDomains,omitzero"` - ConnectDomains []string `json:"connectDomains,omitzero"` - FrameDomains []string `json:"frameDomains,omitzero"` + // Domains the UI resource may use as document base URIs. + BaseURIDomains []string `json:"baseUriDomains,omitzero"` + // Domains the UI resource may connect to. + ConnectDomains []string `json:"connectDomains,omitzero"` + // Domains the UI resource may embed as nested frames. + FrameDomains []string `json:"frameDomains,omitzero"` + // Domains from which the UI resource may load scripts, styles, images, and other resources. ResourceDomains []string `json:"resourceDomains,omitzero"` } @@ -4080,6 +4211,30 @@ type WorkingDirectoryContext struct { RepositoryHost *string `json:"repositoryHost,omitempty"` } +// What the agent was doing when the user interrupted it. +type AgentInterruptedActivity string + +const ( + // Background sub-agents were running while the main loop was idle. + AgentInterruptedActivityBackgroundAgent AgentInterruptedActivity = "background_agent" + // A request to the model was open. + AgentInterruptedActivityModelCall AgentInterruptedActivity = "model_call" + // The turn was sleeping between retry attempts. + AgentInterruptedActivityRetryBackoff AgentInterruptedActivity = "retry_backoff" + // One or more tools were executing. + AgentInterruptedActivityToolCall AgentInterruptedActivity = "tool_call" +) + +// Where the interruption landed relative to the first streamed token. +type AgentInterruptedCancelPhase string + +const ( + // The response was already streaming when the request was cancelled. + AgentInterruptedCancelPhaseMidStream AgentInterruptedCancelPhase = "mid_stream" + // No output had been produced when the request was cancelled. + AgentInterruptedCancelPhasePreFirstToken AgentInterruptedCancelPhase = "pre_first_token" +) + // Tool call type: "function" for standard tool calls, "custom" for grammar-based tool calls. Defaults to "function" when absent. type AssistantMessageToolRequestType string @@ -4104,6 +4259,16 @@ const ( AssistantUsageAPIEndpointWsResponses AssistantUsageAPIEndpoint = "ws:/responses" ) +// Transport used for a successful model call +type AssistantUsageTransport string + +const ( + // HTTP transport, including SSE streams. + AssistantUsageTransportHTTP AssistantUsageTransport = "http" + // WebSocket transport. + AssistantUsageTransportWebsocket AssistantUsageTransport = "websocket" +) + // Why the auto-approval judge produced no usable recommendation. Present only alongside an `error` recommendation, where the human-readable reason is a fixed string and therefore cannot distinguish these cases. Intended to make a judge failure reportable by a consumer that has no access to the host's logs. // Experimental: AutoApprovalJudgeFailureReason is part of an experimental API and may change or be removed. type AutoApprovalJudgeFailureReason string @@ -4516,6 +4681,7 @@ type PermissionPromptRequestKind string const ( PermissionPromptRequestKindCommands PermissionPromptRequestKind = "commands" PermissionPromptRequestKindCustomTool PermissionPromptRequestKind = "custom-tool" + PermissionPromptRequestKindExtensionEnvAccess PermissionPromptRequestKind = "extension-env-access" PermissionPromptRequestKindExtensionManagement PermissionPromptRequestKind = "extension-management" PermissionPromptRequestKindExtensionPermissionAccess PermissionPromptRequestKind = "extension-permission-access" PermissionPromptRequestKindFactory PermissionPromptRequestKind = "factory" @@ -4540,11 +4706,21 @@ const ( PermissionPromptRequestPathAccessKindWrite PermissionPromptRequestPathAccessKind = "write" ) +// Advisory recommendation the runtime attaches to a permission request whose origin it can vouch for by construction. Unlike the auto-approval judge this does not depend on auto mode and does not evaluate what the tool call does; its absence simply means the runtime has no opinion and the request follows the host's normal approval flow. +// Experimental: PermissionRecommendation is part of an experimental API and may change or be removed. +type PermissionRecommendation string + +const ( + // The runtime vouches for the request's origin and recommends approving it without prompting. The host still owns the decision and may deny it; deny rules, managed policy, and the auto-approval safety judge all outrank this recommendation. + PermissionRecommendationApprove PermissionRecommendation = "approve" +) + // Kind discriminator for PermissionRequest. type PermissionRequestKind string const ( PermissionRequestKindCustomTool PermissionRequestKind = "custom-tool" + PermissionRequestKindExtensionEnvAccess PermissionRequestKind = "extension-env-access" PermissionRequestKindExtensionManagement PermissionRequestKind = "extension-management" PermissionRequestKindExtensionPermissionAccess PermissionRequestKind = "extension-permission-access" PermissionRequestKindFactory PermissionRequestKind = "factory" diff --git a/go/zsession_events.go b/go/zsession_events.go index 48ad42849..2976b0d5b 100644 --- a/go/zsession_events.go +++ b/go/zsession_events.go @@ -9,6 +9,9 @@ import "github.com/github/copilot-sdk/go/rpc" type ( AbortData = rpc.AbortData AbortReason = rpc.AbortReason + AgentInterruptedActivity = rpc.AgentInterruptedActivity + AgentInterruptedCancelPhase = rpc.AgentInterruptedCancelPhase + AgentInterruptedData = rpc.AgentInterruptedData AssistantIdleData = rpc.AssistantIdleData AssistantIntentData = rpc.AssistantIntentData AssistantMessageData = rpc.AssistantMessageData @@ -29,6 +32,7 @@ type ( AssistantUsageCopilotUsage = rpc.AssistantUsageCopilotUsage AssistantUsageCopilotUsageTokenDetail = rpc.AssistantUsageCopilotUsageTokenDetail AssistantUsageData = rpc.AssistantUsageData + AssistantUsageTransport = rpc.AssistantUsageTransport Attachment = rpc.Attachment AttachmentBlob = rpc.AttachmentBlob AttachmentDirectory = rpc.AttachmentDirectory @@ -149,6 +153,7 @@ type ( ModelCallFailureSource = rpc.ModelCallFailureSource ModelCallFailureTransport = rpc.ModelCallFailureTransport ModelCallStartData = rpc.ModelCallStartData + ModelChangeSource = rpc.ModelChangeSource OmittedBinaryOmittedReason = rpc.OmittedBinaryOmittedReason OmittedBinaryResult = rpc.OmittedBinaryResult OmittedBinaryType = rpc.OmittedBinaryType @@ -168,6 +173,7 @@ type ( PermissionPromptRequest = rpc.PermissionPromptRequest PermissionPromptRequestCommands = rpc.PermissionPromptRequestCommands PermissionPromptRequestCustomTool = rpc.PermissionPromptRequestCustomTool + PermissionPromptRequestExtensionEnvAccess = rpc.PermissionPromptRequestExtensionEnvAccess PermissionPromptRequestExtensionManagement = rpc.PermissionPromptRequestExtensionManagement PermissionPromptRequestExtensionPermissionAccess = rpc.PermissionPromptRequestExtensionPermissionAccess PermissionPromptRequestFactory = rpc.PermissionPromptRequestFactory @@ -180,10 +186,12 @@ type ( PermissionPromptRequestRead = rpc.PermissionPromptRequestRead PermissionPromptRequestURL = rpc.PermissionPromptRequestURL PermissionPromptRequestWrite = rpc.PermissionPromptRequestWrite + PermissionRecommendation = rpc.PermissionRecommendation PermissionRequest = rpc.PermissionRequest PermissionRequestCommand = rpc.PermissionRequestCommand PermissionRequestCustomTool = rpc.PermissionRequestCustomTool PermissionRequestedData = rpc.PermissionRequestedData + PermissionRequestExtensionEnvAccess = rpc.PermissionRequestExtensionEnvAccess PermissionRequestExtensionManagement = rpc.PermissionRequestExtensionManagement PermissionRequestExtensionPermissionAccess = rpc.PermissionRequestExtensionPermissionAccess PermissionRequestFactory = rpc.PermissionRequestFactory @@ -220,6 +228,7 @@ type ( ReasoningSummary = rpc.ReasoningSummary SamplingCompletedData = rpc.SamplingCompletedData SamplingRequestedData = rpc.SamplingRequestedData + SandboxDecisionData = rpc.SandboxDecisionData ScheduleOrigin = rpc.ScheduleOrigin SessionAutoModeResolvedData = rpc.SessionAutoModeResolvedData SessionAutopilotObjectiveChangedData = rpc.SessionAutopilotObjectiveChangedData @@ -358,6 +367,7 @@ type ( UserToolSessionApproval = rpc.UserToolSessionApproval UserToolSessionApprovalCommands = rpc.UserToolSessionApprovalCommands UserToolSessionApprovalCustomTool = rpc.UserToolSessionApprovalCustomTool + UserToolSessionApprovalExtensionEnvAccess = rpc.UserToolSessionApprovalExtensionEnvAccess UserToolSessionApprovalExtensionManagement = rpc.UserToolSessionApprovalExtensionManagement UserToolSessionApprovalExtensionPermissionAccess = rpc.UserToolSessionApprovalExtensionPermissionAccess UserToolSessionApprovalFactory = rpc.UserToolSessionApprovalFactory @@ -378,12 +388,20 @@ const ( AbortReasonRemoteCommand = rpc.AbortReasonRemoteCommand AbortReasonUserAbort = rpc.AbortReasonUserAbort AbortReasonUserInitiated = rpc.AbortReasonUserInitiated + AgentInterruptedActivityBackgroundAgent = rpc.AgentInterruptedActivityBackgroundAgent + AgentInterruptedActivityModelCall = rpc.AgentInterruptedActivityModelCall + AgentInterruptedActivityRetryBackoff = rpc.AgentInterruptedActivityRetryBackoff + AgentInterruptedActivityToolCall = rpc.AgentInterruptedActivityToolCall + AgentInterruptedCancelPhaseMidStream = rpc.AgentInterruptedCancelPhaseMidStream + AgentInterruptedCancelPhasePreFirstToken = rpc.AgentInterruptedCancelPhasePreFirstToken AssistantMessageToolRequestTypeCustom = rpc.AssistantMessageToolRequestTypeCustom AssistantMessageToolRequestTypeFunction = rpc.AssistantMessageToolRequestTypeFunction AssistantUsageAPIEndpointChatCompletions = rpc.AssistantUsageAPIEndpointChatCompletions AssistantUsageAPIEndpointResponses = rpc.AssistantUsageAPIEndpointResponses AssistantUsageAPIEndpointV1Messages = rpc.AssistantUsageAPIEndpointV1Messages AssistantUsageAPIEndpointWsResponses = rpc.AssistantUsageAPIEndpointWsResponses + AssistantUsageTransportHTTP = rpc.AssistantUsageTransportHTTP + AssistantUsageTransportWebsocket = rpc.AssistantUsageTransportWebsocket AttachmentGitHubReferenceTypeDiscussion = rpc.AttachmentGitHubReferenceTypeDiscussion AttachmentGitHubReferenceTypeIssue = rpc.AttachmentGitHubReferenceTypeIssue AttachmentGitHubReferenceTypePr = rpc.AttachmentGitHubReferenceTypePr @@ -511,6 +529,17 @@ const ( ModelCallFailureSourceTopLevel = rpc.ModelCallFailureSourceTopLevel ModelCallFailureTransportHTTP = rpc.ModelCallFailureTransportHTTP ModelCallFailureTransportWebsocket = rpc.ModelCallFailureTransportWebsocket + ModelChangeSourceAgent = rpc.ModelChangeSourceAgent + ModelChangeSourceAutomatic = rpc.ModelChangeSourceAutomatic + ModelChangeSourceConfigCommand = rpc.ModelChangeSourceConfigCommand + ModelChangeSourceManagedSettings = rpc.ModelChangeSourceManagedSettings + ModelChangeSourceModelCommand = rpc.ModelChangeSourceModelCommand + ModelChangeSourceModelPicker = rpc.ModelChangeSourceModelPicker + ModelChangeSourcePlanMode = rpc.ModelChangeSourcePlanMode + ModelChangeSourceRepoSettings = rpc.ModelChangeSourceRepoSettings + ModelChangeSourceSDK = rpc.ModelChangeSourceSDK + ModelChangeSourceSettingsCommand = rpc.ModelChangeSourceSettingsCommand + ModelChangeSourceStartup = rpc.ModelChangeSourceStartup OmittedBinaryOmittedReasonAssetUnavailable = rpc.OmittedBinaryOmittedReasonAssetUnavailable OmittedBinaryOmittedReasonTooLarge = rpc.OmittedBinaryOmittedReasonTooLarge OmittedBinaryTypeImage = rpc.OmittedBinaryTypeImage @@ -520,6 +549,7 @@ const ( PermissionAllowAllModeOn = rpc.PermissionAllowAllModeOn PermissionPromptRequestKindCommands = rpc.PermissionPromptRequestKindCommands PermissionPromptRequestKindCustomTool = rpc.PermissionPromptRequestKindCustomTool + PermissionPromptRequestKindExtensionEnvAccess = rpc.PermissionPromptRequestKindExtensionEnvAccess PermissionPromptRequestKindExtensionManagement = rpc.PermissionPromptRequestKindExtensionManagement PermissionPromptRequestKindExtensionPermissionAccess = rpc.PermissionPromptRequestKindExtensionPermissionAccess PermissionPromptRequestKindFactory = rpc.PermissionPromptRequestKindFactory @@ -533,7 +563,9 @@ const ( PermissionPromptRequestPathAccessKindRead = rpc.PermissionPromptRequestPathAccessKindRead PermissionPromptRequestPathAccessKindShell = rpc.PermissionPromptRequestPathAccessKindShell PermissionPromptRequestPathAccessKindWrite = rpc.PermissionPromptRequestPathAccessKindWrite + PermissionRecommendationApprove = rpc.PermissionRecommendationApprove PermissionRequestKindCustomTool = rpc.PermissionRequestKindCustomTool + PermissionRequestKindExtensionEnvAccess = rpc.PermissionRequestKindExtensionEnvAccess PermissionRequestKindExtensionManagement = rpc.PermissionRequestKindExtensionManagement PermissionRequestKindExtensionPermissionAccess = rpc.PermissionRequestKindExtensionPermissionAccess PermissionRequestKindFactory = rpc.PermissionRequestKindFactory @@ -570,6 +602,7 @@ const ( ScheduleOriginModel = rpc.ScheduleOriginModel ScheduleOriginUser = rpc.ScheduleOriginUser SessionEventTypeAbort = rpc.SessionEventTypeAbort + SessionEventTypeAgentInterrupted = rpc.SessionEventTypeAgentInterrupted SessionEventTypeAssistantIdle = rpc.SessionEventTypeAssistantIdle SessionEventTypeAssistantIntent = rpc.SessionEventTypeAssistantIntent SessionEventTypeAssistantMessage = rpc.SessionEventTypeAssistantMessage @@ -616,6 +649,7 @@ const ( SessionEventTypePermissionRequested = rpc.SessionEventTypePermissionRequested SessionEventTypeSamplingCompleted = rpc.SessionEventTypeSamplingCompleted SessionEventTypeSamplingRequested = rpc.SessionEventTypeSamplingRequested + SessionEventTypeSandboxDecision = rpc.SessionEventTypeSandboxDecision SessionEventTypeSessionAutoModeResolved = rpc.SessionEventTypeSessionAutoModeResolved SessionEventTypeSessionAutopilotObjectiveChanged = rpc.SessionEventTypeSessionAutopilotObjectiveChanged SessionEventTypeSessionBackgroundTasksChanged = rpc.SessionEventTypeSessionBackgroundTasksChanged @@ -744,6 +778,7 @@ const ( UserMessageDeliverySteering = rpc.UserMessageDeliverySteering UserToolSessionApprovalKindCommands = rpc.UserToolSessionApprovalKindCommands UserToolSessionApprovalKindCustomTool = rpc.UserToolSessionApprovalKindCustomTool + UserToolSessionApprovalKindExtensionEnvAccess = rpc.UserToolSessionApprovalKindExtensionEnvAccess UserToolSessionApprovalKindExtensionManagement = rpc.UserToolSessionApprovalKindExtensionManagement UserToolSessionApprovalKindExtensionPermissionAccess = rpc.UserToolSessionApprovalKindExtensionPermissionAccess UserToolSessionApprovalKindFactory = rpc.UserToolSessionApprovalKindFactory diff --git a/java/pom.xml b/java/pom.xml index cb6662458..cd41c45b0 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -63,7 +63,7 @@ DO NOT EDIT MANUALLY. Updated by the update-copilot-dependency workflow. --> - ^1.0.79 + ^1.0.80-0 true diff --git a/java/scripts/codegen/package-lock.json b/java/scripts/codegen/package-lock.json index 527eef03e..cc25a44b9 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.79", + "@github/copilot": "^1.0.80-0", "json-schema": "^0.4.0", "tsx": "^4.23.1" } @@ -428,9 +428,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.79.tgz", - "integrity": "sha512-uHBm2BYbKJgyfiKp1WokX7QUNHGvzEX0zaGeb3qM3CybP06rsJrX3JgQe95qwwma6vQz0ah9gV68ERW2JqaKRA==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.80-0.tgz", + "integrity": "sha512-y2LqQT9JHL5NSfSLWwUbuDCEanCYz8o+GNqpAh3/DG8LCctLVPMdVTyIoDIWDk/8GUjh9FakA/jS+MMV/ugbpQ==", "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.79", - "@github/copilot-darwin-x64": "1.0.79", - "@github/copilot-linux-arm64": "1.0.79", - "@github/copilot-linux-x64": "1.0.79", - "@github/copilot-linuxmusl-arm64": "1.0.79", - "@github/copilot-linuxmusl-x64": "1.0.79", - "@github/copilot-win32-arm64": "1.0.79", - "@github/copilot-win32-x64": "1.0.79" + "@github/copilot-darwin-arm64": "1.0.80-0", + "@github/copilot-darwin-x64": "1.0.80-0", + "@github/copilot-linux-arm64": "1.0.80-0", + "@github/copilot-linux-x64": "1.0.80-0", + "@github/copilot-linuxmusl-arm64": "1.0.80-0", + "@github/copilot-linuxmusl-x64": "1.0.80-0", + "@github/copilot-win32-arm64": "1.0.80-0", + "@github/copilot-win32-x64": "1.0.80-0" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.79.tgz", - "integrity": "sha512-rsw7JoMvlcxXb0yx08oIeEc0x2hUEwKSfhX9ESKfdMVt0Ckrzm4OEvNUyzOpOnLJ9+l3h/aI+u1w5g2ZU2K7UA==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.80-0.tgz", + "integrity": "sha512-gsRLSyPd4j15zivQLYOyvzb4sGrGS4p6e2Dwv1KIvcJ2IAwANyCcfXAXy0F0xB+B+mQgvCwCdkK1Rmjy+9ftow==", "cpu": [ "arm64" ], @@ -466,9 +466,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.79.tgz", - "integrity": "sha512-D983e2lXYnq+KhjA8mTZXonY1+LGfJN9BM195J73shUvx49nRJmibDHWLvVtGeYc+43evGUOAQrOqOspAhhWPQ==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.80-0.tgz", + "integrity": "sha512-D7PrkVmPb91MPa8H5nY9DfxWWR4Je+KZY/gmkJYDryTrWO7CabfE29yKqBwhi+WuBpVYWttDF3C1TeYTdOYpkg==", "cpu": [ "x64" ], @@ -482,9 +482,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.79.tgz", - "integrity": "sha512-qqaNkvi92Wg+4OZk/kTWC2nUG72G0vV6eRAo5+PnKaPmjdX1GsI0a+lPxXPEbzX0zYLi/8yrUyANwyyNEsGgXA==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.80-0.tgz", + "integrity": "sha512-b1LAUiv7bY9cNXiilztDZTt5+M29axFWF354eg8VXRGaWXfT77ctgfLb1UiTBABUKlIfHOuodq1cjtSOnYDtPg==", "cpu": [ "arm64" ], @@ -498,9 +498,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.79.tgz", - "integrity": "sha512-wzotZfvHkItutciLFMXZT2k9Qiii4Ta8tsVDCMQ7CP8hPxV91FyJ1yf3+FFSSfPvWrfYM6BOAiqIuX+LjgRuiw==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.80-0.tgz", + "integrity": "sha512-FvbdftgJzbU7yagRMO9Sitd7UOF8T4Amkbuss+rweZBOJBgsBWDvUJWCf9m06iuHaLYoICiGp94BFMowHyBIoQ==", "cpu": [ "x64" ], @@ -514,9 +514,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.79.tgz", - "integrity": "sha512-INtRSARl7DdNm2MXnn4GJuK+Y7QD24ANox02uH8htNQwRlNvdvg+YGS1V/mYgLDXFepeUjMjzTNC+i70+kh5uw==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.80-0.tgz", + "integrity": "sha512-AwoUp+RVRqAyTiqMnlKx8gIldxghZQxet31sWsLBDE/AS5Dv/ohx0wQ7aouKORUMkh+ZtIK+WmgyR7de1hRDPQ==", "cpu": [ "arm64" ], @@ -530,9 +530,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.79.tgz", - "integrity": "sha512-LxJAIfPP6Ok/9qpXGZuhnAft3W9JVcK9tbO3jWXcGDJT3v+2NtutyjmP/A7/cDXdTruXVQ4MybwAgacN8Gj/sg==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.80-0.tgz", + "integrity": "sha512-9RCoTNtaDnC2r68ecHrpORmTjaSaV9hUdRJb9nsh46En9SSkcEl4yvQ14Fl9HJ95BhKHqE6krf7YxCgAKTQ3bA==", "cpu": [ "x64" ], @@ -546,9 +546,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.79.tgz", - "integrity": "sha512-5wg/ayCBTVy4g4FdO/9BJZRVARY0sgjAn9rBkw5BSJMv4u7Mvxg5Sftlift+V5UWxTyCSHAELZ5IHKvox4Yi8w==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.80-0.tgz", + "integrity": "sha512-ypxN5LRkXgvEDjSYOQ9lMXrZAC+NVWeIBSd/ywGiA4wg7XtH2VBbaiYMPvX6R6xIrn4LUK+/UlYwwIqf8laXhw==", "cpu": [ "arm64" ], @@ -562,9 +562,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.79.tgz", - "integrity": "sha512-FTpThWwwCDYnLdE0pfdo5zpAQLLVg36kmC2IKyVMuCYv9iPe7rE1mz7ng/UITN9M3TAMBrwHSvCV3pITvw4W8Q==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.80-0.tgz", + "integrity": "sha512-uKrkfKblj+sIthys3a/RYU5muLtMd5Wc5NstbCJHD7DLqGbDK7Fec9REBr4/NHGGI/24FJhCXJNEBPgE5urgew==", "cpu": [ "x64" ], diff --git a/java/scripts/codegen/package.json b/java/scripts/codegen/package.json index b1393f40b..3759acbd9 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.79", + "@github/copilot": "^1.0.80-0", "json-schema": "^0.4.0", "tsx": "^4.23.1" } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AgentInterruptedActivity.java b/java/sdk/src/generated/java/com/github/copilot/generated/AgentInterruptedActivity.java new file mode 100644 index 000000000..0cca731a6 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AgentInterruptedActivity.java @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * 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 javax.annotation.processing.Generated; + +/** + * What the agent was doing when the user interrupted it. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum AgentInterruptedActivity { + /** The {@code model_call} variant. */ + MODEL_CALL("model_call"), + /** The {@code retry_backoff} variant. */ + RETRY_BACKOFF("retry_backoff"), + /** The {@code tool_call} variant. */ + TOOL_CALL("tool_call"), + /** The {@code background_agent} variant. */ + BACKGROUND_AGENT("background_agent"); + + private final String value; + AgentInterruptedActivity(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static AgentInterruptedActivity fromValue(String value) { + for (AgentInterruptedActivity v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown AgentInterruptedActivity value: " + value); + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AgentInterruptedCancelPhase.java b/java/sdk/src/generated/java/com/github/copilot/generated/AgentInterruptedCancelPhase.java new file mode 100644 index 000000000..41a8bd11b --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AgentInterruptedCancelPhase.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * 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 javax.annotation.processing.Generated; + +/** + * Where the interruption landed relative to the first streamed token. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum AgentInterruptedCancelPhase { + /** The {@code pre_first_token} variant. */ + PRE_FIRST_TOKEN("pre_first_token"), + /** The {@code mid_stream} variant. */ + MID_STREAM("mid_stream"); + + private final String value; + AgentInterruptedCancelPhase(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static AgentInterruptedCancelPhase fromValue(String value) { + for (AgentInterruptedCancelPhase v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown AgentInterruptedCancelPhase value: " + value); + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AgentInterruptedEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/AgentInterruptedEvent.java new file mode 100644 index 000000000..ef6772fca --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AgentInterruptedEvent.java @@ -0,0 +1,66 @@ +/*--------------------------------------------------------------------------------------------- + * 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 java.util.List; +import javax.annotation.processing.Generated; + +/** + * Session event "agent.interrupted". Metadata for work the user interrupted while the agent was running + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class AgentInterruptedEvent extends SessionEvent { + + @Override + public String getType() { return "agent.interrupted"; } + + @JsonProperty("data") + private AgentInterruptedEventData data; + + public AgentInterruptedEventData getData() { return data; } + public void setData(AgentInterruptedEventData data) { this.data = data; } + + /** Data payload for {@link AgentInterruptedEvent}. */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record AgentInterruptedEventData( + /** What the agent was doing when the user interrupted it */ + @JsonProperty("activity") AgentInterruptedActivity activity, + /** How long the interrupted work had been running, in milliseconds */ + @JsonProperty("elapsedMs") Double elapsedMs, + /** Zero-based agentic-loop iteration the interrupt landed in */ + @JsonProperty("turn") Long turn, + /** For an interrupted model call: the model the request targeted */ + @JsonProperty("model") String model, + /** For an interrupted model call: the provider endpoint the request targeted */ + @JsonProperty("apiEndpoint") String apiEndpoint, + /** For an interrupted model call: the transport the request used */ + @JsonProperty("transport") ModelCallFailureTransport transport, + /** For an interrupted model call: the reasoning effort the request asked for */ + @JsonProperty("reasoningEffort") String reasoningEffort, + /** For an interrupted model call: whether the user interrupted before any token arrived or while the response was streaming */ + @JsonProperty("cancelPhase") AgentInterruptedCancelPhase cancelPhase, + /** For a mid-stream interrupt: the observed time to first observable output, in milliseconds. Deliberately distinct from the `ttftMs` reported on a successful model call, which measures time to first stream event. */ + @JsonProperty("outputTtftMs") Double outputTtftMs, + /** Names of the tools that were still running. More than one when the model requested a parallel fan-out. */ + @JsonProperty("toolNames") List toolNames, + /** Tool call identifiers that were still running */ + @JsonProperty("toolCallIds") List toolCallIds, + /** Subset of `toolNames` whose tool metadata marks the tool name as safe to record unhashed in telemetry. */ + @JsonProperty("safeToolNames") List safeToolNames, + /** For an interrupted background-agent batch: how many background sub-agents the stop swept. Counts accepted cancellations, so an agent cancelled as a cascade of its interrupted parent is covered by that parent rather than counted again. */ + @JsonProperty("interruptedAgentCount") Long interruptedAgentCount + ) { + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java index fee236ed2..785e3b49d 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java @@ -67,6 +67,7 @@ public record AssistantMessageEventData( @JsonProperty("clientRequestId") String clientRequestId, /** Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation */ @JsonProperty("serviceRequestId") String serviceRequestId, + /** Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. */ @JsonProperty("rte") Boolean rte, /** 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, diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageServerTools.java b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageServerTools.java index 72d685037..6d67f6ecb 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageServerTools.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageServerTools.java @@ -23,10 +23,15 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record AssistantMessageServerTools( + /** Model provider that produced this server-tool payload. */ @JsonProperty("provider") String provider, + /** Provider-native server-tool call and output items preserved verbatim for replay. */ @JsonProperty("items") List items, + /** Provider function-call namespaces keyed by function-call identifier. */ @JsonProperty("functionCallNamespaces") Map functionCallNamespaces, + /** Raw provider content blocks retained for verbatim round-tripping. */ @JsonProperty("rawContentBlocks") List rawContentBlocks, + /** Advisor model identifier associated with the server-tool payload. */ @JsonProperty("advisorModel") String advisorModel ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantReasoningEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantReasoningEvent.java index 52996aeee..627dea8ef 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantReasoningEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantReasoningEvent.java @@ -38,6 +38,7 @@ public record AssistantReasoningEventData( @JsonProperty("reasoningId") String reasoningId, /** The complete extended thinking text from the model */ @JsonProperty("content") String content, + /** Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. */ @JsonProperty("rte") Boolean rte ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageEvent.java index 85bd81d3c..2ce76eb88 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageEvent.java @@ -62,12 +62,27 @@ public record AssistantUsageEventData( @JsonProperty("initiator") String initiator, /** Coarse classification of the interaction that produced this call, mirroring the session's per-request agent context (e.g. `conversation-agent`, `conversation-subagent`, `conversation-sampling`, `conversation-background`, `conversation-compaction`, `conversation-user`). Non-billing; lets consumers attribute a model call to a call class (e.g. sub-agent/sidekick) independently of the billing initiator. Absent when the runtime did not classify the request. */ @JsonProperty("interactionType") String interactionType, + /** Whether this model call used a bring-your-own-key provider */ + @JsonProperty("isByok") Boolean isByok, + /** Whether Auto mode was selected for this model call */ + @JsonProperty("isAuto") Boolean isAuto, + /** Effective maximum prompt-token limit used for this model call */ + @JsonProperty("maxPromptTokens") Long maxPromptTokens, + /** Requested maximum output tokens used for this model call */ + @JsonProperty("maxOutputTokens") Long maxOutputTokens, + /** Number of accepted speculative prediction tokens */ + @JsonProperty("acceptedPredictionTokens") Long acceptedPredictionTokens, + /** Number of rejected speculative prediction tokens */ + @JsonProperty("rejectedPredictionTokens") Long rejectedPredictionTokens, + /** Transport used for this model call (http or websocket) */ + @JsonProperty("transport") AssistantUsageTransport transport, /** Completion ID from the model provider (e.g., chatcmpl-abc123) */ @JsonProperty("apiCallId") String apiCallId, /** GitHub request tracing ID (x-github-request-id header) for server-side log correlation */ @JsonProperty("providerCallId") String providerCallId, /** Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation */ @JsonProperty("serviceRequestId") String serviceRequestId, + /** Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. */ @JsonProperty("rte") Boolean rte, /** API endpoint used for this model call, matching CAPI supported_endpoints vocabulary */ @JsonProperty("apiEndpoint") AssistantUsageApiEndpoint apiEndpoint, @@ -79,6 +94,8 @@ public record AssistantUsageEventData( @JsonProperty("copilotUsage") AssistantUsageCopilotUsage copilotUsage, /** Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max") */ @JsonProperty("reasoningEffort") String reasoningEffort, + /** Reasoning summary mode used for this model call, if applicable */ + @JsonProperty("reasoningSummary") ReasoningSummary reasoningSummary, /** Number of tools available to the model for this call */ @JsonProperty("availableToolCount") Long availableToolCount, /** Number of tokens used by tool definitions for this call */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageTransport.java b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageTransport.java new file mode 100644 index 000000000..9d69b50f0 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageTransport.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * 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 javax.annotation.processing.Generated; + +/** + * Transport used for a successful model call + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum AssistantUsageTransport { + /** The {@code http} variant. */ + HTTP("http"), + /** The {@code websocket} variant. */ + WEBSOCKET("websocket"); + + private final String value; + AssistantUsageTransport(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static AssistantUsageTransport fromValue(String value) { + for (AssistantUsageTransport v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown AssistantUsageTransport value: " + value); + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/ExitPlanModeRequestedEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/ExitPlanModeRequestedEvent.java index 4242b4b65..7f20d35bf 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/ExitPlanModeRequestedEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/ExitPlanModeRequestedEvent.java @@ -44,7 +44,9 @@ public record ExitPlanModeRequestedEventData( /** Available actions the user can take */ @JsonProperty("actions") List actions, /** Recommended action to preselect for the user */ - @JsonProperty("recommendedAction") ExitPlanModeAction recommendedAction + @JsonProperty("recommendedAction") ExitPlanModeAction recommendedAction, + /** Model the session had selected when the plan was authored, when one is known */ + @JsonProperty("model") String model ) { } } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunUpdatedEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunUpdatedEvent.java index e9abb1053..33b542058 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunUpdatedEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunUpdatedEvent.java @@ -34,6 +34,7 @@ public final class FactoryRunUpdatedEvent extends SessionEvent { @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) public record FactoryRunUpdatedEventData( + /** Factory run identifier. */ @JsonProperty("runId") String runId, /** Monotonic revision now available for the run. */ @JsonProperty("revision") Long revision diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/ModelCallFailureEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/ModelCallFailureEvent.java index f6c399b4c..3d7ea21b8 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/ModelCallFailureEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/ModelCallFailureEvent.java @@ -45,6 +45,7 @@ public record ModelCallFailureEventData( @JsonProperty("providerCallId") String providerCallId, /** Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation */ @JsonProperty("serviceRequestId") String serviceRequestId, + /** Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. */ @JsonProperty("rte") Boolean rte, /** HTTP status code from the failed request */ @JsonProperty("statusCode") Long statusCode, diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/ModelChangeSource.java b/java/sdk/src/generated/java/com/github/copilot/generated/ModelChangeSource.java new file mode 100644 index 000000000..0d54709de --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/ModelChangeSource.java @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * 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 javax.annotation.processing.Generated; + +/** + * Origin of an effective session model change. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum ModelChangeSource { + /** The {@code model_command} variant. */ + MODEL_COMMAND("model_command"), + /** The {@code settings_command} variant. */ + SETTINGS_COMMAND("settings_command"), + /** The {@code config_command} variant. */ + CONFIG_COMMAND("config_command"), + /** The {@code model_picker} variant. */ + MODEL_PICKER("model_picker"), + /** The {@code managed_settings} variant. */ + MANAGED_SETTINGS("managed_settings"), + /** The {@code repo_settings} variant. */ + REPO_SETTINGS("repo_settings"), + /** The {@code startup} variant. */ + STARTUP("startup"), + /** The {@code agent} variant. */ + AGENT("agent"), + /** The {@code plan_mode} variant. */ + PLAN_MODE("plan_mode"), + /** The {@code automatic} variant. */ + AUTOMATIC("automatic"), + /** The {@code sdk} variant. */ + SDK("sdk"); + + private final String value; + ModelChangeSource(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static ModelChangeSource fromValue(String value) { + for (ModelChangeSource v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown ModelChangeSource value: " + value); + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SandboxDecisionEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/SandboxDecisionEvent.java new file mode 100644 index 000000000..f87be0fe9 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/SandboxDecisionEvent.java @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * 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 "sandbox.decision". Payload of `sandbox.decision`, a bounded governance record of what the process sandbox was configured to do and whether it took effect. Discriminated by `kind`. + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SandboxDecisionEvent extends SessionEvent { + + @Override + public String getType() { return "sandbox.decision"; } + + @JsonProperty("data") + private SandboxDecisionEventData data; + + public SandboxDecisionEventData getData() { return data; } + public void setData(SandboxDecisionEventData data) { this.data = data; } + + /** Data payload for {@link SandboxDecisionEvent}. */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record SandboxDecisionEventData() { + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SessionEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/SessionEvent.java index 582ecd3d4..ba3ffeb41 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/SessionEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/SessionEvent.java @@ -59,6 +59,7 @@ @JsonSubTypes.Type(value = PendingMessagesModifiedEvent.class, name = "pending_messages.modified"), @JsonSubTypes.Type(value = AssistantTurnStartEvent.class, name = "assistant.turn_start"), @JsonSubTypes.Type(value = AssistantTurnRetryEvent.class, name = "assistant.turn_retry"), + @JsonSubTypes.Type(value = AgentInterruptedEvent.class, name = "agent.interrupted"), @JsonSubTypes.Type(value = AssistantIntentEvent.class, name = "assistant.intent"), @JsonSubTypes.Type(value = AssistantServerToolProgressEvent.class, name = "assistant.server_tool_progress"), @JsonSubTypes.Type(value = AssistantReasoningEvent.class, name = "assistant.reasoning"), @@ -81,6 +82,7 @@ @JsonSubTypes.Type(value = ToolExecutionCompleteEvent.class, name = "tool.execution_complete"), @JsonSubTypes.Type(value = ToolSearchActivatedEvent.class, name = "tool_search.activated"), @JsonSubTypes.Type(value = SkillInvokedEvent.class, name = "skill.invoked"), + @JsonSubTypes.Type(value = SandboxDecisionEvent.class, name = "sandbox.decision"), @JsonSubTypes.Type(value = SubagentStartedEvent.class, name = "subagent.started"), @JsonSubTypes.Type(value = SubagentCompletedEvent.class, name = "subagent.completed"), @JsonSubTypes.Type(value = SubagentFailedEvent.class, name = "subagent.failed"), @@ -177,6 +179,7 @@ public abstract sealed class SessionEvent permits PendingMessagesModifiedEvent, AssistantTurnStartEvent, AssistantTurnRetryEvent, + AgentInterruptedEvent, AssistantIntentEvent, AssistantServerToolProgressEvent, AssistantReasoningEvent, @@ -199,6 +202,7 @@ public abstract sealed class SessionEvent permits ToolExecutionCompleteEvent, ToolSearchActivatedEvent, SkillInvokedEvent, + SandboxDecisionEvent, SubagentStartedEvent, SubagentCompletedEvent, SubagentFailedEvent, diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SessionModelChangeEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/SessionModelChangeEvent.java index e53c1594a..868d78fe0 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/SessionModelChangeEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/SessionModelChangeEvent.java @@ -53,7 +53,9 @@ public record SessionModelChangeEventData( /** Context tier after the model change; null explicitly clears a previously selected tier */ @JsonProperty("contextTier") ContextTier contextTier, /** Reason the change happened, when not user-initiated. `"rate_limit_auto_switch"` for changes triggered by the auto-mode-switch rate-limit recovery path, or `"refusal_fallback"` when the active model declined a request (content refusal) and the runtime switched to the configured refusal-fallback model. UI clients can use this to render contextual copy. */ - @JsonProperty("cause") String cause + @JsonProperty("cause") String cause, + /** Origin of the effective model change, when known. */ + @JsonProperty("source") ModelChangeSource source ) { } } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteEvent.java index a265b5305..574d3aa6b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteEvent.java @@ -45,6 +45,7 @@ public record ToolExecutionCompleteEventData( @JsonProperty("mcpMeta") Object mcpMeta, /** CAPI interaction ID for correlating this tool execution with upstream telemetry */ @JsonProperty("interactionId") String interactionId, + /** Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. */ @JsonProperty("rte") Boolean rte, /** Whether this tool call was explicitly requested by the user rather than the assistant */ @JsonProperty("isUserRequested") Boolean isUserRequested, diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUI.java b/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUI.java index 6679b85ae..500eb1755 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUI.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUI.java @@ -25,7 +25,9 @@ public record ToolExecutionCompleteUIResourceMetaUI( @JsonProperty("csp") ToolExecutionCompleteUIResourceMetaUICsp csp, /** Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. */ @JsonProperty("permissions") ToolExecutionCompleteUIResourceMetaUIPermissions permissions, + /** Optional dedicated origin for the rendered MCP Apps UI resource. */ @JsonProperty("domain") String domain, + /** Whether the host should render a border around the MCP Apps UI resource. */ @JsonProperty("prefersBorder") Boolean prefersBorder ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUICsp.java b/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUICsp.java index 41e799cf0..4b9cfb133 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUICsp.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUICsp.java @@ -22,9 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record ToolExecutionCompleteUIResourceMetaUICsp( + /** Domains the UI resource may connect to. */ @JsonProperty("connectDomains") List connectDomains, + /** Domains from which the UI resource may load scripts, styles, images, and other resources. */ @JsonProperty("resourceDomains") List resourceDomains, + /** Domains the UI resource may embed as nested frames. */ @JsonProperty("frameDomains") List frameDomains, + /** Domains the UI resource may use as document base URIs. */ @JsonProperty("baseUriDomains") List baseUriDomains ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionStartEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionStartEvent.java index 782e93931..1aa69c6c2 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionStartEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionStartEvent.java @@ -44,6 +44,7 @@ public record ToolExecutionStartEventData( @JsonProperty("shellToolInfo") ToolExecutionStartShellToolInfo shellToolInfo, /** Model identifier that generated this tool call */ @JsonProperty("model") String model, + /** Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. */ @JsonProperty("rte") Boolean rte, /** Name of the MCP server hosting this tool, when the tool is an MCP tool */ @JsonProperty("mcpServerName") String mcpServerName, diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ApiKeyAuthInfo.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ApiKeyAuthInfo.java new file mode 100644 index 000000000..02297cb3f --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ApiKeyAuthInfo.java @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Authentication-info variant for API-key authentication to a non-GitHub LLM provider, carrying the secret `apiKey` and host. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class ApiKeyAuthInfo extends AuthInfo { + + @JsonProperty("type") + private final String type = "api-key"; + + @Override + public String getType() { return type; } + + /** The API key. Treat as a secret. */ + @JsonProperty("apiKey") + private String apiKey; + + /** Authentication host. */ + @JsonProperty("host") + private String host; + + /** Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. */ + @JsonProperty("copilotUser") + private CopilotUserResponse copilotUser; + + public String getApiKey() { return apiKey; } + public void setApiKey(String apiKey) { this.apiKey = apiKey; } + + public String getHost() { return host; } + public void setHost(String host) { this.host = host; } + + public CopilotUserResponse getCopilotUser() { return copilotUser; } + public void setCopilotUser(CopilotUserResponse copilotUser) { this.copilotUser = copilotUser; } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthInfo.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthInfo.java new file mode 100644 index 000000000..ce193cec3 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthInfo.java @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * 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.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import javax.annotation.processing.Generated; + +/** + * Initial authentication info for the session. + * + * @since 1.0.0 + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = HMACAuthInfo.class, name = "hmac"), + @JsonSubTypes.Type(value = EnvAuthInfo.class, name = "env"), + @JsonSubTypes.Type(value = TokenAuthInfo.class, name = "token"), + @JsonSubTypes.Type(value = CopilotApiTokenAuthInfo.class, name = "copilot-api-token"), + @JsonSubTypes.Type(value = UserAuthInfo.class, name = "user"), + @JsonSubTypes.Type(value = GhCliAuthInfo.class, name = "gh-cli"), + @JsonSubTypes.Type(value = ApiKeyAuthInfo.class, name = "api-key") +}) +@JsonIgnoreProperties(ignoreUnknown = true) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public abstract class AuthInfo { + + /** + * Returns the discriminator value for this variant. + * + * @return the type discriminator + */ + public abstract String getType(); +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthValidationError.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthValidationError.java new file mode 100644 index 000000000..99f78006f --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthValidationError.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; + +/** + * Validation error from an authentication attempt. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record AuthValidationError( + /** Authentication validation error message */ + @JsonProperty("message") String message, + /** Optional message returned by GitHub */ + @JsonProperty("githubMessage") String gitHubMessage +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotApiTokenAuthInfo.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotApiTokenAuthInfo.java new file mode 100644 index 000000000..2e6952f53 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotApiTokenAuthInfo.java @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Authentication-info variant for direct Copilot API token auth sourced from environment variables, with public GitHub host. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class CopilotApiTokenAuthInfo extends AuthInfo { + + @JsonProperty("type") + private final String type = "copilot-api-token"; + + @Override + public String getType() { return type; } + + /** Authentication host (always the public GitHub host). */ + @JsonProperty("host") + private String host; + + /** Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. */ + @JsonProperty("copilotUser") + private CopilotUserResponse copilotUser; + + public String getHost() { return host; } + public void setHost(String host) { this.host = host; } + + public CopilotUserResponse getCopilotUser() { return copilotUser; } + public void setCopilotUser(CopilotUserResponse copilotUser) { this.copilotUser = copilotUser; } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponse.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponse.java new file mode 100644 index 000000000..cd6d5c83b --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponse.java @@ -0,0 +1,79 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record CopilotUserResponse( + /** GitHub login of the authenticated user. */ + @JsonProperty("login") String login, + /** Copilot access SKU identifier (e.g. `free_limited_copilot`, `copilot_for_business_seat_quota`) used to gate model and feature access. */ + @JsonProperty("access_type_sku") String accessTypeSku, + /** Opaque analytics tracking identifier for the user, forwarded from the Copilot API. */ + @JsonProperty("analytics_tracking_id") String analyticsTrackingId, + /** Date the Copilot seat was assigned to the user, if applicable. */ + @JsonProperty("assigned_date") Object assignedDate, + /** Whether the user is eligible to sign up for the free/limited Copilot tier. */ + @JsonProperty("can_signup_for_limited") Boolean canSignupForLimited, + /** Whether Copilot chat is enabled for the user. */ + @JsonProperty("chat_enabled") Boolean chatEnabled, + /** Copilot plan name for the user (e.g. `individual`, `business`, `enterprise`). */ + @JsonProperty("copilot_plan") String copilotPlan, + /** Whether `.copilotignore` content-exclusion support is enabled for the user. */ + @JsonProperty("copilotignore_enabled") Boolean copilotignoreEnabled, + /** Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough. */ + @JsonProperty("endpoints") CopilotUserResponseEndpoints endpoints, + /** Logins of the organizations the user belongs to. */ + @JsonProperty("organization_login_list") List organizationLoginList, + /** Organizations the user belongs to, each with an optional login and display name. */ + @JsonProperty("organization_list") Object organizationList, + /** Whether the Codex agent is enabled for the user. */ + @JsonProperty("codex_agent_enabled") Boolean codexAgentEnabled, + /** Whether MCP (Model Context Protocol) support is enabled for the user. */ + @JsonProperty("is_mcp_enabled") Object isMcpEnabled, + /** Date the user's usage quota next resets, as a raw string from the Copilot API; see `quota_reset_date_utc` for the UTC-normalized value. */ + @JsonProperty("quota_reset_date") String quotaResetDate, + /** Quota snapshot map from the raw Copilot user-response passthrough, with chat, completions, premium-interactions, and other entries. */ + @JsonProperty("quota_snapshots") CopilotUserResponseQuotaSnapshots quotaSnapshots, + /** Whether the user's telemetry is subject to restricted-data handling. */ + @JsonProperty("restricted_telemetry") Boolean restrictedTelemetry, + /** Whether the user is a GitHub/Microsoft staff member. */ + @JsonProperty("is_staff") Boolean isStaff, + /** Raw passthrough of the Copilot API `te` flag for the user (an opaque server-side eligibility signal surfaced in telemetry); not otherwise interpreted by the runtime. */ + @JsonProperty("te") Boolean te, + /** Whether the account is on usage-based (token/AI-credit) billing rather than a fixed premium-request quota. */ + @JsonProperty("token_based_billing") Boolean tokenBasedBilling, + /** Whether the user is able to upgrade their Copilot plan. */ + @JsonProperty("can_upgrade_plan") Boolean canUpgradePlan, + /** UTC-normalized form of `quota_reset_date` (the date the user's usage quota next resets). */ + @JsonProperty("quota_reset_date_utc") String quotaResetDateUtc, + /** Per-category quota allotments for free/limited-tier users, keyed by quota category. */ + @JsonProperty("limited_user_quotas") Map limitedUserQuotas, + /** Date the free/limited-tier user's quotas next reset, as a raw string from the Copilot API. */ + @JsonProperty("limited_user_reset_date") String limitedUserResetDate, + /** Per-category monthly quota allotments, keyed by quota category. */ + @JsonProperty("monthly_quotas") Map monthlyQuotas, + /** Whether cloud session storage is enabled for the user. */ + @JsonProperty("cloud_session_storage_enabled") Boolean cloudSessionStorageEnabled, + /** Whether CLI remote control is enabled for the user. */ + @JsonProperty("cli_remote_control_enabled") Boolean cliRemoteControlEnabled +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseEndpoints.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseEndpoints.java new file mode 100644 index 000000000..3e4606559 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseEndpoints.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 com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record CopilotUserResponseEndpoints( + /** Copilot API endpoint URL. */ + @JsonProperty("api") String api, + /** Origin-tracker endpoint URL. */ + @JsonProperty("origin-tracker") String originTracker, + /** Copilot proxy endpoint URL. */ + @JsonProperty("proxy") String proxy, + /** Copilot telemetry endpoint URL. */ + @JsonProperty("telemetry") String telemetry, + /** Experimental-service endpoint URL. */ + @JsonProperty("exp") String exp +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshots.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshots.java new file mode 100644 index 000000000..10c983bb4 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshots.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; + +/** + * Quota snapshot map from the raw Copilot user-response passthrough, with chat, completions, premium-interactions, and other entries. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record CopilotUserResponseQuotaSnapshots( + /** Chat quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. */ + @JsonProperty("chat") CopilotUserResponseQuotaSnapshotsChat chat, + /** Completions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. */ + @JsonProperty("completions") CopilotUserResponseQuotaSnapshotsCompletions completions, + /** Premium-interactions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. */ + @JsonProperty("premium_interactions") CopilotUserResponseQuotaSnapshotsPremiumInteractions premiumInteractions +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshotsChat.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshotsChat.java new file mode 100644 index 000000000..94a516286 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshotsChat.java @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Chat quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record CopilotUserResponseQuotaSnapshotsChat( + /** Number of requests/units included in the entitlement for this period; `-1` denotes an unlimited entitlement. */ + @JsonProperty("entitlement") Double entitlement, + /** Count of additional pay-per-request usage consumed this period beyond the entitlement. */ + @JsonProperty("overage_count") Double overageCount, + /** Whether usage may continue at pay-per-request rates once the entitlement is exhausted. */ + @JsonProperty("overage_permitted") Boolean overagePermitted, + /** Percentage of the entitlement remaining at the snapshot timestamp. */ + @JsonProperty("percent_remaining") Double percentRemaining, + /** Identifier of the quota bucket this snapshot describes. */ + @JsonProperty("quota_id") String quotaId, + /** Amount of quota remaining at the snapshot timestamp. */ + @JsonProperty("quota_remaining") Double quotaRemaining, + /** Remaining entitlement/quota amount at the snapshot timestamp. */ + @JsonProperty("remaining") Double remaining, + /** Whether the entitlement for this category is unlimited. */ + @JsonProperty("unlimited") Boolean unlimited, + /** UTC timestamp when this snapshot was captured. */ + @JsonProperty("timestamp_utc") String timestampUtc, + /** Whether the user currently has quota available; when `false` and not unlimited, further requests are blocked until the quota resets. */ + @JsonProperty("has_quota") Boolean hasQuota, + /** Unix epoch time, in seconds, when this quota next resets. */ + @JsonProperty("quota_reset_at") Double quotaResetAt, + /** Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. */ + @JsonProperty("token_based_billing") Boolean tokenBasedBilling +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshotsCompletions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshotsCompletions.java new file mode 100644 index 000000000..826b034ba --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshotsCompletions.java @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Completions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record CopilotUserResponseQuotaSnapshotsCompletions( + /** Number of requests/units included in the entitlement for this period; `-1` denotes an unlimited entitlement. */ + @JsonProperty("entitlement") Double entitlement, + /** Count of additional pay-per-request usage consumed this period beyond the entitlement. */ + @JsonProperty("overage_count") Double overageCount, + /** Whether usage may continue at pay-per-request rates once the entitlement is exhausted. */ + @JsonProperty("overage_permitted") Boolean overagePermitted, + /** Percentage of the entitlement remaining at the snapshot timestamp. */ + @JsonProperty("percent_remaining") Double percentRemaining, + /** Identifier of the quota bucket this snapshot describes. */ + @JsonProperty("quota_id") String quotaId, + /** Amount of quota remaining at the snapshot timestamp. */ + @JsonProperty("quota_remaining") Double quotaRemaining, + /** Remaining entitlement/quota amount at the snapshot timestamp. */ + @JsonProperty("remaining") Double remaining, + /** Whether the entitlement for this category is unlimited. */ + @JsonProperty("unlimited") Boolean unlimited, + /** UTC timestamp when this snapshot was captured. */ + @JsonProperty("timestamp_utc") String timestampUtc, + /** Whether the user currently has quota available; when `false` and not unlimited, further requests are blocked until the quota resets. */ + @JsonProperty("has_quota") Boolean hasQuota, + /** Unix epoch time, in seconds, when this quota next resets. */ + @JsonProperty("quota_reset_at") Double quotaResetAt, + /** Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. */ + @JsonProperty("token_based_billing") Boolean tokenBasedBilling +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshotsPremiumInteractions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshotsPremiumInteractions.java new file mode 100644 index 000000000..ca4a08b4f --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CopilotUserResponseQuotaSnapshotsPremiumInteractions.java @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Premium-interactions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record CopilotUserResponseQuotaSnapshotsPremiumInteractions( + /** Number of requests/units included in the entitlement for this period; `-1` denotes an unlimited entitlement. */ + @JsonProperty("entitlement") Double entitlement, + /** Count of additional pay-per-request usage consumed this period beyond the entitlement. */ + @JsonProperty("overage_count") Double overageCount, + /** Whether usage may continue at pay-per-request rates once the entitlement is exhausted. */ + @JsonProperty("overage_permitted") Boolean overagePermitted, + /** Percentage of the entitlement remaining at the snapshot timestamp. */ + @JsonProperty("percent_remaining") Double percentRemaining, + /** Identifier of the quota bucket this snapshot describes. */ + @JsonProperty("quota_id") String quotaId, + /** Amount of quota remaining at the snapshot timestamp. */ + @JsonProperty("quota_remaining") Double quotaRemaining, + /** Remaining entitlement/quota amount at the snapshot timestamp. */ + @JsonProperty("remaining") Double remaining, + /** Whether the entitlement for this category is unlimited. */ + @JsonProperty("unlimited") Boolean unlimited, + /** UTC timestamp when this snapshot was captured. */ + @JsonProperty("timestamp_utc") String timestampUtc, + /** Whether the user currently has quota available; when `false` and not unlimited, further requests are blocked until the quota resets. */ + @JsonProperty("has_quota") Boolean hasQuota, + /** Unix epoch time, in seconds, when this quota next resets. */ + @JsonProperty("quota_reset_at") Double quotaResetAt, + /** Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. */ + @JsonProperty("token_based_billing") Boolean tokenBasedBilling +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/EnvAuthInfo.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/EnvAuthInfo.java new file mode 100644 index 000000000..927058a3c --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/EnvAuthInfo.java @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Authentication-info variant for a token sourced from an environment variable, with host, optional login, token, and env var name. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class EnvAuthInfo extends AuthInfo { + + @JsonProperty("type") + private final String type = "env"; + + @Override + public String getType() { return type; } + + /** Authentication host (e.g. https://github.com or a GHES host). */ + @JsonProperty("host") + private String host; + + /** User login associated with the token. Undefined for server-to-server tokens (those starting with `ghs_`). */ + @JsonProperty("login") + private String login; + + /** The token value itself. Treat as a secret. */ + @JsonProperty("token") + private String token; + + /** Name of the environment variable the token was sourced from. */ + @JsonProperty("envVar") + private String envVar; + + /** Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. */ + @JsonProperty("copilotUser") + private CopilotUserResponse copilotUser; + + public String getHost() { return host; } + public void setHost(String host) { this.host = host; } + + public String getLogin() { return login; } + public void setLogin(String login) { this.login = login; } + + public String getToken() { return token; } + public void setToken(String token) { this.token = token; } + + public String getEnvVar() { return envVar; } + public void setEnvVar(String envVar) { this.envVar = envVar; } + + public CopilotUserResponse getCopilotUser() { return copilotUser; } + public void setCopilotUser(CopilotUserResponse copilotUser) { this.copilotUser = copilotUser; } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentSummary.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentSummary.java index af20d8e81..d1bd2329b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentSummary.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentSummary.java @@ -21,18 +21,33 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record FactoryAgentSummary( + /** Stable direct-agent identifier. */ @JsonProperty("agentId") String agentId, + /** Tool-call identifier that launched the agent. */ @JsonProperty("toolCallId") String toolCallId, + /** Owning factory run identifier. */ @JsonProperty("runId") String runId, + /** Phase identifier active when the agent was launched, or null. */ @JsonProperty("phaseId") String phaseId, + /** Friendly, non-unique name intended for display */ @JsonProperty("label") String label, + /** Friendly, non-unique name intended for display */ + @JsonProperty("displayName") String displayName, + /** Registered agent type. */ @JsonProperty("agentType") String agentType, + /** Current durable or live agent status. */ @JsonProperty("status") String status, + /** Model requested when the agent was launched. */ @JsonProperty("requestedModel") String requestedModel, + /** Concrete model resolved for the agent. */ @JsonProperty("resolvedModel") String resolvedModel, + /** Epoch milliseconds when the agent started. */ @JsonProperty("startedAt") Long startedAt, + /** Epoch milliseconds when the agent completed. */ @JsonProperty("completedAt") Long completedAt, + /** Accumulated active agent time in milliseconds. */ @JsonProperty("activeMs") Long activeMs, + /** Prompt-safe live activity text. */ @JsonProperty("activity") String activity ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryCurrentPhase.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryCurrentPhase.java index 6a8de8e82..e0a30f51a 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryCurrentPhase.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryCurrentPhase.java @@ -21,7 +21,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record FactoryCurrentPhase( + /** Current phase identifier. */ @JsonProperty("id") String id, + /** Zero-based declared phase ordinal, or null for an undeclared phase. */ @JsonProperty("ordinal") Long ordinal ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryDeclaredLimits.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryDeclaredLimits.java index 21f74646f..7fa99b005 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryDeclaredLimits.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryDeclaredLimits.java @@ -21,9 +21,13 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record FactoryDeclaredLimits( + /** Maximum concurrently active subagents. */ @JsonProperty("maxConcurrentSubagents") Long maxConcurrentSubagents, + /** Maximum total subagents spawned by the run. */ @JsonProperty("maxTotalSubagents") Long maxTotalSubagents, + /** Maximum accumulated active execution time in seconds. */ @JsonProperty("timeoutSeconds") Double timeoutSeconds, + /** Maximum AI credits consumed by subagents and descendants. */ @JsonProperty("maxAiCredits") Double maxAiCredits ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseObservation.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseObservation.java index aa04ef5ba..aa96e0cb9 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseObservation.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseObservation.java @@ -21,18 +21,31 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record FactoryPhaseObservation( + /** Phase identifier. */ @JsonProperty("id") String id, + /** Zero-based declared phase ordinal, or null for an undeclared phase. */ @JsonProperty("ordinal") Long ordinal, + /** Human-readable phase title. */ @JsonProperty("title") String title, + /** Optional human-readable phase detail. */ @JsonProperty("detail") String detail, + /** Derived lifecycle state of the phase. */ @JsonProperty("status") FactoryPhaseStatus status, + /** Most recent run attempt that entered this phase, or `0` if the phase has never been entered. */ @JsonProperty("lastEnteredRunAttempt") Long lastEnteredRunAttempt, + /** Number of times execution entered this phase. */ @JsonProperty("entryCount") Long entryCount, + /** Epoch milliseconds when this phase first started; for a skipped phase, the synthetic skip timestamp (equal to `completedAt`). */ @JsonProperty("startedAt") Long startedAt, + /** Epoch milliseconds when this phase completed; for a skipped phase, the synthetic skip timestamp (equal to `startedAt`). */ @JsonProperty("completedAt") Long completedAt, + /** Completed active time accumulated by this phase in milliseconds. */ @JsonProperty("accumulatedActiveMs") Long accumulatedActiveMs, + /** Current live active time for this phase in milliseconds. */ @JsonProperty("currentActiveMs") Long currentActiveMs, + /** Total direct agents associated with this phase. */ @JsonProperty("totalAgentCount") Long totalAgentCount, + /** Direct agents in this phase that are currently live. */ @JsonProperty("liveAgentCount") Long liveAgentCount ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressPage.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressPage.java index 56732d8f4..76278a158 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressPage.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressPage.java @@ -22,10 +22,15 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record FactoryProgressPage( + /** Progress records in sequence order. */ @JsonProperty("records") List records, + /** Oldest sequence number in this page, or null when empty. */ @JsonProperty("oldestSeq") Long oldestSeq, + /** Newest sequence number in this page, or null when empty. */ @JsonProperty("newestSeq") Long newestSeq, + /** Whether progress records older than this page exist. */ @JsonProperty("hasMoreOlder") Boolean hasMoreOlder, + /** Whether progress records newer than this page exist. */ @JsonProperty("hasMoreNewer") Boolean hasMoreNewer, /** Run revision reflected by this page. */ @JsonProperty("revision") Long revision diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunConsumed.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunConsumed.java index 62cec5f73..a492db26f 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunConsumed.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunConsumed.java @@ -21,8 +21,11 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record FactoryRunConsumed( + /** Accumulated active execution time in milliseconds. */ @JsonProperty("activeMs") Long activeMs, + /** Total subagents spawned by the run. */ @JsonProperty("subagents") Long subagents, + /** AI usage consumed by the run in nano-AIU. */ @JsonProperty("nanoAiu") Long nanoAiu ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java index fb90885ee..f482acfa1 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java @@ -21,24 +21,43 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record FactoryRunSummary( + /** Factory run identifier. */ @JsonProperty("runId") String runId, + /** Registered factory name. */ @JsonProperty("factoryName") String factoryName, + /** Human-readable factory description. */ @JsonProperty("description") String description, + /** Current factory run status. */ @JsonProperty("status") FactoryRunStatus status, + /** Monotonic durable run revision. */ @JsonProperty("revision") Long revision, + /** Epoch milliseconds when the run was created. */ @JsonProperty("createdAt") Long createdAt, + /** Epoch milliseconds when execution first started, or null before start. */ @JsonProperty("startedAt") Long startedAt, + /** Epoch milliseconds when the durable run was last updated. */ @JsonProperty("updatedAt") Long updatedAt, + /** Epoch milliseconds when the run completed, or null while nonterminal. */ @JsonProperty("completedAt") Long completedAt, + /** Current phase identity, or null before any phase is entered. */ @JsonProperty("currentPhase") FactoryCurrentPhase currentPhase, + /** Number of phases declared by the factory. */ @JsonProperty("declaredPhaseCount") Long declaredPhaseCount, + /** Number of direct factory agents currently live. */ @JsonProperty("liveAgentCount") Long liveAgentCount, + /** Total direct factory agents spawned across all attempts. */ @JsonProperty("totalSpawnedAgentCount") Long totalSpawnedAgentCount, + /** Durable resource consumption. */ @JsonProperty("consumed") FactoryRunConsumed consumed, + /** Resource ceilings declared by the factory. */ @JsonProperty("declaredLimits") FactoryDeclaredLimits declaredLimits, + /** Approved effective resource ceilings, or null until approved. */ @JsonProperty("approved") FactoryDeclaredLimits approved, + /** Epoch milliseconds when this live-overlay snapshot was observed. */ @JsonProperty("observedAt") Long observedAt, + /** Epoch milliseconds when the current active segment started, or null while inactive. */ @JsonProperty("activeSegmentStartedAt") Long activeSegmentStartedAt, + /** Terminal run outcome, or null while nonterminal. */ @JsonProperty("terminal") FactoryRunTerminal terminal ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java index 231c1b8a1..bf9bfa7db 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java @@ -21,9 +21,13 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record FactoryRunTerminal( + /** Human-readable terminal reason. */ @JsonProperty("reason") String reason, + /** Machine-readable terminal failure. */ @JsonProperty("failure") Object failure, + /** Human-readable terminal error. */ @JsonProperty("error") String error, + /** Prompt-safe preview of the completed result. */ @JsonProperty("resultPreview") String resultPreview ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GhCliAuthInfo.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GhCliAuthInfo.java new file mode 100644 index 000000000..5bf5e6292 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GhCliAuthInfo.java @@ -0,0 +1,58 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Authentication-info variant for GitHub CLI credentials, carrying host, login, and the `gh auth token` value. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class GhCliAuthInfo extends AuthInfo { + + @JsonProperty("type") + private final String type = "gh-cli"; + + @Override + public String getType() { return type; } + + /** Authentication host. */ + @JsonProperty("host") + private String host; + + /** User login as reported by `gh auth status`. */ + @JsonProperty("login") + private String login; + + /** The token returned by `gh auth token`. Treat as a secret. */ + @JsonProperty("token") + private String token; + + /** Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. */ + @JsonProperty("copilotUser") + private CopilotUserResponse copilotUser; + + public String getHost() { return host; } + public void setHost(String host) { this.host = host; } + + public String getLogin() { return login; } + public void setLogin(String login) { this.login = login; } + + public String getToken() { return token; } + public void setToken(String token) { this.token = token; } + + public CopilotUserResponse getCopilotUser() { return copilotUser; } + public void setCopilotUser(CopilotUserResponse copilotUser) { this.copilotUser = copilotUser; } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/HMACAuthInfo.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/HMACAuthInfo.java new file mode 100644 index 000000000..93cf2e35f --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/HMACAuthInfo.java @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Authentication-info variant for GitHub-internal HMAC auth, carrying the public GitHub host and HMAC secret. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class HMACAuthInfo extends AuthInfo { + + @JsonProperty("type") + private final String type = "hmac"; + + @Override + public String getType() { return type; } + + /** Authentication host. HMAC auth always targets the public GitHub host. */ + @JsonProperty("host") + private String host; + + /** HMAC secret used to sign requests. */ + @JsonProperty("hmac") + private String hmac; + + /** Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. */ + @JsonProperty("copilotUser") + private CopilotUserResponse copilotUser; + + public String getHost() { return host; } + public void setHost(String host) { this.host = host; } + + public String getHmac() { return hmac; } + public void setHmac(String hmac) { this.hmac = hmac; } + + public CopilotUserResponse getCopilotUser() { return copilotUser; } + public void setCopilotUser(CopilotUserResponse copilotUser) { this.copilotUser = copilotUser; } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/LlmInferenceHttpRequestStartRequest.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/LlmInferenceHttpRequestStartRequest.java index b846fcf37..a75733cb3 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/LlmInferenceHttpRequestStartRequest.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/LlmInferenceHttpRequestStartRequest.java @@ -31,6 +31,7 @@ public record LlmInferenceHttpRequestStartRequest( @JsonProperty("method") String method, /** Absolute request URL. */ @JsonProperty("url") String url, + /** HTTP request headers, preserving multiple values per name. */ @JsonProperty("headers") Map> headers, /** Transport the runtime would otherwise use for this request. `http` (the default when absent) covers plain HTTP and SSE responses; `websocket` indicates a full-duplex message channel where each body chunk maps to one WebSocket message and the `binary` flag distinguishes text from binary frames. The SDK consumer uses this to decide whether to service the request with an HTTP client or a WebSocket client. It is the one piece of request metadata the consumer cannot reliably infer from the URL or headers alone. */ @JsonProperty("transport") LlmInferenceHttpRequestStartTransport transport, diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/LlmInferenceHttpResponseStartParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/LlmInferenceHttpResponseStartParams.java index 69c26221b..dddc6a315 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/LlmInferenceHttpResponseStartParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/LlmInferenceHttpResponseStartParams.java @@ -32,6 +32,7 @@ public record LlmInferenceHttpResponseStartParams( @JsonProperty("status") Long status, /** Optional HTTP status reason phrase. */ @JsonProperty("statusText") String statusText, + /** HTTP response headers, preserving multiple values per name. */ @JsonProperty("headers") Map> headers ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpElicitationFormMode.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpElicitationFormMode.java new file mode 100644 index 000000000..8bb655e3e --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpElicitationFormMode.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 javax.annotation.processing.Generated; + +/** + * Structured MCP elicitation mode. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum McpElicitationFormMode { + /** The {@code form} variant. */ + FORM("form"); + + private final String value; + McpElicitationFormMode(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static McpElicitationFormMode fromValue(String value) { + for (McpElicitationFormMode v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown McpElicitationFormMode value: " + value); + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpFailedServer.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpFailedServer.java new file mode 100644 index 000000000..36009e491 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpFailedServer.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; + +/** + * MCP server whose connection attempt failed. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record McpFailedServer( + /** The config key of the server that failed to connect. */ + @JsonProperty("name") String name, + /** The captured connection failure detail. */ + @JsonProperty("error") String error +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeNeedsAuthReason.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeNeedsAuthReason.java new file mode 100644 index 000000000..967a01aab --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeNeedsAuthReason.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; + +/** + * Why a passive MCP OAuth probe determined authentication is needed. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum McpOauthProbeNeedsAuthReason { + /** The {@code initial} variant. */ + INITIAL("initial"), + /** The {@code refresh} variant. */ + REFRESH("refresh"), + /** The {@code upscope} variant. */ + UPSCOPE("upscope"); + + private final String value; + McpOauthProbeNeedsAuthReason(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static McpOauthProbeNeedsAuthReason fromValue(String value) { + for (McpOauthProbeNeedsAuthReason v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown McpOauthProbeNeedsAuthReason value: " + value); + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResult.java new file mode 100644 index 000000000..1a94e1714 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResult.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.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import javax.annotation.processing.Generated; + +/** + * Passive MCP OAuth probe result. `authenticated` means the server accepted the probe request while an OAuth-origin access token was attached; it does not prove the server required or independently validated that token. The probe does not make a second unauthenticated request. Failed is an expected probe-domain outcome; JSON-RPC errors are reserved for API-call failures. + * + * @since 1.0.0 + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "status", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = McpOauthProbeResultNoAuthRequired.class, name = "no-auth-required"), + @JsonSubTypes.Type(value = McpOauthProbeResultAuthenticated.class, name = "authenticated"), + @JsonSubTypes.Type(value = McpOauthProbeResultNeedsAuth.class, name = "needs-auth"), + @JsonSubTypes.Type(value = McpOauthProbeResultFailed.class, name = "failed") +}) +@JsonIgnoreProperties(ignoreUnknown = true) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public abstract class McpOauthProbeResult { + + /** + * Returns the discriminator value for this variant. + * + * @return the status discriminator + */ + public abstract String getStatus(); +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultAuthenticated.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultAuthenticated.java new file mode 100644 index 000000000..a56a257f8 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultAuthenticated.java @@ -0,0 +1,52 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Variant {@code authenticated} of {@link McpOauthProbeResult}. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class McpOauthProbeResultAuthenticated extends McpOauthProbeResult { + + @JsonProperty("status") + private final String status = "authenticated"; + + @Override + public String getStatus() { return status; } + + /** HTTP response returned by the server. */ + @JsonProperty("httpResponse") + private McpOauthProbeResultAuthenticatedHttpResponse httpResponse; + + public McpOauthProbeResultAuthenticatedHttpResponse getHttpResponse() { return httpResponse; } + public void setHttpResponse(McpOauthProbeResultAuthenticatedHttpResponse httpResponse) { this.httpResponse = httpResponse; } + + + /** Raw HTTP response details from the OAuth auth challenge, as observed by the runtime. */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record McpOauthProbeResultAuthenticatedHttpResponse( + /** HTTP status code returned with the auth challenge. */ + @JsonProperty("statusCode") Long statusCode, + /** HTTP response headers as observed by the runtime. Order and casing are transport-dependent, and duplicate header names may appear multiple times. */ + @JsonProperty("headers") List headers, + /** Complete UTF-8 response body for host-specific challenge handling, including an empty string for an empty body. Omitted when the complete body is not valid UTF-8; body read failures fail the HTTP operation rather than exposing a partial response. */ + @JsonProperty("body") String body + ) { + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultFailed.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultFailed.java new file mode 100644 index 000000000..ff35b8868 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultFailed.java @@ -0,0 +1,59 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Variant {@code failed} of {@link McpOauthProbeResult}. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class McpOauthProbeResultFailed extends McpOauthProbeResult { + + @JsonProperty("status") + private final String status = "failed"; + + @Override + public String getStatus() { return status; } + + /** Human-readable probe failure detail. */ + @JsonProperty("error") + private String error; + + /** HTTP response returned by the server, when the probe reached the server and captured the complete response. */ + @JsonProperty("httpResponse") + private McpOauthProbeResultFailedHttpResponse httpResponse; + + public String getError() { return error; } + public void setError(String error) { this.error = error; } + + public McpOauthProbeResultFailedHttpResponse getHttpResponse() { return httpResponse; } + public void setHttpResponse(McpOauthProbeResultFailedHttpResponse httpResponse) { this.httpResponse = httpResponse; } + + + /** Raw HTTP response details from the OAuth auth challenge, as observed by the runtime. */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record McpOauthProbeResultFailedHttpResponse( + /** HTTP status code returned with the auth challenge. */ + @JsonProperty("statusCode") Long statusCode, + /** HTTP response headers as observed by the runtime. Order and casing are transport-dependent, and duplicate header names may appear multiple times. */ + @JsonProperty("headers") List headers, + /** Complete UTF-8 response body for host-specific challenge handling, including an empty string for an empty body. Omitted when the complete body is not valid UTF-8; body read failures fail the HTTP operation rather than exposing a partial response. */ + @JsonProperty("body") String body + ) { + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultNeedsAuth.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultNeedsAuth.java new file mode 100644 index 000000000..75c828d05 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultNeedsAuth.java @@ -0,0 +1,79 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Variant {@code needs-auth} of {@link McpOauthProbeResult}. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class McpOauthProbeResultNeedsAuth extends McpOauthProbeResult { + + @JsonProperty("status") + private final String status = "needs-auth"; + + @Override + public String getStatus() { return status; } + + /** HTTP 401 or 403 response returned by the server. */ + @JsonProperty("httpResponse") + private McpOauthProbeResultNeedsAuthHttpResponse httpResponse; + + /** Why authentication is needed. */ + @JsonProperty("reason") + private McpOauthProbeNeedsAuthReason reason; + + /** Parsed WWW-Authenticate challenge parameters, when present and parseable. */ + @JsonProperty("wwwAuthenticateParams") + private McpOauthProbeResultNeedsAuthWwwAuthenticateParams wwwAuthenticateParams; + + public McpOauthProbeResultNeedsAuthHttpResponse getHttpResponse() { return httpResponse; } + public void setHttpResponse(McpOauthProbeResultNeedsAuthHttpResponse httpResponse) { this.httpResponse = httpResponse; } + + public McpOauthProbeNeedsAuthReason getReason() { return reason; } + public void setReason(McpOauthProbeNeedsAuthReason reason) { this.reason = reason; } + + public McpOauthProbeResultNeedsAuthWwwAuthenticateParams getWwwAuthenticateParams() { return wwwAuthenticateParams; } + public void setWwwAuthenticateParams(McpOauthProbeResultNeedsAuthWwwAuthenticateParams wwwAuthenticateParams) { this.wwwAuthenticateParams = wwwAuthenticateParams; } + + + /** Raw HTTP response details from the OAuth auth challenge, as observed by the runtime. */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record McpOauthProbeResultNeedsAuthHttpResponse( + /** HTTP status code returned with the auth challenge. */ + @JsonProperty("statusCode") Long statusCode, + /** HTTP response headers as observed by the runtime. Order and casing are transport-dependent, and duplicate header names may appear multiple times. */ + @JsonProperty("headers") List headers, + /** Complete UTF-8 response body for host-specific challenge handling, including an empty string for an empty body. Omitted when the complete body is not valid UTF-8; body read failures fail the HTTP operation rather than exposing a partial response. */ + @JsonProperty("body") String body + ) { + } + + /** OAuth WWW-Authenticate parameters parsed from an MCP auth challenge */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record McpOauthProbeResultNeedsAuthWwwAuthenticateParams( + /** Protected resource metadata URL from the WWW-Authenticate resource_metadata parameter, if present */ + @JsonProperty("resourceMetadataUrl") String resourceMetadataUrl, + /** Requested OAuth scopes from the WWW-Authenticate scope parameter, if present */ + @JsonProperty("scope") String scope, + /** OAuth error from the WWW-Authenticate error parameter, if present */ + @JsonProperty("error") String error + ) { + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultNoAuthRequired.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultNoAuthRequired.java new file mode 100644 index 000000000..6d66dd845 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpOauthProbeResultNoAuthRequired.java @@ -0,0 +1,52 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Variant {@code no-auth-required} of {@link McpOauthProbeResult}. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class McpOauthProbeResultNoAuthRequired extends McpOauthProbeResult { + + @JsonProperty("status") + private final String status = "no-auth-required"; + + @Override + public String getStatus() { return status; } + + /** HTTP response returned by the server. */ + @JsonProperty("httpResponse") + private McpOauthProbeResultNoAuthRequiredHttpResponse httpResponse; + + public McpOauthProbeResultNoAuthRequiredHttpResponse getHttpResponse() { return httpResponse; } + public void setHttpResponse(McpOauthProbeResultNoAuthRequiredHttpResponse httpResponse) { this.httpResponse = httpResponse; } + + + /** Raw HTTP response details from the OAuth auth challenge, as observed by the runtime. */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record McpOauthProbeResultNoAuthRequiredHttpResponse( + /** HTTP status code returned with the auth challenge. */ + @JsonProperty("statusCode") Long statusCode, + /** HTTP response headers as observed by the runtime. Order and casing are transport-dependent, and duplicate header names may appear multiple times. */ + @JsonProperty("headers") List headers, + /** Complete UTF-8 response body for host-specific challenge handling, including an empty string for an empty body. Omitted when the complete body is not valid UTF-8; body read failures fail the HTTP operation rather than exposing a partial response. */ + @JsonProperty("body") String body + ) { + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpTaskMetadata.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpTaskMetadata.java new file mode 100644 index 000000000..1b7fccb29 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpTaskMetadata.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; + +/** + * Metadata controlling an MCP task's lifetime. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record McpTaskMetadata( + /** Task time-to-live. */ + @JsonProperty("ttl") Long ttl +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/Model.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/Model.java index f002df540..8aadae4a2 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/Model.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/Model.java @@ -34,6 +34,10 @@ public record Model( @JsonProperty("billing") ModelBilling billing, /** Supported reasoning effort levels (only present if model supports reasoning effort) */ @JsonProperty("supportedReasoningEfforts") List supportedReasoningEfforts, + /** Default reasoning effort level (only present if model supports reasoning effort) */ + @JsonProperty("defaultReasoningEffort") String defaultReasoningEffort, + /** Context-window tiers this model offers, when the provider advertises them independently of tiered token pricing. Copilot models carry their tiers in `billing.tokenPrices`; a provider that has no pricing to publish (an agent host reached over AHP, for example) declares them here instead, so the model picker can still offer the tier toggle. */ + @JsonProperty("supportedContextTiers") List supportedContextTiers, /** Model capability category for grouping in the model picker */ @JsonProperty("modelPickerCategory") ModelPickerCategory modelPickerCategory, /** Relative cost tier for token-based billing users */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelChangeSource.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelChangeSource.java new file mode 100644 index 000000000..6e5d4ea8d --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelChangeSource.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; + +/** + * Origin of an effective session model change. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum ModelChangeSource { + /** The {@code model_command} variant. */ + MODEL_COMMAND("model_command"), + /** The {@code settings_command} variant. */ + SETTINGS_COMMAND("settings_command"), + /** The {@code config_command} variant. */ + CONFIG_COMMAND("config_command"), + /** The {@code model_picker} variant. */ + MODEL_PICKER("model_picker"), + /** The {@code managed_settings} variant. */ + MANAGED_SETTINGS("managed_settings"), + /** The {@code repo_settings} variant. */ + REPO_SETTINGS("repo_settings"), + /** The {@code startup} variant. */ + STARTUP("startup"), + /** The {@code agent} variant. */ + AGENT("agent"), + /** The {@code plan_mode} variant. */ + PLAN_MODE("plan_mode"), + /** The {@code automatic} variant. */ + AUTOMATIC("automatic"), + /** The {@code sdk} variant. */ + SDK("sdk"); + + private final String value; + ModelChangeSource(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static ModelChangeSource fromValue(String value) { + for (ModelChangeSource v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown ModelChangeSource value: " + value); + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicy.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicy.java index 2864bbd99..3efd398a0 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicy.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicy.java @@ -22,7 +22,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record OptionsUpdateAdditionalContentExclusionPolicy( + /** Content-exclusion rules to apply. */ @JsonProperty("rules") List rules, + /** Opaque policy update timestamp supplied by the host. */ @JsonProperty("last_updated_at") Object lastUpdatedAt, /** Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. */ @JsonProperty("scope") OptionsUpdateAdditionalContentExclusionPolicyScope scope diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRule.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRule.java index 135a7c7f8..047dc9fa0 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRule.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRule.java @@ -22,8 +22,11 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record OptionsUpdateAdditionalContentExclusionPolicyRule( + /** Path patterns covered by this rule. */ @JsonProperty("paths") List paths, + /** Conditions of which at least one must match. */ @JsonProperty("ifAnyMatch") List ifAnyMatch, + /** Conditions none of which may match. */ @JsonProperty("ifNoneMatch") List ifNoneMatch, /** Source descriptor for a `session.options.update` content-exclusion rule, with source name and type. */ @JsonProperty("source") OptionsUpdateAdditionalContentExclusionPolicyRuleSource source diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRuleSource.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRuleSource.java index a36372280..43ec75b1a 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRuleSource.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRuleSource.java @@ -21,7 +21,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record OptionsUpdateAdditionalContentExclusionPolicyRuleSource( + /** Name of the policy source. */ @JsonProperty("name") String name, + /** Type of the policy source. */ @JsonProperty("type") String type ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicy.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicy.java index 249c7598d..e451bfe49 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicy.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicy.java @@ -22,7 +22,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record PermissionsConfigureAdditionalContentExclusionPolicy( + /** Content-exclusion rules to apply. */ @JsonProperty("rules") List rules, + /** Opaque policy update timestamp supplied by the host. */ @JsonProperty("last_updated_at") Object lastUpdatedAt, /** Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` enumeration. */ @JsonProperty("scope") PermissionsConfigureAdditionalContentExclusionPolicyScope scope diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRule.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRule.java index b1afc50fc..4515f55d7 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRule.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRule.java @@ -22,8 +22,11 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record PermissionsConfigureAdditionalContentExclusionPolicyRule( + /** Path patterns covered by this rule. */ @JsonProperty("paths") List paths, + /** Conditions of which at least one must match. */ @JsonProperty("ifAnyMatch") List ifAnyMatch, + /** Conditions none of which may match. */ @JsonProperty("ifNoneMatch") List ifNoneMatch, /** Source descriptor for a `session.permissions.configure` content-exclusion rule, with source name and type. */ @JsonProperty("source") PermissionsConfigureAdditionalContentExclusionPolicyRuleSource source diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.java index f592ae799..e4eae2402 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.java @@ -21,7 +21,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record PermissionsConfigureAdditionalContentExclusionPolicyRuleSource( + /** Name of the policy source. */ @JsonProperty("name") String name, + /** Type of the policy source. */ @JsonProperty("type") String type ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PluginsBuiltinSetParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PluginsBuiltinSetParams.java new file mode 100644 index 000000000..f0d77fe64 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PluginsBuiltinSetParams.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 com.github.copilot.CopilotExperimental; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Trusted built-in plugin directories to use for this runtime process. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PluginsBuiltinSetParams( + /** Complete replacement set of trusted built-in plugin directories. Every entry must be an absolute local filesystem path no longer than 4096 characters. */ + @JsonProperty("paths") List paths +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionHostStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionHostStatus.java new file mode 100644 index 000000000..50b6355d9 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionHostStatus.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 javax.annotation.processing.Generated; + +/** + * What a remote host says one of its sessions is doing right now. Deliberately coarse: this is what a host can report for EVERY session in a catalogue listing, without a client subscribing to each one. AHP's `SessionSummary.status` is the source today; `input-needed` covers both a permission prompt and an `ask_user` question, since the summary does not say which. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum RemoteSessionHostStatus { + /** The {@code idle} variant. */ + IDLE("idle"), + /** The {@code working} variant. */ + WORKING("working"), + /** The {@code input-needed} variant. */ + INPUT_NEEDED("input-needed"), + /** The {@code error} variant. */ + ERROR("error"); + + private final String value; + RemoteSessionHostStatus(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static RemoteSessionHostStatus fromValue(String value) { + for (RemoteSessionHostStatus v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown RemoteSessionHostStatus value: " + value); + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataValue.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataValue.java index 46f1077d9..3ff7338d4 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataValue.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMetadataValue.java @@ -49,6 +49,10 @@ public record RemoteSessionMetadataValue( /** 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 + @JsonProperty("state") String state, + /** Live status as the owning host reports it in its session listing, so a row for a session running elsewhere can show that it is running. Absent for hosts that publish no such status (the cloud task managers), which read as idle. */ + @JsonProperty("hostStatus") RemoteSessionHostStatus hostStatus, + /** Host-supplied human description of what the session is doing right now ("running tests", "waiting for approval"). Optional in the protocol and absent on hosts that do not publish it, so never rely on it -- it enriches `hostStatus`, it does not replace it. */ + @JsonProperty("hostActivity") String hostActivity ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java index d9130eb81..cae6b6868 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java @@ -29,7 +29,7 @@ public record SandboxConfig( @JsonProperty("addCurrentWorkingDirectory") Boolean addCurrentWorkingDirectory, /** Credential-injection capability flags. */ @JsonProperty("auth") SandboxConfigAuth auth, - /** Whether to auto-grant read access to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Default: true (enabled by default; set to false to opt out). */ + /** Whether to auto-grant read access to the tool directories discovered on PATH and in toolchain environment variables (GOROOT, CARGO_HOME, JAVA_HOME, VIRTUAL_ENV, and similar), and to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Set to false to disable every grant listed above: user-installed toolchains (rustup, nvm, pyenv, conda, pipx) then need explicit userPolicy.filesystem entries — readonlyPaths to read them, plus readwriteFiles for a relocated CARGO_HOME's .package-cache and .global-cache, which Cargo locks on every build. Only these developer-tool grants are affected: the working directory (see addCurrentWorkingDirectory), temporary storage, session log paths, and system locations follow their own rules and stay granted, so commands still run. Default: true (enabled by default; set to false to opt out). */ @JsonProperty("allowDevToolAccess") Boolean allowDevToolAccess ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsApi.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsApi.java index 20dc6ab15..a7a28f5d1 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsApi.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsApi.java @@ -21,12 +21,15 @@ public final class ServerPluginsApi { private final RpcCaller caller; + /** API methods for the {@code plugins.builtin} sub-namespace. */ + public final ServerPluginsBuiltinApi builtin; /** 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.builtin = new ServerPluginsBuiltinApi(caller); this.marketplaces = new ServerPluginsMarketplacesApi(caller); } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsBuiltinApi.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsBuiltinApi.java new file mode 100644 index 000000000..0610fcb28 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsBuiltinApi.java @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * 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.github.copilot.CopilotExperimental; +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code plugins.builtin} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class ServerPluginsBuiltinApi { + + private final RpcCaller caller; + + /** @param caller the RPC transport function */ + ServerPluginsBuiltinApi(RpcCaller caller) { + this.caller = caller; + } + + /** + * Trusted built-in plugin directories to use for this runtime process. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + @CopilotExperimental + public CompletableFuture set(PluginsBuiltinSetParams params) { + return caller.invoke("plugins.builtin.set", params, Void.class); + } + +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAuthStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAuthStatus.java new file mode 100644 index 000000000..6f9d876dd --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAuthStatus.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; + +/** + * Authentication status and account metadata for the session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionAuthStatus( + /** Whether the session has resolved authentication */ + @JsonProperty("isAuthenticated") Boolean isAuthenticated, + /** Authentication type */ + @JsonProperty("authType") AuthInfoType authType, + /** Authentication host URL */ + @JsonProperty("host") String host, + /** Authenticated login/username, if available */ + @JsonProperty("login") String login, + /** Human-readable authentication status description */ + @JsonProperty("statusMessage") String statusMessage, + /** Copilot plan tier (e.g., individual_pro, business) */ + @JsonProperty("copilotPlan") String copilotPlan +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasApi.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasApi.java index 88a320e0b..e7cfc4be2 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasApi.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasApi.java @@ -26,12 +26,15 @@ public final class SessionCanvasApi { /** API methods for the {@code canvas.action} sub-namespace. */ public final SessionCanvasActionApi action; + /** API methods for the {@code canvas.provider} sub-namespace. */ + public final SessionCanvasProviderApi provider; /** @param caller the RPC transport function */ SessionCanvasApi(RpcCaller caller, String sessionId) { this.caller = caller; this.sessionId = sessionId; this.action = new SessionCanvasActionApi(caller, sessionId); + this.provider = new SessionCanvasProviderApi(caller, sessionId); } /** diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasProviderApi.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasProviderApi.java new file mode 100644 index 000000000..95fc7ca66 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasProviderApi.java @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * 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.github.copilot.CopilotExperimental; +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code canvas.provider} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionCanvasProviderApi { + + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionCanvasProviderApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Internal canvas provider registration parameters. + *

+ * 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 + */ + @CopilotExperimental + public CompletableFuture register(SessionCanvasProviderRegisterParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.canvas.provider.register", _p, Void.class); + } + + /** + * Internal canvas provider unregistration parameters. + *

+ * 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 + */ + @CopilotExperimental + public CompletableFuture unregister(SessionCanvasProviderUnregisterParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.canvas.provider.unregister", _p, Void.class); + } + +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasProviderRegisterParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasProviderRegisterParams.java new file mode 100644 index 000000000..304757667 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasProviderRegisterParams.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 com.github.copilot.CopilotExperimental; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Internal canvas provider registration parameters. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionCanvasProviderRegisterParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Connection identifier for callback routing */ + @JsonProperty("connectionId") String connectionId, + /** Provider metadata supplied by the host */ + @JsonProperty("info") Object info, + /** Canvas contributions supplied by the provider */ + @JsonProperty("canvases") List canvases +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasProviderUnregisterParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasProviderUnregisterParams.java new file mode 100644 index 000000000..f7b637ac6 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionCanvasProviderUnregisterParams.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 com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Internal canvas provider unregistration parameters. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionCanvasProviderUnregisterParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Connection identifier to unregister */ + @JsonProperty("connectionId") String connectionId +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailResult.java index 5da6f4979..01204cb83 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailResult.java @@ -25,27 +25,49 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionFactoryGetRunDetailResult( + /** Factory run identifier. */ @JsonProperty("runId") String runId, + /** Registered factory name. */ @JsonProperty("factoryName") String factoryName, + /** Human-readable factory description. */ @JsonProperty("description") String description, + /** Current factory run status. */ @JsonProperty("status") FactoryRunStatus status, + /** Monotonic durable run revision. */ @JsonProperty("revision") Long revision, + /** Epoch milliseconds when the run was created. */ @JsonProperty("createdAt") Long createdAt, + /** Epoch milliseconds when execution first started, or null before start. */ @JsonProperty("startedAt") Long startedAt, + /** Epoch milliseconds when the durable run was last updated. */ @JsonProperty("updatedAt") Long updatedAt, + /** Epoch milliseconds when the run completed, or null while nonterminal. */ @JsonProperty("completedAt") Long completedAt, + /** Current phase identity, or null before any phase is entered. */ @JsonProperty("currentPhase") FactoryCurrentPhase currentPhase, + /** Number of phases declared by the factory. */ @JsonProperty("declaredPhaseCount") Long declaredPhaseCount, + /** Number of direct factory agents currently live. */ @JsonProperty("liveAgentCount") Long liveAgentCount, + /** Total direct factory agents spawned across all attempts. */ @JsonProperty("totalSpawnedAgentCount") Long totalSpawnedAgentCount, + /** Durable resource consumption. */ @JsonProperty("consumed") FactoryRunConsumed consumed, + /** Resource ceilings declared by the factory. */ @JsonProperty("declaredLimits") FactoryDeclaredLimits declaredLimits, + /** Approved effective resource ceilings, or null until approved. */ @JsonProperty("approved") FactoryDeclaredLimits approved, + /** Epoch milliseconds when this live-overlay snapshot was observed. */ @JsonProperty("observedAt") Long observedAt, + /** Epoch milliseconds when the current active segment started, or null while inactive. */ @JsonProperty("activeSegmentStartedAt") Long activeSegmentStartedAt, + /** Terminal run outcome, or null while nonterminal. */ @JsonProperty("terminal") FactoryRunTerminal terminal, + /** Lifecycle and timing observations for each factory phase. */ @JsonProperty("phases") List phases, + /** Durable identities and live statuses for direct factory agents. */ @JsonProperty("agents") List agents, + /** Bidirectional page of durable factory progress. */ @JsonProperty("progress") FactoryProgressPage progress ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunProgressResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunProgressResult.java index 369fa07c2..2a4cb78cb 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunProgressResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunProgressResult.java @@ -25,10 +25,15 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionFactoryGetRunProgressResult( + /** Progress records in sequence order. */ @JsonProperty("records") List records, + /** Oldest sequence number in this page, or null when empty. */ @JsonProperty("oldestSeq") Long oldestSeq, + /** Newest sequence number in this page, or null when empty. */ @JsonProperty("newestSeq") Long newestSeq, + /** Whether progress records older than this page exist. */ @JsonProperty("hasMoreOlder") Boolean hasMoreOlder, + /** Whether progress records newer than this page exist. */ @JsonProperty("hasMoreNewer") Boolean hasMoreNewer, /** Run revision reflected by this page. */ @JsonProperty("revision") Long revision diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsResult.java index 3a23bc369..d081003e4 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsResult.java @@ -25,6 +25,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionFactoryListRunsResult( + /** Factory run summaries in durable creation order. */ @JsonProperty("runs") List runs, /** Oldest terminal-run cursor in this page, or null when the terminal window is empty. */ @JsonProperty("oldestSeq") Long oldestSeq, diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionError.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionError.java index cbe170a29..e25eaed86 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionError.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionError.java @@ -21,7 +21,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionFsSqliteTransactionError( + /** Machine-readable classification of the transaction failure. */ @JsonProperty("errorClass") SessionFsSqliteTransactionErrorClass errorClass, + /** Human-readable transaction failure message. */ @JsonProperty("message") String message ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionParams.java index f834d5595..f7699ff8f 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionParams.java @@ -27,6 +27,7 @@ public record SessionFsSqliteTransactionParams( /** Target session identifier */ @JsonProperty("sessionId") String sessionId, + /** Ordered SQL statements to execute in one transaction. */ @JsonProperty("statements") List statements ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionResult.java index f9c799b9b..1b662f404 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionResult.java @@ -25,7 +25,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionFsSqliteTransactionResult( + /** Per-statement query results in input order. */ @JsonProperty("results") List results, + /** Classified transaction failure, when execution did not succeed. */ @JsonProperty("error") SessionFsSqliteTransactionError error ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthApi.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthApi.java index 93fb87150..729979b5e 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthApi.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthApi.java @@ -8,6 +8,7 @@ package com.github.copilot.generated.rpc; import com.github.copilot.CopilotExperimental; +import java.util.List; import java.util.concurrent.CompletableFuture; import javax.annotation.processing.Generated; @@ -57,4 +58,107 @@ public CompletableFuture setCredentials(S return caller.invoke("session.gitHubAuth.setCredentials", _p, SessionGitHubAuthSetCredentialsResult.class); } + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + @CopilotExperimental + public CompletableFuture getCurrentAuthInfo() { + return caller.invoke("session.gitHubAuth.getCurrentAuthInfo", 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 + */ + @CopilotExperimental + public CompletableFuture> getAllAuthAvailable() { + return caller.invoke("session.gitHubAuth.getAllAuthAvailable", java.util.Map.of("sessionId", this.sessionId), RpcMapper.INSTANCE.getTypeFactory().constructCollectionType(List.class, SessionAuthStatus.class)); + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + @CopilotExperimental + public CompletableFuture refreshCopilotUser() { + return caller.invoke("session.gitHubAuth.refreshCopilotUser", java.util.Map.of("sessionId", this.sessionId), Void.class); + } + + /** + * Internal GitHub login parameters. + *

+ * 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 + */ + @CopilotExperimental + public CompletableFuture login(SessionGitHubAuthLoginParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.gitHubAuth.login", _p, AuthInfo.class); + } + + /** + * Parameters for switching the session's active authentication. + *

+ * 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 + */ + @CopilotExperimental + public CompletableFuture switchToAuth(SessionGitHubAuthSwitchToAuthParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.gitHubAuth.switchToAuth", _p, Void.class); + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + @CopilotExperimental + public CompletableFuture logout() { + return caller.invoke("session.gitHubAuth.logout", java.util.Map.of("sessionId", this.sessionId), Void.class); + } + + /** + * Parameters identifying a GitHub authentication to log out. + *

+ * 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 + */ + @CopilotExperimental + public CompletableFuture logoutUser(SessionGitHubAuthLogoutUserParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.gitHubAuth.logoutUser", _p, Void.class); + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + @CopilotExperimental + public CompletableFuture> lastAuthErrors() { + return caller.invoke("session.gitHubAuth.lastAuthErrors", java.util.Map.of("sessionId", this.sessionId), RpcMapper.INSTANCE.getTypeFactory().constructCollectionType(List.class, AuthValidationError.class)); + } + } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthGetAllAuthAvailableParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthGetAllAuthAvailableParams.java new file mode 100644 index 000000000..446642d74 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthGetAllAuthAvailableParams.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 com.github.copilot.CopilotExperimental; +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 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionGitHubAuthGetAllAuthAvailableParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthGetCurrentAuthInfoParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthGetCurrentAuthInfoParams.java new file mode 100644 index 000000000..88838f951 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthGetCurrentAuthInfoParams.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 com.github.copilot.CopilotExperimental; +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 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionGitHubAuthGetCurrentAuthInfoParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLastAuthErrorsParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLastAuthErrorsParams.java new file mode 100644 index 000000000..d4fc156b2 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLastAuthErrorsParams.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 com.github.copilot.CopilotExperimental; +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 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionGitHubAuthLastAuthErrorsParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLoginParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLoginParams.java new file mode 100644 index 000000000..e0d777956 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLoginParams.java @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * 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 com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Internal GitHub login parameters. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionGitHubAuthLoginParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** GitHub host URL */ + @JsonProperty("host") String host, + /** GitHub login */ + @JsonProperty("login") String login, + /** GitHub authentication token */ + @JsonProperty("token") String token, + /** Whether to persist the token after login */ + @JsonProperty("persist") Boolean persist +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLogoutParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLogoutParams.java new file mode 100644 index 000000000..172778d61 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLogoutParams.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 com.github.copilot.CopilotExperimental; +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 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionGitHubAuthLogoutParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLogoutUserParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLogoutUserParams.java new file mode 100644 index 000000000..1aafec781 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthLogoutUserParams.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 com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Parameters identifying a GitHub authentication to log out. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionGitHubAuthLogoutUserParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Authentication information to log out */ + @JsonProperty("authInfo") Object authInfo +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthRefreshCopilotUserParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthRefreshCopilotUserParams.java new file mode 100644 index 000000000..d0b9d33e5 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthRefreshCopilotUserParams.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 com.github.copilot.CopilotExperimental; +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 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionGitHubAuthRefreshCopilotUserParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthSwitchToAuthParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthSwitchToAuthParams.java new file mode 100644 index 000000000..7cd6f72b4 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionGitHubAuthSwitchToAuthParams.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 com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Parameters for switching the session's active authentication. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionGitHubAuthSwitchToAuthParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Authentication information to activate */ + @JsonProperty("authInfo") Object authInfo, + /** Optional token paired with the authentication information */ + @JsonProperty("token") String token +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionLimitPredictionTierOption.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionLimitPredictionTierOption.java index f468e53e0..ad2a6f82c 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionLimitPredictionTierOption.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionLimitPredictionTierOption.java @@ -21,6 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionLimitPredictionTierOption( + /** Semantic usage tier. */ @JsonProperty("tier") SessionLimitPredictionTier tier, /** AI-credit cap for this tier. */ @JsonProperty("cap") Double cap diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionManagedSettings.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionManagedSettings.java index ddba69d8b..cecaca8c1 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionManagedSettings.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionManagedSettings.java @@ -21,6 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionManagedSettings( + /** Managed permission policy injected by the SDK host. */ @JsonProperty("permissions") SessionManagedPermissions permissions ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthApi.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthApi.java index 1fdb292f8..cf4a3601e 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthApi.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthApi.java @@ -78,6 +78,22 @@ public CompletableFuture login(SessionMcpOauthLoginP return caller.invoke("session.mcp.oauth.login", _p, SessionMcpOauthLoginResult.class); } + /** + * Remote MCP server name for a passive OAuth status probe. + *

+ * 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 + */ + @CopilotExperimental + public CompletableFuture probe(SessionMcpOauthProbeParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.oauth.probe", _p, McpOauthProbeResult.class); + } + /** * Pending MCP OAuth request id to respond to. *

diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthProbeParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthProbeParams.java new file mode 100644 index 000000000..1980398e0 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthProbeParams.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 com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Remote MCP server name for a passive OAuth status probe. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpOauthProbeParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Name of the configured remote MCP server to probe. */ + @JsonProperty("serverName") String serverName +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadWithConfigResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadWithConfigResult.java index ba4fcf3b7..eba9a21c1 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadWithConfigResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadWithConfigResult.java @@ -28,6 +28,8 @@ public record SessionMcpReloadWithConfigResult( /** Servers filtered out before startup */ @JsonProperty("filteredServers") List filteredServers, /** Non-default servers allowed by policy */ - @JsonProperty("allowedServers") List allowedServers + @JsonProperty("allowedServers") List allowedServers, + /** Servers whose connection attempt failed. */ + @JsonProperty("failedServers") List failedServers ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelPriceCategory.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelPriceCategory.java index 295f6a01f..be637e948 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelPriceCategory.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelPriceCategory.java @@ -21,7 +21,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionModelPriceCategory( + /** CAPI model identifier. */ @JsonProperty("id") String id, + /** Cost category assigned to the model. */ @JsonProperty("priceCategory") ModelPickerPriceCategory priceCategory ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelSwitchToParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelSwitchToParams.java index fe49e2976..86eee836e 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelSwitchToParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelSwitchToParams.java @@ -38,6 +38,8 @@ public record SessionModelSwitchToParams( @JsonProperty("modelCapabilities") ModelCapabilitiesOverride modelCapabilities, /** Explicit context tier for the selected model. `"default"` / `"long_context"` apply the requested tier; omit this field to use normal model behavior with no explicit tier. */ @JsonProperty("contextTier") ContextTier contextTier, + /** Origin to record on the effective `session.model_change` event. Defaults to `sdk` when omitted. */ + @JsonProperty("source") ModelChangeSource source, /** When true, defer this switch (enqueue it) if another model change is already queued, even when no turn is active — so it drains last (FIFO) and wins over the already-queued change. Intended for genuine user-initiated model selections; internal restore/reapply switches omit it and apply immediately when no turn is active. When no other model change is queued this has no effect (a switch still applies immediately unless a turn is active). */ @JsonProperty("deferIfModelChangeQueued") Boolean deferIfModelChangeQueued ) { diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptionsAdditionalContentExclusionPolicy.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptionsAdditionalContentExclusionPolicy.java index bbc53711a..3ee2252d1 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptionsAdditionalContentExclusionPolicy.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptionsAdditionalContentExclusionPolicy.java @@ -22,7 +22,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionOpenOptionsAdditionalContentExclusionPolicy( + /** Content-exclusion rules to apply. */ @JsonProperty("rules") List rules, + /** Opaque policy update timestamp supplied by the host. */ @JsonProperty("last_updated_at") Object lastUpdatedAt, /** Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` enumeration. */ @JsonProperty("scope") SessionOpenOptionsAdditionalContentExclusionPolicyScope scope diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptionsAdditionalContentExclusionPolicyRule.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptionsAdditionalContentExclusionPolicyRule.java index 403550ae2..480235747 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptionsAdditionalContentExclusionPolicyRule.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptionsAdditionalContentExclusionPolicyRule.java @@ -22,8 +22,11 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionOpenOptionsAdditionalContentExclusionPolicyRule( + /** Path patterns covered by this rule. */ @JsonProperty("paths") List paths, + /** Conditions of which at least one must match. */ @JsonProperty("ifAnyMatch") List ifAnyMatch, + /** Conditions none of which may match. */ @JsonProperty("ifNoneMatch") List ifNoneMatch, /** Source descriptor for a `sessions.open` content-exclusion rule, with source name and type. */ @JsonProperty("source") SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource source diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource.java index 9cfa5894c..a119c9da7 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource.java @@ -21,7 +21,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource( + /** Name of the policy source. */ @JsonProperty("name") String name, + /** Type of the policy source. */ @JsonProperty("type") String type ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueDuplicateAtParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueDuplicateAtParams.java index bf16f9d35..0187e814b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueDuplicateAtParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueDuplicateAtParams.java @@ -26,6 +26,7 @@ public record SessionQueueDuplicateAtParams( /** Target session identifier */ @JsonProperty("sessionId") String sessionId, + /** Stable opaque ID of the queued item to duplicate. */ @JsonProperty("id") String id ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueInsertAtParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueInsertAtParams.java index 981aefb5f..11f0f7653 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueInsertAtParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueInsertAtParams.java @@ -28,6 +28,7 @@ public record SessionQueueInsertAtParams( @JsonProperty("sessionId") String sessionId, /** Zero-based position in the public visible queue. Values outside the queue clamp to an end. */ @JsonProperty("position") Long position, + /** Queued message contents and delivery metadata. */ @JsonProperty("message") QueueInsertMessage message ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueRemoveAtParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueRemoveAtParams.java index bc7cd3e12..5e890f85d 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueRemoveAtParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueRemoveAtParams.java @@ -26,6 +26,7 @@ public record SessionQueueRemoveAtParams( /** Target session identifier */ @JsonProperty("sessionId") String sessionId, + /** Stable opaque ID of the queued item to remove. */ @JsonProperty("id") String id ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueSendNowParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueSendNowParams.java index 6381636a8..9d23f47eb 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueSendNowParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueSendNowParams.java @@ -26,6 +26,7 @@ public record SessionQueueSendNowParams( /** Target session identifier */ @JsonProperty("sessionId") String sessionId, + /** Stable opaque ID of the queued item to steer into the live turn. */ @JsonProperty("id") String id ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueSetDrainPausedParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueSetDrainPausedParams.java index f51e33ea1..4674978d3 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueSetDrainPausedParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueSetDrainPausedParams.java @@ -26,6 +26,7 @@ public record SessionQueueSetDrainPausedParams( /** Target session identifier */ @JsonProperty("sessionId") String sessionId, + /** Whether queued-lane draining should be paused. */ @JsonProperty("paused") Boolean paused ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueUpdateTextParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueUpdateTextParams.java index 139a5ba2a..5f315d572 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueUpdateTextParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueueUpdateTextParams.java @@ -26,8 +26,11 @@ public record SessionQueueUpdateTextParams( /** Target session identifier */ @JsonProperty("sessionId") String sessionId, + /** Stable opaque ID of the queued item to edit. */ @JsonProperty("id") String id, + /** Replacement prompt sent to the model. */ @JsonProperty("prompt") String prompt, + /** Optional replacement prompt displayed to the user. */ @JsonProperty("displayPrompt") String displayPrompt ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsBuiltInToolAvailabilitySnapshot.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsBuiltInToolAvailabilitySnapshot.java index 98e6df29f..8a714d5cc 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsBuiltInToolAvailabilitySnapshot.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsBuiltInToolAvailabilitySnapshot.java @@ -21,7 +21,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionSettingsBuiltInToolAvailabilitySnapshot( + /** Whether the report-progress tool is available. */ @JsonProperty("reportProgress") Boolean reportProgress, + /** Whether the create-pull-request tool is available. */ @JsonProperty("createPullRequest") Boolean createPullRequest ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsEvaluatePredicateResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsEvaluatePredicateResult.java index 1f4a7ed32..3ab56b8ca 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsEvaluatePredicateResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsEvaluatePredicateResult.java @@ -24,6 +24,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionSettingsEvaluatePredicateResult( + /** Whether the named settings predicate evaluated to enabled. */ @JsonProperty("enabled") Boolean enabled ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsJobSnapshot.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsJobSnapshot.java index 463660d8a..8a807e391 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsJobSnapshot.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsJobSnapshot.java @@ -21,8 +21,11 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionSettingsJobSnapshot( + /** GitHub Actions event type for the job. */ @JsonProperty("eventType") String eventType, + /** Whether this is the workflow's trigger job. */ @JsonProperty("isTriggerJob") Boolean isTriggerJob, + /** Availability of job-specific built-in tools. */ @JsonProperty("builtInToolAvailability") SessionSettingsBuiltInToolAvailabilitySnapshot builtInToolAvailability ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsModelSnapshot.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsModelSnapshot.java index ce515c74d..e1eb54a25 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsModelSnapshot.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsModelSnapshot.java @@ -21,9 +21,13 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionSettingsModelSnapshot( + /** Selected model identifier. */ @JsonProperty("model") String model, + /** Default reasoning effort for the selected model. */ @JsonProperty("defaultReasoningEffort") String defaultReasoningEffort, + /** Agent job identifier for the session. */ @JsonProperty("instanceId") String instanceId, + /** Agent service callback URL for job and progress updates. */ @JsonProperty("callbackUrl") String callbackUrl ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsOnlineEvaluationSnapshot.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsOnlineEvaluationSnapshot.java index b1a5be6f3..999e1a2cb 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsOnlineEvaluationSnapshot.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsOnlineEvaluationSnapshot.java @@ -21,7 +21,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionSettingsOnlineEvaluationSnapshot( + /** Whether online evaluation is disabled. */ @JsonProperty("disableOnlineEvaluation") Boolean disableOnlineEvaluation, + /** Whether online-evaluation output-file generation is enabled. */ @JsonProperty("enableOnlineEvaluationOutputFile") Boolean enableOnlineEvaluationOutputFile ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsRepoSnapshot.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsRepoSnapshot.java index 960853c52..3651346bd 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsRepoSnapshot.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsRepoSnapshot.java @@ -21,17 +21,29 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionSettingsRepoSnapshot( + /** Repository name. */ @JsonProperty("name") String name, + /** GitHub repository database ID. */ @JsonProperty("id") Double id, + /** Checked-out repository branch. */ @JsonProperty("branch") String branch, + /** Checked-out commit SHA. */ @JsonProperty("commit") String commit, + /** Whether the repository is writable. */ @JsonProperty("readWrite") Boolean readWrite, + /** Repository owner login. */ @JsonProperty("ownerName") String ownerName, + /** GitHub repository owner database ID. */ @JsonProperty("ownerId") Double ownerId, + /** GitHub server base URL. */ @JsonProperty("serverUrl") String serverUrl, + /** GitHub server host name. */ @JsonProperty("host") String host, + /** Protocol used to access the GitHub host. */ @JsonProperty("hostProtocol") String hostProtocol, + /** GitHub secret-scanning service URL. */ @JsonProperty("secretScanningUrl") String secretScanningUrl, + /** Number of commits in the pull request. */ @JsonProperty("prCommitCount") Double prCommitCount ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsSnapshotResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsSnapshotResult.java index 0851474d6..1bcfe166f 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsSnapshotResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsSnapshotResult.java @@ -24,14 +24,23 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionSettingsSnapshotResult( + /** Agent runtime version selector copied from the session settings, such as `latest` or a runtime release identifier. */ @JsonProperty("version") String version, + /** Name of the SDK client that created the session. */ @JsonProperty("clientName") String clientName, + /** Session timeout in milliseconds. */ @JsonProperty("timeoutMs") Double timeoutMs, + /** Session start time as Unix epoch milliseconds. */ @JsonProperty("startTimeMs") Double startTimeMs, + /** Redacted repository and host settings. */ @JsonProperty("repo") SessionSettingsRepoSnapshot repo, + /** Redacted model routing settings. */ @JsonProperty("model") SessionSettingsModelSnapshot model, + /** Redacted validation and memory-tool settings. */ @JsonProperty("validation") SessionSettingsValidationSnapshot validation, + /** Redacted job settings. */ @JsonProperty("job") SessionSettingsJobSnapshot job, + /** Online-evaluation settings safe for SDK consumers. */ @JsonProperty("onlineEvaluation") SessionSettingsOnlineEvaluationSnapshot onlineEvaluation ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsValidationSnapshot.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsValidationSnapshot.java index 375cfdfec..314cc5b2b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsValidationSnapshot.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsValidationSnapshot.java @@ -21,14 +21,23 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionSettingsValidationSnapshot( + /** General validation timeout budget in seconds. */ @JsonProperty("timeout") Double timeout, + /** Dependabot validation timeout budget in seconds. */ @JsonProperty("dependabotTimeout") Double dependabotTimeout, + /** Whether CodeQL validation is enabled. */ @JsonProperty("codeqlEnabled") Boolean codeqlEnabled, + /** Whether code-review validation is enabled. */ @JsonProperty("codeReviewEnabled") Boolean codeReviewEnabled, + /** Model used for code-review validation. */ @JsonProperty("codeReviewModel") String codeReviewModel, + /** Whether advisory validation is enabled. */ @JsonProperty("advisoryEnabled") Boolean advisoryEnabled, + /** Whether secret-scanning validation is enabled. */ @JsonProperty("secretScanningEnabled") Boolean secretScanningEnabled, + /** Whether the memory-store tool is enabled. */ @JsonProperty("memoryStoreEnabled") Boolean memoryStoreEnabled, + /** Whether the memory-vote tool is enabled. */ @JsonProperty("memoryVoteEnabled") Boolean memoryVoteEnabled ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionTasksStartAgentParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionTasksStartAgentParams.java index 82daeec5e..87da305a6 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionTasksStartAgentParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionTasksStartAgentParams.java @@ -30,7 +30,7 @@ public record SessionTasksStartAgentParams( @JsonProperty("agentType") String agentType, /** Task prompt for the agent */ @JsonProperty("prompt") String prompt, - /** Short name for the agent, used to generate a human-readable ID */ + /** Friendly, non-unique name used when displaying the agent */ @JsonProperty("name") String name, /** Short description of the task */ @JsonProperty("description") String description, diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionUiElicitationParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionUiElicitationParams.java index ad754767e..72207e55b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionUiElicitationParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionUiElicitationParams.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.github.copilot.CopilotExperimental; +import java.util.Map; import javax.annotation.processing.Generated; /** @@ -26,9 +27,15 @@ public record SessionUiElicitationParams( /** Target session identifier */ @JsonProperty("sessionId") String sessionId, + /** Elicitation mode. Omitted and form are equivalent for structured elicitation. */ + @JsonProperty("mode") McpElicitationFormMode mode, /** Message describing what information is needed from the user */ @JsonProperty("message") String message, /** JSON Schema describing the form fields to present to the user */ - @JsonProperty("requestedSchema") UIElicitationSchema requestedSchema + @JsonProperty("requestedSchema") UIElicitationSchema requestedSchema, + /** MCP request metadata. */ + @JsonProperty("_meta") Map> meta, + /** MCP task metadata. */ + @JsonProperty("task") McpTaskMetadata task ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionUiElicitationResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionUiElicitationResult.java index b290cc7c6..bf250f9d7 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionUiElicitationResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionUiElicitationResult.java @@ -28,6 +28,8 @@ public record SessionUiElicitationResult( /** The user's response: accept (submitted), decline (rejected), or cancel (dismissed) */ @JsonProperty("action") UIElicitationResponseAction action, /** The form values submitted by the user (present when action is 'accept') */ - @JsonProperty("content") Map content + @JsonProperty("content") Map content, + /** MCP response metadata. */ + @JsonProperty("_meta") Map> meta ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesAddSummaryResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesAddSummaryResult.java index a50a0b5f5..6dd474df6 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesAddSummaryResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesAddSummaryResult.java @@ -25,7 +25,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionWorkspacesAddSummaryResult( + /** Metadata for the persisted summary. */ @JsonProperty("summary") Map summary, + /** Refreshed metadata for the containing workspace. */ @JsonProperty("workspace") Map workspace ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesEnsureResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesEnsureResult.java index 4a810fe12..c2d7e9ce3 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesEnsureResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesEnsureResult.java @@ -34,23 +34,39 @@ public record SessionWorkspacesEnsureResult( @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) public record SessionWorkspacesEnsureResultWorkspace( + /** Stable workspace identifier. */ @JsonProperty("id") String id, + /** Current working directory associated with the workspace. */ @JsonProperty("cwd") String cwd, + /** Git repository root associated with the workspace. */ @JsonProperty("git_root") String gitRoot, + /** Repository identifier associated with the workspace. */ @JsonProperty("repository") String repository, /** Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. */ @JsonProperty("host_type") WorkspacesWorkspaceDetailsHostType hostType, + /** Current Git branch. */ @JsonProperty("branch") String branch, + /** Workspace display name. */ @JsonProperty("name") String name, + /** Name of the client that created the workspace. */ @JsonProperty("client_name") String clientName, + /** Whether the workspace name was explicitly chosen by the user. */ @JsonProperty("user_named") Boolean userNamed, + /** Number of persisted summaries in the workspace. */ @JsonProperty("summary_count") Long summaryCount, + /** Timestamp when the workspace was created. */ @JsonProperty("created_at") OffsetDateTime createdAt, + /** Timestamp when the workspace was last updated. */ @JsonProperty("updated_at") OffsetDateTime updatedAt, + /** Whether the workspace session can be steered remotely. */ @JsonProperty("remote_steerable") Boolean remoteSteerable, + /** Mission Control task identifier associated with the workspace. */ @JsonProperty("mc_task_id") String mcTaskId, + /** Mission Control session identifier associated with the workspace. */ @JsonProperty("mc_session_id") String mcSessionId, + /** Most recent Mission Control event identifier observed for the workspace. */ @JsonProperty("mc_last_event_id") String mcLastEventId, + /** Whether the per-session Chronicle upgrade prompt was dismissed for the workspace. */ @JsonProperty("chronicle_sync_dismissed") Boolean chronicleSyncDismissed ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesGetWorkspaceResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesGetWorkspaceResult.java index 217ac7d44..6f4714a59 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesGetWorkspaceResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesGetWorkspaceResult.java @@ -34,23 +34,39 @@ public record SessionWorkspacesGetWorkspaceResult( @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) public record SessionWorkspacesGetWorkspaceResultWorkspace( + /** Stable workspace identifier. */ @JsonProperty("id") String id, + /** Current working directory associated with the workspace. */ @JsonProperty("cwd") String cwd, + /** Git repository root associated with the workspace. */ @JsonProperty("git_root") String gitRoot, + /** Repository identifier associated with the workspace. */ @JsonProperty("repository") String repository, /** Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. */ @JsonProperty("host_type") WorkspacesWorkspaceDetailsHostType hostType, + /** Current Git branch. */ @JsonProperty("branch") String branch, + /** Workspace display name. */ @JsonProperty("name") String name, + /** Name of the client that created the workspace. */ @JsonProperty("client_name") String clientName, + /** Whether the workspace name was explicitly chosen by the user. */ @JsonProperty("user_named") Boolean userNamed, + /** Number of persisted summaries in the workspace. */ @JsonProperty("summary_count") Long summaryCount, + /** Timestamp when the workspace was created. */ @JsonProperty("created_at") OffsetDateTime createdAt, + /** Timestamp when the workspace was last updated. */ @JsonProperty("updated_at") OffsetDateTime updatedAt, + /** Whether the workspace session can be steered remotely. */ @JsonProperty("remote_steerable") Boolean remoteSteerable, + /** Mission Control task identifier associated with the workspace. */ @JsonProperty("mc_task_id") String mcTaskId, + /** Mission Control session identifier associated with the workspace. */ @JsonProperty("mc_session_id") String mcSessionId, + /** Most recent Mission Control event identifier observed for the workspace. */ @JsonProperty("mc_last_event_id") String mcLastEventId, + /** Whether the per-session Chronicle upgrade prompt was dismissed for the workspace. */ @JsonProperty("chronicle_sync_dismissed") Boolean chronicleSyncDismissed ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesTruncateSummariesResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesTruncateSummariesResult.java index caa44d0b7..1dc348e67 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesTruncateSummariesResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesTruncateSummariesResult.java @@ -34,23 +34,39 @@ public record SessionWorkspacesTruncateSummariesResult( @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) public record SessionWorkspacesTruncateSummariesResultWorkspace( + /** Stable workspace identifier. */ @JsonProperty("id") String id, + /** Current working directory associated with the workspace. */ @JsonProperty("cwd") String cwd, + /** Git repository root associated with the workspace. */ @JsonProperty("git_root") String gitRoot, + /** Repository identifier associated with the workspace. */ @JsonProperty("repository") String repository, /** Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. */ @JsonProperty("host_type") WorkspacesWorkspaceDetailsHostType hostType, + /** Current Git branch. */ @JsonProperty("branch") String branch, + /** Workspace display name. */ @JsonProperty("name") String name, + /** Name of the client that created the workspace. */ @JsonProperty("client_name") String clientName, + /** Whether the workspace name was explicitly chosen by the user. */ @JsonProperty("user_named") Boolean userNamed, + /** Number of persisted summaries in the workspace. */ @JsonProperty("summary_count") Long summaryCount, + /** Timestamp when the workspace was created. */ @JsonProperty("created_at") OffsetDateTime createdAt, + /** Timestamp when the workspace was last updated. */ @JsonProperty("updated_at") OffsetDateTime updatedAt, + /** Whether the workspace session can be steered remotely. */ @JsonProperty("remote_steerable") Boolean remoteSteerable, + /** Mission Control task identifier associated with the workspace. */ @JsonProperty("mc_task_id") String mcTaskId, + /** Mission Control session identifier associated with the workspace. */ @JsonProperty("mc_session_id") String mcSessionId, + /** Most recent Mission Control event identifier observed for the workspace. */ @JsonProperty("mc_last_event_id") String mcLastEventId, + /** Whether the per-session Chronicle upgrade prompt was dismissed for the workspace. */ @JsonProperty("chronicle_sync_dismissed") Boolean chronicleSyncDismissed ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesUpdateMetadataResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesUpdateMetadataResult.java index 84ec13661..03731650a 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesUpdateMetadataResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesUpdateMetadataResult.java @@ -34,23 +34,39 @@ public record SessionWorkspacesUpdateMetadataResult( @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) public record SessionWorkspacesUpdateMetadataResultWorkspace( + /** Stable workspace identifier. */ @JsonProperty("id") String id, + /** Current working directory associated with the workspace. */ @JsonProperty("cwd") String cwd, + /** Git repository root associated with the workspace. */ @JsonProperty("git_root") String gitRoot, + /** Repository identifier associated with the workspace. */ @JsonProperty("repository") String repository, /** Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. */ @JsonProperty("host_type") WorkspacesWorkspaceDetailsHostType hostType, + /** Current Git branch. */ @JsonProperty("branch") String branch, + /** Workspace display name. */ @JsonProperty("name") String name, + /** Name of the client that created the workspace. */ @JsonProperty("client_name") String clientName, + /** Whether the workspace name was explicitly chosen by the user. */ @JsonProperty("user_named") Boolean userNamed, + /** Number of persisted summaries in the workspace. */ @JsonProperty("summary_count") Long summaryCount, + /** Timestamp when the workspace was created. */ @JsonProperty("created_at") OffsetDateTime createdAt, + /** Timestamp when the workspace was last updated. */ @JsonProperty("updated_at") OffsetDateTime updatedAt, + /** Whether the workspace session can be steered remotely. */ @JsonProperty("remote_steerable") Boolean remoteSteerable, + /** Mission Control task identifier associated with the workspace. */ @JsonProperty("mc_task_id") String mcTaskId, + /** Mission Control session identifier associated with the workspace. */ @JsonProperty("mc_session_id") String mcSessionId, + /** Most recent Mission Control event identifier observed for the workspace. */ @JsonProperty("mc_last_event_id") String mcLastEventId, + /** Whether the per-session Chronicle upgrade prompt was dismissed for the workspace. */ @JsonProperty("chronicle_sync_dismissed") Boolean chronicleSyncDismissed ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/TokenAuthInfo.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/TokenAuthInfo.java new file mode 100644 index 000000000..94e73177e --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/TokenAuthInfo.java @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Authentication-info variant for SDK-configured token authentication, carrying host and the secret token value. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class TokenAuthInfo extends AuthInfo { + + @JsonProperty("type") + private final String type = "token"; + + @Override + public String getType() { return type; } + + /** Authentication host. */ + @JsonProperty("host") + private String host; + + /** The token value itself. Treat as a secret. */ + @JsonProperty("token") + private String token; + + /** Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. */ + @JsonProperty("copilotUser") + private CopilotUserResponse copilotUser; + + public String getHost() { return host; } + public void setHost(String host) { this.host = host; } + + public String getToken() { return token; } + public void setToken(String token) { this.token = token; } + + public CopilotUserResponse getCopilotUser() { return copilotUser; } + public void setCopilotUser(CopilotUserResponse copilotUser) { this.copilotUser = copilotUser; } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/UIElicitationResponse.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/UIElicitationResponse.java index e157ee727..d611a8b44 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/UIElicitationResponse.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/UIElicitationResponse.java @@ -25,6 +25,8 @@ public record UIElicitationResponse( /** The user's response: accept (submitted), decline (rejected), or cancel (dismissed) */ @JsonProperty("action") UIElicitationResponseAction action, /** The form values submitted by the user (present when action is 'accept') */ - @JsonProperty("content") Map content + @JsonProperty("content") Map content, + /** MCP response metadata. */ + @JsonProperty("_meta") Map> meta ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/UserAuthInfo.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/UserAuthInfo.java new file mode 100644 index 000000000..6f136a17c --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/UserAuthInfo.java @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Authentication-info variant for OAuth user auth, with host and login; the token remains in the runtime secret store. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class UserAuthInfo extends AuthInfo { + + @JsonProperty("type") + private final String type = "user"; + + @Override + public String getType() { return type; } + + /** Authentication host. */ + @JsonProperty("host") + private String host; + + /** OAuth user login. */ + @JsonProperty("login") + private String login; + + /** Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. */ + @JsonProperty("copilotUser") + private CopilotUserResponse copilotUser; + + public String getHost() { return host; } + public void setHost(String host) { this.host = host; } + + public String getLogin() { return login; } + public void setLogin(String login) { this.login = login; } + + public CopilotUserResponse getCopilotUser() { return copilotUser; } + public void setCopilotUser(CopilotUserResponse copilotUser) { this.copilotUser = copilotUser; } +} diff --git a/nodejs/package-lock.json b/nodejs/package-lock.json index 0fe7660f8..147d9d8aa 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.79", + "@github/copilot": "^1.0.80-0", "koffi": "^3.1.0", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" @@ -700,9 +700,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.79.tgz", - "integrity": "sha512-uHBm2BYbKJgyfiKp1WokX7QUNHGvzEX0zaGeb3qM3CybP06rsJrX3JgQe95qwwma6vQz0ah9gV68ERW2JqaKRA==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.80-0.tgz", + "integrity": "sha512-y2LqQT9JHL5NSfSLWwUbuDCEanCYz8o+GNqpAh3/DG8LCctLVPMdVTyIoDIWDk/8GUjh9FakA/jS+MMV/ugbpQ==", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "detect-libc": "^2.1.2" @@ -711,20 +711,20 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.79", - "@github/copilot-darwin-x64": "1.0.79", - "@github/copilot-linux-arm64": "1.0.79", - "@github/copilot-linux-x64": "1.0.79", - "@github/copilot-linuxmusl-arm64": "1.0.79", - "@github/copilot-linuxmusl-x64": "1.0.79", - "@github/copilot-win32-arm64": "1.0.79", - "@github/copilot-win32-x64": "1.0.79" + "@github/copilot-darwin-arm64": "1.0.80-0", + "@github/copilot-darwin-x64": "1.0.80-0", + "@github/copilot-linux-arm64": "1.0.80-0", + "@github/copilot-linux-x64": "1.0.80-0", + "@github/copilot-linuxmusl-arm64": "1.0.80-0", + "@github/copilot-linuxmusl-x64": "1.0.80-0", + "@github/copilot-win32-arm64": "1.0.80-0", + "@github/copilot-win32-x64": "1.0.80-0" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.79.tgz", - "integrity": "sha512-rsw7JoMvlcxXb0yx08oIeEc0x2hUEwKSfhX9ESKfdMVt0Ckrzm4OEvNUyzOpOnLJ9+l3h/aI+u1w5g2ZU2K7UA==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.80-0.tgz", + "integrity": "sha512-gsRLSyPd4j15zivQLYOyvzb4sGrGS4p6e2Dwv1KIvcJ2IAwANyCcfXAXy0F0xB+B+mQgvCwCdkK1Rmjy+9ftow==", "cpu": [ "arm64" ], @@ -738,9 +738,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.79.tgz", - "integrity": "sha512-D983e2lXYnq+KhjA8mTZXonY1+LGfJN9BM195J73shUvx49nRJmibDHWLvVtGeYc+43evGUOAQrOqOspAhhWPQ==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.80-0.tgz", + "integrity": "sha512-D7PrkVmPb91MPa8H5nY9DfxWWR4Je+KZY/gmkJYDryTrWO7CabfE29yKqBwhi+WuBpVYWttDF3C1TeYTdOYpkg==", "cpu": [ "x64" ], @@ -754,9 +754,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.79.tgz", - "integrity": "sha512-qqaNkvi92Wg+4OZk/kTWC2nUG72G0vV6eRAo5+PnKaPmjdX1GsI0a+lPxXPEbzX0zYLi/8yrUyANwyyNEsGgXA==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.80-0.tgz", + "integrity": "sha512-b1LAUiv7bY9cNXiilztDZTt5+M29axFWF354eg8VXRGaWXfT77ctgfLb1UiTBABUKlIfHOuodq1cjtSOnYDtPg==", "cpu": [ "arm64" ], @@ -770,9 +770,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.79.tgz", - "integrity": "sha512-wzotZfvHkItutciLFMXZT2k9Qiii4Ta8tsVDCMQ7CP8hPxV91FyJ1yf3+FFSSfPvWrfYM6BOAiqIuX+LjgRuiw==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.80-0.tgz", + "integrity": "sha512-FvbdftgJzbU7yagRMO9Sitd7UOF8T4Amkbuss+rweZBOJBgsBWDvUJWCf9m06iuHaLYoICiGp94BFMowHyBIoQ==", "cpu": [ "x64" ], @@ -786,9 +786,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.79.tgz", - "integrity": "sha512-INtRSARl7DdNm2MXnn4GJuK+Y7QD24ANox02uH8htNQwRlNvdvg+YGS1V/mYgLDXFepeUjMjzTNC+i70+kh5uw==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.80-0.tgz", + "integrity": "sha512-AwoUp+RVRqAyTiqMnlKx8gIldxghZQxet31sWsLBDE/AS5Dv/ohx0wQ7aouKORUMkh+ZtIK+WmgyR7de1hRDPQ==", "cpu": [ "arm64" ], @@ -802,9 +802,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.79.tgz", - "integrity": "sha512-LxJAIfPP6Ok/9qpXGZuhnAft3W9JVcK9tbO3jWXcGDJT3v+2NtutyjmP/A7/cDXdTruXVQ4MybwAgacN8Gj/sg==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.80-0.tgz", + "integrity": "sha512-9RCoTNtaDnC2r68ecHrpORmTjaSaV9hUdRJb9nsh46En9SSkcEl4yvQ14Fl9HJ95BhKHqE6krf7YxCgAKTQ3bA==", "cpu": [ "x64" ], @@ -818,9 +818,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.79.tgz", - "integrity": "sha512-5wg/ayCBTVy4g4FdO/9BJZRVARY0sgjAn9rBkw5BSJMv4u7Mvxg5Sftlift+V5UWxTyCSHAELZ5IHKvox4Yi8w==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.80-0.tgz", + "integrity": "sha512-ypxN5LRkXgvEDjSYOQ9lMXrZAC+NVWeIBSd/ywGiA4wg7XtH2VBbaiYMPvX6R6xIrn4LUK+/UlYwwIqf8laXhw==", "cpu": [ "arm64" ], @@ -834,9 +834,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.79.tgz", - "integrity": "sha512-FTpThWwwCDYnLdE0pfdo5zpAQLLVg36kmC2IKyVMuCYv9iPe7rE1mz7ng/UITN9M3TAMBrwHSvCV3pITvw4W8Q==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.80-0.tgz", + "integrity": "sha512-uKrkfKblj+sIthys3a/RYU5muLtMd5Wc5NstbCJHD7DLqGbDK7Fec9REBr4/NHGGI/24FJhCXJNEBPgE5urgew==", "cpu": [ "x64" ], diff --git a/nodejs/package.json b/nodejs/package.json index 437a77a01..4d6ef2d5a 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -56,7 +56,7 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.79", + "@github/copilot": "^1.0.80-0", "koffi": "^3.1.0", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" diff --git a/nodejs/samples/package-lock.json b/nodejs/samples/package-lock.json index 66b4df470..ec9c5d7b7 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.79", + "@github/copilot": "^1.0.80-0", "koffi": "^3.1.0", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" diff --git a/nodejs/src/generated/rpc.ts b/nodejs/src/generated/rpc.ts index cefc8ef4d..7c8c99a8b 100644 --- a/nodejs/src/generated/rpc.ts +++ b/nodejs/src/generated/rpc.ts @@ -5,7 +5,7 @@ import type { MessageConnection } from "vscode-jsonrpc/node.js"; -import type { AbortReason, Attachment, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, McpServerSource, McpServerStatus, PermissionPromptRequest, PermissionRule, ReasoningSummary, SessionEvent, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval, Verbosity } from "./session-events.js"; +import type { AbortReason, Attachment, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, McpOauthHttpResponse, McpOauthWWWAuthenticateParams, McpServerSource, McpServerStatus, ModelChangeSource, PermissionPromptRequest, PermissionRule, ReasoningSummary, SessionEvent, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval, Verbosity } from "./session-events.js"; /** A value that can be represented losslessly on the SDK JSON wire. */ export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue }; @@ -269,6 +269,14 @@ export type AuthInfoType = | "token" /** Authentication from a Copilot API token. */ | "copilot-api-token"; +/** + * Validation errors from the most recent authentication attempt. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "AuthValidationErrors". + */ +/** @experimental */ +export type AuthValidationErrors = AuthValidationError[]; /** * JSON Schema for canvas open input * @@ -399,6 +407,9 @@ export type DebugCollectLogsDestination = * When true, create the archive atomically without overwriting an existing file by appending ` (N)` before the extension as needed. Defaults to false. */ noOverwrite?: boolean; + /** + * Destination variant discriminator. + */ kind: "archive"; } | { @@ -406,6 +417,9 @@ export type DebugCollectLogsDestination = * Directory where redacted files should be staged. The directory is created if needed. */ outputDirectory: string; + /** + * Destination variant discriminator. + */ kind: "directory"; }; /** @@ -688,6 +702,9 @@ export type FactoryRunFailure = * Factory run identifier. */ runId: string; + /** + * Factory failure variant discriminator. + */ type: "factory_limit_reached"; } | { @@ -699,6 +716,9 @@ export type FactoryRunFailure = * Human-readable reason the resume did not proceed. */ reason: string; + /** + * Factory failure variant discriminator. + */ type: "factory_resume_declined"; } | { @@ -711,6 +731,9 @@ export type FactoryRunFailure = * Factory run identifier. */ runId: string; + /** + * Factory failure variant discriminator. + */ type: "factory_durable_failure"; } | { @@ -722,6 +745,9 @@ export type FactoryRunFailure = * Confirmed usage in nano-AIU, representing the floor of what the run spent. */ drainedNanoAiu: number; + /** + * Factory failure variant discriminator. + */ type: "factory_accounting_incomplete"; }; /** @@ -1152,13 +1178,21 @@ export type McpAppsSetHostContextDetailsPlatform = /** Host runs on a mobile device */ | "mobile"; /** - * MCP server configuration (stdio process or remote HTTP/SSE) + * Serializable MCP server configuration (stdio process or remote HTTP/SSE) * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema - * via the `definition` "McpServerConfig". + * via the `definition` "McpSerializableServerConfig". + */ +/** @experimental */ +export type McpSerializableServerConfig = McpServerConfigStdio | McpServerConfigHttp; +/** + * Telemetry-obfuscation policy for an MCP server's tools. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpSafeForTelemetry". */ /** @experimental */ -export type McpServerConfig = McpServerConfigStdio | McpServerConfigHttp; +export type McpSafeForTelemetry = boolean | McpSafeForTelemetryFields; /** * Set to `true` to use defaults, or provide an object with additional auth or OIDC settings. * @@ -1179,6 +1213,18 @@ export type McpServerConfigDeferTools = | "auto" /** Tools are always included in the initial tool list, even when tool search is enabled. */ | "never"; +/** + * Local MCP transport type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpServerConfigStdioType". + */ +/** @experimental */ +export type McpServerConfigStdioType = + /** Legacy alias for the local stdio transport. */ + | "local" + /** Server communicates over stdio with a local child process. */ + | "stdio"; /** * Remote transport type. Defaults to "http" when omitted. * @@ -1203,6 +1249,14 @@ export type McpServerConfigHttpOauthGrantType = | "authorization_code" /** Headless client credentials flow using the configured OAuth client. */ | "client_credentials"; +/** + * Structured MCP elicitation mode. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpElicitationFormMode". + */ +/** @experimental */ +export type McpElicitationFormMode = "form"; /** * Host response: supply dynamic headers or decline this refresh. * @@ -1218,9 +1272,15 @@ export type McpHeadersHandlePendingHeadersRefreshRequest = headers: { [k: string]: string | undefined; }; + /** + * Headers-refresh response variant discriminator. + */ kind: "headers"; } | { + /** + * Headers-refresh response variant discriminator. + */ kind: "none"; }; /** @@ -1256,9 +1316,15 @@ export type McpOauthPendingRequestResponse = * Token lifetime in seconds, if known. */ expiresIn?: number; + /** + * OAuth response variant discriminator. + */ kind: "token"; } | { + /** + * OAuth response variant discriminator. + */ kind: "cancelled"; }; /** @@ -1273,6 +1339,70 @@ export type McpOauthLoginGrantType = | "authorization_code" /** Headless OAuth flow where a confidential client authenticates directly with a client secret. */ | "client_credentials"; +/** + * Why a passive MCP OAuth probe determined authentication is needed. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpOauthProbeNeedsAuthReason". + */ +/** @experimental */ +export type McpOauthProbeNeedsAuthReason = + /** No token was sent and the server requires authentication. */ + | "initial" + /** A cached token was sent and rejected. */ + | "refresh" + /** The server returned a 403 insufficient_scope challenge, indicating additional scopes or audience are needed. */ + | "upscope"; +/** + * Passive MCP OAuth probe result. `authenticated` means the server accepted the probe request while an OAuth-origin access token was attached; it does not prove the server required or independently validated that token. The probe does not make a second unauthenticated request. Failed is an expected probe-domain outcome; JSON-RPC errors are reserved for API-call failures. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpOauthProbeResult". + */ +/** @experimental */ +export type McpOauthProbeResult = + | { + httpResponse: McpOauthHttpResponse; + /** + * Probe outcome variant discriminator. + */ + status: "no-auth-required"; + } + | { + httpResponse: McpOauthHttpResponse; + /** + * Probe outcome variant discriminator. + */ + status: "authenticated"; + } + | { + httpResponse: McpOauthHttpResponse; + reason: McpOauthProbeNeedsAuthReason; + wwwAuthenticateParams?: McpOauthWWWAuthenticateParams; + /** + * Probe outcome variant discriminator. + */ + status: "needs-auth"; + } + | { + /** + * Human-readable probe failure detail. + */ + error: string; + httpResponse?: McpOauthHttpResponse; + /** + * Probe outcome variant discriminator. + */ + status: "failed"; + }; +/** + * MCP server configuration (stdio, remote HTTP/SSE, or in-process) + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpServerConfig". + */ +/** @experimental */ +export type McpServerConfig = (McpServerConfigStdio | McpServerConfigHttp) | undefined; /** * 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. * @@ -1287,6 +1417,15 @@ export type McpSamplingExecutionAction = | "failure" /** The sampling inference was cancelled before completion. */ | "cancelled"; +/** + * In-process MCP transport type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpServerConfigMemoryType". + */ +/** @experimental */ +/** @internal */ +export type McpServerConfigMemoryType = "memory"; /** * 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". * @@ -1697,7 +1836,8 @@ export type PermissionDecisionApproveForSessionApproval = | PermissionDecisionApproveForSessionApprovalCustomTool | PermissionDecisionApproveForSessionApprovalExtensionManagement | PermissionDecisionApproveForSessionApprovalFactory - | PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess; + | PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess + | PermissionDecisionApproveForSessionApprovalExtensionEnvAccess; /** * Approval to persist for this location * @@ -1715,7 +1855,8 @@ export type PermissionDecisionApproveForLocationApproval = | PermissionDecisionApproveForLocationApprovalCustomTool | PermissionDecisionApproveForLocationApprovalExtensionManagement | PermissionDecisionApproveForLocationApprovalFactory - | PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess; + | PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess + | PermissionDecisionApproveForLocationApprovalExtensionEnvAccess; /** * Disposition of a permission request as observed by the responding client. * @@ -1779,7 +1920,8 @@ export type PermissionsLocationsAddToolApprovalDetails = | PermissionsLocationsAddToolApprovalDetailsCustomTool | PermissionsLocationsAddToolApprovalDetailsExtensionManagement | PermissionsLocationsAddToolApprovalDetailsFactory - | PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess; + | PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess + | PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess; /** * Whether the location is a git repo or directory * @@ -2039,6 +2181,22 @@ export type RemoteSessionMode = | "export" /** Enable both remote session export and remote steering. */ | "on"; +/** + * What a remote host says one of its sessions is doing right now. Deliberately coarse: this is what a host can report for EVERY session in a catalogue listing, without a client subscribing to each one. AHP's `SessionSummary.status` is the source today; `input-needed` covers both a permission prompt and an `ask_user` question, since the summary does not say which. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "RemoteSessionHostStatus". + */ +/** @experimental */ +export type RemoteSessionHostStatus = + /** No turn is running. */ + | "idle" + /** A turn is running. */ + | "working" + /** The session is blocked on the user: a permission prompt or an `ask_user` question. */ + | "input-needed" + /** The session ended its last turn in an error. */ + | "error"; /** * Whether the remote task originated from CCA or CLI `--remote`. * @@ -2051,6 +2209,14 @@ export type RemoteSessionMetadataTaskType = | "cca" /** CLI remote task. */ | "cli"; +/** + * Current authentication information, or null when no authentication is active. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionAuthInfoResult". + */ +/** @experimental */ +export type SessionAuthInfoResult = AuthInfo | null; /** * Session capability enabled for this session * @@ -2227,10 +2393,16 @@ export type SessionLimitPredictionRequest = export type SessionLimitPredictionResult = | { prediction: SessionLimitPredictionDetails; + /** + * Prediction result variant discriminator. + */ kind: "available"; } | { reason: SessionLimitPredictionUnavailableReason; + /** + * Prediction result variant discriminator. + */ kind: "unavailable"; }; /** @@ -2835,6 +3007,30 @@ export type AccountGetAllUsersResult = AccountAllUsers[]; */ /** @experimental */ export type SessionCancelAllBackgroundAgentsResult = number; +/** + * Authentication accounts available to the internal session host. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionGitHubAuthGetAllAuthAvailableResult". + */ +/** @experimental */ +export type SessionGitHubAuthGetAllAuthAvailableResult = SessionAuthStatus[]; +/** + * Whether the current authentication was logged out. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionGitHubAuthLogoutResult". + */ +/** @experimental */ +export type SessionGitHubAuthLogoutResult = boolean; +/** + * Whether the requested authentication was logged out. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionGitHubAuthLogoutUserResult". + */ +/** @experimental */ +export type SessionGitHubAuthLogoutUserResult = boolean; /** * Parameters for aborting the current turn @@ -2960,6 +3156,9 @@ export interface CopilotUserResponse { [k: string]: unknown | undefined; } | ({ + /** + * GitHub login of the organization. + */ login?: | ( | { @@ -2968,6 +3167,9 @@ export interface CopilotUserResponse { | string ) | null; + /** + * Display name of the organization. + */ name?: | ( | { @@ -3056,10 +3258,25 @@ export interface CopilotUserResponse { */ /** @experimental */ export interface CopilotUserResponseEndpoints { + /** + * Copilot API endpoint URL. + */ api?: string; + /** + * Origin-tracker endpoint URL. + */ "origin-tracker"?: string; + /** + * Copilot proxy endpoint URL. + */ proxy?: string; + /** + * Copilot telemetry endpoint URL. + */ telemetry?: string; + /** + * Experimental-service endpoint URL. + */ exp?: string; } /** @@ -3978,6 +4195,23 @@ export interface AllowAllPermissionState { enabled: boolean; mode?: PermissionsAllowAllMode; } +/** + * Validation error from an authentication attempt. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "AuthValidationError". + */ +/** @experimental */ +export interface AuthValidationError { + /** + * Authentication validation error message + */ + message: string; + /** + * Optional message returned by GitHub + */ + githubMessage?: string; +} /** * The running runtime's complete catalog of well-known built-in model IDs, including supported models and additional IDs with built-in metadata. * @@ -4353,6 +4587,40 @@ export interface CanvasProviderOpenResult { */ status?: string; } +/** + * Internal canvas provider registration parameters. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "CanvasProviderRegisterRequest". + */ +/** @experimental */ +export interface CanvasProviderRegisterRequest { + /** + * Connection identifier for callback routing + */ + connectionId: string; + /** + * Provider metadata supplied by the host + */ + info: JsonValue; + /** + * Canvas contributions supplied by the provider + */ + canvases: JsonValue[]; +} +/** + * Internal canvas provider unregistration parameters. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "CanvasProviderUnregisterRequest". + */ +/** @experimental */ +export interface CanvasProviderUnregisterRequest { + /** + * Connection identifier to unregister + */ + connectionId: string; +} /** * Options scoped to the built-in CAPI (Copilot API) provider. * @@ -5787,18 +6055,61 @@ export interface FactoryAgentResult { */ /** @experimental */ export interface FactoryAgentSummary { + /** + * Stable direct-agent identifier. + */ agentId: string; + /** + * Tool-call identifier that launched the agent. + */ toolCallId: string; + /** + * Owning factory run identifier. + */ runId: string; + /** + * Phase identifier active when the agent was launched, or null. + */ phaseId: string | null; + /** + * Friendly, non-unique name intended for display + */ label: string; + /** + * Friendly, non-unique name intended for display + */ + displayName?: string; + /** + * Registered agent type. + */ agentType: string; + /** + * Current durable or live agent status. + */ status: string; + /** + * Model requested when the agent was launched. + */ requestedModel?: string; + /** + * Concrete model resolved for the agent. + */ resolvedModel?: string; + /** + * Epoch milliseconds when the agent started. + */ startedAt?: number; + /** + * Epoch milliseconds when the agent completed. + */ completedAt?: number; + /** + * Accumulated active agent time in milliseconds. + */ activeMs: number; + /** + * Prompt-safe live activity text. + */ activity?: string; } /** @@ -5822,7 +6133,13 @@ export interface FactoryCancelRequest { */ /** @experimental */ export interface FactoryCurrentPhase { + /** + * Current phase identifier. + */ id: string; + /** + * Zero-based declared phase ordinal, or null for an undeclared phase. + */ ordinal: number | null; } /** @@ -5833,9 +6150,21 @@ export interface FactoryCurrentPhase { */ /** @experimental */ export interface FactoryDeclaredLimits { + /** + * Maximum concurrently active subagents. + */ maxConcurrentSubagents?: number; + /** + * Maximum total subagents spawned by the run. + */ maxTotalSubagents?: number; + /** + * Maximum accumulated active execution time in seconds. + */ timeoutSeconds?: number; + /** + * Maximum AI credits consumed by subagents and descendants. + */ maxAiCredits?: number; } /** @@ -6014,6 +6343,9 @@ export interface FactoryListRunsRequest { */ /** @experimental */ export interface FactoryListRunsResult { + /** + * Factory run summaries in durable creation order. + */ runs: FactoryRunSummary[]; /** * Oldest terminal-run cursor in this page, or null when the terminal window is empty. @@ -6040,24 +6372,72 @@ export interface FactoryListRunsResult { */ /** @experimental */ export interface FactoryRunSummary { + /** + * Factory run identifier. + */ runId: string; + /** + * Registered factory name. + */ factoryName: string; + /** + * Human-readable factory description. + */ description: string; status: FactoryRunStatus; + /** + * Monotonic durable run revision. + */ revision: number; + /** + * Epoch milliseconds when the run was created. + */ createdAt: number; + /** + * Epoch milliseconds when execution first started, or null before start. + */ startedAt: number | null; + /** + * Epoch milliseconds when the durable run was last updated. + */ updatedAt: number; + /** + * Epoch milliseconds when the run completed, or null while nonterminal. + */ completedAt: number | null; + /** + * Current phase identity, or null before any phase is entered. + */ currentPhase: FactoryCurrentPhase | null; + /** + * Number of phases declared by the factory. + */ declaredPhaseCount: number; + /** + * Number of direct factory agents currently live. + */ liveAgentCount: number; + /** + * Total direct factory agents spawned across all attempts. + */ totalSpawnedAgentCount: number; consumed: FactoryRunConsumed; declaredLimits: FactoryDeclaredLimits; + /** + * Approved effective resource ceilings, or null until approved. + */ approved: FactoryDeclaredLimits | null; + /** + * Epoch milliseconds when this live-overlay snapshot was observed. + */ observedAt: number; + /** + * Epoch milliseconds when the current active segment started, or null while inactive. + */ activeSegmentStartedAt: number | null; + /** + * Terminal run outcome, or null while nonterminal. + */ terminal: FactoryRunTerminal | null; } /** @@ -6068,8 +6448,17 @@ export interface FactoryRunSummary { */ /** @experimental */ export interface FactoryRunConsumed { + /** + * Accumulated active execution time in milliseconds. + */ activeMs: number; + /** + * Total subagents spawned by the run. + */ subagents: number; + /** + * AI usage consumed by the run in nano-AIU. + */ nanoAiu: number; } /** @@ -6080,9 +6469,18 @@ export interface FactoryRunConsumed { */ /** @experimental */ export interface FactoryRunTerminal { + /** + * Human-readable terminal reason. + */ reason?: string; failure?: FactoryRunFailure; + /** + * Human-readable terminal error. + */ error?: string; + /** + * Prompt-safe preview of the completed result. + */ resultPreview?: string; } /** @@ -6132,18 +6530,54 @@ export interface FactoryLogRequest { */ /** @experimental */ export interface FactoryPhaseObservation { + /** + * Phase identifier. + */ id: string; + /** + * Zero-based declared phase ordinal, or null for an undeclared phase. + */ ordinal: number | null; + /** + * Human-readable phase title. + */ title: string; - detail?: string; + /** + * Optional human-readable phase detail. + */ + detail?: string; status: FactoryPhaseStatus; + /** + * Most recent run attempt that entered this phase, or `0` if the phase has never been entered. + */ lastEnteredRunAttempt: number; + /** + * Number of times execution entered this phase. + */ entryCount: number; + /** + * Epoch milliseconds when this phase first started; for a skipped phase, the synthetic skip timestamp (equal to `completedAt`). + */ startedAt?: number; + /** + * Epoch milliseconds when this phase completed; for a skipped phase, the synthetic skip timestamp (equal to `startedAt`). + */ completedAt?: number; + /** + * Completed active time accumulated by this phase in milliseconds. + */ accumulatedActiveMs: number; + /** + * Current live active time for this phase in milliseconds. + */ currentActiveMs: number; + /** + * Total direct agents associated with this phase. + */ totalAgentCount: number; + /** + * Direct agents in this phase that are currently live. + */ liveAgentCount: number; } /** @@ -6184,10 +6618,25 @@ export interface FactoryProgressLine { */ /** @experimental */ export interface FactoryProgressPage { + /** + * Progress records in sequence order. + */ records: FactoryProgressLine[]; + /** + * Oldest sequence number in this page, or null when empty. + */ oldestSeq: number | null; + /** + * Newest sequence number in this page, or null when empty. + */ newestSeq: number | null; + /** + * Whether progress records older than this page exist. + */ hasMoreOlder: boolean; + /** + * Whether progress records newer than this page exist. + */ hasMoreNewer: boolean; /** * Run revision reflected by this page. @@ -6286,26 +6735,80 @@ export interface FactoryRunResult { */ /** @experimental */ export interface FactoryRunDetail { + /** + * Factory run identifier. + */ runId: string; + /** + * Registered factory name. + */ factoryName: string; + /** + * Human-readable factory description. + */ description: string; status: FactoryRunStatus; + /** + * Monotonic durable run revision. + */ revision: number; + /** + * Epoch milliseconds when the run was created. + */ createdAt: number; + /** + * Epoch milliseconds when execution first started, or null before start. + */ startedAt: number | null; + /** + * Epoch milliseconds when the durable run was last updated. + */ updatedAt: number; + /** + * Epoch milliseconds when the run completed, or null while nonterminal. + */ completedAt: number | null; + /** + * Current phase identity, or null before any phase is entered. + */ currentPhase: FactoryCurrentPhase | null; + /** + * Number of phases declared by the factory. + */ declaredPhaseCount: number; + /** + * Number of direct factory agents currently live. + */ liveAgentCount: number; + /** + * Total direct factory agents spawned across all attempts. + */ totalSpawnedAgentCount: number; consumed: FactoryRunConsumed; declaredLimits: FactoryDeclaredLimits; + /** + * Approved effective resource ceilings, or null until approved. + */ approved: FactoryDeclaredLimits | null; + /** + * Epoch milliseconds when this live-overlay snapshot was observed. + */ observedAt: number; + /** + * Epoch milliseconds when the current active segment started, or null while inactive. + */ activeSegmentStartedAt: number | null; + /** + * Terminal run outcome, or null while nonterminal. + */ terminal: FactoryRunTerminal | null; + /** + * Lifecycle and timing observations for each factory phase. + */ phases: FactoryPhaseObservation[]; + /** + * Durable identities and live statuses for direct factory agents. + */ agents: FactoryAgentSummary[]; progress: FactoryProgressPage; } @@ -6962,12 +7465,21 @@ export interface InstalledPluginSourceGitHub { * Constant value. Always "github". */ source: "github"; + /** + * GitHub repository in `owner/repo` form. + */ repo: string; + /** + * Optional Git ref to resolve. + */ ref?: string; /** * Optional full 40-character hexadecimal commit SHA. */ sha?: string; + /** + * Optional repository-relative path to the plugin. + */ path?: string; } /** @@ -6982,12 +7494,21 @@ export interface InstalledPluginSourceUrl { * Constant value. Always "url". */ source: "url"; + /** + * URL of the plugin source. + */ url: string; + /** + * Optional Git ref to resolve. + */ ref?: string; /** * Optional full 40-character hexadecimal commit SHA. */ sha?: string; + /** + * Optional source-relative path to the plugin. + */ path?: string; } /** @@ -7002,6 +7523,9 @@ export interface InstalledPluginSourceLocal { * Constant value. Always "local". */ source: "local"; + /** + * Local filesystem path to the plugin. + */ path: string; } /** @@ -7999,7 +8523,7 @@ export interface McpConfigAddRequest { * Unique name for the MCP server */ name: string; - config: McpServerConfig; + config: McpSerializableServerConfig; } /** * Stdio MCP server configuration launched as a child process. @@ -8009,6 +8533,11 @@ export interface McpConfigAddRequest { */ /** @experimental */ export interface McpServerConfigStdio { + /** + * Optional human-readable server name. + */ + displayName?: string; + safeForTelemetry?: McpSafeForTelemetry; /** * Tools to include. Defaults to all tools if not specified. */ @@ -8019,7 +8548,7 @@ export interface McpServerConfigStdio { isDefaultServer?: boolean; filterMapping?: FilterMapping; /** - * Timeout in milliseconds for tool calls to this server. + * Timeout in milliseconds for tool discovery and tool calls. */ timeout?: number; oidc?: McpServerAuthConfig; @@ -8029,6 +8558,43 @@ export interface McpServerConfigStdio { * Set to true to disable persisted MCP tool snapshots for this server. Live tool discovery is unaffected. */ disableToolCache?: boolean; + /** + * Whether secret masking is disabled for calls to this server. + */ + disableSecretMasking?: boolean; + /** + * Tool names excluded after the include filter is applied. + */ + excludeTools?: string[]; + /** + * Event types this server receives as Copilot notifications. + */ + events?: string[]; + /** + * Copilot notification types this server may send to the host. + */ + notifications?: string[]; + source?: McpServerSource; + /** + * Plugin that provided this server. + */ + sourcePlugin?: string; + /** + * Version of the plugin that provided this server. + */ + sourcePluginVersion?: string; + /** + * Whether the providing plugin uses the Open Plugin Spec. + */ + sourcePluginSpec?: boolean; + /** + * Source file path recorded while loading the config. + */ + sourcePath?: string; + /** + * Configuration warnings recorded while loading the server. + */ + configWarnings?: string[]; /** * Executable command used to start the Stdio MCP server process. */ @@ -8047,6 +8613,24 @@ export interface McpServerConfigStdio { env?: { [k: string]: string | undefined; }; + type?: McpServerConfigStdioType; +} +/** + * Per-field MCP telemetry-obfuscation policy. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpSafeForTelemetryFields". + */ +/** @experimental */ +export interface McpSafeForTelemetryFields { + /** + * Whether the MCP tool name may be included in telemetry without obfuscation. + */ + name: boolean; + /** + * Whether MCP tool input names may be included in telemetry without obfuscation. + */ + inputsNames: boolean; } /** * Authentication settings with optional redirect port configuration. @@ -8069,6 +8653,11 @@ export interface McpServerAuthConfigRedirectPort { */ /** @experimental */ export interface McpServerConfigHttp { + /** + * Optional human-readable server name. + */ + displayName?: string; + safeForTelemetry?: McpSafeForTelemetry; /** * Tools to include. Defaults to all tools if not specified. */ @@ -8080,7 +8669,7 @@ export interface McpServerConfigHttp { isDefaultServer?: boolean; filterMapping?: FilterMapping; /** - * Timeout in milliseconds for tool calls to this server. + * Timeout in milliseconds for tool discovery and tool calls. */ timeout?: number; oidc?: McpServerAuthConfig; @@ -8090,6 +8679,43 @@ export interface McpServerConfigHttp { * Set to true to disable persisted MCP tool snapshots for this server. Live tool discovery is unaffected. */ disableToolCache?: boolean; + /** + * Whether secret masking is disabled for calls to this server. + */ + disableSecretMasking?: boolean; + /** + * Tool names excluded after the include filter is applied. + */ + excludeTools?: string[]; + /** + * Event types this server receives as Copilot notifications. + */ + events?: string[]; + /** + * Copilot notification types this server may send to the host. + */ + notifications?: string[]; + source?: McpServerSource; + /** + * Plugin that provided this server. + */ + sourcePlugin?: string; + /** + * Version of the plugin that provided this server. + */ + sourcePluginVersion?: string; + /** + * Whether the providing plugin uses the Open Plugin Spec. + */ + sourcePluginSpec?: boolean; + /** + * Source file path recorded while loading the config. + */ + sourcePath?: string; + /** + * Configuration warnings recorded while loading the server. + */ + configWarnings?: string[]; /** * URL of the remote MCP server endpoint. */ @@ -8100,6 +8726,10 @@ export interface McpServerConfigHttp { headers?: { [k: string]: string | undefined; }; + /** + * Dynamic-header refresh cache lifetime in milliseconds. + */ + headersRefreshTtlMs?: number; /** * OAuth client ID for a pre-registered remote MCP OAuth client. */ @@ -8148,7 +8778,7 @@ export interface McpConfigList { * All MCP servers from user config, keyed by name */ servers: { - [k: string]: McpServerConfig; + [k: string]: McpSerializableServerConfig; }; } /** @@ -8176,7 +8806,7 @@ export interface McpConfigUpdateRequest { * Name of the MCP server to update */ name: string; - config: McpServerConfig; + config: McpSerializableServerConfig; } /** * Opaque auth info used to configure GitHub MCP. @@ -8301,6 +8931,23 @@ export interface McpExecuteSamplingRequest { export interface McpExecuteSamplingResult { [k: string]: unknown | undefined; } +/** + * MCP server whose connection attempt failed. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpFailedServer". + */ +/** @experimental */ +export interface McpFailedServer { + /** + * The config key of the server that failed to connect. + */ + name: string; + /** + * The captured connection failure detail. + */ + error?: string; +} /** * MCP server filtered by policy, with name, reason, and optional redacted reason. * @@ -8607,6 +9254,19 @@ export interface McpOauthLoginResult { */ authorizationUrl?: string; } +/** + * Remote MCP server name for a passive OAuth status probe. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpOauthProbeRequest". + */ +/** @experimental */ +export interface McpOauthProbeRequest { + /** + * Name of the configured remote MCP server to probe. + */ + serverName: string; +} /** * Pending MCP OAuth request id to respond to. * @@ -8665,6 +9325,34 @@ export interface McpRegisterExternalClientRequest { */ config: OpaqueInProcessValue; } +/** + * In-process MCP reload configuration. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpReloadConfig". + */ +/** @experimental */ +/** @internal */ +export interface McpReloadConfig { + mcpServers: { + [k: string]: McpServerConfig | undefined; + }; + disabledServers?: string[]; + enabledServers?: string[]; + /** + * Server names the CLI enabled for this session via `--enable-mcp-server`. + */ + cliEnabledServers?: string[]; + mcp3pEnabled?: boolean; + includeWorkspaceSources?: boolean; + configFilter?: OpaqueInProcessValue; + githubMcpToolOptions?: OpaqueInProcessValue; + githubMcpUserOverride?: boolean; + secretStore?: OpaqueInProcessValue; + activeGitHubToken?: string; + useCachedToolSnapshots?: boolean; + forceRestart?: boolean; +} /** * Opaque MCP reload configuration. * @@ -8674,12 +9362,7 @@ export interface McpRegisterExternalClientRequest { /** @experimental */ /** @internal */ export interface McpReloadWithConfigRequest { - /** - * Opaque runtime MCP reload configuration. Marked internal: an in-process runtime shape (reloadMcpServers throws over the wire). - * - * @internal - */ - config: OpaqueInProcessValue; + config: unknown; } /** * Indicates whether the auto-managed `github` MCP server was removed (false when nothing to remove). @@ -8989,7 +9672,7 @@ export interface McpRestartServerRequest { * Name of the MCP server to restart */ serverName: string; - config?: McpServerConfig; + config?: McpSerializableServerConfig; } /** * Outcome of an MCP sampling execution: success result, failure error, or cancellation. @@ -9033,6 +9716,84 @@ export interface McpServer { */ error?: string; } +/** + * In-process MCP server configuration used by embedded SDK clients. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpServerConfigMemory". + */ +/** @experimental */ +/** @internal */ +export interface McpServerConfigMemory { + type: McpServerConfigMemoryType; + /** + * In-process MCP server instance. This value cannot cross a JSON-RPC boundary. + * + * @internal + */ + serverInstance: OpaqueInProcessValue; + /** + * Tools to include. Defaults to all tools if not specified. + */ + tools?: string[]; + /** + * Optional human-readable server name. + */ + displayName?: string; + /** + * Whether this server is a built-in fallback. + */ + isDefaultServer?: boolean; + filterMapping?: FilterMapping; + safeForTelemetry?: McpSafeForTelemetry; + /** + * Timeout in milliseconds for tool discovery and tool calls. + */ + timeout?: number; + oidc?: McpServerAuthConfig; + deferTools?: McpServerConfigDeferTools; + /** + * Whether persisted tool snapshots are disabled. + */ + disableToolCache?: boolean; + /** + * Whether secret masking is disabled for calls to this server. + */ + disableSecretMasking?: boolean; + /** + * Tool names excluded after the include filter is applied. + */ + excludeTools?: string[]; + /** + * Event types this server receives as Copilot notifications. + */ + events?: string[]; + /** + * Copilot notification types this server may send to the host. + */ + notifications?: string[]; + source?: McpServerSource; + /** + * Plugin that provided this server. + */ + sourcePlugin?: string; + /** + * Version of the plugin that provided this server. + */ + sourcePluginVersion?: string; + /** + * Whether the providing plugin uses the Open Plugin Spec. + */ + sourcePluginSpec?: boolean; + /** + * Source file path recorded while loading the config. + */ + sourcePath?: string; + /** + * Configuration warnings recorded while loading the server. + */ + configWarnings?: string[]; +} /** * MCP servers configured for the session, with their connection status and host-level state. * @@ -9079,7 +9840,7 @@ export interface McpStartServerRequest { * Name of the MCP server to start */ serverName: string; - config?: McpServerConfig; + config?: McpSerializableServerConfig; } /** * MCP server startup filtering result. @@ -9097,6 +9858,10 @@ export interface McpStartServersResult { * Non-default servers allowed by policy */ allowedServers?: McpAllowedServer[]; + /** + * Servers whose connection attempt failed. + */ + failedServers?: McpFailedServer[]; } /** * Server name for an individual MCP server stop. @@ -9111,6 +9876,19 @@ export interface McpStopServerRequest { */ serverName: string; } +/** + * Metadata controlling an MCP task's lifetime. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "McpTaskMetadata". + */ +/** @experimental */ +export interface McpTaskMetadata { + /** + * Task time-to-live. + */ + ttl?: number; +} /** * Server name identifying the external client to remove. * @@ -9407,6 +10185,14 @@ export interface Model { * Supported reasoning effort levels (only present if model supports reasoning effort) */ supportedReasoningEfforts?: string[]; + /** + * Default reasoning effort level (only present if model supports reasoning effort) + */ + defaultReasoningEffort?: string; + /** + * Context-window tiers this model offers, when the provider advertises them independently of tiered token pricing. Copilot models carry their tiers in `billing.tokenPrices`; a provider that has no pricing to publish (an agent host reached over AHP, for example) declares them here instead, so the model picker can still offer the tier toggle. + */ + supportedContextTiers?: string[]; modelPickerCategory?: ModelPickerCategory; modelPickerPriceCategory?: ModelPickerPriceCategory; } @@ -9762,6 +10548,7 @@ export interface ModelSwitchToRequest { verbosity?: Verbosity; modelCapabilities?: ModelCapabilitiesOverride; contextTier?: ContextTier; + source?: ModelChangeSource; /** * When true, defer this switch (enqueue it) if another model change is already queued, even when no turn is active — so it drains last (FIFO) and wins over the already-queued change. Intended for genuine user-initiated model selections; internal restore/reapply switches omit it and apply immediately when no turn is active. When no other model change is queued this has no effect (a switch still applies immediately unless a turn is active). */ @@ -9906,7 +10693,13 @@ export interface NameSetRequest { */ /** @experimental */ export interface OptionsUpdateAdditionalContentExclusionPolicy { + /** + * Content-exclusion rules to apply. + */ rules: OptionsUpdateAdditionalContentExclusionPolicyRule[]; + /** + * Opaque policy update timestamp supplied by the host. + */ last_updated_at: JsonValue; scope: OptionsUpdateAdditionalContentExclusionPolicyScope; } @@ -9918,8 +10711,17 @@ export interface OptionsUpdateAdditionalContentExclusionPolicy { */ /** @experimental */ export interface OptionsUpdateAdditionalContentExclusionPolicyRule { + /** + * Path patterns covered by this rule. + */ paths: string[]; + /** + * Conditions of which at least one must match. + */ ifAnyMatch?: string[]; + /** + * Conditions none of which may match. + */ ifNoneMatch?: string[]; source: OptionsUpdateAdditionalContentExclusionPolicyRuleSource; } @@ -9931,7 +10733,13 @@ export interface OptionsUpdateAdditionalContentExclusionPolicyRule { */ /** @experimental */ export interface OptionsUpdateAdditionalContentExclusionPolicyRuleSource { + /** + * Name of the policy source. + */ name: string; + /** + * Type of the policy source. + */ type: string; } /** @@ -10158,6 +10966,29 @@ export interface PermissionDecisionApproveForSessionApprovalExtensionPermissionA */ extensionName: string; } +/** + * Session-scoped approval details for an extension's access to sensitive environment variables, keyed by extension name and the exact set of variable names. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForSessionApprovalExtensionEnvAccess". + */ +/** @experimental */ +export interface PermissionDecisionApproveForSessionApprovalExtensionEnvAccess { + /** + * Approval covering an extension's request to read sensitive environment variables. + */ + kind: "extension-env-access"; + /** + * Extension name. + */ + extensionName: string; + /** + * Names of the sensitive environment variables this approval covers. Values are never persisted. + * + * @minItems 1 + */ + environmentVariables: [string, ...string[]]; +} /** * Permission-decision request variant to approve and persist a permission for a project location, with approval details and location key. * @@ -10338,6 +11169,29 @@ export interface PermissionDecisionApproveForLocationApprovalExtensionPermission */ extensionName: string; } +/** + * Location-scoped approval details for an extension's access to sensitive environment variables, keyed by extension name and the exact set of variable names. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionDecisionApproveForLocationApprovalExtensionEnvAccess". + */ +/** @experimental */ +export interface PermissionDecisionApproveForLocationApprovalExtensionEnvAccess { + /** + * Approval covering an extension's request to read sensitive environment variables. + */ + kind: "extension-env-access"; + /** + * Extension name. + */ + extensionName: string; + /** + * Names of the sensitive environment variables this approval covers. Values are never persisted. + * + * @minItems 1 + */ + environmentVariables: [string, ...string[]]; +} /** * Permission-decision request variant to permanently approve a URL domain across sessions. * @@ -10743,6 +11597,29 @@ export interface PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAc */ extensionName: string; } +/** + * Location-persisted tool approval details for an extension's access to sensitive environment variables, keyed by extension name and the exact set of variable names. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess". + */ +/** @experimental */ +export interface PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess { + /** + * Approval covering an extension's request to read sensitive environment variables. + */ + kind: "extension-env-access"; + /** + * Extension name. + */ + extensionName: string; + /** + * Names of the sensitive environment variables this approval covers. Values are never persisted. + * + * @minItems 1 + */ + environmentVariables: [string, ...string[]]; +} /** * Working directory to load persisted location permissions for. * @@ -10984,7 +11861,13 @@ export interface PermissionRulesSet { */ /** @experimental */ export interface PermissionsConfigureAdditionalContentExclusionPolicy { + /** + * Content-exclusion rules to apply. + */ rules: PermissionsConfigureAdditionalContentExclusionPolicyRule[]; + /** + * Opaque policy update timestamp supplied by the host. + */ last_updated_at: JsonValue; scope: PermissionsConfigureAdditionalContentExclusionPolicyScope; } @@ -10996,8 +11879,17 @@ export interface PermissionsConfigureAdditionalContentExclusionPolicy { */ /** @experimental */ export interface PermissionsConfigureAdditionalContentExclusionPolicyRule { + /** + * Path patterns covered by this rule. + */ paths: string[]; + /** + * Conditions of which at least one must match. + */ ifAnyMatch?: string[]; + /** + * Conditions none of which may match. + */ ifNoneMatch?: string[]; source: PermissionsConfigureAdditionalContentExclusionPolicyRuleSource; } @@ -11009,7 +11901,13 @@ export interface PermissionsConfigureAdditionalContentExclusionPolicyRule { */ /** @experimental */ export interface PermissionsConfigureAdditionalContentExclusionPolicyRuleSource { + /** + * Name of the policy source. + */ name: string; + /** + * Type of the policy source. + */ type: string; } /** @@ -11527,6 +12425,21 @@ export interface PluginListResult { */ plugins: InstalledPluginInfo[]; } +/** + * Trusted built-in plugin directories to use for this runtime process. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PluginsBuiltinSetRequest". + */ +/** @experimental */ +export interface PluginsBuiltinSetRequest { + /** + * Complete replacement set of trusted built-in plugin directories. Every entry must be an absolute local filesystem path no longer than 4096 characters. + * + * @maxItems 64 + */ + paths: string[]; +} /** * Plugin names (or specs) to disable. * @@ -12454,6 +13367,9 @@ export interface QueueDeferSessionIdleRequest { */ /** @experimental */ export interface QueueDuplicateAtRequest { + /** + * Stable opaque ID of the queued item to duplicate. + */ id: string; } /** @@ -12683,6 +13599,9 @@ export interface QueuePendingItemsResult { */ /** @experimental */ export interface QueueRemoveAtRequest { + /** + * Stable opaque ID of the queued item to remove. + */ id: string; } /** @@ -12719,6 +13638,9 @@ export interface QueueRemoveMostRecentResult { */ /** @experimental */ export interface QueueSendNowRequest { + /** + * Stable opaque ID of the queued item to steer into the live turn. + */ id: string; } /** @@ -12742,6 +13664,9 @@ export interface QueueSendNowResult { */ /** @experimental */ export interface QueueSetDrainPausedRequest { + /** + * Whether queued-lane draining should be paused. + */ paused: boolean; } /** @@ -12777,8 +13702,17 @@ export interface QueueSnapshotResult { */ /** @experimental */ export interface QueueUpdateTextRequest { + /** + * Stable opaque ID of the queued item to edit. + */ id: string; + /** + * Replacement prompt sent to the model. + */ prompt: string; + /** + * Optional replacement prompt displayed to the user. + */ displayPrompt?: string; } /** @@ -12991,7 +13925,7 @@ export interface RemoteControlStatusActive { */ isSteerable: boolean; /** - * 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. + * In-process prompt-manager handle (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. Retained as an optional compatibility field; native remote control does not populate or consume it. * * @internal */ @@ -13200,6 +14134,11 @@ export interface RemoteSessionMetadataValue { * Server-side task state returned by GitHub. */ state?: string; + hostStatus?: RemoteSessionHostStatus; + /** + * Host-supplied human description of what the session is doing right now ("running tests", "waiting for approval"). Optional in the protocol and absent on hosts that do not publish it, so never rely on it -- it enriches `hostStatus`, it does not replace it. + */ + hostActivity?: string; } /** * Repository context for the remote session. @@ -13241,7 +14180,7 @@ export interface SandboxConfig { addCurrentWorkingDirectory?: boolean; auth?: SandboxConfigAuth; /** - * Whether to auto-grant read access to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Default: true (enabled by default; set to false to opt out). + * Whether to auto-grant read access to the tool directories discovered on PATH and in toolchain environment variables (GOROOT, CARGO_HOME, JAVA_HOME, VIRTUAL_ENV, and similar), and to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Set to false to disable every grant listed above: user-installed toolchains (rustup, nvm, pyenv, conda, pipx) then need explicit userPolicy.filesystem entries — readonlyPaths to read them, plus readwriteFiles for a relocated CARGO_HOME's .package-cache and .global-cache, which Cargo locks on every build. Only these developer-tool grants are affected: the working directory (see addCurrentWorkingDirectory), temporary storage, session log paths, and system locations follow their own rules and stay granted, so commands still run. Default: true (enabled by default; set to false to opt out). */ allowDevToolAccess?: boolean; } @@ -13925,6 +14864,41 @@ export interface SessionActivity { */ hasActiveWork: boolean; } +/** + * Internal GitHub login parameters. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionAuthLoginRequest". + */ +/** @experimental */ +export interface SessionAuthLoginRequest { + /** + * GitHub host URL + */ + host: string; + /** + * GitHub login + */ + login: string; + /** + * GitHub authentication token + */ + token: string; + /** + * Whether to persist the token after login + */ + persist?: boolean; +} +/** + * Parameters identifying a GitHub authentication to log out. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionAuthLogoutUserRequest". + */ +/** @experimental */ +export interface SessionAuthLogoutUserRequest { + authInfo: AuthInfo; +} /** * Authentication status and account metadata for the session. * @@ -13955,6 +14929,20 @@ export interface SessionAuthStatus { */ copilotPlan?: string; } +/** + * Parameters for switching the session's active authentication. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionAuthSwitchRequest". + */ +/** @experimental */ +export interface SessionAuthSwitchRequest { + authInfo: AuthInfo; + /** + * Optional token paired with the authentication information + */ + token?: string; +} /** * Map of sessionId -> bytes freed by removing the session's workspace directory. * @@ -14349,6 +15337,9 @@ export interface SessionFsSqliteQueryResult { /** @experimental */ export interface SessionFsSqliteTransactionError { errorClass: SessionFsSqliteTransactionErrorClass; + /** + * Human-readable transaction failure message. + */ message: string; } /** @@ -14363,6 +15354,9 @@ export interface SessionFsSqliteTransactionRequest { * Target session identifier */ sessionId: string; + /** + * Ordered SQL statements to execute in one transaction. + */ statements: SessionFsSqliteTransactionStatement[]; } /** @@ -14393,6 +15387,9 @@ export interface SessionFsSqliteTransactionStatement { */ /** @experimental */ export interface SessionFsSqliteTransactionResult { + /** + * Per-statement query results in input order. + */ results: SessionFsSqliteQueryResult[]; error?: SessionFsSqliteTransactionError; } @@ -14518,12 +15515,21 @@ export interface SessionInstalledPluginSourceGitHub { * Constant value. Always "github". */ source: "github"; + /** + * GitHub repository in `owner/repo` form. + */ repo: string; + /** + * Optional Git ref to resolve. + */ ref?: string; /** * Optional full 40-character hexadecimal commit SHA. */ sha?: string; + /** + * Optional repository-relative path to the plugin. + */ path?: string; } /** @@ -14538,12 +15544,21 @@ export interface SessionInstalledPluginSourceUrl { * Constant value. Always "url". */ source: "url"; + /** + * URL of the plugin source. + */ url: string; + /** + * Optional Git ref to resolve. + */ ref?: string; /** * Optional full 40-character hexadecimal commit SHA. */ sha?: string; + /** + * Optional source-relative path to the plugin. + */ path?: string; } /** @@ -14558,6 +15573,9 @@ export interface SessionInstalledPluginSourceLocal { * Constant value. Always "local". */ source: "local"; + /** + * Local filesystem path to the plugin. + */ path: string; } /** @@ -14805,6 +15823,9 @@ export interface SessionModelList { */ /** @experimental */ export interface SessionModelPriceCategory { + /** + * CAPI model identifier. + */ id: string; priceCategory: ModelPickerPriceCategory; } @@ -15109,7 +16130,13 @@ export interface ShellInitScript { */ /** @experimental */ export interface SessionOpenOptionsAdditionalContentExclusionPolicy { + /** + * Content-exclusion rules to apply. + */ rules: SessionOpenOptionsAdditionalContentExclusionPolicyRule[]; + /** + * Opaque policy update timestamp supplied by the host. + */ last_updated_at: JsonValue; scope: SessionOpenOptionsAdditionalContentExclusionPolicyScope; } @@ -15121,8 +16148,17 @@ export interface SessionOpenOptionsAdditionalContentExclusionPolicy { */ /** @experimental */ export interface SessionOpenOptionsAdditionalContentExclusionPolicyRule { + /** + * Path patterns covered by this rule. + */ paths: string[]; + /** + * Conditions of which at least one must match. + */ ifAnyMatch?: string[]; + /** + * Conditions none of which may match. + */ ifNoneMatch?: string[]; source: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource; } @@ -15134,7 +16170,13 @@ export interface SessionOpenOptionsAdditionalContentExclusionPolicyRule { */ /** @experimental */ export interface SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource { + /** + * Name of the policy source. + */ name: string; + /** + * Type of the policy source. + */ type: string; } /** @@ -15493,7 +16535,13 @@ export interface SessionSetCredentialsResult { */ /** @experimental */ export interface SessionSettingsBuiltInToolAvailabilitySnapshot { + /** + * Whether the report-progress tool is available. + */ reportProgress?: boolean; + /** + * Whether the create-pull-request tool is available. + */ createPullRequest?: boolean; } /** @@ -15518,6 +16566,9 @@ export interface SessionSettingsEvaluatePredicateRequest { */ /** @experimental */ export interface SessionSettingsEvaluatePredicateResult { + /** + * Whether the named settings predicate evaluated to enabled. + */ enabled: boolean; } /** @@ -15528,7 +16579,13 @@ export interface SessionSettingsEvaluatePredicateResult { */ /** @experimental */ export interface SessionSettingsJobSnapshot { + /** + * GitHub Actions event type for the job. + */ eventType?: string; + /** + * Whether this is the workflow's trigger job. + */ isTriggerJob?: boolean; builtInToolAvailability?: SessionSettingsBuiltInToolAvailabilitySnapshot; } @@ -15540,9 +16597,21 @@ export interface SessionSettingsJobSnapshot { */ /** @experimental */ export interface SessionSettingsModelSnapshot { + /** + * Selected model identifier. + */ model?: string; + /** + * Default reasoning effort for the selected model. + */ defaultReasoningEffort?: string; + /** + * Agent job identifier for the session. + */ instanceId?: string; + /** + * Agent service callback URL for job and progress updates. + */ callbackUrl?: string; } /** @@ -15553,7 +16622,13 @@ export interface SessionSettingsModelSnapshot { */ /** @experimental */ export interface SessionSettingsOnlineEvaluationSnapshot { + /** + * Whether online evaluation is disabled. + */ disableOnlineEvaluation?: boolean; + /** + * Whether online-evaluation output-file generation is enabled. + */ enableOnlineEvaluationOutputFile?: boolean; } /** @@ -15564,17 +16639,53 @@ export interface SessionSettingsOnlineEvaluationSnapshot { */ /** @experimental */ export interface SessionSettingsRepoSnapshot { + /** + * Repository name. + */ name?: string; + /** + * GitHub repository database ID. + */ id?: number; + /** + * Checked-out repository branch. + */ branch?: string; + /** + * Checked-out commit SHA. + */ commit?: string; + /** + * Whether the repository is writable. + */ readWrite?: boolean; + /** + * Repository owner login. + */ ownerName?: string; + /** + * GitHub repository owner database ID. + */ ownerId?: number; + /** + * GitHub server base URL. + */ serverUrl?: string; + /** + * GitHub server host name. + */ host?: string; + /** + * Protocol used to access the GitHub host. + */ hostProtocol?: string; + /** + * GitHub secret-scanning service URL. + */ secretScanningUrl?: string; + /** + * Number of commits in the pull request. + */ prCommitCount?: number; } /** @@ -15585,9 +16696,21 @@ export interface SessionSettingsRepoSnapshot { */ /** @experimental */ export interface SessionSettingsSnapshot { + /** + * Agent runtime version selector copied from the session settings, such as `latest` or a runtime release identifier. + */ version?: string; + /** + * Name of the SDK client that created the session. + */ clientName?: string; + /** + * Session timeout in milliseconds. + */ timeoutMs?: number; + /** + * Session start time as Unix epoch milliseconds. + */ startTimeMs?: number; repo: SessionSettingsRepoSnapshot; model: SessionSettingsModelSnapshot; @@ -15603,14 +16726,41 @@ export interface SessionSettingsSnapshot { */ /** @experimental */ export interface SessionSettingsValidationSnapshot { + /** + * General validation timeout budget in seconds. + */ timeout?: number; + /** + * Dependabot validation timeout budget in seconds. + */ dependabotTimeout?: number; + /** + * Whether CodeQL validation is enabled. + */ codeqlEnabled?: boolean; + /** + * Whether code-review validation is enabled. + */ codeReviewEnabled?: boolean; + /** + * Model used for code-review validation. + */ codeReviewModel?: string; + /** + * Whether advisory validation is enabled. + */ advisoryEnabled?: boolean; + /** + * Whether secret-scanning validation is enabled. + */ secretScanningEnabled?: boolean; + /** + * Whether the memory-store tool is enabled. + */ memoryStoreEnabled?: boolean; + /** + * Whether the memory-vote tool is enabled. + */ memoryVoteEnabled?: boolean; } /** @@ -16814,6 +17964,10 @@ export interface TaskAgentInfo { * Tool call ID associated with this agent task */ toolCallId: string; + /** + * Friendly, non-unique name intended for display + */ + displayName?: string; /** * Short description of the task */ @@ -17180,7 +18334,7 @@ export interface TasksStartAgentRequest { */ prompt: string; /** - * Short name for the agent, used to generate a human-readable ID + * Friendly, non-unique name used when displaying the agent */ name: string; /** @@ -17437,11 +18591,20 @@ export interface UIElicitationArrayEnumFieldItems { */ /** @experimental */ export interface UIElicitationRequest { + mode?: McpElicitationFormMode; /** * Message describing what information is needed from the user */ message: string; requestedSchema: UIElicitationSchema; + /** + * MCP request metadata. + */ + _meta?: { + [k: string]: unknown | undefined; + }; + task?: McpTaskMetadata; + [k: string]: unknown | undefined; } /** * JSON Schema describing the form fields to present to the user @@ -17644,6 +18807,13 @@ export interface UIElicitationSchemaPropertyNumber { export interface UIElicitationResponse { action: UIElicitationResponseAction; content?: UIElicitationResponseContent; + /** + * MCP response metadata. + */ + _meta?: { + [k: string]: unknown | undefined; + }; + [k: string]: unknown | undefined; } /** * The form values submitted by the user (present when action is 'accept') @@ -18314,7 +19484,13 @@ export interface WorkspacesAddSummaryRequest { */ /** @experimental */ export interface WorkspacesAddSummaryResult { + /** + * Metadata for the persisted summary. + */ summary?: {}; + /** + * Refreshed metadata for the containing workspace. + */ workspace?: {}; [k: string]: unknown | undefined; } @@ -18421,22 +19597,70 @@ export interface WorkspacesGetWorkspaceResult { * Current workspace metadata, or null if not available */ workspace: { + /** + * Stable workspace identifier. + */ id: string; + /** + * Current working directory associated with the workspace. + */ cwd?: string; + /** + * Git repository root associated with the workspace. + */ git_root?: string; + /** + * Repository identifier associated with the workspace. + */ repository?: string; host_type?: WorkspacesWorkspaceDetailsHostType; + /** + * Current Git branch. + */ branch?: string; + /** + * Workspace display name. + */ name?: string; + /** + * Name of the client that created the workspace. + */ client_name?: string; + /** + * Whether the workspace name was explicitly chosen by the user. + */ user_named?: boolean; + /** + * Number of persisted summaries in the workspace. + */ summary_count?: number; + /** + * Timestamp when the workspace was created. + */ created_at?: string; + /** + * Timestamp when the workspace was last updated. + */ updated_at?: string; + /** + * Whether the workspace session can be steered remotely. + */ remote_steerable?: boolean; + /** + * Mission Control task identifier associated with the workspace. + */ mc_task_id?: string; + /** + * Mission Control session identifier associated with the workspace. + */ mc_session_id?: string; + /** + * Most recent Mission Control event identifier observed for the workspace. + */ mc_last_event_id?: string; + /** + * Whether the per-session Chronicle upgrade prompt was dismissed for the workspace. + */ chronicle_sync_dismissed?: boolean; } | null; /** @@ -19000,6 +20224,16 @@ export function createServerRpc(connection: MessageConnection) { disable: async (params: PluginsDisableRequest): Promise => connection.sendRequest("plugins.disable", params), /** @experimental */ + builtin: { + /** + * Replaces this server's trusted built-in plugin directories while no sessions are active. + * + * @param params Trusted built-in plugin directories to use for this runtime process. + */ + set: async (params: PluginsBuiltinSetRequest): Promise => + connection.sendRequest("plugins.builtin.set", params), + }, + /** @experimental */ marketplaces: { /** * Lists all registered marketplaces (defaults + user-added). @@ -20380,6 +21614,15 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin */ login: async (params: McpOauthLoginRequest): Promise => connection.sendRequest("session.mcp.oauth.login", { sessionId, ...params }), + /** + * Passively probes a configured remote MCP server to classify whether OAuth is required or a cached/override token is accepted. Does not start OAuth, emit pending OAuth requests, or mutate MCP connection state. + * + * @param params Remote MCP server name for a passive OAuth status probe. + * + * @returns Passive MCP OAuth probe result. `authenticated` means the server accepted the probe request while an OAuth-origin access token was attached; it does not prove the server required or independently validated that token. The probe does not make a second unauthenticated request. Failed is an expected probe-domain outcome; JSON-RPC errors are reserved for API-call failures. + */ + probe: async (params: McpOauthProbeRequest): Promise => + connection.sendRequest("session.mcp.oauth.probe", { sessionId, ...params }), /** * Responds to a pending MCP OAuth authorization request by its request id. * @@ -21420,6 +22663,89 @@ export function createInternalSessionRpc(connection: MessageConnection, sessionI sendSystemNotification: async (params: SendSystemNotificationRequest): Promise => connection.sendRequest("session.sendSystemNotification", { sessionId, ...params }), /** @experimental */ + gitHubAuth: { + /** + * Gets the current authentication information for internal session hosts. + * + * @returns Current authentication information, or null when no authentication is active. + */ + getCurrentAuthInfo: async (): Promise => + connection.sendRequest("session.gitHubAuth.getCurrentAuthInfo", { sessionId }), + /** + * Gets all authentication accounts available to the internal session host. + * + * @returns Authentication accounts available to the internal session host. + */ + getAllAuthAvailable: async (): Promise => + connection.sendRequest("session.gitHubAuth.getAllAuthAvailable", { sessionId }), + /** + * Refreshes Copilot account metadata for the current authentication. + * + * @returns Current authentication information, or null when no authentication is active. + */ + refreshCopilotUser: async (): Promise => + connection.sendRequest("session.gitHubAuth.refreshCopilotUser", { sessionId }), + /** + * Logs in a GitHub user through the internal session host. + * + * @param params Internal GitHub login parameters. + * + * @returns Initial authentication info for the session. + */ + login: async (params: SessionAuthLoginRequest): Promise => + connection.sendRequest("session.gitHubAuth.login", { sessionId, ...params }), + /** + * Switches the session to another available authentication. + * + * @param params Parameters for switching the session's active authentication. + */ + switchToAuth: async (params: SessionAuthSwitchRequest): Promise => + connection.sendRequest("session.gitHubAuth.switchToAuth", { sessionId, ...params }), + /** + * Logs out the session's current GitHub authentication. + * + * @returns Whether the current authentication was logged out. + */ + logout: async (): Promise => + connection.sendRequest("session.gitHubAuth.logout", { sessionId }), + /** + * Logs out a specific GitHub authentication. + * + * @param params Parameters identifying a GitHub authentication to log out. + * + * @returns Whether the requested authentication was logged out. + */ + logoutUser: async (params: SessionAuthLogoutUserRequest): Promise => + connection.sendRequest("session.gitHubAuth.logoutUser", { sessionId, ...params }), + /** + * Gets validation errors from the most recent authentication attempt. + * + * @returns Validation errors from the most recent authentication attempt. + */ + lastAuthErrors: async (): Promise => + connection.sendRequest("session.gitHubAuth.lastAuthErrors", { sessionId }), + }, + /** @experimental */ + canvas: { + /** @experimental */ + provider: { + /** + * Registers an internal canvas provider connection and its contributions. + * + * @param params Internal canvas provider registration parameters. + */ + register: async (params: CanvasProviderRegisterRequest): Promise => + connection.sendRequest("session.canvas.provider.register", { sessionId, ...params }), + /** + * Unregisters an internal canvas provider connection. + * + * @param params Internal canvas provider unregistration parameters. + */ + unregister: async (params: CanvasProviderUnregisterRequest): Promise => + connection.sendRequest("session.canvas.provider.unregister", { sessionId, ...params }), + }, + }, + /** @experimental */ mcp: { /** * Reloads MCP server connections for the session with an explicit host-provided configuration. diff --git a/nodejs/src/generated/session-events.ts b/nodejs/src/generated/session-events.ts index 4bdfa1994..5e8525729 100644 --- a/nodejs/src/generated/session-events.ts +++ b/nodejs/src/generated/session-events.ts @@ -189,6 +189,32 @@ export type AutopilotObjectiveChangedStatus = | "cap_reached" /** Objective was completed by the agent. */ | "completed"; +/** + * Origin of an effective session model change. + */ +export type ModelChangeSource = + /** The user selected a model directly with `/model `. */ + | "model_command" + /** The user selected the model with `/settings`. */ + | "settings_command" + /** The user selected the model with the `/config` alias. */ + | "config_command" + /** The user selected the model in the model picker, including the picker opened by bare `/model`. */ + | "model_picker" + /** Organization-managed settings selected the model. */ + | "managed_settings" + /** Repository settings selected the model. */ + | "repo_settings" + /** Startup model resolution selected the model. */ + | "startup" + /** Selecting an agent selected its configured model. */ + | "agent" + /** Entering, leaving, or reconfiguring plan mode selected the model. */ + | "plan_mode" + /** The runtime selected the model automatically, such as rate-limit recovery or refusal fallback. */ + | "automatic" + /** An SDK or RPC caller selected the model. */ + | "sdk"; /** * The session mode the agent is operating in */ @@ -363,6 +389,14 @@ export type AssistantUsageApiEndpoint = | "/responses" /** WebSocket Responses API endpoint. */ | "ws:/responses"; +/** + * Transport used for a successful model call + */ +export type AssistantUsageTransport = + /** HTTP transport, including SSE streams. */ + | "http" + /** WebSocket transport. */ + | "websocket"; /** * For HTTP 400 failures only: whether the response carried a structured CAPI error envelope (structured_error, a deterministic validation failure) or no error body (bodyless, the transient gateway/proxy signature). Absent for non-400 failures. */ @@ -549,7 +583,15 @@ export type PermissionRequest = | PermissionRequestHook | PermissionRequestExtensionManagement | PermissionRequestFactory - | PermissionRequestExtensionPermissionAccess; + | PermissionRequestExtensionPermissionAccess + | PermissionRequestExtensionEnvAccess; +/** + * Advisory recommendation the runtime attaches to a permission request whose origin it can vouch for by construction. Unlike the auto-approval judge this does not depend on auto mode and does not evaluate what the tool call does; its absence simply means the runtime has no opinion and the request follows the host's normal approval flow. + */ +/** @experimental */ +export type PermissionRecommendation = + /** The runtime vouches for the request's origin and recommends approving it without prompting. The host still owns the decision and may deny it; deny rules, managed policy, and the auto-approval safety judge all outrank this recommendation. */ + "approve"; /** * Whether this is a store or vote memory operation */ @@ -589,7 +631,8 @@ export type PermissionPromptRequest = | PermissionPromptRequestHook | PermissionPromptRequestExtensionManagement | PermissionPromptRequestFactory - | PermissionPromptRequestExtensionPermissionAccess; + | PermissionPromptRequestExtensionPermissionAccess + | PermissionPromptRequestExtensionEnvAccess; /** * Why the auto-approval judge produced no usable recommendation. Present only alongside an `error` recommendation, where the human-readable reason is a fixed string and therefore cannot distinguish these cases. Intended to make a judge failure reportable by a consumer that has no access to the host's logs. */ @@ -653,7 +696,8 @@ export type UserToolSessionApproval = | UserToolSessionApprovalCustomTool | UserToolSessionApprovalExtensionManagement | UserToolSessionApprovalFactory - | UserToolSessionApprovalExtensionPermissionAccess; + | UserToolSessionApprovalExtensionPermissionAccess + | UserToolSessionApprovalExtensionEnvAccess; /** * Elicitation mode; "form" for structured input, "url" for browser-based. Defaults to "form" when absent. */ @@ -1659,6 +1703,7 @@ export interface ModelChangeData { */ reasoningEffort?: string | null; reasoningSummary?: ReasoningSummary; + source?: ModelChangeSource; verbosity?: Verbosity; } /** @@ -3499,6 +3544,9 @@ export interface AssistantReasoningData { * Unique identifier for this reasoning block */ reasoningId: string; + /** + * Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. + */ rte?: boolean; } /** @@ -3736,6 +3784,9 @@ export interface AssistantMessageData { * GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs */ requestId?: string; + /** + * Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. + */ rte?: boolean; serverTools?: AssistantMessageServerTools; /** @@ -3884,12 +3935,27 @@ export interface CitationLocationBlock { */ /** @experimental */ export interface AssistantMessageServerTools { + /** + * Advisor model identifier associated with the server-tool payload. + */ advisorModel?: string; + /** + * Provider function-call namespaces keyed by function-call identifier. + */ functionCallNamespaces?: { [k: string]: string | undefined; }; + /** + * Provider-native server-tool call and output items preserved verbatim for replay. + */ items?: JsonValue[]; + /** + * Model provider that produced this server-tool payload. + */ provider: string; + /** + * Raw provider content blocks retained for verbatim round-tripping. + */ rawContentBlocks?: JsonValue[]; } /** @@ -4133,6 +4199,10 @@ export interface AssistantUsageEvent { * LLM API call usage metrics including tokens, costs, quotas, and billing information */ export interface AssistantUsageData { + /** + * Number of accepted speculative prediction tokens + */ + acceptedPredictionTokens?: number; /** * Completion ID from the model provider (e.g., chatcmpl-abc123) */ @@ -4191,6 +4261,22 @@ export interface AssistantUsageData { * Average inter-token latency in milliseconds. Only available for streaming requests */ interTokenLatencyMs?: number; + /** + * Whether Auto mode was selected for this model call + */ + isAuto?: boolean; + /** + * Whether this model call used a bring-your-own-key provider + */ + isByok?: boolean; + /** + * Requested maximum output tokens used for this model call + */ + maxOutputTokens?: number; + /** + * Effective maximum prompt-token limit used for this model call + */ + maxPromptTokens?: number; /** * Model identifier used for this API call */ @@ -4226,10 +4312,18 @@ export interface AssistantUsageData { * Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max") */ reasoningEffort?: string; + reasoningSummary?: ReasoningSummary; /** * Number of output tokens used for reasoning (e.g., chain-of-thought) */ reasoningTokens?: number; + /** + * Number of rejected speculative prediction tokens + */ + rejectedPredictionTokens?: number; + /** + * Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. + */ rte?: boolean; /** * Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation @@ -4253,6 +4347,7 @@ export interface AssistantUsageData { * @internal */ toolTokenCount?: number; + transport?: AssistantUsageTransport; } /** * Per-request cost and usage data from the CAPI copilot_usage response field @@ -4460,6 +4555,9 @@ export interface ModelCallFailureData { */ reasoningEffort?: string; requestFingerprint?: ModelCallFailureRequestFingerprint; + /** + * Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. + */ rte?: boolean; /** * Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation @@ -4647,6 +4745,9 @@ export interface ToolExecutionStartData { * Tool call ID of the parent tool invocation when this event originates from a sub-agent */ parentToolCallId?: string; + /** + * Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. + */ rte?: boolean; shellToolInfo?: ToolExecutionStartShellToolInfo; /** @@ -4860,6 +4961,9 @@ export interface ToolExecutionCompleteData { */ parentToolCallId?: string; result?: ToolExecutionCompleteResult; + /** + * Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. + */ rte?: boolean; /** * Whether this tool execution ran inside a sandbox container @@ -5273,17 +5377,35 @@ export interface ToolExecutionCompleteUIResourceMeta { */ export interface ToolExecutionCompleteUIResourceMetaUI { csp?: ToolExecutionCompleteUIResourceMetaUICsp; + /** + * Optional dedicated origin for the rendered MCP Apps UI resource. + */ domain?: string; permissions?: ToolExecutionCompleteUIResourceMetaUIPermissions; + /** + * Whether the host should render a border around the MCP Apps UI resource. + */ prefersBorder?: boolean; } /** * CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. */ export interface ToolExecutionCompleteUIResourceMetaUICsp { + /** + * Domains the UI resource may use as document base URIs. + */ baseUriDomains?: string[]; + /** + * Domains the UI resource may connect to. + */ connectDomains?: string[]; + /** + * Domains the UI resource may embed as nested frames. + */ frameDomains?: string[]; + /** + * Domains from which the UI resource may load scripts, styles, images, and other resources. + */ resourceDomains?: string[]; } /** @@ -6060,7 +6182,7 @@ export interface SystemNotificationData { */ export interface SystemNotificationAgentCompleted { /** - * Unique identifier of the background agent + * Unique task identifier */ agentId: string; /** @@ -6071,6 +6193,10 @@ export interface SystemNotificationAgentCompleted { * Human-readable description of the agent task */ description?: string; + /** + * Friendly, non-unique name intended for display + */ + displayName?: string; /** * The full prompt given to the background agent */ @@ -6086,7 +6212,7 @@ export interface SystemNotificationAgentCompleted { */ export interface SystemNotificationAgentIdle { /** - * Unique identifier of the background agent + * Unique task identifier */ agentId: string; /** @@ -6097,6 +6223,10 @@ export interface SystemNotificationAgentIdle { * Human-readable description of the agent task */ description?: string; + /** + * Friendly, non-unique name intended for display + */ + displayName?: string; /** * Type discriminator. Always "agent_idle". */ @@ -6484,6 +6614,12 @@ export interface PermissionRequestMcp { * Permission kind discriminator */ kind: "mcp"; + /** + * Advisory runtime permission recommendation. The SDK host remains responsible for deciding the request and may reject it. + * + * @experimental + */ + permissionRecommendation?: PermissionRecommendation; /** * Whether this MCP tool is read-only (no side effects) */ @@ -6656,9 +6792,21 @@ export interface PermissionRequestFactory { * Whether this factory is eligible for persistent approval */ canPersistApproval: boolean; + /** + * Factory-declared AI-credit limit before any run/resume caller override is applied. + */ declaredMaxAiCredits?: number; + /** + * Factory-declared concurrent-subagent limit before any run/resume caller override is applied. + */ declaredMaxConcurrentSubagents?: number; + /** + * Factory-declared total-subagent limit before any run/resume caller override is applied. + */ declaredMaxTotalSubagents?: number; + /** + * Factory-declared active-time limit in seconds before any run/resume caller override is applied. + */ declaredTimeoutSeconds?: number; /** * Factory description @@ -6732,6 +6880,29 @@ export interface PermissionRequestExtensionPermissionAccess { */ toolCallId?: string; } +/** + * Extension sensitive environment variable access request + */ +export interface PermissionRequestExtensionEnvAccess { + /** + * Names of the sensitive environment variables the extension is requesting. Values never appear here. + * + * @minItems 1 + */ + environmentVariables: [string, ...string[]]; + /** + * Name of the extension requesting environment variable access + */ + extensionName: string; + /** + * Permission kind discriminator + */ + kind: "extension-env-access"; + /** + * Tool call ID that triggered this permission request + */ + toolCallId?: string; +} /** * Shell command permission prompt */ @@ -6883,6 +7054,12 @@ export interface PermissionPromptRequestMcp { * Prompt kind discriminator */ kind: "mcp"; + /** + * Advisory runtime permission recommendation. The host remains responsible for deciding the request and may reject it. + * + * @experimental + */ + permissionRecommendation?: PermissionRecommendation; /** * Name of the MCP server providing the tool */ @@ -7111,9 +7288,21 @@ export interface PermissionPromptRequestFactory { * Whether this factory is eligible for persistent approval */ canPersistApproval: boolean; + /** + * Factory-declared AI-credit limit before any run/resume caller override is applied. + */ declaredMaxAiCredits?: number; + /** + * Factory-declared concurrent-subagent limit before any run/resume caller override is applied. + */ declaredMaxConcurrentSubagents?: number; + /** + * Factory-declared total-subagent limit before any run/resume caller override is applied. + */ declaredMaxTotalSubagents?: number; + /** + * Factory-declared active-time limit in seconds before any run/resume caller override is applied. + */ declaredTimeoutSeconds?: number; /** * Factory description @@ -7184,6 +7373,35 @@ export interface PermissionPromptRequestExtensionPermissionAccess { */ toolCallId?: string; } +/** + * Extension sensitive environment variable access prompt + */ +export interface PermissionPromptRequestExtensionEnvAccess { + /** + * Auto-approval judge information for this request; present only when auto mode is enabled. + * + * @experimental + */ + autoApproval?: PermissionAutoApproval; + /** + * Names of the sensitive environment variables the extension is requesting. Values never appear here. + * + * @minItems 1 + */ + environmentVariables: [string, ...string[]]; + /** + * Name of the extension requesting environment variable access + */ + extensionName: string; + /** + * Prompt kind discriminator + */ + kind: "extension-env-access"; + /** + * Tool call ID that triggered this permission request + */ + toolCallId?: string; +} /** * Session event "permission.completed". Permission request completion notification signaling UI dismissal */ @@ -7356,6 +7574,25 @@ export interface UserToolSessionApprovalExtensionPermissionAccess { */ kind: "extension-permission-access"; } +/** + * Session-scoped tool-approval rule for an extension's access to sensitive environment variables, keyed by extension name and the exact set of variable names. + */ +export interface UserToolSessionApprovalExtensionEnvAccess { + /** + * Names of the sensitive environment variables this approval covers. Values are never persisted. + * + * @minItems 1 + */ + environmentVariables: [string, ...string[]]; + /** + * Extension name + */ + extensionName: string; + /** + * Extension environment access approval kind + */ + kind: "extension-env-access"; +} /** * Permission response variant that approves a request and persists the provided approval to a project location key. */ @@ -8872,6 +9109,10 @@ export interface ExitPlanModeRequestedData { * Available actions the user can take */ actions: ExitPlanModeAction[]; + /** + * Model the session had selected when the plan was authored, when one is known + */ + model?: string; /** * Full content of the plan file */ @@ -9051,6 +9292,9 @@ export interface FactoryRunUpdatedData { * Monotonic revision now available for the run. */ revision: number; + /** + * Factory run identifier. + */ runId: string; } /** diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py index 103149088..f2a8a91fc 100644 --- a/python/copilot/generated/rpc.py +++ b/python/copilot/generated/rpc.py @@ -6,7 +6,7 @@ from typing import ClassVar, TYPE_CHECKING -from .session_events import AbortReason, Attachment, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, McpServerSource, McpServerStatus, PermissionPromptRequest, PermissionRule, ReasoningSummary, SessionEvent, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval, Verbosity +from .session_events import AbortReason, Attachment, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, McpOauthHttpResponse, McpOauthWWWAuthenticateParams, McpServerSource, McpServerStatus, ModelChangeSource, PermissionPromptRequest, PermissionRule, ReasoningSummary, SessionEvent, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval, Verbosity if TYPE_CHECKING: from .._jsonrpc import JsonRpcClient @@ -126,10 +126,19 @@ class CopilotUserResponseEndpoints: """Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough.""" api: str | None = None + """Copilot API endpoint URL.""" + exp: str | None = None + """Experimental-service endpoint URL.""" + origin_tracker: str | None = None + """Origin-tracker endpoint URL.""" + proxy: str | None = None + """Copilot proxy endpoint URL.""" + telemetry: str | None = None + """Copilot telemetry endpoint URL.""" @staticmethod def from_dict(obj: Any) -> 'CopilotUserResponseEndpoints': @@ -697,6 +706,33 @@ class PermissionsAllowAllMode(Enum): class APIKeyAuthInfoType(Enum): API_KEY = "api-key" +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class AuthValidationError: + """Validation error from an authentication attempt. + + Validation errors from the most recent authentication attempt. + """ + message: str + """Authentication validation error message""" + + github_message: str | None = None + """Optional message returned by GitHub""" + + @staticmethod + def from_dict(obj: Any) -> 'AuthValidationError': + assert isinstance(obj, dict) + message = from_str(obj.get("message")) + github_message = from_union([from_str, from_none], obj.get("githubMessage")) + return AuthValidationError(message, github_message) + + def to_dict(self) -> dict: + result: dict = {} + result["message"] = from_str(self.message) + if self.github_message is not None: + result["githubMessage"] = from_union([from_str, from_none], self.github_message) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CancelUserRequestedShellCommandResult: @@ -886,6 +922,54 @@ 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 CanvasProviderRegisterRequest: + """Internal canvas provider registration parameters.""" + + canvases: list[Any] + """Canvas contributions supplied by the provider""" + + connection_id: str + """Connection identifier for callback routing""" + + info: Any + """Provider metadata supplied by the host""" + + @staticmethod + def from_dict(obj: Any) -> 'CanvasProviderRegisterRequest': + assert isinstance(obj, dict) + canvases = from_list(lambda x: x, obj.get("canvases")) + connection_id = from_str(obj.get("connectionId")) + info = obj.get("info") + return CanvasProviderRegisterRequest(canvases, connection_id, info) + + def to_dict(self) -> dict: + result: dict = {} + result["canvases"] = from_list(lambda x: x, self.canvases) + result["connectionId"] = from_str(self.connection_id) + result["info"] = self.info + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class CanvasProviderUnregisterRequest: + """Internal canvas provider unregistration parameters.""" + + connection_id: str + """Connection identifier to unregister""" + + @staticmethod + def from_dict(obj: Any) -> 'CanvasProviderUnregisterRequest': + assert isinstance(obj, dict) + connection_id = from_str(obj.get("connectionId")) + return CanvasProviderUnregisterRequest(connection_id) + + def to_dict(self) -> dict: + result: dict = {} + result["connectionId"] = from_str(self.connection_id) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CapiSessionOptions: @@ -2349,65 +2433,6 @@ def to_dict(self) -> dict: result["result"] = self.result return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class FactoryAgentSummary: - """Prompt-safe durable identity and live status for a direct factory agent.""" - - active_ms: int - agent_id: str - agent_type: str - label: str - run_id: str - status: str - tool_call_id: str - activity: str | None = None - completed_at: int | None = None - phase_id: str | None = None - requested_model: str | None = None - resolved_model: str | None = None - started_at: int | None = None - - @staticmethod - def from_dict(obj: Any) -> 'FactoryAgentSummary': - assert isinstance(obj, dict) - active_ms = from_int(obj.get("activeMs")) - agent_id = from_str(obj.get("agentId")) - agent_type = from_str(obj.get("agentType")) - label = from_str(obj.get("label")) - run_id = from_str(obj.get("runId")) - status = from_str(obj.get("status")) - tool_call_id = from_str(obj.get("toolCallId")) - activity = from_union([from_str, from_none], obj.get("activity")) - completed_at = from_union([from_int, from_none], obj.get("completedAt")) - phase_id = from_union([from_none, from_str], obj.get("phaseId")) - requested_model = from_union([from_str, from_none], obj.get("requestedModel")) - resolved_model = from_union([from_str, from_none], obj.get("resolvedModel")) - started_at = from_union([from_int, from_none], obj.get("startedAt")) - return FactoryAgentSummary(active_ms, agent_id, agent_type, label, run_id, status, tool_call_id, activity, completed_at, phase_id, requested_model, resolved_model, started_at) - - def to_dict(self) -> dict: - result: dict = {} - result["activeMs"] = from_int(self.active_ms) - result["agentId"] = from_str(self.agent_id) - result["agentType"] = from_str(self.agent_type) - result["label"] = from_str(self.label) - result["runId"] = from_str(self.run_id) - result["status"] = from_str(self.status) - result["toolCallId"] = from_str(self.tool_call_id) - if self.activity is not None: - result["activity"] = from_union([from_str, from_none], self.activity) - if self.completed_at is not None: - result["completedAt"] = from_union([from_int, from_none], self.completed_at) - result["phaseId"] = from_union([from_none, from_str], self.phase_id) - if self.requested_model is not None: - result["requestedModel"] = from_union([from_str, from_none], self.requested_model) - if self.resolved_model is not None: - result["resolvedModel"] = from_union([from_str, from_none], self.resolved_model) - if self.started_at is not None: - result["startedAt"] = from_union([from_int, from_none], self.started_at) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class FactoryCancelRequest: @@ -2433,7 +2458,10 @@ class FactoryCurrentPhase: """Current factory phase identity.""" id: str + """Current phase identifier.""" + ordinal: int | None = None + """Zero-based declared phase ordinal, or null for an undeclared phase.""" @staticmethod def from_dict(obj: Any) -> 'FactoryCurrentPhase': @@ -2451,12 +2479,21 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class FactoryDeclaredLimits: - """Declared or approved factory resource ceilings.""" + """Declared or approved factory resource ceilings. + Resource ceilings declared by the factory. + """ max_ai_credits: float | None = None + """Maximum AI credits consumed by subagents and descendants.""" + max_concurrent_subagents: int | None = None + """Maximum concurrently active subagents.""" + max_total_subagents: int | None = None + """Maximum total subagents spawned by the run.""" + timeout_seconds: float | None = None + """Maximum accumulated active execution time in seconds.""" @staticmethod def from_dict(obj: Any) -> 'FactoryDeclaredLimits': @@ -2740,11 +2777,18 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class FactoryRunConsumed: - """Durable factory resource consumption.""" + """Durable resource consumption. + Durable factory resource consumption. + """ active_ms: int + """Accumulated active execution time in milliseconds.""" + nano_aiu: int + """AI usage consumed by the run in nano-AIU.""" + subagents: int + """Total subagents spawned by the run.""" @staticmethod def from_dict(obj: Any) -> 'FactoryRunConsumed': @@ -2763,7 +2807,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. class FactoryRunStatus(Enum): - """Current or terminal state of a factory run. + """Current factory run status. + + Current or terminal state of a factory run. Current or terminal factory run status. """ @@ -2803,8 +2849,10 @@ class FactoryLogLineKind(Enum): # Experimental: this type is part of an experimental API and may change or be removed. class FactoryPhaseStatus(Enum): - """Derived lifecycle state of a factory phase.""" + """Derived lifecycle state of the phase. + Derived lifecycle state of a factory phase. + """ ACTIVE = "active" COMPLETED = "completed" PENDING = "pending" @@ -3745,6 +3793,8 @@ class LlmInferenceHTTPResponseStartRequest: """Response head.""" headers: dict[str, list[str]] + """HTTP response headers, preserving multiple values per name.""" + request_id: str """Matches the requestId from the originating httpRequestStart frame.""" @@ -4330,6 +4380,8 @@ def to_dict(self) -> dict: class MCPServerConfigDeferTools(Enum): """Controls if tools provided by this server can be loaded on demand via tool search (auto) or always included in the initial tool list (never) + + Controls whether tools can be loaded on demand. """ AUTO = "auto" NEVER = "never" @@ -4347,11 +4399,40 @@ class MCPGrantType(Enum): CLIENT_CREDENTIALS = "client_credentials" # Experimental: this type is part of an experimental API and may change or be removed. -class MCPServerConfigHTTPType(Enum): - """Remote transport type. Defaults to "http" when omitted.""" +@dataclass +class MCPSafeForTelemetryFields: + """Per-field MCP telemetry-obfuscation policy.""" + + inputs_names: bool + """Whether MCP tool input names may be included in telemetry without obfuscation.""" + + name: bool + """Whether the MCP tool name may be included in telemetry without obfuscation.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPSafeForTelemetryFields': + assert isinstance(obj, dict) + inputs_names = from_bool(obj.get("inputsNames")) + name = from_bool(obj.get("name")) + return MCPSafeForTelemetryFields(inputs_names, name) + + def to_dict(self) -> dict: + result: dict = {} + result["inputsNames"] = from_bool(self.inputs_names) + result["name"] = from_bool(self.name) + return result + +class MCPSerializableServerConfigType(Enum): + """Local transport type. Defaults to stdio when omitted. + Local MCP transport type. + + Remote transport type. Defaults to "http" when omitted. + """ HTTP = "http" + LOCAL = "local" SSE = "sse" + STDIO = "stdio" # Experimental: this type is part of an experimental API and may change or be removed. @dataclass @@ -4495,6 +4576,14 @@ 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. +class MCPElicitationFormMode(Enum): + """Structured MCP elicitation mode. + + Elicitation mode. Omitted and form are equivalent for structured elicitation. + """ + FORM = "form" + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPEnableRequest: @@ -4514,6 +4603,31 @@ 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 MCPFailedServer: + """MCP server whose connection attempt failed.""" + + name: str + """The config key of the server that failed to connect.""" + + error: str | None = None + """The captured connection failure detail.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPFailedServer': + assert isinstance(obj, dict) + name = from_str(obj.get("name")) + error = from_union([from_str, from_none], obj.get("error")) + return MCPFailedServer(name, error) + + def to_dict(self) -> dict: + result: dict = {} + result["name"] = from_str(self.name) + 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 MCPFilteredServer: @@ -4762,6 +4876,63 @@ def to_dict(self) -> dict: result["authorizationUrl"] = from_union([from_str, from_none], self.authorization_url) return result +# Experimental: this type is part of an experimental API and may change or be removed. +class MCPOauthProbeNeedsAuthReason(Enum): + """Why a passive MCP OAuth probe determined authentication is needed. + + Why authentication is needed. + """ + INITIAL = "initial" + REFRESH = "refresh" + UPSCOPE = "upscope" + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPOauthProbeRequest: + """Remote MCP server name for a passive OAuth status probe.""" + + server_name: str + """Name of the configured remote MCP server to probe.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPOauthProbeRequest': + assert isinstance(obj, dict) + server_name = from_str(obj.get("serverName")) + return MCPOauthProbeRequest(server_name) + + def to_dict(self) -> dict: + result: dict = {} + result["serverName"] = from_str(self.server_name) + return result + +@dataclass +class ExternalRefMCPOauthHTTPResponse: + """HTTP response returned by the server. + + HTTP 401 or 403 response returned by the server. + + HTTP response returned by the server, when the probe reached the server and captured the + complete response. + """ + external_ref_marker_external_ref_mcp_oauth_http_response: str + + @staticmethod + def from_dict(obj: Any) -> 'ExternalRefMCPOauthHTTPResponse': + assert isinstance(obj, dict) + external_ref_marker_external_ref_mcp_oauth_http_response = from_str(obj.get("__externalRefMarker___ExternalRef_McpOauthHttpResponse")) + return ExternalRefMCPOauthHTTPResponse(external_ref_marker_external_ref_mcp_oauth_http_response) + + def to_dict(self) -> dict: + result: dict = {} + result["__externalRefMarker___ExternalRef_McpOauthHttpResponse"] = from_str(self.external_ref_marker_external_ref_mcp_oauth_http_response) + return result + +class Status(Enum): + AUTHENTICATED = "authenticated" + FAILED = "failed" + NEEDS_AUTH = "needs-auth" + NO_AUTH_REQUIRED = "no-auth-required" + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPOauthRespondRequest: @@ -4802,6 +4973,21 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +class MCPServerConfigType(Enum): + """Local transport type. Defaults to stdio when omitted. + + Local MCP transport type. + + Remote transport type. Defaults to "http" when omitted. + + In-process MCP transport type. + """ + HTTP = "http" + LOCAL = "local" + MEMORY = "memory" + SSE = "sse" + STDIO = "stdio" + # 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 @@ -4975,6 +5161,29 @@ class MCPSamplingExecutionAction(Enum): FAILURE = "failure" SUCCESS = "success" +# Experimental: this type is part of an experimental API and may change or be removed. +class MCPServerConfigHTTPType(Enum): + """Remote transport type. Defaults to "http" when omitted.""" + + HTTP = "http" + SSE = "sse" + +# 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. +class MCPServerConfigMemoryType(Enum): + """In-process MCP transport type.""" + + MEMORY = "memory" + +# Experimental: this type is part of an experimental API and may change or be removed. +class MCPServerConfigStdioType(Enum): + """Local transport type. Defaults to stdio when omitted. + + Local MCP transport type. + """ + LOCAL = "local" + STDIO = "stdio" + # Experimental: this type is part of an experimental API and may change or be removed. class MCPSetEnvValueModeDetails(Enum): """How environment-variable values supplied to MCP servers are resolved. "direct" passes @@ -5012,6 +5221,28 @@ 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 MCPTaskMetadata: + """Metadata controlling an MCP task's lifetime. + + MCP task metadata. + """ + ttl: int | None = None + """Task time-to-live.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPTaskMetadata': + assert isinstance(obj, dict) + ttl = from_union([from_int, from_none], obj.get("ttl")) + return MCPTaskMetadata(ttl) + + def to_dict(self) -> dict: + result: dict = {} + if self.ttl is not None: + result["ttl"] = from_union([from_int, from_none], self.ttl) + 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 @@ -5590,8 +5821,10 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. class ModelPickerPriceCategory(Enum): - """Relative cost tier for token-based billing users""" + """Relative cost tier for token-based billing users + Cost category assigned to the model. + """ HIGH = "high" LOW = "low" MEDIUM = "medium" @@ -5866,7 +6099,10 @@ class OptionsUpdateAdditionalContentExclusionPolicyRuleSource: and type. """ name: str + """Name of the policy source.""" + type: str + """Type of the policy source.""" @staticmethod def from_dict(obj: Any) -> 'OptionsUpdateAdditionalContentExclusionPolicyRuleSource': @@ -5940,6 +6176,7 @@ def to_dict(self) -> dict: class ApprovalKind(Enum): COMMANDS = "commands" CUSTOM_TOOL = "custom-tool" + EXTENSION_ENV_ACCESS = "extension-env-access" EXTENSION_MANAGEMENT = "extension-management" EXTENSION_PERMISSION_ACCESS = "extension-permission-access" FACTORY = "factory" @@ -5975,6 +6212,9 @@ class PermissionDecisionApproveForLocationApprovalCommandsKind(Enum): class PermissionDecisionApproveForLocationApprovalCustomToolKind(Enum): CUSTOM_TOOL = "custom-tool" +class PermissionDecisionApproveForLocationApprovalExtensionEnvAccessKind(Enum): + EXTENSION_ENV_ACCESS = "extension-env-access" + class PermissionDecisionApproveForLocationApprovalExtensionManagementKind(Enum): EXTENSION_MANAGEMENT = "extension-management" @@ -5990,9 +6230,6 @@ class PermissionDecisionApproveForLocationApprovalMCPKind(Enum): class PermissionDecisionApproveForLocationApprovalMCPSamplingKind(Enum): MCP_SAMPLING = "mcp-sampling" -class PermissionDecisionApproveForLocationApprovalMemoryKind(Enum): - MEMORY = "memory" - class PermissionDecisionApproveForLocationApprovalReadKind(Enum): READ = "read" @@ -6384,7 +6621,10 @@ class PermissionsConfigureAdditionalContentExclusionPolicyRuleSource: source name and type. """ name: str + """Name of the policy source.""" + type: str + """Type of the policy source.""" @staticmethod def from_dict(obj: Any) -> 'PermissionsConfigureAdditionalContentExclusionPolicyRuleSource': @@ -6925,6 +7165,27 @@ def to_dict(self) -> dict: result["previousVersion"] = from_union([from_str, from_none], self.previous_version) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PluginsBuiltinSetRequest: + """Trusted built-in plugin directories to use for this runtime process.""" + + paths: list[str] + """Complete replacement set of trusted built-in plugin directories. Every entry must be an + absolute local filesystem path no longer than 4096 characters. + """ + + @staticmethod + def from_dict(obj: Any) -> 'PluginsBuiltinSetRequest': + assert isinstance(obj, dict) + paths = from_list(from_str, obj.get("paths")) + return PluginsBuiltinSetRequest(paths) + + def to_dict(self) -> dict: + result: dict = {} + result["paths"] = from_list(from_str, self.paths) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PluginsMarketplacesAddRequest: @@ -7364,6 +7625,7 @@ class QueueDuplicateAtRequest: """Parameters for duplicating a queued item.""" id: str + """Stable opaque ID of the queued item to duplicate.""" @staticmethod def from_dict(obj: Any) -> 'QueueDuplicateAtRequest': @@ -7592,6 +7854,7 @@ class QueueRemoveAtRequest: """Parameters for removing a queued item by stable id.""" id: str + """Stable opaque ID of the queued item to remove.""" @staticmethod def from_dict(obj: Any) -> 'QueueRemoveAtRequest': @@ -7650,6 +7913,7 @@ class QueueSendNowRequest: """Parameters for steering a queued message into a live turn.""" id: str + """Stable opaque ID of the queued item to steer into the live turn.""" @staticmethod def from_dict(obj: Any) -> 'QueueSendNowRequest': @@ -7692,6 +7956,7 @@ class QueueSetDrainPausedRequest: one that never acquired it. """ paused: bool + """Whether queued-lane draining should be paused.""" @staticmethod def from_dict(obj: Any) -> 'QueueSetDrainPausedRequest': @@ -7710,8 +7975,13 @@ class QueueUpdateTextRequest: """Parameters for editing a single queued message.""" id: str + """Stable opaque ID of the queued item to edit.""" + prompt: str + """Replacement prompt sent to the model.""" + display_prompt: str | None = None + """Optional replacement prompt displayed to the user.""" @staticmethod def from_dict(obj: Any) -> 'QueueUpdateTextRequest': @@ -8079,6 +8349,23 @@ def to_dict(self) -> dict: result: dict = {} return result +# Experimental: this type is part of an experimental API and may change or be removed. +class RemoteSessionHostStatus(Enum): + """What a remote host says one of its sessions is doing right now. Deliberately coarse: this + is what a host can report for EVERY session in a catalogue listing, without a client + subscribing to each one. AHP's `SessionSummary.status` is the source today; + `input-needed` covers both a permission prompt and an `ask_user` question, since the + summary does not say which. + + Live status as the owning host reports it in its session listing, so a row for a session + running elsewhere can show that it is running. Absent for hosts that publish no such + status (the cloud task managers), which read as idle. + """ + ERROR = "error" + IDLE = "idle" + INPUT_NEEDED = "input-needed" + WORKING = "working" + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class RemoteSessionMetadataRepository: @@ -8868,6 +9155,85 @@ def to_dict(self) -> dict: 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 SessionAuthLoginRequest: + """Internal GitHub login parameters.""" + + host: str + """GitHub host URL""" + + login: str + """GitHub login""" + + token: str + """GitHub authentication token""" + + persist: bool | None = None + """Whether to persist the token after login""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionAuthLoginRequest': + assert isinstance(obj, dict) + host = from_str(obj.get("host")) + login = from_str(obj.get("login")) + token = from_str(obj.get("token")) + persist = from_union([from_bool, from_none], obj.get("persist")) + return SessionAuthLoginRequest(host, login, token, persist) + + def to_dict(self) -> dict: + result: dict = {} + result["host"] = from_str(self.host) + result["login"] = from_str(self.login) + result["token"] = from_str(self.token) + if self.persist is not None: + result["persist"] = from_union([from_bool, from_none], self.persist) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionAuthLogoutUserRequest: + """Parameters identifying a GitHub authentication to log out.""" + + auth_info: AuthInfo + """Authentication information to log out""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionAuthLogoutUserRequest': + assert isinstance(obj, dict) + auth_info = _load_AuthInfo(obj.get("authInfo")) + return SessionAuthLogoutUserRequest(auth_info) + + def to_dict(self) -> dict: + result: dict = {} + result["authInfo"] = (self.auth_info).to_dict() + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionAuthSwitchRequest: + """Parameters for switching the session's active authentication.""" + + auth_info: AuthInfo + """Authentication information to activate""" + + token: str | None = None + """Optional token paired with the authentication information""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionAuthSwitchRequest': + assert isinstance(obj, dict) + auth_info = _load_AuthInfo(obj.get("authInfo")) + token = from_union([from_str, from_none], obj.get("token")) + return SessionAuthSwitchRequest(auth_info, token) + + def to_dict(self) -> dict: + result: dict = {} + result["authInfo"] = (self.auth_info).to_dict() + if self.token is not None: + result["token"] = from_union([from_str, from_none], self.token) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionBulkDeleteResult: @@ -9298,8 +9664,10 @@ class SessionFSSqliteQueryType(Enum): # Experimental: this type is part of an experimental API and may change or be removed. class SessionFSSqliteTransactionErrorClass(Enum): - """SQLite transaction failure classification.""" + """Machine-readable classification of the transaction failure. + SQLite transaction failure classification. + """ BUSY_OR_LOCKED = "busyOrLocked" FATAL = "fatal" POST_COMMIT_AMBIGUOUS = "postCommitAmbiguous" @@ -9413,6 +9781,8 @@ class SessionLimitPredictionTier(Enum): """Tier chosen as the recommended cap. Semantic usage tier used for a recommended cap or additional headroom. + + Semantic usage tier. """ ADDITIONAL_HEADROOM = "additional_headroom" GENEROUS_HEADROOM = "generous_headroom" @@ -9548,7 +9918,10 @@ class SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource: """Source descriptor for a `sessions.open` content-exclusion rule, with source name and type.""" name: str + """Name of the policy source.""" + type: str + """Type of the policy source.""" @staticmethod def from_dict(obj: Any) -> 'SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource': @@ -9768,10 +10141,15 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionSettingsBuiltInToolAvailabilitySnapshot: - """Availability of built-in job tools surfaced to boundary consumers.""" + """Availability of built-in job tools surfaced to boundary consumers. + Availability of job-specific built-in tools. + """ create_pull_request: bool | None = None + """Whether the create-pull-request tool is available.""" + report_progress: bool | None = None + """Whether the report-progress tool is available.""" @staticmethod def from_dict(obj: Any) -> 'SessionSettingsBuiltInToolAvailabilitySnapshot': @@ -9821,6 +10199,7 @@ class SessionSettingsEvaluatePredicateResult: """Result of evaluating a Rust-owned settings predicate.""" enabled: bool + """Whether the named settings predicate evaluated to enabled.""" @staticmethod def from_dict(obj: Any) -> 'SessionSettingsEvaluatePredicateResult': @@ -9836,12 +10215,21 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionSettingsModelSnapshot: - """Redacted model routing settings for a session.""" + """Redacted model routing settings for a session. + Redacted model routing settings. + """ callback_url: str | None = None + """Agent service callback URL for job and progress updates.""" + default_reasoning_effort: str | None = None + """Default reasoning effort for the selected model.""" + instance_id: str | None = None + """Agent job identifier for the session.""" + model: str | None = None + """Selected model identifier.""" @staticmethod def from_dict(obj: Any) -> 'SessionSettingsModelSnapshot': @@ -9867,10 +10255,15 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionSettingsOnlineEvaluationSnapshot: - """Online-evaluation settings safe to expose across the SDK boundary.""" + """Online-evaluation settings safe to expose across the SDK boundary. + Online-evaluation settings safe for SDK consumers. + """ disable_online_evaluation: bool | None = None + """Whether online evaluation is disabled.""" + enable_online_evaluation_output_file: bool | None = None + """Whether online-evaluation output-file generation is enabled.""" @staticmethod def from_dict(obj: Any) -> 'SessionSettingsOnlineEvaluationSnapshot': @@ -9890,20 +10283,45 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionSettingsRepoSnapshot: - """Redacted repository and GitHub host settings for a session.""" + """Redacted repository and GitHub host settings for a session. + Redacted repository and host settings. + """ branch: str | None = None + """Checked-out repository branch.""" + commit: str | None = None + """Checked-out commit SHA.""" + host: str | None = None + """GitHub server host name.""" + host_protocol: str | None = None + """Protocol used to access the GitHub host.""" + id: float | None = None + """GitHub repository database ID.""" + name: str | None = None + """Repository name.""" + owner_id: float | None = None + """GitHub repository owner database ID.""" + owner_name: str | None = None + """Repository owner login.""" + pr_commit_count: float | None = None + """Number of commits in the pull request.""" + read_write: bool | None = None + """Whether the repository is writable.""" + secret_scanning_url: str | None = None + """GitHub secret-scanning service URL.""" + server_url: str | None = None + """GitHub server base URL.""" @staticmethod def from_dict(obj: Any) -> 'SessionSettingsRepoSnapshot': @@ -9950,57 +10368,6 @@ def to_dict(self) -> dict: result["serverUrl"] = from_union([from_str, from_none], self.server_url) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class SessionSettingsValidationSnapshot: - """Redacted validation and memory-tool settings for a session.""" - - advisory_enabled: bool | None = None - codeql_enabled: bool | None = None - code_review_enabled: bool | None = None - code_review_model: str | None = None - dependabot_timeout: float | None = None - memory_store_enabled: bool | None = None - memory_vote_enabled: bool | None = None - secret_scanning_enabled: bool | None = None - timeout: float | None = None - - @staticmethod - def from_dict(obj: Any) -> 'SessionSettingsValidationSnapshot': - assert isinstance(obj, dict) - advisory_enabled = from_union([from_bool, from_none], obj.get("advisoryEnabled")) - codeql_enabled = from_union([from_bool, from_none], obj.get("codeqlEnabled")) - code_review_enabled = from_union([from_bool, from_none], obj.get("codeReviewEnabled")) - code_review_model = from_union([from_str, from_none], obj.get("codeReviewModel")) - dependabot_timeout = from_union([from_float, from_none], obj.get("dependabotTimeout")) - memory_store_enabled = from_union([from_bool, from_none], obj.get("memoryStoreEnabled")) - memory_vote_enabled = from_union([from_bool, from_none], obj.get("memoryVoteEnabled")) - secret_scanning_enabled = from_union([from_bool, from_none], obj.get("secretScanningEnabled")) - timeout = from_union([from_float, from_none], obj.get("timeout")) - return SessionSettingsValidationSnapshot(advisory_enabled, codeql_enabled, code_review_enabled, code_review_model, dependabot_timeout, memory_store_enabled, memory_vote_enabled, secret_scanning_enabled, timeout) - - def to_dict(self) -> dict: - result: dict = {} - if self.advisory_enabled is not None: - result["advisoryEnabled"] = from_union([from_bool, from_none], self.advisory_enabled) - if self.codeql_enabled is not None: - result["codeqlEnabled"] = from_union([from_bool, from_none], self.codeql_enabled) - if self.code_review_enabled is not None: - result["codeReviewEnabled"] = from_union([from_bool, from_none], self.code_review_enabled) - if self.code_review_model is not None: - result["codeReviewModel"] = from_union([from_str, from_none], self.code_review_model) - if self.dependabot_timeout is not None: - result["dependabotTimeout"] = from_union([to_float, from_none], self.dependabot_timeout) - if self.memory_store_enabled is not None: - result["memoryStoreEnabled"] = from_union([from_bool, from_none], self.memory_store_enabled) - if self.memory_vote_enabled is not None: - result["memoryVoteEnabled"] = from_union([from_bool, from_none], self.memory_vote_enabled) - if self.secret_scanning_enabled is not None: - result["secretScanningEnabled"] = from_union([from_bool, from_none], self.secret_scanning_enabled) - if self.timeout is not None: - result["timeout"] = from_union([to_float, from_none], self.timeout) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionSizes: @@ -11567,7 +11934,7 @@ class TasksStartAgentRequest: """Type of agent to start (e.g., 'explore', 'task', 'general-purpose')""" name: str - """Short name for the agent, used to generate a human-readable ID""" + """Friendly, non-unique name used when displaying the agent""" prompt: str """Task prompt for the agent""" @@ -12327,7 +12694,10 @@ class WorkspacesAddSummaryResult: """Persisted summary metadata and refreshed workspace metadata.""" summary: dict[str, Any] | None = None + """Metadata for the persisted summary.""" + workspace: dict[str, Any] | None = None + """Refreshed metadata for the containing workspace.""" @staticmethod def from_dict(obj: Any) -> 'WorkspacesAddSummaryResult': @@ -12645,8 +13015,10 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionAuthStatus: - """Authentication status and account metadata for the session.""" + """Authentication status and account metadata for the session. + Authentication accounts available to the internal session host. + """ is_authenticated: bool """Whether the session has resolved authentication""" @@ -13374,6 +13746,8 @@ class DebugCollectLogsDestination: `directory` to stage redacted files for caller-managed upload/post-processing. """ kind: DebugCollectLogsResultKind + """Destination variant discriminator.""" + no_overwrite: bool | None = None """When true, create the archive atomically without overwriting an existing file by appending ` (N)` before the extension as needed. Defaults to false. @@ -13407,8 +13781,11 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionManagedPermissions: - """Enterprise permission policy expressed with the runtime's managed permission-rule syntax.""" + """Enterprise permission policy expressed with the runtime's managed permission-rule + syntax. + Managed permission policy injected by the SDK host. + """ allow: list[str] | None = None """Permission rules that allow matching operations unless another managed source, deny, or ask rule restricts them. @@ -14148,7 +14525,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class FactoryRunFailure: - """Machine-readable factory run failure. + """Machine-readable terminal failure. + + Machine-readable factory run failure. Machine-readable failure details for an errored run. @@ -14160,6 +14539,8 @@ class FactoryRunFailure: Factory run identifier whose changed limits were declined. """ type: FactoryRunFailureType + """Factory failure variant discriminator.""" + kind: FactoryRunFailureKind | None = None """Resource ceiling that stopped the run.""" @@ -14288,18 +14669,47 @@ class FactoryPhaseObservation: """Durable lifecycle and timing for one factory phase.""" accumulated_active_ms: int + """Completed active time accumulated by this phase in milliseconds.""" + current_active_ms: int + """Current live active time for this phase in milliseconds.""" + entry_count: int + """Number of times execution entered this phase.""" + id: str + """Phase identifier.""" + last_entered_run_attempt: int + """Most recent run attempt that entered this phase, or `0` if the phase has never been + entered. + """ live_agent_count: int + """Direct agents in this phase that are currently live.""" + status: FactoryPhaseStatus + """Derived lifecycle state of the phase.""" + title: str + """Human-readable phase title.""" + total_agent_count: int + """Total direct agents associated with this phase.""" + completed_at: int | None = None + """Epoch milliseconds when this phase completed; for a skipped phase, the synthetic skip + timestamp (equal to `startedAt`). + """ detail: str | None = None + """Optional human-readable phase detail.""" + ordinal: int | None = None + """Zero-based declared phase ordinal, or null for an undeclared phase.""" + started_at: int | None = None + """Epoch milliseconds when this phase first started; for a skipped phase, the synthetic skip + timestamp (equal to `completedAt`). + """ @staticmethod def from_dict(obj: Any) -> 'FactoryPhaseObservation': @@ -14600,12 +15010,23 @@ class InstalledPluginSource: Constant value. Always "local". """ path: str | None = None + """Optional repository-relative path to the plugin. + + Optional source-relative path to the plugin. + + Local filesystem path to the plugin. + """ ref: str | None = None + """Optional Git ref to resolve.""" + repo: str | None = None + """GitHub repository in `owner/repo` form.""" + sha: str | None = None """Optional full 40-character hexadecimal commit SHA.""" url: str | None = None + """URL of the plugin source.""" @staticmethod def from_dict(obj: Any) -> 'InstalledPluginSource': @@ -14652,12 +15073,23 @@ class SessionInstalledPluginSource: Constant value. Always "local". """ path: str | None = None + """Optional repository-relative path to the plugin. + + Optional source-relative path to the plugin. + + Local filesystem path to the plugin. + """ ref: str | None = None + """Optional Git ref to resolve.""" + repo: str | None = None + """GitHub repository in `owner/repo` form.""" + sha: str | None = None """Optional full 40-character hexadecimal commit SHA.""" url: str | None = None + """URL of the plugin source.""" @staticmethod def from_dict(obj: Any) -> 'SessionInstalledPluginSource': @@ -14692,11 +15124,17 @@ class InstalledPluginSourceGitHub: full commit SHA, and optional subpath. """ repo: str + """GitHub repository in `owner/repo` form.""" + source: FluffySource """Constant value. Always "github".""" path: str | None = None + """Optional repository-relative path to the plugin.""" + ref: str | None = None + """Optional Git ref to resolve.""" + sha: str | None = None """Optional full 40-character hexadecimal commit SHA.""" @@ -14729,11 +15167,17 @@ class SessionInstalledPluginSourceGitHub: full commit SHA, and optional subpath. """ repo: str + """GitHub repository in `owner/repo` form.""" + source: FluffySource """Constant value. Always "github".""" path: str | None = None + """Optional repository-relative path to the plugin.""" + ref: str | None = None + """Optional Git ref to resolve.""" + sha: str | None = None """Optional full 40-character hexadecimal commit SHA.""" @@ -14765,6 +15209,8 @@ class InstalledPluginSourceLocal: """Source descriptor for a direct local plugin install, with a local filesystem path.""" path: str + """Local filesystem path to the plugin.""" + source: TentacledSource """Constant value. Always "local".""" @@ -14787,6 +15233,8 @@ class SessionInstalledPluginSourceLocal: """Source descriptor for a direct local plugin install, with a local filesystem path.""" path: str + """Local filesystem path to the plugin.""" + source: TentacledSource """Constant value. Always "local".""" @@ -14813,8 +15261,14 @@ class InstalledPluginSourceURL: """Constant value. Always "url".""" url: str + """URL of the plugin source.""" + path: str | None = None + """Optional source-relative path to the plugin.""" + ref: str | None = None + """Optional Git ref to resolve.""" + sha: str | None = None """Optional full 40-character hexadecimal commit SHA.""" @@ -14850,8 +15304,14 @@ class SessionInstalledPluginSourceURL: """Constant value. Always "url".""" url: str + """URL of the plugin source.""" + path: str | None = None + """Optional source-relative path to the plugin.""" + ref: str | None = None + """Optional Git ref to resolve.""" + sha: str | None = None """Optional full 40-character hexadecimal commit SHA.""" @@ -14955,6 +15415,8 @@ class LlmInferenceHTTPRequestStartRequest: """The head of an outbound model-layer HTTP request.""" headers: dict[str, list[str]] + """HTTP request headers, preserving multiple values per name.""" + method: str """HTTP method, e.g. GET, POST.""" @@ -15207,24 +15669,55 @@ def to_dict(self) -> dict: @dataclass class Workspace: id: str + """Stable workspace identifier.""" + branch: str | None = None + """Current Git branch.""" + chronicle_sync_dismissed: bool | None = None + """Whether the per-session Chronicle upgrade prompt was dismissed for the workspace.""" + client_name: str | None = None + """Name of the client that created the workspace.""" + created_at: datetime | None = None + """Timestamp when the workspace was created.""" + cwd: str | None = None + """Current working directory associated with the workspace.""" + git_root: str | None = None + """Git repository root associated with the workspace.""" + host_type: HostType | None = None """Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration.""" mc_last_event_id: str | None = None + """Most recent Mission Control event identifier observed for the workspace.""" + mc_session_id: str | None = None + """Mission Control session identifier associated with the workspace.""" + mc_task_id: str | None = None + """Mission Control task identifier associated with the workspace.""" + name: str | None = None + """Workspace display name.""" + remote_steerable: bool | None = None + """Whether the workspace session can be steered remotely.""" + repository: str | None = None + """Repository identifier associated with the workspace.""" + summary_count: int | None = None + """Number of persisted summaries in the workspace.""" + updated_at: datetime | None = None + """Timestamp when the workspace was last updated.""" + user_named: bool | None = None + """Whether the workspace name was explicitly chosen by the user.""" @staticmethod def from_dict(obj: Any) -> 'Workspace': @@ -15530,95 +16023,6 @@ def to_dict(self) -> dict: result["contents"] = from_list(lambda x: to_class(MCPAppsResourceContent, x), self.contents) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class MCPServerConfigStdio: - """Stdio MCP server configuration launched as a child process.""" - - command: str - """Executable command used to start the Stdio MCP server process.""" - - args: list[str] | None = None - """Command-line arguments passed to the Stdio MCP server process.""" - - auth: bool | MCPServerAuthConfigRedirectPort | None = None - """Set to `true` to use defaults, or provide an object with additional auth or OIDC settings.""" - - cwd: str | None = None - """Working directory for the Stdio MCP server process.""" - - defer_tools: MCPServerConfigDeferTools | None = None - """Controls if tools provided by this server can be loaded on demand via tool search (auto) - or always included in the initial tool list (never) - """ - disable_tool_cache: bool | None = None - """Set to true to disable persisted MCP tool snapshots for this server. Live tool discovery - is unaffected. - """ - env: dict[str, str] | None = None - """Environment variables to pass to the Stdio MCP server process.""" - - filter_mapping: dict[str, ContentFilterMode] | ContentFilterMode | None = None - """Content filtering mode to apply to all tools, or a map of tool name to content filtering - mode. - """ - is_default_server: bool | None = None - """Whether this server is a built-in fallback used when the user has not configured their - own server. - """ - oidc: bool | MCPServerAuthConfigRedirectPort | None = None - """Set to `true` to use defaults, or provide an object with additional auth or OIDC settings.""" - - timeout: int | None = None - """Timeout in milliseconds for tool calls to this server.""" - - tools: list[str] | None = None - """Tools to include. Defaults to all tools if not specified.""" - - @staticmethod - def from_dict(obj: Any) -> 'MCPServerConfigStdio': - assert isinstance(obj, dict) - command = from_str(obj.get("command")) - args = from_union([lambda x: from_list(from_str, x), from_none], obj.get("args")) - auth = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("auth")) - cwd = from_union([from_str, from_none], obj.get("cwd")) - defer_tools = from_union([MCPServerConfigDeferTools, from_none], obj.get("deferTools")) - disable_tool_cache = from_union([from_bool, from_none], obj.get("disableToolCache")) - env = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("env")) - filter_mapping = from_union([lambda x: from_dict(ContentFilterMode, x), ContentFilterMode, from_none], obj.get("filterMapping")) - is_default_server = from_union([from_bool, from_none], obj.get("isDefaultServer")) - oidc = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("oidc")) - timeout = from_union([from_int, from_none], obj.get("timeout")) - tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tools")) - return MCPServerConfigStdio(command, args, auth, cwd, defer_tools, disable_tool_cache, env, filter_mapping, is_default_server, oidc, timeout, tools) - - def to_dict(self) -> dict: - result: dict = {} - result["command"] = from_str(self.command) - if self.args is not None: - result["args"] = from_union([lambda x: from_list(from_str, x), from_none], self.args) - if self.auth is not None: - result["auth"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.auth) - if self.cwd is not None: - result["cwd"] = from_union([from_str, from_none], self.cwd) - if self.defer_tools is not None: - result["deferTools"] = from_union([lambda x: to_enum(MCPServerConfigDeferTools, x), from_none], self.defer_tools) - if self.disable_tool_cache is not None: - result["disableToolCache"] = from_union([from_bool, from_none], self.disable_tool_cache) - if self.env is not None: - result["env"] = from_union([lambda x: from_dict(from_str, x), from_none], self.env) - if self.filter_mapping is not None: - result["filterMapping"] = from_union([lambda x: from_dict(lambda x: to_enum(ContentFilterMode, x), x), lambda x: to_enum(ContentFilterMode, x), from_none], self.filter_mapping) - if self.is_default_server is not None: - result["isDefaultServer"] = from_union([from_bool, from_none], self.is_default_server) - if self.oidc is not None: - result["oidc"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.oidc) - if self.timeout is not None: - result["timeout"] = from_union([from_int, from_none], self.timeout) - if self.tools is not None: - result["tools"] = from_union([lambda x: from_list(from_str, x), from_none], self.tools) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPOauthLoginRequest: @@ -15696,243 +16100,6 @@ def to_dict(self) -> dict: result["publicClient"] = from_union([from_bool, from_none], self.public_client) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class MCPServerConfig: - """MCP server configuration (stdio process or remote HTTP/SSE) - - Replacement MCP server configuration (stdio process or remote HTTP/SSE). Omit to restart - the server with its already-registered configuration (config-free restart-by-name). - - MCP server configuration (stdio process or remote HTTP/SSE). Omit to start the server - with its already-registered configuration (config-free start-by-name). - - Stdio MCP server configuration launched as a child process. - - Remote MCP server configuration accessed over HTTP or SSE. - """ - args: list[str] | None = None - """Command-line arguments passed to the Stdio MCP server process.""" - - auth: bool | MCPServerAuthConfigRedirectPort | None = None - """Set to `true` to use defaults, or provide an object with additional auth or OIDC settings.""" - - command: str | None = None - """Executable command used to start the Stdio MCP server process.""" - - cwd: str | None = None - """Working directory for the Stdio MCP server process.""" - - defer_tools: MCPServerConfigDeferTools | None = None - """Controls if tools provided by this server can be loaded on demand via tool search (auto) - or always included in the initial tool list (never) - """ - disable_tool_cache: bool | None = None - """Set to true to disable persisted MCP tool snapshots for this server. Live tool discovery - is unaffected. - """ - env: dict[str, str] | None = None - """Environment variables to pass to the Stdio MCP server process.""" - - filter_mapping: dict[str, ContentFilterMode] | ContentFilterMode | None = None - """Content filtering mode to apply to all tools, or a map of tool name to content filtering - mode. - """ - is_default_server: bool | None = None - """Whether this server is a built-in fallback used when the user has not configured their - own server. - """ - oidc: bool | MCPServerAuthConfigRedirectPort | None = None - """Set to `true` to use defaults, or provide an object with additional auth or OIDC settings.""" - - timeout: int | None = None - """Timeout in milliseconds for tool calls to this server.""" - - tools: list[str] | None = None - """Tools to include. Defaults to all tools if not specified.""" - - headers: dict[str, str] | None = None - """HTTP headers to include in requests to the remote MCP server.""" - - oauth_client_id: str | None = None - """OAuth client ID for a pre-registered remote MCP OAuth client.""" - - oauth_grant_type: MCPGrantType | None = None - """OAuth grant type to use when authenticating to the remote MCP server.""" - - oauth_public_client: bool | None = None - """Whether the configured OAuth client is public and does not require a client secret.""" - - type: MCPServerConfigHTTPType | None = None - """Remote transport type. Defaults to "http" when omitted.""" - - url: str | None = None - """URL of the remote MCP server endpoint.""" - - @staticmethod - def from_dict(obj: Any) -> 'MCPServerConfig': - assert isinstance(obj, dict) - args = from_union([lambda x: from_list(from_str, x), from_none], obj.get("args")) - auth = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("auth")) - command = from_union([from_str, from_none], obj.get("command")) - cwd = from_union([from_str, from_none], obj.get("cwd")) - defer_tools = from_union([MCPServerConfigDeferTools, from_none], obj.get("deferTools")) - disable_tool_cache = from_union([from_bool, from_none], obj.get("disableToolCache")) - env = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("env")) - filter_mapping = from_union([lambda x: from_dict(ContentFilterMode, x), ContentFilterMode, from_none], obj.get("filterMapping")) - is_default_server = from_union([from_bool, from_none], obj.get("isDefaultServer")) - oidc = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("oidc")) - timeout = from_union([from_int, from_none], obj.get("timeout")) - tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tools")) - headers = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("headers")) - oauth_client_id = from_union([from_str, from_none], obj.get("oauthClientId")) - oauth_grant_type = from_union([MCPGrantType, from_none], obj.get("oauthGrantType")) - oauth_public_client = from_union([from_bool, from_none], obj.get("oauthPublicClient")) - type = from_union([MCPServerConfigHTTPType, from_none], obj.get("type")) - url = from_union([from_str, from_none], obj.get("url")) - return MCPServerConfig(args, auth, command, cwd, defer_tools, disable_tool_cache, env, filter_mapping, is_default_server, oidc, timeout, tools, headers, oauth_client_id, oauth_grant_type, oauth_public_client, type, url) - - def to_dict(self) -> dict: - result: dict = {} - if self.args is not None: - result["args"] = from_union([lambda x: from_list(from_str, x), from_none], self.args) - if self.auth is not None: - result["auth"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.auth) - if self.command is not None: - result["command"] = from_union([from_str, from_none], self.command) - if self.cwd is not None: - result["cwd"] = from_union([from_str, from_none], self.cwd) - if self.defer_tools is not None: - result["deferTools"] = from_union([lambda x: to_enum(MCPServerConfigDeferTools, x), from_none], self.defer_tools) - if self.disable_tool_cache is not None: - result["disableToolCache"] = from_union([from_bool, from_none], self.disable_tool_cache) - if self.env is not None: - result["env"] = from_union([lambda x: from_dict(from_str, x), from_none], self.env) - if self.filter_mapping is not None: - result["filterMapping"] = from_union([lambda x: from_dict(lambda x: to_enum(ContentFilterMode, x), x), lambda x: to_enum(ContentFilterMode, x), from_none], self.filter_mapping) - if self.is_default_server is not None: - result["isDefaultServer"] = from_union([from_bool, from_none], self.is_default_server) - if self.oidc is not None: - result["oidc"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.oidc) - if self.timeout is not None: - result["timeout"] = from_union([from_int, from_none], self.timeout) - if self.tools is not None: - result["tools"] = from_union([lambda x: from_list(from_str, x), from_none], self.tools) - if self.headers is not None: - result["headers"] = from_union([lambda x: from_dict(from_str, x), from_none], self.headers) - if self.oauth_client_id is not None: - result["oauthClientId"] = from_union([from_str, from_none], self.oauth_client_id) - if self.oauth_grant_type is not None: - result["oauthGrantType"] = from_union([lambda x: to_enum(MCPGrantType, x), from_none], self.oauth_grant_type) - if self.oauth_public_client is not None: - result["oauthPublicClient"] = from_union([from_bool, from_none], self.oauth_public_client) - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(MCPServerConfigHTTPType, x), from_none], self.type) - 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 MCPServerConfigHTTP: - """Remote MCP server configuration accessed over HTTP or SSE.""" - - url: str - """URL of the remote MCP server endpoint.""" - - auth: bool | MCPServerAuthConfigRedirectPort | None = None - """Set to `true` to use defaults, or provide an object with additional auth or OIDC settings.""" - - defer_tools: MCPServerConfigDeferTools | None = None - """Controls if tools provided by this server can be loaded on demand via tool search (auto) - or always included in the initial tool list (never) - """ - disable_tool_cache: bool | None = None - """Set to true to disable persisted MCP tool snapshots for this server. Live tool discovery - is unaffected. - """ - filter_mapping: dict[str, ContentFilterMode] | ContentFilterMode | None = None - """Content filtering mode to apply to all tools, or a map of tool name to content filtering - mode. - """ - headers: dict[str, str] | None = None - """HTTP headers to include in requests to the remote MCP server.""" - - is_default_server: bool | None = None - """Whether this server is a built-in fallback used when the user has not configured their - own server. - """ - oauth_client_id: str | None = None - """OAuth client ID for a pre-registered remote MCP OAuth client.""" - - oauth_grant_type: MCPGrantType | None = None - """OAuth grant type to use when authenticating to the remote MCP server.""" - - oauth_public_client: bool | None = None - """Whether the configured OAuth client is public and does not require a client secret.""" - - oidc: bool | MCPServerAuthConfigRedirectPort | None = None - """Set to `true` to use defaults, or provide an object with additional auth or OIDC settings.""" - - timeout: int | None = None - """Timeout in milliseconds for tool calls to this server.""" - - tools: list[str] | None = None - """Tools to include. Defaults to all tools if not specified.""" - - type: MCPServerConfigHTTPType | None = None - """Remote transport type. Defaults to "http" when omitted.""" - - @staticmethod - def from_dict(obj: Any) -> 'MCPServerConfigHTTP': - assert isinstance(obj, dict) - url = from_str(obj.get("url")) - auth = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("auth")) - defer_tools = from_union([MCPServerConfigDeferTools, from_none], obj.get("deferTools")) - disable_tool_cache = from_union([from_bool, from_none], obj.get("disableToolCache")) - filter_mapping = from_union([lambda x: from_dict(ContentFilterMode, x), ContentFilterMode, from_none], obj.get("filterMapping")) - headers = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("headers")) - is_default_server = from_union([from_bool, from_none], obj.get("isDefaultServer")) - oauth_client_id = from_union([from_str, from_none], obj.get("oauthClientId")) - oauth_grant_type = from_union([MCPGrantType, from_none], obj.get("oauthGrantType")) - oauth_public_client = from_union([from_bool, from_none], obj.get("oauthPublicClient")) - oidc = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("oidc")) - timeout = from_union([from_int, from_none], obj.get("timeout")) - tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tools")) - type = from_union([MCPServerConfigHTTPType, from_none], obj.get("type")) - return MCPServerConfigHTTP(url, auth, defer_tools, disable_tool_cache, filter_mapping, headers, is_default_server, oauth_client_id, oauth_grant_type, oauth_public_client, oidc, timeout, tools, type) - - def to_dict(self) -> dict: - result: dict = {} - result["url"] = from_str(self.url) - if self.auth is not None: - result["auth"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.auth) - if self.defer_tools is not None: - result["deferTools"] = from_union([lambda x: to_enum(MCPServerConfigDeferTools, x), from_none], self.defer_tools) - if self.disable_tool_cache is not None: - result["disableToolCache"] = from_union([from_bool, from_none], self.disable_tool_cache) - if self.filter_mapping is not None: - result["filterMapping"] = from_union([lambda x: from_dict(lambda x: to_enum(ContentFilterMode, x), x), lambda x: to_enum(ContentFilterMode, x), from_none], self.filter_mapping) - if self.headers is not None: - result["headers"] = from_union([lambda x: from_dict(from_str, x), from_none], self.headers) - if self.is_default_server is not None: - result["isDefaultServer"] = from_union([from_bool, from_none], self.is_default_server) - if self.oauth_client_id is not None: - result["oauthClientId"] = from_union([from_str, from_none], self.oauth_client_id) - if self.oauth_grant_type is not None: - result["oauthGrantType"] = from_union([lambda x: to_enum(MCPGrantType, x), from_none], self.oauth_grant_type) - if self.oauth_public_client is not None: - result["oauthPublicClient"] = from_union([from_bool, from_none], self.oauth_public_client) - if self.oidc is not None: - result["oidc"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.oidc) - if self.timeout is not None: - result["timeout"] = from_union([from_int, from_none], self.timeout) - if self.tools is not None: - result["tools"] = from_union([lambda x: from_list(from_str, x), from_none], self.tools) - if self.type is not None: - 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: @@ -15944,18 +16111,24 @@ class MCPStartServersResult: allowed_servers: list[MCPAllowedServer] | None = None """Non-default servers allowed by policy""" + failed_servers: list[MCPFailedServer] | None = None + """Servers whose connection attempt failed.""" + @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) + failed_servers = from_union([lambda x: from_list(MCPFailedServer.from_dict, x), from_none], obj.get("failedServers")) + return MCPStartServersResult(filtered_servers, allowed_servers, failed_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) + if self.failed_servers is not None: + result["failedServers"] = from_union([lambda x: from_list(lambda x: to_class(MCPFailedServer, x), x), from_none], self.failed_servers) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -15964,6 +16137,8 @@ class MCPHeadersHandlePendingHeadersRefreshRequest: """Host response: supply dynamic headers or decline this refresh.""" kind: MCPHeadersHandlePendingHeadersRefreshRequestKind + """Headers-refresh response variant discriminator.""" + headers: dict[str, str] | None = None """Headers to overlay onto the MCP request. Dynamic headers override static config headers but do not replace SDK-managed request headers. @@ -16038,6 +16213,8 @@ class MCPOauthPendingRequestResponse: """Host response to the pending OAuth request.""" kind: MCPOauthPendingRequestResponseKind + """OAuth response variant discriminator.""" + access_token: str | None = None """Access token acquired by the SDK host""" @@ -16122,6 +16299,60 @@ 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 PermissionDecisionApproveForLocationApprovalMemory: + """Location-scoped approval details for writes to long-term memory.""" + + kind: ClassVar[str] = "memory" + """Approval covering writes to long-term memory.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalMemory': + assert isinstance(obj, dict) + return PermissionDecisionApproveForLocationApprovalMemory() + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = self.kind + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionDecisionApproveForSessionApprovalMemory: + """Session-scoped approval details for writes to long-term memory.""" + + kind: ClassVar[str] = "memory" + """Approval covering writes to long-term memory.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalMemory': + assert isinstance(obj, dict) + return PermissionDecisionApproveForSessionApprovalMemory() + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = self.kind + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsLocationsAddToolApprovalDetailsMemory: + """Location-persisted tool approval details for writes to long-term memory.""" + + kind: ClassVar[str] = "memory" + """Approval covering writes to long-term memory.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalDetailsMemory': + assert isinstance(obj, dict) + return PermissionsLocationsAddToolApprovalDetailsMemory() + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = self.kind + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPSetEnvValueModeParams: @@ -16437,7 +16668,10 @@ class SessionModelPriceCategory: """Cost-category metadata for a CAPI model.""" id: str + """CAPI model identifier.""" + price_category: ModelPickerPriceCategory + """Cost category assigned to the model.""" @staticmethod def from_dict(obj: Any) -> 'SessionModelPriceCategory': @@ -16714,12 +16948,17 @@ class OptionsUpdateAdditionalContentExclusionPolicyRule: conditions, and source. """ paths: list[str] + """Path patterns covered by this rule.""" + source: OptionsUpdateAdditionalContentExclusionPolicyRuleSource """Source descriptor for a `session.options.update` content-exclusion rule, with source name and type. """ if_any_match: list[str] | None = None + """Conditions of which at least one must match.""" + if_none_match: list[str] | None = None + """Conditions none of which may match.""" @staticmethod def from_dict(obj: Any) -> 'OptionsUpdateAdditionalContentExclusionPolicyRule': @@ -17245,60 +17484,6 @@ 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 PermissionDecisionApproveForLocationApprovalMemory: - """Location-scoped approval details for writes to long-term memory.""" - - kind: ClassVar[str] = "memory" - """Approval covering writes to long-term memory.""" - - @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalMemory': - assert isinstance(obj, dict) - return PermissionDecisionApproveForLocationApprovalMemory() - - def to_dict(self) -> dict: - result: dict = {} - result["kind"] = self.kind - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class PermissionDecisionApproveForSessionApprovalMemory: - """Session-scoped approval details for writes to long-term memory.""" - - kind: ClassVar[str] = "memory" - """Approval covering writes to long-term memory.""" - - @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalMemory': - assert isinstance(obj, dict) - return PermissionDecisionApproveForSessionApprovalMemory() - - def to_dict(self) -> dict: - result: dict = {} - result["kind"] = self.kind - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class PermissionsLocationsAddToolApprovalDetailsMemory: - """Location-persisted tool approval details for writes to long-term memory.""" - - kind: ClassVar[str] = "memory" - """Approval covering writes to long-term memory.""" - - @staticmethod - def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalDetailsMemory': - assert isinstance(obj, dict) - return PermissionsLocationsAddToolApprovalDetailsMemory() - - def to_dict(self) -> dict: - result: dict = {} - result["kind"] = self.kind - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalRead: @@ -17866,12 +18051,17 @@ class PermissionsConfigureAdditionalContentExclusionPolicyRule: match conditions, and source. """ paths: list[str] + """Path patterns covered by this rule.""" + source: PermissionsConfigureAdditionalContentExclusionPolicyRuleSource """Source descriptor for a `session.permissions.configure` content-exclusion rule, with source name and type. """ if_any_match: list[str] | None = None + """Conditions of which at least one must match.""" + if_none_match: list[str] | None = None + """Conditions none of which may match.""" @staticmethod def from_dict(obj: Any) -> 'PermissionsConfigureAdditionalContentExclusionPolicyRule': @@ -18893,8 +19083,10 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class QueueInsertMessage: - """Serializable message fields accepted by queue.insertAt.""" + """Queued message contents and delivery metadata. + Serializable message fields accepted by queue.insertAt. + """ prompt: str """The user message text.""" @@ -19237,9 +19429,8 @@ class RemoteControlStatusActive: # 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. + excluded from the public SDK surface. Retained as an optional compatibility field; native + remote control does not populate or consume it. """ @staticmethod @@ -19720,9 +19911,14 @@ def to_dict(self) -> dict: class SessionFSSqliteTransactionError: """Classified SQLite transaction failure. busyOrLocked guarantees rollback; postCommitAmbiguous must never be retried. + + Classified transaction failure, when execution did not succeed. """ error_class: SessionFSSqliteTransactionErrorClass + """Machine-readable classification of the transaction failure.""" + message: str + """Human-readable transaction failure message.""" @staticmethod def from_dict(obj: Any) -> 'SessionFSSqliteTransactionError': @@ -19832,6 +20028,7 @@ class SessionLimitPredictionTierOption: """AI-credit cap for this tier.""" tier: SessionLimitPredictionTier + """Semantic usage tier.""" @staticmethod def from_dict(obj: Any) -> 'SessionLimitPredictionTierOption': @@ -19853,11 +20050,16 @@ class SessionOpenOptionsAdditionalContentExclusionPolicyRule: conditions, and source. """ paths: list[str] + """Path patterns covered by this rule.""" + source: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource """Source descriptor for a `sessions.open` content-exclusion rule, with source name and type.""" if_any_match: list[str] | None = None + """Conditions of which at least one must match.""" + if_none_match: list[str] | None = None + """Conditions none of which may match.""" @staticmethod def from_dict(obj: Any) -> 'SessionOpenOptionsAdditionalContentExclusionPolicyRule': @@ -19936,11 +20138,18 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionSettingsJobSnapshot: - """Redacted job settings for a session. The job nonce is excluded.""" + """Redacted job settings for a session. The job nonce is excluded. + Redacted job settings. + """ built_in_tool_availability: SessionSettingsBuiltInToolAvailabilitySnapshot | None = None + """Availability of job-specific built-in tools.""" + event_type: str | None = None + """GitHub Actions event type for the job.""" + is_trigger_job: bool | None = None + """Whether this is the workflow's trigger job.""" @staticmethod def from_dict(obj: Any) -> 'SessionSettingsJobSnapshot': @@ -20714,6 +20923,224 @@ 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 MCPSerializableServerConfig: + """MCP server configuration (stdio process or remote HTTP/SSE) + + Serializable MCP server configuration (stdio process or remote HTTP/SSE) + + Replacement MCP server configuration (stdio process or remote HTTP/SSE). Omit to restart + the server with its already-registered configuration (config-free restart-by-name). + + MCP server configuration (stdio process or remote HTTP/SSE). Omit to start the server + with its already-registered configuration (config-free start-by-name). + + Stdio MCP server configuration launched as a child process. + + Remote MCP server configuration accessed over HTTP or SSE. + """ + args: list[str] | None = None + """Command-line arguments passed to the Stdio MCP server process.""" + + auth: bool | MCPServerAuthConfigRedirectPort | None = None + """Set to `true` to use defaults, or provide an object with additional auth or OIDC settings.""" + + command: str | None = None + """Executable command used to start the Stdio MCP server process.""" + + config_warnings: list[str] | None = None + """Configuration warnings recorded while loading the server.""" + + cwd: str | None = None + """Working directory for the Stdio MCP server process.""" + + defer_tools: MCPServerConfigDeferTools | None = None + """Controls if tools provided by this server can be loaded on demand via tool search (auto) + or always included in the initial tool list (never) + """ + disable_secret_masking: bool | None = None + """Whether secret masking is disabled for calls to this server.""" + + disable_tool_cache: bool | None = None + """Set to true to disable persisted MCP tool snapshots for this server. Live tool discovery + is unaffected. + """ + display_name: str | None = None + """Optional human-readable server name.""" + + env: dict[str, str] | None = None + """Environment variables to pass to the Stdio MCP server process.""" + + events: list[str] | None = None + """Event types this server receives as Copilot notifications.""" + + exclude_tools: list[str] | None = None + """Tool names excluded after the include filter is applied.""" + + filter_mapping: dict[str, ContentFilterMode] | ContentFilterMode | None = None + """Content filtering mode to apply to all tools, or a map of tool name to content filtering + mode. + """ + is_default_server: bool | None = None + """Whether this server is a built-in fallback used when the user has not configured their + own server. + """ + notifications: list[str] | None = None + """Copilot notification types this server may send to the host.""" + + oidc: bool | MCPServerAuthConfigRedirectPort | None = None + """Set to `true` to use defaults, or provide an object with additional auth or OIDC settings.""" + + safe_for_telemetry: bool | MCPSafeForTelemetryFields | None = None + """Telemetry-obfuscation policy for this server's tools.""" + + source: McpServerSource | None = None + """The origin of this server configuration.""" + + source_path: str | None = None + """Source file path recorded while loading the config.""" + + source_plugin: str | None = None + """Plugin that provided this server.""" + + source_plugin_spec: bool | None = None + """Whether the providing plugin uses the Open Plugin Spec.""" + + source_plugin_version: str | None = None + """Version of the plugin that provided this server.""" + + timeout: int | None = None + """Timeout in milliseconds for tool discovery and tool calls.""" + + tools: list[str] | None = None + """Tools to include. Defaults to all tools if not specified.""" + + type: MCPSerializableServerConfigType | None = None + """Local transport type. Defaults to stdio when omitted. + + Remote transport type. Defaults to "http" when omitted. + """ + headers: dict[str, str] | None = None + """HTTP headers to include in requests to the remote MCP server.""" + + headers_refresh_ttl_ms: int | None = None + """Dynamic-header refresh cache lifetime in milliseconds.""" + + oauth_client_id: str | None = None + """OAuth client ID for a pre-registered remote MCP OAuth client.""" + + oauth_grant_type: MCPGrantType | None = None + """OAuth grant type to use when authenticating to the remote MCP server.""" + + oauth_public_client: bool | None = None + """Whether the configured OAuth client is public and does not require a client secret.""" + + url: str | None = None + """URL of the remote MCP server endpoint.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPSerializableServerConfig': + assert isinstance(obj, dict) + args = from_union([lambda x: from_list(from_str, x), from_none], obj.get("args")) + auth = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("auth")) + command = from_union([from_str, from_none], obj.get("command")) + config_warnings = from_union([lambda x: from_list(from_str, x), from_none], obj.get("configWarnings")) + cwd = from_union([from_str, from_none], obj.get("cwd")) + defer_tools = from_union([MCPServerConfigDeferTools, from_none], obj.get("deferTools")) + disable_secret_masking = from_union([from_bool, from_none], obj.get("disableSecretMasking")) + disable_tool_cache = from_union([from_bool, from_none], obj.get("disableToolCache")) + display_name = from_union([from_str, from_none], obj.get("displayName")) + env = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("env")) + events = from_union([lambda x: from_list(from_str, x), from_none], obj.get("events")) + exclude_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("excludeTools")) + filter_mapping = from_union([lambda x: from_dict(ContentFilterMode, x), ContentFilterMode, from_none], obj.get("filterMapping")) + is_default_server = from_union([from_bool, from_none], obj.get("isDefaultServer")) + notifications = from_union([lambda x: from_list(from_str, x), from_none], obj.get("notifications")) + oidc = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("oidc")) + safe_for_telemetry = from_union([from_bool, MCPSafeForTelemetryFields.from_dict, from_none], obj.get("safeForTelemetry")) + source = from_union([McpServerSource, from_none], obj.get("source")) + source_path = from_union([from_str, from_none], obj.get("sourcePath")) + source_plugin = from_union([from_str, from_none], obj.get("sourcePlugin")) + source_plugin_spec = from_union([from_bool, from_none], obj.get("sourcePluginSpec")) + source_plugin_version = from_union([from_str, from_none], obj.get("sourcePluginVersion")) + timeout = from_union([from_int, from_none], obj.get("timeout")) + tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tools")) + type = from_union([MCPSerializableServerConfigType, from_none], obj.get("type")) + headers = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("headers")) + headers_refresh_ttl_ms = from_union([from_int, from_none], obj.get("headersRefreshTtlMs")) + oauth_client_id = from_union([from_str, from_none], obj.get("oauthClientId")) + oauth_grant_type = from_union([MCPGrantType, from_none], obj.get("oauthGrantType")) + oauth_public_client = from_union([from_bool, from_none], obj.get("oauthPublicClient")) + url = from_union([from_str, from_none], obj.get("url")) + return MCPSerializableServerConfig(args, auth, command, config_warnings, cwd, defer_tools, disable_secret_masking, disable_tool_cache, display_name, env, events, exclude_tools, filter_mapping, is_default_server, notifications, oidc, safe_for_telemetry, source, source_path, source_plugin, source_plugin_spec, source_plugin_version, timeout, tools, type, headers, headers_refresh_ttl_ms, oauth_client_id, oauth_grant_type, oauth_public_client, url) + + def to_dict(self) -> dict: + result: dict = {} + if self.args is not None: + result["args"] = from_union([lambda x: from_list(from_str, x), from_none], self.args) + if self.auth is not None: + result["auth"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.auth) + if self.command is not None: + result["command"] = from_union([from_str, from_none], self.command) + if self.config_warnings is not None: + result["configWarnings"] = from_union([lambda x: from_list(from_str, x), from_none], self.config_warnings) + if self.cwd is not None: + result["cwd"] = from_union([from_str, from_none], self.cwd) + if self.defer_tools is not None: + result["deferTools"] = from_union([lambda x: to_enum(MCPServerConfigDeferTools, x), from_none], self.defer_tools) + if self.disable_secret_masking is not None: + result["disableSecretMasking"] = from_union([from_bool, from_none], self.disable_secret_masking) + if self.disable_tool_cache is not None: + result["disableToolCache"] = from_union([from_bool, from_none], self.disable_tool_cache) + if self.display_name is not None: + result["displayName"] = from_union([from_str, from_none], self.display_name) + if self.env is not None: + result["env"] = from_union([lambda x: from_dict(from_str, x), from_none], self.env) + if self.events is not None: + result["events"] = from_union([lambda x: from_list(from_str, x), from_none], self.events) + if self.exclude_tools is not None: + result["excludeTools"] = from_union([lambda x: from_list(from_str, x), from_none], self.exclude_tools) + if self.filter_mapping is not None: + result["filterMapping"] = from_union([lambda x: from_dict(lambda x: to_enum(ContentFilterMode, x), x), lambda x: to_enum(ContentFilterMode, x), from_none], self.filter_mapping) + if self.is_default_server is not None: + result["isDefaultServer"] = from_union([from_bool, from_none], self.is_default_server) + if self.notifications is not None: + result["notifications"] = from_union([lambda x: from_list(from_str, x), from_none], self.notifications) + if self.oidc is not None: + result["oidc"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.oidc) + if self.safe_for_telemetry is not None: + result["safeForTelemetry"] = from_union([from_bool, lambda x: to_class(MCPSafeForTelemetryFields, x), from_none], self.safe_for_telemetry) + if self.source is not None: + result["source"] = from_union([lambda x: to_enum(McpServerSource, x), from_none], self.source) + if self.source_path is not None: + result["sourcePath"] = from_union([from_str, from_none], self.source_path) + if self.source_plugin is not None: + result["sourcePlugin"] = from_union([from_str, from_none], self.source_plugin) + if self.source_plugin_spec is not None: + result["sourcePluginSpec"] = from_union([from_bool, from_none], self.source_plugin_spec) + if self.source_plugin_version is not None: + result["sourcePluginVersion"] = from_union([from_str, from_none], self.source_plugin_version) + if self.timeout is not None: + result["timeout"] = from_union([from_int, from_none], self.timeout) + if self.tools is not None: + result["tools"] = from_union([lambda x: from_list(from_str, x), from_none], self.tools) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(MCPSerializableServerConfigType, x), from_none], self.type) + if self.headers is not None: + result["headers"] = from_union([lambda x: from_dict(from_str, x), from_none], self.headers) + if self.headers_refresh_ttl_ms is not None: + result["headersRefreshTtlMs"] = from_union([from_int, from_none], self.headers_refresh_ttl_ms) + if self.oauth_client_id is not None: + result["oauthClientId"] = from_union([from_str, from_none], self.oauth_client_id) + if self.oauth_grant_type is not None: + result["oauthGrantType"] = from_union([lambda x: to_enum(MCPGrantType, x), from_none], self.oauth_grant_type) + if self.oauth_public_client is not None: + result["oauthPublicClient"] = from_union([from_bool, from_none], self.oauth_public_client) + 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 MCPToolUI: @@ -20744,6 +21171,352 @@ def to_dict(self) -> dict: result["visibility"] = from_union([lambda x: from_list(lambda x: to_enum(MCPToolUIVisibility, x), x), from_none], self.visibility) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPServerConfigHTTP: + """Remote MCP server configuration accessed over HTTP or SSE.""" + + url: str + """URL of the remote MCP server endpoint.""" + + auth: bool | MCPServerAuthConfigRedirectPort | None = None + """Set to `true` to use defaults, or provide an object with additional auth or OIDC settings.""" + + config_warnings: list[str] | None = None + """Configuration warnings recorded while loading the server.""" + + defer_tools: MCPServerConfigDeferTools | None = None + """Controls if tools provided by this server can be loaded on demand via tool search (auto) + or always included in the initial tool list (never) + """ + disable_secret_masking: bool | None = None + """Whether secret masking is disabled for calls to this server.""" + + disable_tool_cache: bool | None = None + """Set to true to disable persisted MCP tool snapshots for this server. Live tool discovery + is unaffected. + """ + display_name: str | None = None + """Optional human-readable server name.""" + + events: list[str] | None = None + """Event types this server receives as Copilot notifications.""" + + exclude_tools: list[str] | None = None + """Tool names excluded after the include filter is applied.""" + + filter_mapping: dict[str, ContentFilterMode] | ContentFilterMode | None = None + """Content filtering mode to apply to all tools, or a map of tool name to content filtering + mode. + """ + headers: dict[str, str] | None = None + """HTTP headers to include in requests to the remote MCP server.""" + + headers_refresh_ttl_ms: int | None = None + """Dynamic-header refresh cache lifetime in milliseconds.""" + + is_default_server: bool | None = None + """Whether this server is a built-in fallback used when the user has not configured their + own server. + """ + notifications: list[str] | None = None + """Copilot notification types this server may send to the host.""" + + oauth_client_id: str | None = None + """OAuth client ID for a pre-registered remote MCP OAuth client.""" + + oauth_grant_type: MCPGrantType | None = None + """OAuth grant type to use when authenticating to the remote MCP server.""" + + oauth_public_client: bool | None = None + """Whether the configured OAuth client is public and does not require a client secret.""" + + oidc: bool | MCPServerAuthConfigRedirectPort | None = None + """Set to `true` to use defaults, or provide an object with additional auth or OIDC settings.""" + + safe_for_telemetry: bool | MCPSafeForTelemetryFields | None = None + """Telemetry-obfuscation policy for this server's tools.""" + + source: McpServerSource | None = None + """The origin of this server configuration.""" + + source_path: str | None = None + """Source file path recorded while loading the config.""" + + source_plugin: str | None = None + """Plugin that provided this server.""" + + source_plugin_spec: bool | None = None + """Whether the providing plugin uses the Open Plugin Spec.""" + + source_plugin_version: str | None = None + """Version of the plugin that provided this server.""" + + timeout: int | None = None + """Timeout in milliseconds for tool discovery and tool calls.""" + + tools: list[str] | None = None + """Tools to include. Defaults to all tools if not specified.""" + + type: MCPServerConfigHTTPType | None = None + """Remote transport type. Defaults to "http" when omitted.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPServerConfigHTTP': + assert isinstance(obj, dict) + url = from_str(obj.get("url")) + auth = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("auth")) + config_warnings = from_union([lambda x: from_list(from_str, x), from_none], obj.get("configWarnings")) + defer_tools = from_union([MCPServerConfigDeferTools, from_none], obj.get("deferTools")) + disable_secret_masking = from_union([from_bool, from_none], obj.get("disableSecretMasking")) + disable_tool_cache = from_union([from_bool, from_none], obj.get("disableToolCache")) + display_name = from_union([from_str, from_none], obj.get("displayName")) + events = from_union([lambda x: from_list(from_str, x), from_none], obj.get("events")) + exclude_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("excludeTools")) + filter_mapping = from_union([lambda x: from_dict(ContentFilterMode, x), ContentFilterMode, from_none], obj.get("filterMapping")) + headers = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("headers")) + headers_refresh_ttl_ms = from_union([from_int, from_none], obj.get("headersRefreshTtlMs")) + is_default_server = from_union([from_bool, from_none], obj.get("isDefaultServer")) + notifications = from_union([lambda x: from_list(from_str, x), from_none], obj.get("notifications")) + oauth_client_id = from_union([from_str, from_none], obj.get("oauthClientId")) + oauth_grant_type = from_union([MCPGrantType, from_none], obj.get("oauthGrantType")) + oauth_public_client = from_union([from_bool, from_none], obj.get("oauthPublicClient")) + oidc = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("oidc")) + safe_for_telemetry = from_union([from_bool, MCPSafeForTelemetryFields.from_dict, from_none], obj.get("safeForTelemetry")) + source = from_union([McpServerSource, from_none], obj.get("source")) + source_path = from_union([from_str, from_none], obj.get("sourcePath")) + source_plugin = from_union([from_str, from_none], obj.get("sourcePlugin")) + source_plugin_spec = from_union([from_bool, from_none], obj.get("sourcePluginSpec")) + source_plugin_version = from_union([from_str, from_none], obj.get("sourcePluginVersion")) + timeout = from_union([from_int, from_none], obj.get("timeout")) + tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tools")) + type = from_union([MCPServerConfigHTTPType, from_none], obj.get("type")) + return MCPServerConfigHTTP(url, auth, config_warnings, defer_tools, disable_secret_masking, disable_tool_cache, display_name, events, exclude_tools, filter_mapping, headers, headers_refresh_ttl_ms, is_default_server, notifications, oauth_client_id, oauth_grant_type, oauth_public_client, oidc, safe_for_telemetry, source, source_path, source_plugin, source_plugin_spec, source_plugin_version, timeout, tools, type) + + def to_dict(self) -> dict: + result: dict = {} + result["url"] = from_str(self.url) + if self.auth is not None: + result["auth"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.auth) + if self.config_warnings is not None: + result["configWarnings"] = from_union([lambda x: from_list(from_str, x), from_none], self.config_warnings) + if self.defer_tools is not None: + result["deferTools"] = from_union([lambda x: to_enum(MCPServerConfigDeferTools, x), from_none], self.defer_tools) + if self.disable_secret_masking is not None: + result["disableSecretMasking"] = from_union([from_bool, from_none], self.disable_secret_masking) + if self.disable_tool_cache is not None: + result["disableToolCache"] = from_union([from_bool, from_none], self.disable_tool_cache) + if self.display_name is not None: + result["displayName"] = from_union([from_str, from_none], self.display_name) + if self.events is not None: + result["events"] = from_union([lambda x: from_list(from_str, x), from_none], self.events) + if self.exclude_tools is not None: + result["excludeTools"] = from_union([lambda x: from_list(from_str, x), from_none], self.exclude_tools) + if self.filter_mapping is not None: + result["filterMapping"] = from_union([lambda x: from_dict(lambda x: to_enum(ContentFilterMode, x), x), lambda x: to_enum(ContentFilterMode, x), from_none], self.filter_mapping) + if self.headers is not None: + result["headers"] = from_union([lambda x: from_dict(from_str, x), from_none], self.headers) + if self.headers_refresh_ttl_ms is not None: + result["headersRefreshTtlMs"] = from_union([from_int, from_none], self.headers_refresh_ttl_ms) + if self.is_default_server is not None: + result["isDefaultServer"] = from_union([from_bool, from_none], self.is_default_server) + if self.notifications is not None: + result["notifications"] = from_union([lambda x: from_list(from_str, x), from_none], self.notifications) + if self.oauth_client_id is not None: + result["oauthClientId"] = from_union([from_str, from_none], self.oauth_client_id) + if self.oauth_grant_type is not None: + result["oauthGrantType"] = from_union([lambda x: to_enum(MCPGrantType, x), from_none], self.oauth_grant_type) + if self.oauth_public_client is not None: + result["oauthPublicClient"] = from_union([from_bool, from_none], self.oauth_public_client) + if self.oidc is not None: + result["oidc"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.oidc) + if self.safe_for_telemetry is not None: + result["safeForTelemetry"] = from_union([from_bool, lambda x: to_class(MCPSafeForTelemetryFields, x), from_none], self.safe_for_telemetry) + if self.source is not None: + result["source"] = from_union([lambda x: to_enum(McpServerSource, x), from_none], self.source) + if self.source_path is not None: + result["sourcePath"] = from_union([from_str, from_none], self.source_path) + if self.source_plugin is not None: + result["sourcePlugin"] = from_union([from_str, from_none], self.source_plugin) + if self.source_plugin_spec is not None: + result["sourcePluginSpec"] = from_union([from_bool, from_none], self.source_plugin_spec) + if self.source_plugin_version is not None: + result["sourcePluginVersion"] = from_union([from_str, from_none], self.source_plugin_version) + if self.timeout is not None: + result["timeout"] = from_union([from_int, from_none], self.timeout) + if self.tools is not None: + result["tools"] = from_union([lambda x: from_list(from_str, x), from_none], self.tools) + if self.type is not None: + 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 MCPServerConfigStdio: + """Stdio MCP server configuration launched as a child process.""" + + command: str + """Executable command used to start the Stdio MCP server process.""" + + args: list[str] | None = None + """Command-line arguments passed to the Stdio MCP server process.""" + + auth: bool | MCPServerAuthConfigRedirectPort | None = None + """Set to `true` to use defaults, or provide an object with additional auth or OIDC settings.""" + + config_warnings: list[str] | None = None + """Configuration warnings recorded while loading the server.""" + + cwd: str | None = None + """Working directory for the Stdio MCP server process.""" + + defer_tools: MCPServerConfigDeferTools | None = None + """Controls if tools provided by this server can be loaded on demand via tool search (auto) + or always included in the initial tool list (never) + """ + disable_secret_masking: bool | None = None + """Whether secret masking is disabled for calls to this server.""" + + disable_tool_cache: bool | None = None + """Set to true to disable persisted MCP tool snapshots for this server. Live tool discovery + is unaffected. + """ + display_name: str | None = None + """Optional human-readable server name.""" + + env: dict[str, str] | None = None + """Environment variables to pass to the Stdio MCP server process.""" + + events: list[str] | None = None + """Event types this server receives as Copilot notifications.""" + + exclude_tools: list[str] | None = None + """Tool names excluded after the include filter is applied.""" + + filter_mapping: dict[str, ContentFilterMode] | ContentFilterMode | None = None + """Content filtering mode to apply to all tools, or a map of tool name to content filtering + mode. + """ + is_default_server: bool | None = None + """Whether this server is a built-in fallback used when the user has not configured their + own server. + """ + notifications: list[str] | None = None + """Copilot notification types this server may send to the host.""" + + oidc: bool | MCPServerAuthConfigRedirectPort | None = None + """Set to `true` to use defaults, or provide an object with additional auth or OIDC settings.""" + + safe_for_telemetry: bool | MCPSafeForTelemetryFields | None = None + """Telemetry-obfuscation policy for this server's tools.""" + + source: McpServerSource | None = None + """The origin of this server configuration.""" + + source_path: str | None = None + """Source file path recorded while loading the config.""" + + source_plugin: str | None = None + """Plugin that provided this server.""" + + source_plugin_spec: bool | None = None + """Whether the providing plugin uses the Open Plugin Spec.""" + + source_plugin_version: str | None = None + """Version of the plugin that provided this server.""" + + timeout: int | None = None + """Timeout in milliseconds for tool discovery and tool calls.""" + + tools: list[str] | None = None + """Tools to include. Defaults to all tools if not specified.""" + + type: MCPServerConfigStdioType | None = None + """Local transport type. Defaults to stdio when omitted.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPServerConfigStdio': + assert isinstance(obj, dict) + command = from_str(obj.get("command")) + args = from_union([lambda x: from_list(from_str, x), from_none], obj.get("args")) + auth = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("auth")) + config_warnings = from_union([lambda x: from_list(from_str, x), from_none], obj.get("configWarnings")) + cwd = from_union([from_str, from_none], obj.get("cwd")) + defer_tools = from_union([MCPServerConfigDeferTools, from_none], obj.get("deferTools")) + disable_secret_masking = from_union([from_bool, from_none], obj.get("disableSecretMasking")) + disable_tool_cache = from_union([from_bool, from_none], obj.get("disableToolCache")) + display_name = from_union([from_str, from_none], obj.get("displayName")) + env = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("env")) + events = from_union([lambda x: from_list(from_str, x), from_none], obj.get("events")) + exclude_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("excludeTools")) + filter_mapping = from_union([lambda x: from_dict(ContentFilterMode, x), ContentFilterMode, from_none], obj.get("filterMapping")) + is_default_server = from_union([from_bool, from_none], obj.get("isDefaultServer")) + notifications = from_union([lambda x: from_list(from_str, x), from_none], obj.get("notifications")) + oidc = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("oidc")) + safe_for_telemetry = from_union([from_bool, MCPSafeForTelemetryFields.from_dict, from_none], obj.get("safeForTelemetry")) + source = from_union([McpServerSource, from_none], obj.get("source")) + source_path = from_union([from_str, from_none], obj.get("sourcePath")) + source_plugin = from_union([from_str, from_none], obj.get("sourcePlugin")) + source_plugin_spec = from_union([from_bool, from_none], obj.get("sourcePluginSpec")) + source_plugin_version = from_union([from_str, from_none], obj.get("sourcePluginVersion")) + timeout = from_union([from_int, from_none], obj.get("timeout")) + tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tools")) + type = from_union([MCPServerConfigStdioType, from_none], obj.get("type")) + return MCPServerConfigStdio(command, args, auth, config_warnings, cwd, defer_tools, disable_secret_masking, disable_tool_cache, display_name, env, events, exclude_tools, filter_mapping, is_default_server, notifications, oidc, safe_for_telemetry, source, source_path, source_plugin, source_plugin_spec, source_plugin_version, timeout, tools, type) + + def to_dict(self) -> dict: + result: dict = {} + result["command"] = from_str(self.command) + if self.args is not None: + result["args"] = from_union([lambda x: from_list(from_str, x), from_none], self.args) + if self.auth is not None: + result["auth"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.auth) + if self.config_warnings is not None: + result["configWarnings"] = from_union([lambda x: from_list(from_str, x), from_none], self.config_warnings) + if self.cwd is not None: + result["cwd"] = from_union([from_str, from_none], self.cwd) + if self.defer_tools is not None: + result["deferTools"] = from_union([lambda x: to_enum(MCPServerConfigDeferTools, x), from_none], self.defer_tools) + if self.disable_secret_masking is not None: + result["disableSecretMasking"] = from_union([from_bool, from_none], self.disable_secret_masking) + if self.disable_tool_cache is not None: + result["disableToolCache"] = from_union([from_bool, from_none], self.disable_tool_cache) + if self.display_name is not None: + result["displayName"] = from_union([from_str, from_none], self.display_name) + if self.env is not None: + result["env"] = from_union([lambda x: from_dict(from_str, x), from_none], self.env) + if self.events is not None: + result["events"] = from_union([lambda x: from_list(from_str, x), from_none], self.events) + if self.exclude_tools is not None: + result["excludeTools"] = from_union([lambda x: from_list(from_str, x), from_none], self.exclude_tools) + if self.filter_mapping is not None: + result["filterMapping"] = from_union([lambda x: from_dict(lambda x: to_enum(ContentFilterMode, x), x), lambda x: to_enum(ContentFilterMode, x), from_none], self.filter_mapping) + if self.is_default_server is not None: + result["isDefaultServer"] = from_union([from_bool, from_none], self.is_default_server) + if self.notifications is not None: + result["notifications"] = from_union([lambda x: from_list(from_str, x), from_none], self.notifications) + if self.oidc is not None: + result["oidc"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.oidc) + if self.safe_for_telemetry is not None: + result["safeForTelemetry"] = from_union([from_bool, lambda x: to_class(MCPSafeForTelemetryFields, x), from_none], self.safe_for_telemetry) + if self.source is not None: + result["source"] = from_union([lambda x: to_enum(McpServerSource, x), from_none], self.source) + if self.source_path is not None: + result["sourcePath"] = from_union([from_str, from_none], self.source_path) + if self.source_plugin is not None: + result["sourcePlugin"] = from_union([from_str, from_none], self.source_plugin) + if self.source_plugin_spec is not None: + result["sourcePluginSpec"] = from_union([from_bool, from_none], self.source_plugin_spec) + if self.source_plugin_version is not None: + result["sourcePluginVersion"] = from_union([from_str, from_none], self.source_plugin_version) + if self.timeout is not None: + result["timeout"] = from_union([from_int, from_none], self.timeout) + if self.tools is not None: + result["tools"] = from_union([lambda x: from_list(from_str, x), from_none], self.tools) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(MCPServerConfigStdioType, x), from_none], self.type) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionLocationAddToolApprovalParams: @@ -20838,6 +21611,9 @@ class TaskAgentInfo: completed_at: datetime | None = None """ISO 8601 timestamp when the task finished""" + display_name: str | None = None + """Friendly, non-unique name intended for display""" + error: str | None = None """Error message when the task failed""" @@ -20873,6 +21649,7 @@ def from_dict(obj: Any) -> 'TaskAgentInfo': active_time_ms = from_union([from_int, from_none], obj.get("activeTimeMs")) can_promote_to_background = from_union([from_bool, from_none], obj.get("canPromoteToBackground")) completed_at = from_union([from_datetime, from_none], obj.get("completedAt")) + display_name = from_union([from_str, from_none], obj.get("displayName")) error = from_union([from_str, from_none], obj.get("error")) execution_mode = from_union([TaskExecutionMode, from_none], obj.get("executionMode")) idle_since = from_union([from_datetime, from_none], obj.get("idleSince")) @@ -20880,7 +21657,7 @@ def from_dict(obj: Any) -> 'TaskAgentInfo': model = from_union([from_str, from_none], obj.get("model")) resolved_model = from_union([from_str, from_none], obj.get("resolvedModel")) result = from_union([from_str, from_none], obj.get("result")) - return TaskAgentInfo(agent_type, description, id, prompt, started_at, status, tool_call_id, active_started_at, active_time_ms, can_promote_to_background, completed_at, error, execution_mode, idle_since, latest_response, model, resolved_model, result) + return TaskAgentInfo(agent_type, description, id, prompt, started_at, status, tool_call_id, active_started_at, active_time_ms, can_promote_to_background, completed_at, display_name, error, execution_mode, idle_since, latest_response, model, resolved_model, result) def to_dict(self) -> dict: result: dict = {} @@ -20900,6 +21677,8 @@ def to_dict(self) -> dict: result["canPromoteToBackground"] = from_union([from_bool, from_none], self.can_promote_to_background) if self.completed_at is not None: result["completedAt"] = from_union([lambda x: x.isoformat(), from_none], self.completed_at) + if self.display_name is not None: + result["displayName"] = from_union([from_str, from_none], self.display_name) if self.error is not None: result["error"] = from_union([from_str, from_none], self.error) if self.execution_mode is not None: @@ -21229,6 +22008,9 @@ class UIElicitationResponse: action: UIElicitationResponseAction """The user's response: accept (submitted), decline (rejected), or cancel (dismissed)""" + meta: dict[str, Any] | None = None + """MCP response metadata.""" + content: dict[str, float | bool | list[str] | str] | None = None """The form values submitted by the user (present when action is 'accept')""" @@ -21236,12 +22018,15 @@ class UIElicitationResponse: def from_dict(obj: Any) -> 'UIElicitationResponse': assert isinstance(obj, dict) action = UIElicitationResponseAction(obj.get("action")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("_meta")) content = from_union([lambda x: from_dict(lambda x: from_union([from_float, from_bool, lambda x: from_list(from_str, x), from_str], x), x), from_none], obj.get("content")) - return UIElicitationResponse(action, content) + return UIElicitationResponse(action, meta, content) def to_dict(self) -> dict: result: dict = {} result["action"] = to_enum(UIElicitationResponseAction, self.action) + if self.meta is not None: + result["_meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.content is not None: result["content"] = from_union([lambda x: from_dict(lambda x: from_union([to_float, from_bool, lambda x: from_list(from_str, x), from_str], x), x), from_none], self.content) return result @@ -21836,6 +22621,7 @@ class SessionManagedSettings: Composes restrictively with self-fetched and device policy and is not persisted. """ permissions: SessionManagedPermissions | None = None + """Managed permission policy injected by the SDK host.""" @staticmethod def from_dict(obj: Any) -> 'SessionManagedSettings': @@ -21893,6 +22679,36 @@ def to_dict(self) -> dict: result["extensions"] = from_list(lambda x: to_class(Extension, x), self.extensions) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionDecisionApproveForLocationApprovalExtensionEnvAccess: + """Location-scoped approval details for an extension's access to sensitive environment + variables, keyed by extension name and the exact set of variable names. + """ + environment_variables: list[str] + """Names of the sensitive environment variables this approval covers. Values are never + persisted. + """ + extension_name: str + """Extension name.""" + + kind: ClassVar[str] = "extension-env-access" + """Approval covering an extension's request to read sensitive environment variables.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalExtensionEnvAccess': + assert isinstance(obj, dict) + environment_variables = from_list(from_str, obj.get("environmentVariables")) + extension_name = from_str(obj.get("extensionName")) + return PermissionDecisionApproveForLocationApprovalExtensionEnvAccess(environment_variables, extension_name) + + def to_dict(self) -> dict: + result: dict = {} + result["environmentVariables"] = from_list(from_str, self.environment_variables) + result["extensionName"] = from_str(self.extension_name) + result["kind"] = self.kind + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess: @@ -21917,6 +22733,36 @@ def to_dict(self) -> dict: result["kind"] = self.kind return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionDecisionApproveForSessionApprovalExtensionEnvAccess: + """Session-scoped approval details for an extension's access to sensitive environment + variables, keyed by extension name and the exact set of variable names. + """ + environment_variables: list[str] + """Names of the sensitive environment variables this approval covers. Values are never + persisted. + """ + extension_name: str + """Extension name.""" + + kind: ClassVar[str] = "extension-env-access" + """Approval covering an extension's request to read sensitive environment variables.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalExtensionEnvAccess': + assert isinstance(obj, dict) + environment_variables = from_list(from_str, obj.get("environmentVariables")) + extension_name = from_str(obj.get("extensionName")) + return PermissionDecisionApproveForSessionApprovalExtensionEnvAccess(environment_variables, extension_name) + + def to_dict(self) -> dict: + result: dict = {} + result["environmentVariables"] = from_list(from_str, self.environment_variables) + result["extensionName"] = from_str(self.extension_name) + result["kind"] = self.kind + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess: @@ -21941,6 +22787,36 @@ def to_dict(self) -> dict: result["kind"] = self.kind return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess: + """Location-persisted tool approval details for an extension's access to sensitive + environment variables, keyed by extension name and the exact set of variable names. + """ + environment_variables: list[str] + """Names of the sensitive environment variables this approval covers. Values are never + persisted. + """ + extension_name: str + """Extension name.""" + + kind: ClassVar[str] = "extension-env-access" + """Approval covering an extension's request to read sensitive environment variables.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess': + assert isinstance(obj, dict) + environment_variables = from_list(from_str, obj.get("environmentVariables")) + extension_name = from_str(obj.get("extensionName")) + return PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess(environment_variables, extension_name) + + def to_dict(self) -> dict: + result: dict = {} + result["environmentVariables"] = from_list(from_str, self.environment_variables) + result["extensionName"] = from_str(self.extension_name) + result["kind"] = self.kind + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess: @@ -22093,9 +22969,16 @@ class FactoryRunTerminal: """Prompt-safe terminal factory outcome.""" error: str | None = None + """Human-readable terminal error.""" + failure: FactoryRunFailure | None = None + """Machine-readable terminal failure.""" + reason: str | None = None + """Human-readable terminal reason.""" + result_preview: str | None = None + """Prompt-safe preview of the completed result.""" @staticmethod def from_dict(obj: Any) -> 'FactoryRunTerminal': @@ -22206,16 +23089,27 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class FactoryProgressPage: - """A bidirectional page of factory progress.""" + """A bidirectional page of factory progress. + Bidirectional page of durable factory progress. + """ has_more_newer: bool + """Whether progress records newer than this page exist.""" + has_more_older: bool + """Whether progress records older than this page exist.""" + records: list[FactoryProgressLine] + """Progress records in sequence order.""" + revision: int """Run revision reflected by this page.""" newest_seq: int | None = None + """Newest sequence number in this page, or null when empty.""" + oldest_seq: int | None = None + """Oldest sequence number in this page, or null when empty.""" @staticmethod def from_dict(obj: Any) -> 'FactoryProgressPage': @@ -22634,6 +23528,16 @@ class RemoteSessionMetadataValue: context: SessionContext | None = None """Most recent working directory context.""" + host_activity: str | None = None + """Host-supplied human description of what the session is doing right now ("running tests", + "waiting for approval"). Optional in the protocol and absent on hosts that do not publish + it, so never rely on it -- it enriches `hostStatus`, it does not replace it. + """ + host_status: RemoteSessionHostStatus | None = None + """Live status as the owning host reports it in its session listing, so a row for a session + running elsewhere can show that it is running. Absent for hosts that publish no such + status (the cloud task managers), which read as idle. + """ name: str | None = None """Optional human-friendly name set via /rename.""" @@ -22666,6 +23570,8 @@ def from_dict(obj: Any) -> 'RemoteSessionMetadataValue': 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")) + host_activity = from_union([from_str, from_none], obj.get("hostActivity")) + host_status = from_union([RemoteSessionHostStatus, from_none], obj.get("hostStatus")) 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")) @@ -22673,7 +23579,7 @@ def from_dict(obj: Any) -> 'RemoteSessionMetadataValue': 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) + return RemoteSessionMetadataValue(is_remote, modified_time, remote_session_ids, repository, session_id, start_time, context, host_activity, host_status, name, pull_request_number, resource_id, stale_at, state, summary, task_type) def to_dict(self) -> dict: result: dict = {} @@ -22685,6 +23591,10 @@ def to_dict(self) -> dict: 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.host_activity is not None: + result["hostActivity"] = from_union([from_str, from_none], self.host_activity) + if self.host_status is not None: + result["hostStatus"] = from_union([lambda x: to_enum(RemoteSessionHostStatus, x), from_none], self.host_status) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) if self.pull_request_number is not None: @@ -22985,129 +23895,6 @@ def to_dict(self) -> dict: result["context"] = to_class(MCPAppsSetHostContextDetails, self.context) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@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 - -# Experimental: this type is part of an experimental API and may change or be removed. -@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 - -# Experimental: this type is part of an experimental API and may change or be removed. -@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 MCPRestartServerRequest: - """Server name and optional replacement configuration for an individual MCP server restart. - Omit `config` for a config-free restart-by-name of an already-configured server. - """ - server_name: str - """Name of the MCP server to restart""" - - config: MCPServerConfig | None = None - """Replacement MCP server configuration (stdio process or remote HTTP/SSE). Omit to restart - the server with its already-registered configuration (config-free restart-by-name). - """ - - @staticmethod - def from_dict(obj: Any) -> 'MCPRestartServerRequest': - assert isinstance(obj, dict) - server_name = from_str(obj.get("serverName")) - config = from_union([MCPServerConfig.from_dict, from_none], obj.get("config")) - return MCPRestartServerRequest(server_name, config) - - def to_dict(self) -> dict: - result: dict = {} - result["serverName"] = from_str(self.server_name) - if self.config is not None: - result["config"] = from_union([lambda x: to_class(MCPServerConfig, x), from_none], self.config) - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class MCPStartServerRequest: - """Server name and optional configuration for an individual MCP server start. Omit `config` - for a config-free start-by-name of an already-configured server. - """ - server_name: str - """Name of the MCP server to start""" - - config: MCPServerConfig | None = None - """MCP server configuration (stdio process or remote HTTP/SSE). Omit to start the server - with its already-registered configuration (config-free start-by-name). - """ - - @staticmethod - def from_dict(obj: Any) -> 'MCPStartServerRequest': - assert isinstance(obj, dict) - server_name = from_str(obj.get("serverName")) - config = from_union([MCPServerConfig.from_dict, from_none], obj.get("config")) - return MCPStartServerRequest(server_name, config) - - def to_dict(self) -> dict: - result: dict = {} - result["serverName"] = from_str(self.server_name) - if self.config is not None: - result["config"] = from_union([lambda x: to_class(MCPServerConfig, x), from_none], self.config) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPHeadersHandlePendingHeadersRefreshRequestRequest: @@ -23430,7 +24217,11 @@ class OptionsUpdateAdditionalContentExclusionPolicy: data, and scope. """ last_updated_at: Any + """Opaque policy update timestamp supplied by the host.""" + rules: list[OptionsUpdateAdditionalContentExclusionPolicyRule] + """Content-exclusion rules to apply.""" + scope: AdditionalContentExclusionPolicyScope """Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration.""" @@ -23488,7 +24279,11 @@ class PermissionsConfigureAdditionalContentExclusionPolicy: last-updated data, and scope. """ last_updated_at: Any + """Opaque policy update timestamp supplied by the host.""" + rules: list[PermissionsConfigureAdditionalContentExclusionPolicyRule] + """Content-exclusion rules to apply.""" + scope: AdditionalContentExclusionPolicyScope """Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` enumeration. @@ -23759,6 +24554,8 @@ class QueueInsertAtRequest: """Parameters for inserting a queued message at a public visible position.""" message: QueueInsertMessage + """Queued message contents and delivery metadata.""" + position: int """Zero-based position in the public visible queue. Values outside the queue clamp to an end.""" @@ -24047,6 +24844,7 @@ class SessionFSSqliteTransactionRequest: """Target session identifier""" statements: list[SessionFSSqliteTransactionStatement] + """Ordered SQL statements to execute in one transaction.""" @staticmethod def from_dict(obj: Any) -> 'SessionFSSqliteTransactionRequest': @@ -24068,7 +24866,11 @@ class SessionOpenOptionsAdditionalContentExclusionPolicy: data, and scope. """ last_updated_at: Any + """Opaque policy update timestamp supplied by the host.""" + rules: list[SessionOpenOptionsAdditionalContentExclusionPolicyRule] + """Content-exclusion rules to apply.""" + scope: AdditionalContentExclusionPolicyScope """Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` enumeration. @@ -24140,53 +24942,6 @@ def to_dict(self) -> dict: result["processFlags"] = from_union([lambda x: from_list(from_str, x), from_none], self.process_flags) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class SessionSettingsSnapshot: - """Redacted, serializable view of session runtime settings for SDK boundary consumers. - Secrets and raw feature flags are intentionally excluded. - """ - job: SessionSettingsJobSnapshot - model: SessionSettingsModelSnapshot - online_evaluation: SessionSettingsOnlineEvaluationSnapshot - repo: SessionSettingsRepoSnapshot - validation: SessionSettingsValidationSnapshot - client_name: str | None = None - start_time_ms: float | None = None - timeout_ms: float | None = None - version: str | None = None - - @staticmethod - def from_dict(obj: Any) -> 'SessionSettingsSnapshot': - assert isinstance(obj, dict) - job = SessionSettingsJobSnapshot.from_dict(obj.get("job")) - model = SessionSettingsModelSnapshot.from_dict(obj.get("model")) - online_evaluation = SessionSettingsOnlineEvaluationSnapshot.from_dict(obj.get("onlineEvaluation")) - repo = SessionSettingsRepoSnapshot.from_dict(obj.get("repo")) - validation = SessionSettingsValidationSnapshot.from_dict(obj.get("validation")) - client_name = from_union([from_str, from_none], obj.get("clientName")) - start_time_ms = from_union([from_float, from_none], obj.get("startTimeMs")) - timeout_ms = from_union([from_float, from_none], obj.get("timeoutMs")) - version = from_union([from_str, from_none], obj.get("version")) - return SessionSettingsSnapshot(job, model, online_evaluation, repo, validation, client_name, start_time_ms, timeout_ms, version) - - def to_dict(self) -> dict: - result: dict = {} - result["job"] = to_class(SessionSettingsJobSnapshot, self.job) - result["model"] = to_class(SessionSettingsModelSnapshot, self.model) - result["onlineEvaluation"] = to_class(SessionSettingsOnlineEvaluationSnapshot, self.online_evaluation) - result["repo"] = to_class(SessionSettingsRepoSnapshot, self.repo) - result["validation"] = to_class(SessionSettingsValidationSnapshot, self.validation) - if self.client_name is not None: - result["clientName"] = from_union([from_str, from_none], self.client_name) - if self.start_time_ms is not None: - result["startTimeMs"] = from_union([to_float, from_none], self.start_time_ms) - if self.timeout_ms is not None: - result["timeoutMs"] = from_union([to_float, from_none], self.timeout_ms) - 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 AgentGetCurrentResult: @@ -24373,6 +25128,129 @@ def to_dict(self) -> dict: 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 MCPConfigAddRequest: + """MCP server name and configuration to add to user configuration.""" + + config: MCPSerializableServerConfig + """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 = MCPSerializableServerConfig.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(MCPSerializableServerConfig, 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 MCPConfigList: + """User-configured MCP servers, keyed by server name.""" + + servers: dict[str, MCPSerializableServerConfig] + """All MCP servers from user config, keyed by name""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPConfigList': + assert isinstance(obj, dict) + servers = from_dict(MCPSerializableServerConfig.from_dict, obj.get("servers")) + return MCPConfigList(servers) + + def to_dict(self) -> dict: + result: dict = {} + result["servers"] = from_dict(lambda x: to_class(MCPSerializableServerConfig, x), self.servers) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPConfigUpdateRequest: + """MCP server name and replacement configuration to write to user configuration.""" + + config: MCPSerializableServerConfig + """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 = MCPSerializableServerConfig.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(MCPSerializableServerConfig, 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 MCPRestartServerRequest: + """Server name and optional replacement configuration for an individual MCP server restart. + Omit `config` for a config-free restart-by-name of an already-configured server. + """ + server_name: str + """Name of the MCP server to restart""" + + config: MCPSerializableServerConfig | None = None + """Replacement MCP server configuration (stdio process or remote HTTP/SSE). Omit to restart + the server with its already-registered configuration (config-free restart-by-name). + """ + + @staticmethod + def from_dict(obj: Any) -> 'MCPRestartServerRequest': + assert isinstance(obj, dict) + server_name = from_str(obj.get("serverName")) + config = from_union([MCPSerializableServerConfig.from_dict, from_none], obj.get("config")) + return MCPRestartServerRequest(server_name, config) + + def to_dict(self) -> dict: + result: dict = {} + result["serverName"] = from_str(self.server_name) + if self.config is not None: + result["config"] = from_union([lambda x: to_class(MCPSerializableServerConfig, x), from_none], self.config) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPStartServerRequest: + """Server name and optional configuration for an individual MCP server start. Omit `config` + for a config-free start-by-name of an already-configured server. + """ + server_name: str + """Name of the MCP server to start""" + + config: MCPSerializableServerConfig | None = None + """MCP server configuration (stdio process or remote HTTP/SSE). Omit to start the server + with its already-registered configuration (config-free start-by-name). + """ + + @staticmethod + def from_dict(obj: Any) -> 'MCPStartServerRequest': + assert isinstance(obj, dict) + server_name = from_str(obj.get("serverName")) + config = from_union([MCPSerializableServerConfig.from_dict, from_none], obj.get("config")) + return MCPStartServerRequest(server_name, config) + + def to_dict(self) -> dict: + result: dict = {} + result["serverName"] = from_str(self.server_name) + if self.config is not None: + result["config"] = from_union([lambda x: to_class(MCPSerializableServerConfig, x), from_none], self.config) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPTools: @@ -25058,24 +25936,61 @@ class FactoryRunSummary: """Durable factory run summary with read-time live overlays.""" consumed: FactoryRunConsumed + """Durable resource consumption.""" + created_at: int + """Epoch milliseconds when the run was created.""" + declared_limits: FactoryDeclaredLimits + """Resource ceilings declared by the factory.""" + declared_phase_count: int + """Number of phases declared by the factory.""" + description: str + """Human-readable factory description.""" + factory_name: str + """Registered factory name.""" + live_agent_count: int + """Number of direct factory agents currently live.""" + observed_at: int + """Epoch milliseconds when this live-overlay snapshot was observed.""" + revision: int + """Monotonic durable run revision.""" + run_id: str + """Factory run identifier.""" + status: FactoryRunStatus + """Current factory run status.""" + total_spawned_agent_count: int + """Total direct factory agents spawned across all attempts.""" + updated_at: int + """Epoch milliseconds when the durable run was last updated.""" + active_segment_started_at: int | None = None + """Epoch milliseconds when the current active segment started, or null while inactive.""" + approved: FactoryDeclaredLimits | None = None + """Approved effective resource ceilings, or null until approved.""" + completed_at: int | None = None + """Epoch milliseconds when the run completed, or null while nonterminal.""" + current_phase: FactoryCurrentPhase | None = None + """Current phase identity, or null before any phase is entered.""" + started_at: int | None = None + """Epoch milliseconds when execution first started, or null before start.""" + terminal: FactoryRunTerminal | None = None + """Terminal run outcome, or null while nonterminal.""" @staticmethod def from_dict(obj: Any) -> 'FactoryRunSummary': @@ -25148,87 +26063,6 @@ def to_dict(self) -> dict: result["run"] = to_class(FactoryRunResult, self.run) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class FactoryRunDetail: - """Full factory run observability detail.""" - - agents: list[FactoryAgentSummary] - consumed: FactoryRunConsumed - created_at: int - declared_limits: FactoryDeclaredLimits - declared_phase_count: int - description: str - factory_name: str - live_agent_count: int - observed_at: int - phases: list[FactoryPhaseObservation] - progress: FactoryProgressPage - revision: int - run_id: str - status: FactoryRunStatus - total_spawned_agent_count: int - updated_at: int - active_segment_started_at: int | None = None - approved: FactoryDeclaredLimits | None = None - completed_at: int | None = None - current_phase: FactoryCurrentPhase | None = None - started_at: int | None = None - terminal: FactoryRunTerminal | None = None - - @staticmethod - def from_dict(obj: Any) -> 'FactoryRunDetail': - assert isinstance(obj, dict) - agents = from_list(FactoryAgentSummary.from_dict, obj.get("agents")) - consumed = FactoryRunConsumed.from_dict(obj.get("consumed")) - created_at = from_int(obj.get("createdAt")) - declared_limits = FactoryDeclaredLimits.from_dict(obj.get("declaredLimits")) - declared_phase_count = from_int(obj.get("declaredPhaseCount")) - description = from_str(obj.get("description")) - factory_name = from_str(obj.get("factoryName")) - live_agent_count = from_int(obj.get("liveAgentCount")) - observed_at = from_int(obj.get("observedAt")) - phases = from_list(FactoryPhaseObservation.from_dict, obj.get("phases")) - progress = FactoryProgressPage.from_dict(obj.get("progress")) - revision = from_int(obj.get("revision")) - run_id = from_str(obj.get("runId")) - status = FactoryRunStatus(obj.get("status")) - total_spawned_agent_count = from_int(obj.get("totalSpawnedAgentCount")) - updated_at = from_int(obj.get("updatedAt")) - active_segment_started_at = from_union([from_int, from_none], obj.get("activeSegmentStartedAt")) - approved = from_union([FactoryDeclaredLimits.from_dict, from_none], obj.get("approved")) - completed_at = from_union([from_int, from_none], obj.get("completedAt")) - current_phase = from_union([FactoryCurrentPhase.from_dict, from_none], obj.get("currentPhase")) - started_at = from_union([from_int, from_none], obj.get("startedAt")) - terminal = from_union([FactoryRunTerminal.from_dict, from_none], obj.get("terminal")) - return FactoryRunDetail(agents, consumed, created_at, declared_limits, declared_phase_count, description, factory_name, live_agent_count, observed_at, phases, progress, revision, run_id, status, total_spawned_agent_count, updated_at, active_segment_started_at, approved, completed_at, current_phase, started_at, terminal) - - def to_dict(self) -> dict: - result: dict = {} - result["agents"] = from_list(lambda x: to_class(FactoryAgentSummary, x), self.agents) - result["consumed"] = to_class(FactoryRunConsumed, self.consumed) - result["createdAt"] = from_int(self.created_at) - result["declaredLimits"] = to_class(FactoryDeclaredLimits, self.declared_limits) - result["declaredPhaseCount"] = from_int(self.declared_phase_count) - result["description"] = from_str(self.description) - result["factoryName"] = from_str(self.factory_name) - result["liveAgentCount"] = from_int(self.live_agent_count) - result["observedAt"] = from_int(self.observed_at) - result["phases"] = from_list(lambda x: to_class(FactoryPhaseObservation, x), self.phases) - result["progress"] = to_class(FactoryProgressPage, self.progress) - result["revision"] = from_int(self.revision) - result["runId"] = from_str(self.run_id) - result["status"] = to_enum(FactoryRunStatus, self.status) - result["totalSpawnedAgentCount"] = from_int(self.total_spawned_agent_count) - result["updatedAt"] = from_int(self.updated_at) - result["activeSegmentStartedAt"] = from_union([from_int, from_none], self.active_segment_started_at) - result["approved"] = from_union([lambda x: to_class(FactoryDeclaredLimits, x), from_none], self.approved) - result["completedAt"] = from_union([from_int, from_none], self.completed_at) - result["currentPhase"] = from_union([lambda x: to_class(FactoryCurrentPhase, x), from_none], self.current_phase) - result["startedAt"] = from_union([from_int, from_none], self.started_at) - result["terminal"] = from_union([lambda x: to_class(FactoryRunTerminal, x), from_none], self.terminal) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionsSetAdditionalPluginsRequest: @@ -25719,13 +26553,21 @@ class SandboxConfig: """Whether to auto-add the current working directory to readwritePaths. Default: true.""" allow_dev_tool_access: bool | None = None - """Whether to auto-grant read access to common developer-tool caches, registries, and - toolchains in their default home locations (cargo, go, npm, Maven, and more), plus - read-write access to (and, on Unix, up-front creation of) the scratch caches builds write - on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so - builds work without extra configuration; a relocated CARGO_HOME additionally gets its - Cargo lock files granted read-write. Default: true (enabled by default; set to false to - opt out). + """Whether to auto-grant read access to the tool directories discovered on PATH and in + toolchain environment variables (GOROOT, CARGO_HOME, JAVA_HOME, VIRTUAL_ENV, and + similar), and to common developer-tool caches, registries, and toolchains in their + default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, + on Unix, up-front creation of) the scratch caches builds write on every run (go-build, + ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra + configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted + read-write. Set to false to disable every grant listed above: user-installed toolchains + (rustup, nvm, pyenv, conda, pipx) then need explicit userPolicy.filesystem entries — + readonlyPaths to read them, plus readwriteFiles for a relocated CARGO_HOME's + .package-cache and .global-cache, which Cargo locks on every build. Only these + developer-tool grants are affected: the working directory (see + addCurrentWorkingDirectory), temporary storage, session log paths, and system locations + follow their own rules and stay granted, so commands still run. Default: true (enabled by + default; set to false to opt out). """ auth: SandboxConfigAuth | None = None """Credential-injection capability flags.""" @@ -25762,7 +26604,10 @@ class SessionFSSqliteTransactionResult: """Per-statement results, or a classified transaction error.""" results: list[SessionFSSqliteQueryResult] + """Per-statement query results in input order.""" + error: SessionFSSqliteTransactionError | None = None + """Classified transaction failure, when execution did not succeed.""" @staticmethod def from_dict(obj: Any) -> 'SessionFSSqliteTransactionResult': @@ -25833,6 +26678,8 @@ class FactoryListRunsResult: """A page of factory runs in durable creation order.""" runs: list[FactoryRunSummary] + """Factory run summaries in durable creation order.""" + has_more_newer: bool | None = None """Whether terminal runs newer than this page exist.""" @@ -26782,17 +27629,35 @@ class UIElicitationRequest: requested_schema: UIElicitationSchema """JSON Schema describing the form fields to present to the user""" + meta: dict[str, Any] | None = None + """MCP request metadata.""" + + mode: MCPElicitationFormMode | None = None + """Elicitation mode. Omitted and form are equivalent for structured elicitation.""" + + task: MCPTaskMetadata | None = None + """MCP task metadata.""" + @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) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("_meta")) + mode = from_union([MCPElicitationFormMode, from_none], obj.get("mode")) + task = from_union([MCPTaskMetadata.from_dict, from_none], obj.get("task")) + return UIElicitationRequest(message, requested_schema, meta, mode, task) def to_dict(self) -> dict: result: dict = {} result["message"] = from_str(self.message) result["requestedSchema"] = to_class(UIElicitationSchema, self.requested_schema) + if self.meta is not None: + result["_meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.mode is not None: + result["mode"] = from_union([lambda x: to_enum(MCPElicitationFormMode, x), from_none], self.mode) + if self.task is not None: + result["task"] = from_union([lambda x: to_class(MCPTaskMetadata, x), from_none], self.task) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -27533,6 +28398,220 @@ def to_dict(self) -> dict: result["login"] = from_union([from_str, from_none], self.login) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class FactoryAgentSummary: + """Prompt-safe durable identity and live status for a direct factory agent.""" + + active_ms: int + """Accumulated active agent time in milliseconds.""" + + agent_id: str + """Stable direct-agent identifier.""" + + agent_type: str + """Registered agent type.""" + + label: str + """Friendly, non-unique name intended for display""" + + run_id: str + """Owning factory run identifier.""" + + status: str + """Current durable or live agent status.""" + + tool_call_id: str + """Tool-call identifier that launched the agent.""" + + activity: str | None = None + """Prompt-safe live activity text.""" + + completed_at: int | None = None + """Epoch milliseconds when the agent completed.""" + + display_name: str | None = None + """Friendly, non-unique name intended for display""" + + phase_id: str | None = None + """Phase identifier active when the agent was launched, or null.""" + + requested_model: str | None = None + """Model requested when the agent was launched.""" + + resolved_model: str | None = None + """Concrete model resolved for the agent.""" + + started_at: int | None = None + """Epoch milliseconds when the agent started.""" + + @staticmethod + def from_dict(obj: Any) -> 'FactoryAgentSummary': + assert isinstance(obj, dict) + active_ms = from_int(obj.get("activeMs")) + agent_id = from_str(obj.get("agentId")) + agent_type = from_str(obj.get("agentType")) + label = from_str(obj.get("label")) + run_id = from_str(obj.get("runId")) + status = from_str(obj.get("status")) + tool_call_id = from_str(obj.get("toolCallId")) + activity = from_union([from_str, from_none], obj.get("activity")) + completed_at = from_union([from_int, from_none], obj.get("completedAt")) + display_name = from_union([from_str, from_none], obj.get("displayName")) + phase_id = from_union([from_none, from_str], obj.get("phaseId")) + requested_model = from_union([from_str, from_none], obj.get("requestedModel")) + resolved_model = from_union([from_str, from_none], obj.get("resolvedModel")) + started_at = from_union([from_int, from_none], obj.get("startedAt")) + return FactoryAgentSummary(active_ms, agent_id, agent_type, label, run_id, status, tool_call_id, activity, completed_at, display_name, phase_id, requested_model, resolved_model, started_at) + + def to_dict(self) -> dict: + result: dict = {} + result["activeMs"] = from_int(self.active_ms) + result["agentId"] = from_str(self.agent_id) + result["agentType"] = from_str(self.agent_type) + result["label"] = from_str(self.label) + result["runId"] = from_str(self.run_id) + result["status"] = from_str(self.status) + result["toolCallId"] = from_str(self.tool_call_id) + if self.activity is not None: + result["activity"] = from_union([from_str, from_none], self.activity) + if self.completed_at is not None: + result["completedAt"] = from_union([from_int, from_none], self.completed_at) + if self.display_name is not None: + result["displayName"] = from_union([from_str, from_none], self.display_name) + result["phaseId"] = from_union([from_none, from_str], self.phase_id) + if self.requested_model is not None: + result["requestedModel"] = from_union([from_str, from_none], self.requested_model) + if self.resolved_model is not None: + result["resolvedModel"] = from_union([from_str, from_none], self.resolved_model) + if self.started_at is not None: + result["startedAt"] = from_union([from_int, from_none], self.started_at) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class FactoryRunDetail: + """Full factory run observability detail.""" + + agents: list[FactoryAgentSummary] + """Durable identities and live statuses for direct factory agents.""" + + consumed: FactoryRunConsumed + """Durable resource consumption.""" + + created_at: int + """Epoch milliseconds when the run was created.""" + + declared_limits: FactoryDeclaredLimits + """Resource ceilings declared by the factory.""" + + declared_phase_count: int + """Number of phases declared by the factory.""" + + description: str + """Human-readable factory description.""" + + factory_name: str + """Registered factory name.""" + + live_agent_count: int + """Number of direct factory agents currently live.""" + + observed_at: int + """Epoch milliseconds when this live-overlay snapshot was observed.""" + + phases: list[FactoryPhaseObservation] + """Lifecycle and timing observations for each factory phase.""" + + progress: FactoryProgressPage + """Bidirectional page of durable factory progress.""" + + revision: int + """Monotonic durable run revision.""" + + run_id: str + """Factory run identifier.""" + + status: FactoryRunStatus + """Current factory run status.""" + + total_spawned_agent_count: int + """Total direct factory agents spawned across all attempts.""" + + updated_at: int + """Epoch milliseconds when the durable run was last updated.""" + + active_segment_started_at: int | None = None + """Epoch milliseconds when the current active segment started, or null while inactive.""" + + approved: FactoryDeclaredLimits | None = None + """Approved effective resource ceilings, or null until approved.""" + + completed_at: int | None = None + """Epoch milliseconds when the run completed, or null while nonterminal.""" + + current_phase: FactoryCurrentPhase | None = None + """Current phase identity, or null before any phase is entered.""" + + started_at: int | None = None + """Epoch milliseconds when execution first started, or null before start.""" + + terminal: FactoryRunTerminal | None = None + """Terminal run outcome, or null while nonterminal.""" + + @staticmethod + def from_dict(obj: Any) -> 'FactoryRunDetail': + assert isinstance(obj, dict) + agents = from_list(FactoryAgentSummary.from_dict, obj.get("agents")) + consumed = FactoryRunConsumed.from_dict(obj.get("consumed")) + created_at = from_int(obj.get("createdAt")) + declared_limits = FactoryDeclaredLimits.from_dict(obj.get("declaredLimits")) + declared_phase_count = from_int(obj.get("declaredPhaseCount")) + description = from_str(obj.get("description")) + factory_name = from_str(obj.get("factoryName")) + live_agent_count = from_int(obj.get("liveAgentCount")) + observed_at = from_int(obj.get("observedAt")) + phases = from_list(FactoryPhaseObservation.from_dict, obj.get("phases")) + progress = FactoryProgressPage.from_dict(obj.get("progress")) + revision = from_int(obj.get("revision")) + run_id = from_str(obj.get("runId")) + status = FactoryRunStatus(obj.get("status")) + total_spawned_agent_count = from_int(obj.get("totalSpawnedAgentCount")) + updated_at = from_int(obj.get("updatedAt")) + active_segment_started_at = from_union([from_int, from_none], obj.get("activeSegmentStartedAt")) + approved = from_union([FactoryDeclaredLimits.from_dict, from_none], obj.get("approved")) + completed_at = from_union([from_int, from_none], obj.get("completedAt")) + current_phase = from_union([FactoryCurrentPhase.from_dict, from_none], obj.get("currentPhase")) + started_at = from_union([from_int, from_none], obj.get("startedAt")) + terminal = from_union([FactoryRunTerminal.from_dict, from_none], obj.get("terminal")) + return FactoryRunDetail(agents, consumed, created_at, declared_limits, declared_phase_count, description, factory_name, live_agent_count, observed_at, phases, progress, revision, run_id, status, total_spawned_agent_count, updated_at, active_segment_started_at, approved, completed_at, current_phase, started_at, terminal) + + def to_dict(self) -> dict: + result: dict = {} + result["agents"] = from_list(lambda x: to_class(FactoryAgentSummary, x), self.agents) + result["consumed"] = to_class(FactoryRunConsumed, self.consumed) + result["createdAt"] = from_int(self.created_at) + result["declaredLimits"] = to_class(FactoryDeclaredLimits, self.declared_limits) + result["declaredPhaseCount"] = from_int(self.declared_phase_count) + result["description"] = from_str(self.description) + result["factoryName"] = from_str(self.factory_name) + result["liveAgentCount"] = from_int(self.live_agent_count) + result["observedAt"] = from_int(self.observed_at) + result["phases"] = from_list(lambda x: to_class(FactoryPhaseObservation, x), self.phases) + result["progress"] = to_class(FactoryProgressPage, self.progress) + result["revision"] = from_int(self.revision) + result["runId"] = from_str(self.run_id) + result["status"] = to_enum(FactoryRunStatus, self.status) + result["totalSpawnedAgentCount"] = from_int(self.total_spawned_agent_count) + result["updatedAt"] = from_int(self.updated_at) + result["activeSegmentStartedAt"] = from_union([from_int, from_none], self.active_segment_started_at) + result["approved"] = from_union([lambda x: to_class(FactoryDeclaredLimits, x), from_none], self.approved) + result["completedAt"] = from_union([from_int, from_none], self.completed_at) + result["currentPhase"] = from_union([lambda x: to_class(FactoryCurrentPhase, x), from_none], self.current_phase) + result["startedAt"] = from_union([from_int, from_none], self.started_at) + result["terminal"] = from_union([lambda x: to_class(FactoryRunTerminal, x), from_none], self.terminal) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class GhCLIAuthInfo: @@ -27766,6 +28845,58 @@ 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 MCPOauthProbeResult: + """Passive MCP OAuth probe result. `authenticated` means the server accepted the probe + request while an OAuth-origin access token was attached; it does not prove the server + required or independently validated that token. The probe does not make a second + unauthenticated request. Failed is an expected probe-domain outcome; JSON-RPC errors are + reserved for API-call failures. + """ + status: Status + """Probe outcome variant discriminator.""" + + http_response: ExternalRefMCPOauthHTTPResponse | None = None + """HTTP response returned by the server. + + HTTP 401 or 403 response returned by the server. + + HTTP response returned by the server, when the probe reached the server and captured the + complete response. + """ + reason: MCPOauthProbeNeedsAuthReason | None = None + """Why authentication is needed.""" + + www_authenticate_params: McpOauthWWWAuthenticateParams | None = None + """Parsed WWW-Authenticate challenge parameters, when present and parseable.""" + + error: str | None = None + """Human-readable probe failure detail.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPOauthProbeResult': + assert isinstance(obj, dict) + status = Status(obj.get("status")) + http_response = from_union([ExternalRefMCPOauthHTTPResponse.from_dict, from_none], obj.get("httpResponse")) + reason = from_union([MCPOauthProbeNeedsAuthReason, from_none], obj.get("reason")) + www_authenticate_params = from_union([McpOauthWWWAuthenticateParams.from_dict, from_none], obj.get("wwwAuthenticateParams")) + error = from_union([from_str, from_none], obj.get("error")) + return MCPOauthProbeResult(status, http_response, reason, www_authenticate_params, error) + + def to_dict(self) -> dict: + result: dict = {} + result["status"] = to_enum(Status, self.status) + if self.http_response is not None: + result["httpResponse"] = from_union([lambda x: to_class(ExternalRefMCPOauthHTTPResponse, x), from_none], self.http_response) + if self.reason is not None: + result["reason"] = from_union([lambda x: to_enum(MCPOauthProbeNeedsAuthReason, x), from_none], self.reason) + if self.www_authenticate_params is not None: + result["wwwAuthenticateParams"] = from_union([lambda x: to_class(McpOauthWWWAuthenticateParams, x), from_none], self.www_authenticate_params) + 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. # Internal: this type is an internal SDK API and is not part of the public surface. @dataclass @@ -27805,6 +28936,304 @@ def to_dict(self) -> dict: result["transport"] = self.transport return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPServerConfig: + """MCP server configuration (stdio, remote HTTP/SSE, or in-process) + + Stdio MCP server configuration launched as a child process. + + Remote MCP server configuration accessed over HTTP or SSE. + + In-process MCP server configuration used by embedded SDK clients. + """ + args: list[str] | None = None + """Command-line arguments passed to the Stdio MCP server process.""" + + auth: bool | MCPServerAuthConfigRedirectPort | None = None + """Set to `true` to use defaults, or provide an object with additional auth or OIDC settings.""" + + command: str | None = None + """Executable command used to start the Stdio MCP server process.""" + + config_warnings: list[str] | None = None + """Configuration warnings recorded while loading the server.""" + + cwd: str | None = None + """Working directory for the Stdio MCP server process.""" + + defer_tools: MCPServerConfigDeferTools | None = None + """Controls if tools provided by this server can be loaded on demand via tool search (auto) + or always included in the initial tool list (never) + + Controls whether tools can be loaded on demand. + """ + disable_secret_masking: bool | None = None + """Whether secret masking is disabled for calls to this server.""" + + disable_tool_cache: bool | None = None + """Set to true to disable persisted MCP tool snapshots for this server. Live tool discovery + is unaffected. + + Whether persisted tool snapshots are disabled. + """ + display_name: str | None = None + """Optional human-readable server name.""" + + env: dict[str, str] | None = None + """Environment variables to pass to the Stdio MCP server process.""" + + events: list[str] | None = None + """Event types this server receives as Copilot notifications.""" + + exclude_tools: list[str] | None = None + """Tool names excluded after the include filter is applied.""" + + filter_mapping: dict[str, ContentFilterMode] | ContentFilterMode | None = None + """Content filtering mode to apply to all tools, or a map of tool name to content filtering + mode. + + Content filtering mode to apply to this server's tools. + """ + is_default_server: bool | None = None + """Whether this server is a built-in fallback used when the user has not configured their + own server. + + Whether this server is a built-in fallback. + """ + notifications: list[str] | None = None + """Copilot notification types this server may send to the host.""" + + oidc: bool | MCPServerAuthConfigRedirectPort | None = None + """Set to `true` to use defaults, or provide an object with additional auth or OIDC + settings. + + Set to `true` to use default OIDC settings. + """ + safe_for_telemetry: bool | MCPSafeForTelemetryFields | None = None + """Telemetry-obfuscation policy for this server's tools.""" + + source: McpServerSource | None = None + """The origin of this server configuration.""" + + source_path: str | None = None + """Source file path recorded while loading the config.""" + + source_plugin: str | None = None + """Plugin that provided this server.""" + + source_plugin_spec: bool | None = None + """Whether the providing plugin uses the Open Plugin Spec.""" + + source_plugin_version: str | None = None + """Version of the plugin that provided this server.""" + + timeout: int | None = None + """Timeout in milliseconds for tool discovery and tool calls.""" + + tools: list[str] | None = None + """Tools to include. Defaults to all tools if not specified.""" + + type: MCPServerConfigType | None = None + """Local transport type. Defaults to stdio when omitted. + + Remote transport type. Defaults to "http" when omitted. + """ + headers: dict[str, str] | None = None + """HTTP headers to include in requests to the remote MCP server.""" + + headers_refresh_ttl_ms: int | None = None + """Dynamic-header refresh cache lifetime in milliseconds.""" + + oauth_client_id: str | None = None + """OAuth client ID for a pre-registered remote MCP OAuth client.""" + + oauth_grant_type: MCPGrantType | None = None + """OAuth grant type to use when authenticating to the remote MCP server.""" + + oauth_public_client: bool | None = None + """Whether the configured OAuth client is public and does not require a client secret.""" + + url: str | None = None + """URL of the remote MCP server endpoint.""" + + server_instance: Any = None + """In-process MCP server instance. This value cannot cross a JSON-RPC boundary.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPServerConfig': + assert isinstance(obj, dict) + args = from_union([lambda x: from_list(from_str, x), from_none], obj.get("args")) + auth = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("auth")) + command = from_union([from_str, from_none], obj.get("command")) + config_warnings = from_union([lambda x: from_list(from_str, x), from_none], obj.get("configWarnings")) + cwd = from_union([from_str, from_none], obj.get("cwd")) + defer_tools = from_union([MCPServerConfigDeferTools, from_none], obj.get("deferTools")) + disable_secret_masking = from_union([from_bool, from_none], obj.get("disableSecretMasking")) + disable_tool_cache = from_union([from_bool, from_none], obj.get("disableToolCache")) + display_name = from_union([from_str, from_none], obj.get("displayName")) + env = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("env")) + events = from_union([lambda x: from_list(from_str, x), from_none], obj.get("events")) + exclude_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("excludeTools")) + filter_mapping = from_union([lambda x: from_dict(ContentFilterMode, x), ContentFilterMode, from_none], obj.get("filterMapping")) + is_default_server = from_union([from_bool, from_none], obj.get("isDefaultServer")) + notifications = from_union([lambda x: from_list(from_str, x), from_none], obj.get("notifications")) + oidc = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("oidc")) + safe_for_telemetry = from_union([from_bool, MCPSafeForTelemetryFields.from_dict, from_none], obj.get("safeForTelemetry")) + source = from_union([McpServerSource, from_none], obj.get("source")) + source_path = from_union([from_str, from_none], obj.get("sourcePath")) + source_plugin = from_union([from_str, from_none], obj.get("sourcePlugin")) + source_plugin_spec = from_union([from_bool, from_none], obj.get("sourcePluginSpec")) + source_plugin_version = from_union([from_str, from_none], obj.get("sourcePluginVersion")) + timeout = from_union([from_int, from_none], obj.get("timeout")) + tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tools")) + type = from_union([MCPServerConfigType, from_none], obj.get("type")) + headers = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("headers")) + headers_refresh_ttl_ms = from_union([from_int, from_none], obj.get("headersRefreshTtlMs")) + oauth_client_id = from_union([from_str, from_none], obj.get("oauthClientId")) + oauth_grant_type = from_union([MCPGrantType, from_none], obj.get("oauthGrantType")) + oauth_public_client = from_union([from_bool, from_none], obj.get("oauthPublicClient")) + url = from_union([from_str, from_none], obj.get("url")) + server_instance = obj.get("serverInstance") + return MCPServerConfig(args, auth, command, config_warnings, cwd, defer_tools, disable_secret_masking, disable_tool_cache, display_name, env, events, exclude_tools, filter_mapping, is_default_server, notifications, oidc, safe_for_telemetry, source, source_path, source_plugin, source_plugin_spec, source_plugin_version, timeout, tools, type, headers, headers_refresh_ttl_ms, oauth_client_id, oauth_grant_type, oauth_public_client, url, server_instance) + + def to_dict(self) -> dict: + result: dict = {} + if self.args is not None: + result["args"] = from_union([lambda x: from_list(from_str, x), from_none], self.args) + if self.auth is not None: + result["auth"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.auth) + if self.command is not None: + result["command"] = from_union([from_str, from_none], self.command) + if self.config_warnings is not None: + result["configWarnings"] = from_union([lambda x: from_list(from_str, x), from_none], self.config_warnings) + if self.cwd is not None: + result["cwd"] = from_union([from_str, from_none], self.cwd) + if self.defer_tools is not None: + result["deferTools"] = from_union([lambda x: to_enum(MCPServerConfigDeferTools, x), from_none], self.defer_tools) + if self.disable_secret_masking is not None: + result["disableSecretMasking"] = from_union([from_bool, from_none], self.disable_secret_masking) + if self.disable_tool_cache is not None: + result["disableToolCache"] = from_union([from_bool, from_none], self.disable_tool_cache) + if self.display_name is not None: + result["displayName"] = from_union([from_str, from_none], self.display_name) + if self.env is not None: + result["env"] = from_union([lambda x: from_dict(from_str, x), from_none], self.env) + if self.events is not None: + result["events"] = from_union([lambda x: from_list(from_str, x), from_none], self.events) + if self.exclude_tools is not None: + result["excludeTools"] = from_union([lambda x: from_list(from_str, x), from_none], self.exclude_tools) + if self.filter_mapping is not None: + result["filterMapping"] = from_union([lambda x: from_dict(lambda x: to_enum(ContentFilterMode, x), x), lambda x: to_enum(ContentFilterMode, x), from_none], self.filter_mapping) + if self.is_default_server is not None: + result["isDefaultServer"] = from_union([from_bool, from_none], self.is_default_server) + if self.notifications is not None: + result["notifications"] = from_union([lambda x: from_list(from_str, x), from_none], self.notifications) + if self.oidc is not None: + result["oidc"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.oidc) + if self.safe_for_telemetry is not None: + result["safeForTelemetry"] = from_union([from_bool, lambda x: to_class(MCPSafeForTelemetryFields, x), from_none], self.safe_for_telemetry) + if self.source is not None: + result["source"] = from_union([lambda x: to_enum(McpServerSource, x), from_none], self.source) + if self.source_path is not None: + result["sourcePath"] = from_union([from_str, from_none], self.source_path) + if self.source_plugin is not None: + result["sourcePlugin"] = from_union([from_str, from_none], self.source_plugin) + if self.source_plugin_spec is not None: + result["sourcePluginSpec"] = from_union([from_bool, from_none], self.source_plugin_spec) + if self.source_plugin_version is not None: + result["sourcePluginVersion"] = from_union([from_str, from_none], self.source_plugin_version) + if self.timeout is not None: + result["timeout"] = from_union([from_int, from_none], self.timeout) + if self.tools is not None: + result["tools"] = from_union([lambda x: from_list(from_str, x), from_none], self.tools) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(MCPServerConfigType, x), from_none], self.type) + if self.headers is not None: + result["headers"] = from_union([lambda x: from_dict(from_str, x), from_none], self.headers) + if self.headers_refresh_ttl_ms is not None: + result["headersRefreshTtlMs"] = from_union([from_int, from_none], self.headers_refresh_ttl_ms) + if self.oauth_client_id is not None: + result["oauthClientId"] = from_union([from_str, from_none], self.oauth_client_id) + if self.oauth_grant_type is not None: + result["oauthGrantType"] = from_union([lambda x: to_enum(MCPGrantType, x), from_none], self.oauth_grant_type) + if self.oauth_public_client is not None: + result["oauthPublicClient"] = from_union([from_bool, from_none], self.oauth_public_client) + if self.url is not None: + result["url"] = from_union([from_str, from_none], self.url) + if self.server_instance is not None: + result["serverInstance"] = self.server_instance + 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 MCPReloadConfig: + """In-process MCP reload configuration.""" + + mcp_servers: dict[str, MCPServerConfig] + active_git_hub_token: str | None = None + cli_enabled_servers: list[str] | None = None + """Server names the CLI enabled for this session via `--enable-mcp-server`.""" + + config_filter: Any = None + disabled_servers: list[str] | None = None + enabled_servers: list[str] | None = None + force_restart: bool | None = None + github_mcp_tool_options: Any = None + github_mcp_user_override: bool | None = None + include_workspace_sources: bool | None = None + mcp3_p_enabled: bool | None = None + secret_store: Any = None + use_cached_tool_snapshots: bool | None = None + + @staticmethod + def from_dict(obj: Any) -> 'MCPReloadConfig': + assert isinstance(obj, dict) + mcp_servers = from_dict(MCPServerConfig.from_dict, obj.get("mcpServers")) + active_git_hub_token = from_union([from_str, from_none], obj.get("activeGitHubToken")) + cli_enabled_servers = from_union([lambda x: from_list(from_str, x), from_none], obj.get("cliEnabledServers")) + config_filter = obj.get("configFilter") + disabled_servers = from_union([lambda x: from_list(from_str, x), from_none], obj.get("disabledServers")) + enabled_servers = from_union([lambda x: from_list(from_str, x), from_none], obj.get("enabledServers")) + force_restart = from_union([from_bool, from_none], obj.get("forceRestart")) + github_mcp_tool_options = obj.get("githubMcpToolOptions") + github_mcp_user_override = from_union([from_bool, from_none], obj.get("githubMcpUserOverride")) + include_workspace_sources = from_union([from_bool, from_none], obj.get("includeWorkspaceSources")) + mcp3_p_enabled = from_union([from_bool, from_none], obj.get("mcp3pEnabled")) + secret_store = obj.get("secretStore") + use_cached_tool_snapshots = from_union([from_bool, from_none], obj.get("useCachedToolSnapshots")) + return MCPReloadConfig(mcp_servers, active_git_hub_token, cli_enabled_servers, config_filter, disabled_servers, enabled_servers, force_restart, github_mcp_tool_options, github_mcp_user_override, include_workspace_sources, mcp3_p_enabled, secret_store, use_cached_tool_snapshots) + + def to_dict(self) -> dict: + result: dict = {} + result["mcpServers"] = from_dict(lambda x: to_class(MCPServerConfig, x), self.mcp_servers) + if self.active_git_hub_token is not None: + result["activeGitHubToken"] = from_union([from_str, from_none], self.active_git_hub_token) + if self.cli_enabled_servers is not None: + result["cliEnabledServers"] = from_union([lambda x: from_list(from_str, x), from_none], self.cli_enabled_servers) + if self.config_filter is not None: + result["configFilter"] = self.config_filter + if self.disabled_servers is not None: + result["disabledServers"] = from_union([lambda x: from_list(from_str, x), from_none], self.disabled_servers) + if self.enabled_servers is not None: + result["enabledServers"] = from_union([lambda x: from_list(from_str, x), from_none], self.enabled_servers) + if self.force_restart is not None: + result["forceRestart"] = from_union([from_bool, from_none], self.force_restart) + if self.github_mcp_tool_options is not None: + result["githubMcpToolOptions"] = self.github_mcp_tool_options + if self.github_mcp_user_override is not None: + result["githubMcpUserOverride"] = from_union([from_bool, from_none], self.github_mcp_user_override) + if self.include_workspace_sources is not None: + result["includeWorkspaceSources"] = from_union([from_bool, from_none], self.include_workspace_sources) + if self.mcp3_p_enabled is not None: + result["mcp3pEnabled"] = from_union([from_bool, from_none], self.mcp3_p_enabled) + if self.secret_store is not None: + result["secretStore"] = self.secret_store + if self.use_cached_tool_snapshots is not None: + result["useCachedToolSnapshots"] = from_union([from_bool, from_none], self.use_cached_tool_snapshots) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPResourceAnnotations: @@ -28040,6 +29469,143 @@ def to_dict(self) -> dict: result["nextCursor"] = from_union([from_str, from_none], self.next_cursor) 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 MCPServerConfigMemory: + """In-process MCP server configuration used by embedded SDK clients.""" + + type: MCPServerConfigMemoryType + server_instance: Any = None + """In-process MCP server instance. This value cannot cross a JSON-RPC boundary.""" + + config_warnings: list[str] | None = None + """Configuration warnings recorded while loading the server.""" + + defer_tools: MCPServerConfigDeferTools | None = None + """Controls whether tools can be loaded on demand.""" + + disable_secret_masking: bool | None = None + """Whether secret masking is disabled for calls to this server.""" + + disable_tool_cache: bool | None = None + """Whether persisted tool snapshots are disabled.""" + + display_name: str | None = None + """Optional human-readable server name.""" + + events: list[str] | None = None + """Event types this server receives as Copilot notifications.""" + + exclude_tools: list[str] | None = None + """Tool names excluded after the include filter is applied.""" + + filter_mapping: dict[str, ContentFilterMode] | ContentFilterMode | None = None + """Content filtering mode to apply to this server's tools.""" + + is_default_server: bool | None = None + """Whether this server is a built-in fallback.""" + + notifications: list[str] | None = None + """Copilot notification types this server may send to the host.""" + + oidc: bool | MCPServerAuthConfigRedirectPort | None = None + """Set to `true` to use default OIDC settings.""" + + safe_for_telemetry: bool | MCPSafeForTelemetryFields | None = None + """Telemetry-obfuscation policy for this server's tools.""" + + source: McpServerSource | None = None + """The origin of this server configuration.""" + + source_path: str | None = None + """Source file path recorded while loading the config.""" + + source_plugin: str | None = None + """Plugin that provided this server.""" + + source_plugin_spec: bool | None = None + """Whether the providing plugin uses the Open Plugin Spec.""" + + source_plugin_version: str | None = None + """Version of the plugin that provided this server.""" + + timeout: int | None = None + """Timeout in milliseconds for tool discovery and tool calls.""" + + tools: list[str] | None = None + """Tools to include. Defaults to all tools if not specified.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPServerConfigMemory': + assert isinstance(obj, dict) + server_instance = obj.get("serverInstance") + type = MCPServerConfigMemoryType(obj.get("type")) + config_warnings = from_union([lambda x: from_list(from_str, x), from_none], obj.get("configWarnings")) + defer_tools = from_union([MCPServerConfigDeferTools, from_none], obj.get("deferTools")) + disable_secret_masking = from_union([from_bool, from_none], obj.get("disableSecretMasking")) + disable_tool_cache = from_union([from_bool, from_none], obj.get("disableToolCache")) + display_name = from_union([from_str, from_none], obj.get("displayName")) + events = from_union([lambda x: from_list(from_str, x), from_none], obj.get("events")) + exclude_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("excludeTools")) + filter_mapping = from_union([lambda x: from_dict(ContentFilterMode, x), ContentFilterMode, from_none], obj.get("filterMapping")) + is_default_server = from_union([from_bool, from_none], obj.get("isDefaultServer")) + notifications = from_union([lambda x: from_list(from_str, x), from_none], obj.get("notifications")) + oidc = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict, from_none], obj.get("oidc")) + safe_for_telemetry = from_union([from_bool, MCPSafeForTelemetryFields.from_dict, from_none], obj.get("safeForTelemetry")) + source = from_union([McpServerSource, from_none], obj.get("source")) + source_path = from_union([from_str, from_none], obj.get("sourcePath")) + source_plugin = from_union([from_str, from_none], obj.get("sourcePlugin")) + source_plugin_spec = from_union([from_bool, from_none], obj.get("sourcePluginSpec")) + source_plugin_version = from_union([from_str, from_none], obj.get("sourcePluginVersion")) + timeout = from_union([from_int, from_none], obj.get("timeout")) + tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tools")) + return MCPServerConfigMemory(server_instance, type, config_warnings, defer_tools, disable_secret_masking, disable_tool_cache, display_name, events, exclude_tools, filter_mapping, is_default_server, notifications, oidc, safe_for_telemetry, source, source_path, source_plugin, source_plugin_spec, source_plugin_version, timeout, tools) + + def to_dict(self) -> dict: + result: dict = {} + result["serverInstance"] = self.server_instance + result["type"] = to_enum(MCPServerConfigMemoryType, self.type) + if self.config_warnings is not None: + result["configWarnings"] = from_union([lambda x: from_list(from_str, x), from_none], self.config_warnings) + if self.defer_tools is not None: + result["deferTools"] = from_union([lambda x: to_enum(MCPServerConfigDeferTools, x), from_none], self.defer_tools) + if self.disable_secret_masking is not None: + result["disableSecretMasking"] = from_union([from_bool, from_none], self.disable_secret_masking) + if self.disable_tool_cache is not None: + result["disableToolCache"] = from_union([from_bool, from_none], self.disable_tool_cache) + if self.display_name is not None: + result["displayName"] = from_union([from_str, from_none], self.display_name) + if self.events is not None: + result["events"] = from_union([lambda x: from_list(from_str, x), from_none], self.events) + if self.exclude_tools is not None: + result["excludeTools"] = from_union([lambda x: from_list(from_str, x), from_none], self.exclude_tools) + if self.filter_mapping is not None: + result["filterMapping"] = from_union([lambda x: from_dict(lambda x: to_enum(ContentFilterMode, x), x), lambda x: to_enum(ContentFilterMode, x), from_none], self.filter_mapping) + if self.is_default_server is not None: + result["isDefaultServer"] = from_union([from_bool, from_none], self.is_default_server) + if self.notifications is not None: + result["notifications"] = from_union([lambda x: from_list(from_str, x), from_none], self.notifications) + if self.oidc is not None: + result["oidc"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x), from_none], self.oidc) + if self.safe_for_telemetry is not None: + result["safeForTelemetry"] = from_union([from_bool, lambda x: to_class(MCPSafeForTelemetryFields, x), from_none], self.safe_for_telemetry) + if self.source is not None: + result["source"] = from_union([lambda x: to_enum(McpServerSource, x), from_none], self.source) + if self.source_path is not None: + result["sourcePath"] = from_union([from_str, from_none], self.source_path) + if self.source_plugin is not None: + result["sourcePlugin"] = from_union([from_str, from_none], self.source_plugin) + if self.source_plugin_spec is not None: + result["sourcePluginSpec"] = from_union([from_bool, from_none], self.source_plugin_spec) + if self.source_plugin_version is not None: + result["sourcePluginVersion"] = from_union([from_str, from_none], self.source_plugin_version) + if self.timeout is not None: + result["timeout"] = from_union([from_int, from_none], self.timeout) + if self.tools is not None: + result["tools"] = from_union([lambda x: from_list(from_str, x), from_none], self.tools) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MetadataContextInfoRequest: @@ -28145,6 +29711,9 @@ class Model: billing: ModelBilling | None = None """Billing information""" + default_reasoning_effort: str | None = None + """Default reasoning effort level (only present if model supports reasoning effort)""" + model_picker_category: ModelPickerCategory | None = None """Model capability category for grouping in the model picker""" @@ -28154,6 +29723,12 @@ class Model: policy: ModelPolicy | None = None """Policy state (if applicable)""" + supported_context_tiers: list[str] | None = None + """Context-window tiers this model offers, when the provider advertises them independently + of tiered token pricing. Copilot models carry their tiers in `billing.tokenPrices`; a + provider that has no pricing to publish (an agent host reached over AHP, for example) + declares them here instead, so the model picker can still offer the tier toggle. + """ supported_reasoning_efforts: list[str] | None = None """Supported reasoning effort levels (only present if model supports reasoning effort)""" @@ -28164,11 +29739,13 @@ def from_dict(obj: Any) -> 'Model': id = from_str(obj.get("id")) name = from_str(obj.get("name")) billing = from_union([ModelBilling.from_dict, from_none], obj.get("billing")) + default_reasoning_effort = from_union([from_str, from_none], obj.get("defaultReasoningEffort")) model_picker_category = from_union([ModelPickerCategory, from_none], obj.get("modelPickerCategory")) model_picker_price_category = from_union([ModelPickerPriceCategory, from_none], obj.get("modelPickerPriceCategory")) policy = from_union([ModelPolicy.from_dict, from_none], obj.get("policy")) + supported_context_tiers = from_union([lambda x: from_list(from_str, x), from_none], obj.get("supportedContextTiers")) supported_reasoning_efforts = from_union([lambda x: from_list(from_str, x), from_none], obj.get("supportedReasoningEfforts")) - return Model(capabilities, id, name, billing, model_picker_category, model_picker_price_category, policy, supported_reasoning_efforts) + return Model(capabilities, id, name, billing, default_reasoning_effort, model_picker_category, model_picker_price_category, policy, supported_context_tiers, supported_reasoning_efforts) def to_dict(self) -> dict: result: dict = {} @@ -28177,12 +29754,16 @@ def to_dict(self) -> dict: result["name"] = from_str(self.name) if self.billing is not None: result["billing"] = from_union([lambda x: to_class(ModelBilling, x), from_none], self.billing) + if self.default_reasoning_effort is not None: + result["defaultReasoningEffort"] = from_union([from_str, from_none], self.default_reasoning_effort) if self.model_picker_category is not None: result["modelPickerCategory"] = from_union([lambda x: to_enum(ModelPickerCategory, x), from_none], self.model_picker_category) if self.model_picker_price_category is not None: result["modelPickerPriceCategory"] = from_union([lambda x: to_enum(ModelPickerPriceCategory, x), from_none], self.model_picker_price_category) if self.policy is not None: result["policy"] = from_union([lambda x: to_class(ModelPolicy, x), from_none], self.policy) + if self.supported_context_tiers is not None: + result["supportedContextTiers"] = from_union([lambda x: from_list(from_str, x), from_none], self.supported_context_tiers) if self.supported_reasoning_efforts is not None: result["supportedReasoningEfforts"] = from_union([lambda x: from_list(from_str, x), from_none], self.supported_reasoning_efforts) return result @@ -28240,6 +29821,10 @@ class ModelSwitchToRequest: reasoning_summary: ReasoningSummary | None = None """Reasoning summary mode to request for supported model clients""" + source: ModelChangeSource | None = None + """Origin to record on the effective `session.model_change` event. Defaults to `sdk` when + omitted. + """ verbosity: Verbosity | None = None """Output verbosity level to request for supported models""" @@ -28252,8 +29837,9 @@ def from_dict(obj: Any) -> 'ModelSwitchToRequest': model_capabilities = from_union([ModelCapabilitiesOverride.from_dict, from_none], obj.get("modelCapabilities")) reasoning_effort = from_union([from_str, from_none], obj.get("reasoningEffort")) reasoning_summary = from_union([ReasoningSummary, from_none], obj.get("reasoningSummary")) + source = from_union([ModelChangeSource, from_none], obj.get("source")) verbosity = from_union([Verbosity, from_none], obj.get("verbosity")) - return ModelSwitchToRequest(model_id, context_tier, defer_if_model_change_queued, model_capabilities, reasoning_effort, reasoning_summary, verbosity) + return ModelSwitchToRequest(model_id, context_tier, defer_if_model_change_queued, model_capabilities, reasoning_effort, reasoning_summary, source, verbosity) def to_dict(self) -> dict: result: dict = {} @@ -28268,6 +29854,8 @@ def to_dict(self) -> dict: 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.source is not None: + result["source"] = from_union([lambda x: to_enum(ModelChangeSource, x), from_none], self.source) if self.verbosity is not None: result["verbosity"] = from_union([lambda x: to_enum(Verbosity, x), from_none], self.verbosity) return result @@ -28370,6 +29958,116 @@ def to_dict(self) -> dict: result["unsubscribe"] = self.unsubscribe return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class HMACAuthInfoClass: + """Authentication-info variant for GitHub-internal HMAC auth, carrying the public GitHub + host and HMAC secret. + + Authentication-info variant for a token sourced from an environment variable, with host, + optional login, token, and env var name. + + Authentication-info variant for SDK-configured token authentication, carrying host and + the secret token value. + + Authentication-info variant for direct Copilot API token auth sourced from environment + variables, with public GitHub host. + + Authentication-info variant for OAuth user auth, with host and login; the token remains + in the runtime secret store. + + Authentication-info variant for GitHub CLI credentials, carrying host, login, and the `gh + auth token` value. + + Authentication-info variant for API-key authentication to a non-GitHub LLM provider, + carrying the secret `apiKey` and host. + """ + host: str + """Authentication host. HMAC auth always targets the public GitHub host. + + Authentication host (e.g. https://github.com or a GHES host). + + Authentication host. + + Authentication host (always the public GitHub host). + """ + type: AuthInfoType + """HMAC-based authentication used by GitHub-internal services. + + Personal access token (PAT) or server-to-server token sourced from an environment + variable. + + SDK-side token authentication; the host configured the token directly via the SDK. + + Direct Copilot API authentication via the `GITHUB_COPILOT_API_TOKEN` + `COPILOT_API_URL` + environment-variable pair. The token itself is read from the environment by the runtime, + not carried in this struct. + + OAuth user authentication. The token itself is held in the runtime's secret token store + (keyed by host+login) and is NOT carried in this struct. + + Authentication via the `gh` CLI's saved credentials. + + API-key authentication for non-GitHub LLM providers (e.g. when running BYOM-style). + """ + copilot_user: CopilotUserResponse | None = None + """Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the + GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this + verbatim and does not re-fetch when set. + """ + hmac: str | None = None + """HMAC secret used to sign requests.""" + + env_var: str | None = None + """Name of the environment variable the token was sourced from.""" + + login: str | None = None + """User login associated with the token. Undefined for server-to-server tokens (those + starting with `ghs_`). + + OAuth user login. + + User login as reported by `gh auth status`. + """ + token: str | None = None + """The token value itself. Treat as a secret. + + The token returned by `gh auth token`. Treat as a secret. + """ + api_key: str | None = None + """The API key. Treat as a secret.""" + + @staticmethod + def from_dict(obj: Any) -> 'HMACAuthInfoClass': + assert isinstance(obj, dict) + host = from_str(obj.get("host")) + type = AuthInfoType(obj.get("type")) + copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) + hmac = from_union([from_str, from_none], obj.get("hmac")) + env_var = from_union([from_str, from_none], obj.get("envVar")) + login = from_union([from_str, from_none], obj.get("login")) + token = from_union([from_str, from_none], obj.get("token")) + api_key = from_union([from_str, from_none], obj.get("apiKey")) + return HMACAuthInfoClass(host, type, copilot_user, hmac, env_var, login, token, api_key) + + def to_dict(self) -> dict: + result: dict = {} + result["host"] = from_str(self.host) + result["type"] = to_enum(AuthInfoType, self.type) + if self.copilot_user is not None: + result["copilotUser"] = from_union([lambda x: to_class(CopilotUserResponse, x), from_none], self.copilot_user) + if self.hmac is not None: + result["hmac"] = from_union([from_str, from_none], self.hmac) + if self.env_var is not None: + result["envVar"] = from_union([from_str, from_none], self.env_var) + if self.login is not None: + result["login"] = from_union([from_str, from_none], self.login) + if self.token is not None: + result["token"] = from_union([from_str, from_none], self.token) + if self.api_key is not None: + result["apiKey"] = from_union([from_str, from_none], self.api_key) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionLimitPredictionDetails: @@ -28439,6 +30137,8 @@ class SessionLimitPredictionResult: include an explicit reason. """ kind: SessionLimitPredictionResultKind + """Prediction result variant discriminator.""" + prediction: SessionLimitPredictionDetails | None = None """Predicted session limit details.""" @@ -28482,6 +30182,142 @@ def to_dict(self) -> dict: result["modelId"] = from_union([from_str, from_none], self.model_id) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionSettingsValidationSnapshot: + """Redacted validation and memory-tool settings. + + Redacted validation and memory-tool settings for a session. + """ + advisory_enabled: bool | None = None + """Whether advisory validation is enabled.""" + + codeql_enabled: bool | None = None + """Whether CodeQL validation is enabled.""" + + code_review_enabled: bool | None = None + """Whether code-review validation is enabled.""" + + code_review_model: str | None = None + """Model used for code-review validation.""" + + dependabot_timeout: float | None = None + """Dependabot validation timeout budget in seconds.""" + + memory_store_enabled: bool | None = None + """Whether the memory-store tool is enabled.""" + + memory_vote_enabled: bool | None = None + """Whether the memory-vote tool is enabled.""" + + secret_scanning_enabled: bool | None = None + """Whether secret-scanning validation is enabled.""" + + timeout: float | None = None + """General validation timeout budget in seconds.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionSettingsValidationSnapshot': + assert isinstance(obj, dict) + advisory_enabled = from_union([from_bool, from_none], obj.get("advisoryEnabled")) + codeql_enabled = from_union([from_bool, from_none], obj.get("codeqlEnabled")) + code_review_enabled = from_union([from_bool, from_none], obj.get("codeReviewEnabled")) + code_review_model = from_union([from_str, from_none], obj.get("codeReviewModel")) + dependabot_timeout = from_union([from_float, from_none], obj.get("dependabotTimeout")) + memory_store_enabled = from_union([from_bool, from_none], obj.get("memoryStoreEnabled")) + memory_vote_enabled = from_union([from_bool, from_none], obj.get("memoryVoteEnabled")) + secret_scanning_enabled = from_union([from_bool, from_none], obj.get("secretScanningEnabled")) + timeout = from_union([from_float, from_none], obj.get("timeout")) + return SessionSettingsValidationSnapshot(advisory_enabled, codeql_enabled, code_review_enabled, code_review_model, dependabot_timeout, memory_store_enabled, memory_vote_enabled, secret_scanning_enabled, timeout) + + def to_dict(self) -> dict: + result: dict = {} + if self.advisory_enabled is not None: + result["advisoryEnabled"] = from_union([from_bool, from_none], self.advisory_enabled) + if self.codeql_enabled is not None: + result["codeqlEnabled"] = from_union([from_bool, from_none], self.codeql_enabled) + if self.code_review_enabled is not None: + result["codeReviewEnabled"] = from_union([from_bool, from_none], self.code_review_enabled) + if self.code_review_model is not None: + result["codeReviewModel"] = from_union([from_str, from_none], self.code_review_model) + if self.dependabot_timeout is not None: + result["dependabotTimeout"] = from_union([to_float, from_none], self.dependabot_timeout) + if self.memory_store_enabled is not None: + result["memoryStoreEnabled"] = from_union([from_bool, from_none], self.memory_store_enabled) + if self.memory_vote_enabled is not None: + result["memoryVoteEnabled"] = from_union([from_bool, from_none], self.memory_vote_enabled) + if self.secret_scanning_enabled is not None: + result["secretScanningEnabled"] = from_union([from_bool, from_none], self.secret_scanning_enabled) + if self.timeout is not None: + result["timeout"] = from_union([to_float, from_none], self.timeout) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionSettingsSnapshot: + """Redacted, serializable view of session runtime settings for SDK boundary consumers. + Secrets and raw feature flags are intentionally excluded. + """ + job: SessionSettingsJobSnapshot + """Redacted job settings.""" + + model: SessionSettingsModelSnapshot + """Redacted model routing settings.""" + + online_evaluation: SessionSettingsOnlineEvaluationSnapshot + """Online-evaluation settings safe for SDK consumers.""" + + repo: SessionSettingsRepoSnapshot + """Redacted repository and host settings.""" + + validation: SessionSettingsValidationSnapshot + """Redacted validation and memory-tool settings.""" + + client_name: str | None = None + """Name of the SDK client that created the session.""" + + start_time_ms: float | None = None + """Session start time as Unix epoch milliseconds.""" + + timeout_ms: float | None = None + """Session timeout in milliseconds.""" + + version: str | None = None + """Agent runtime version selector copied from the session settings, such as `latest` or a + runtime release identifier. + """ + + @staticmethod + def from_dict(obj: Any) -> 'SessionSettingsSnapshot': + assert isinstance(obj, dict) + job = SessionSettingsJobSnapshot.from_dict(obj.get("job")) + model = SessionSettingsModelSnapshot.from_dict(obj.get("model")) + online_evaluation = SessionSettingsOnlineEvaluationSnapshot.from_dict(obj.get("onlineEvaluation")) + repo = SessionSettingsRepoSnapshot.from_dict(obj.get("repo")) + validation = SessionSettingsValidationSnapshot.from_dict(obj.get("validation")) + client_name = from_union([from_str, from_none], obj.get("clientName")) + start_time_ms = from_union([from_float, from_none], obj.get("startTimeMs")) + timeout_ms = from_union([from_float, from_none], obj.get("timeoutMs")) + version = from_union([from_str, from_none], obj.get("version")) + return SessionSettingsSnapshot(job, model, online_evaluation, repo, validation, client_name, start_time_ms, timeout_ms, version) + + def to_dict(self) -> dict: + result: dict = {} + result["job"] = to_class(SessionSettingsJobSnapshot, self.job) + result["model"] = to_class(SessionSettingsModelSnapshot, self.model) + result["onlineEvaluation"] = to_class(SessionSettingsOnlineEvaluationSnapshot, self.online_evaluation) + result["repo"] = to_class(SessionSettingsRepoSnapshot, self.repo) + result["validation"] = to_class(SessionSettingsValidationSnapshot, self.validation) + if self.client_name is not None: + result["clientName"] = from_union([from_str, from_none], self.client_name) + if self.start_time_ms is not None: + result["startTimeMs"] = from_union([to_float, from_none], self.start_time_ms) + if self.timeout_ms is not None: + result["timeoutMs"] = from_union([to_float, from_none], self.timeout_ms) + 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 SessionsOpenCloud: @@ -28867,6 +30703,8 @@ class RPC: api_key_auth_info: APIKeyAuthInfo auth_info: AuthInfo auth_info_type: AuthInfoType + auth_validation_error: AuthValidationError + auth_validation_errors: list[AuthValidationError] built_in_model_catalog: BuiltInModelCatalog built_in_model_catalog_entry: BuiltInModelCatalogEntry cancel_user_requested_shell_command_result: CancelUserRequestedShellCommandResult @@ -28884,6 +30722,8 @@ class RPC: canvas_provider_invoke_action_request: CanvasProviderInvokeActionRequest canvas_provider_open_request: CanvasProviderOpenRequest canvas_provider_open_result: CanvasProviderOpenResult + canvas_provider_register_request: CanvasProviderRegisterRequest + canvas_provider_unregister_request: CanvasProviderUnregisterRequest canvas_session_context: CanvasSessionContext capi_session_options: CapiSessionOptions command_list: CommandList @@ -29133,10 +30973,12 @@ class RPC: mcp_disable_request: MCPDisableRequest mcp_discover_request: MCPDiscoverRequest mcp_discover_result: MCPDiscoverResult + mcp_elicitation_form_mode: MCPElicitationFormMode mcp_enable_request: MCPEnableRequest mcp_execute_sampling_params: MCPExecuteSamplingParams mcp_execute_sampling_request: dict[str, Any] mcp_execute_sampling_result: dict[str, Any] + mcp_failed_server: MCPFailedServer mcp_filtered_server: MCPFilteredServer mcp_headers_handle_pending_headers_refresh_request: MCPHeadersHandlePendingHeadersRefreshRequest mcp_headers_handle_pending_headers_refresh_request_request: MCPHeadersHandlePendingHeadersRefreshRequestRequest @@ -29153,9 +30995,13 @@ class RPC: mcp_oauth_login_request: MCPOauthLoginRequest mcp_oauth_login_result: MCPOauthLoginResult mcp_oauth_pending_request_response: MCPOauthPendingRequestResponse + mcp_oauth_probe_needs_auth_reason: MCPOauthProbeNeedsAuthReason + mcp_oauth_probe_request: MCPOauthProbeRequest + mcp_oauth_probe_result: MCPOauthProbeResult mcp_oauth_respond_request: MCPOauthRespondRequest mcp_oauth_respond_result: MCPOauthRespondResult mcp_register_external_client_request: MCPRegisterExternalClientRequest + mcp_reload_config: MCPReloadConfig mcp_reload_with_config_request: MCPReloadWithConfigRequest mcp_remove_git_hub_result: MCPRemoveGitHubResult mcp_resource: MCPResource @@ -29170,8 +31016,11 @@ class RPC: mcp_resources_read_result: MCPResourcesReadResult mcp_resource_template: MCPResourceTemplate mcp_restart_server_request: MCPRestartServerRequest + mcp_safe_for_telemetry: bool | MCPSafeForTelemetryFields + mcp_safe_for_telemetry_fields: MCPSafeForTelemetryFields mcp_sampling_execution_action: MCPSamplingExecutionAction mcp_sampling_execution_result: MCPSamplingExecutionResult + mcp_serializable_server_config: MCPSerializableServerConfig mcp_server: MCPServer mcp_server_auth_config: bool | MCPServerAuthConfigRedirectPort mcp_server_auth_config_redirect_port: MCPServerAuthConfigRedirectPort @@ -29180,7 +31029,10 @@ class RPC: mcp_server_config_http: MCPServerConfigHTTP mcp_server_config_http_oauth_grant_type: MCPGrantType mcp_server_config_http_type: MCPServerConfigHTTPType + mcp_server_config_memory: MCPServerConfigMemory + mcp_server_config_memory_type: MCPServerConfigMemoryType mcp_server_config_stdio: MCPServerConfigStdio + mcp_server_config_stdio_type: MCPServerConfigStdioType mcp_server_failure_info: MCPServerFailureInfo mcp_server_list: MCPServerList mcp_server_needs_auth_info: MCPServerNeedsAuthInfo @@ -29190,6 +31042,7 @@ class RPC: mcp_start_server_request: MCPStartServerRequest mcp_start_servers_result: MCPStartServersResult mcp_stop_server_request: MCPStopServerRequest + mcp_task_metadata: MCPTaskMetadata mcp_tools: MCPTools mcp_tool_ui: MCPToolUI mcp_tool_ui_visibility: MCPToolUIVisibility @@ -29260,6 +31113,7 @@ class RPC: permission_decision_approve_for_location_approval: PermissionDecisionApproveForLocationApproval permission_decision_approve_for_location_approval_commands: PermissionDecisionApproveForLocationApprovalCommands permission_decision_approve_for_location_approval_custom_tool: PermissionDecisionApproveForLocationApprovalCustomTool + permission_decision_approve_for_location_approval_extension_env_access: PermissionDecisionApproveForLocationApprovalExtensionEnvAccess permission_decision_approve_for_location_approval_extension_management: PermissionDecisionApproveForLocationApprovalExtensionManagement permission_decision_approve_for_location_approval_extension_permission_access: PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess permission_decision_approve_for_location_approval_factory: PermissionDecisionApproveForLocationApprovalFactory @@ -29272,6 +31126,7 @@ class RPC: permission_decision_approve_for_session_approval: PermissionDecisionApproveForSessionApproval permission_decision_approve_for_session_approval_commands: PermissionDecisionApproveForSessionApprovalCommands permission_decision_approve_for_session_approval_custom_tool: PermissionDecisionApproveForSessionApprovalCustomTool + permission_decision_approve_for_session_approval_extension_env_access: PermissionDecisionApproveForSessionApprovalExtensionEnvAccess permission_decision_approve_for_session_approval_extension_management: PermissionDecisionApproveForSessionApprovalExtensionManagement permission_decision_approve_for_session_approval_extension_permission_access: PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess permission_decision_approve_for_session_approval_factory: PermissionDecisionApproveForSessionApprovalFactory @@ -29324,6 +31179,7 @@ class RPC: permissions_locations_add_tool_approval_details: PermissionsLocationsAddToolApprovalDetails permissions_locations_add_tool_approval_details_commands: PermissionsLocationsAddToolApprovalDetailsCommands permissions_locations_add_tool_approval_details_custom_tool: PermissionsLocationsAddToolApprovalDetailsCustomTool + permissions_locations_add_tool_approval_details_extension_env_access: PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess permissions_locations_add_tool_approval_details_extension_management: PermissionsLocationsAddToolApprovalDetailsExtensionManagement permissions_locations_add_tool_approval_details_extension_permission_access: PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess permissions_locations_add_tool_approval_details_factory: PermissionsLocationsAddToolApprovalDetailsFactory @@ -29365,6 +31221,7 @@ class RPC: plugin_install_result: PluginInstallResult plugin_list: PluginList plugin_list_result: PluginListResult + plugins_builtin_set_request: PluginsBuiltinSetRequest plugins_disable_request: PluginsDisableRequest plugins_enable_request: PluginsEnableRequest plugins_install_request: PluginsInstallRequest @@ -29467,6 +31324,7 @@ class RPC: remote_notify_steerable_changed_request: RemoteNotifySteerableChangedRequest remote_notify_steerable_changed_result: RemoteNotifySteerableChangedResult remote_session_connection_result: RemoteSessionConnectionResult + remote_session_host_status: RemoteSessionHostStatus remote_session_metadata_repository: RemoteSessionMetadataRepository remote_session_metadata_task_type: TaskType remote_session_metadata_value: RemoteSessionMetadataValue @@ -29510,7 +31368,10 @@ class RPC: server_skill_list: ServerSkillList session_activity: SessionActivity session_agent_list_request: SessionAgentListRequest + session_auth_login_request: SessionAuthLoginRequest + session_auth_logout_user_request: SessionAuthLogoutUserRequest session_auth_status: SessionAuthStatus + session_auth_switch_request: SessionAuthSwitchRequest session_bulk_delete_result: SessionBulkDeleteResult session_cancel_all_background_agents_result: int session_capability: SessionCapability @@ -29552,6 +31413,9 @@ class RPC: session_fs_stat_request: SessionFSStatRequest session_fs_stat_result: SessionFSStatResult session_fs_write_file_request: SessionFSWriteFileRequest + session_git_hub_auth_get_all_auth_available_result: list[SessionAuthStatus] + session_git_hub_auth_logout_result: bool + session_git_hub_auth_logout_user_result: bool session_history_compact_request: SessionHistoryCompactRequest session_installed_plugin: SessionInstalledPlugin session_installed_plugin_source: SessionInstalledPluginSource | str @@ -29823,6 +31687,7 @@ class RPC: workspaces_workspace_details_host_type: HostType workspaces_write_autopilot_objective_request: WorkspacesWriteAutopilotObjectiveRequest workspaces_write_autopilot_objective_result: WorkspacesWriteAutopilotObjectiveResult + session_auth_info_result: HMACAuthInfoClass | None = None session_context_attribution: SessionContextAttribution | None = None session_context_info: SessionContextInfo | None = None subagent_settings: SubagentSettings | None = None @@ -29880,6 +31745,8 @@ 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")) + auth_validation_error = AuthValidationError.from_dict(obj.get("AuthValidationError")) + auth_validation_errors = from_list(AuthValidationError.from_dict, obj.get("AuthValidationErrors")) built_in_model_catalog = BuiltInModelCatalog.from_dict(obj.get("BuiltInModelCatalog")) built_in_model_catalog_entry = BuiltInModelCatalogEntry.from_dict(obj.get("BuiltInModelCatalogEntry")) cancel_user_requested_shell_command_result = CancelUserRequestedShellCommandResult.from_dict(obj.get("CancelUserRequestedShellCommandResult")) @@ -29897,6 +31764,8 @@ def from_dict(obj: Any) -> 'RPC': canvas_provider_invoke_action_request = CanvasProviderInvokeActionRequest.from_dict(obj.get("CanvasProviderInvokeActionRequest")) canvas_provider_open_request = CanvasProviderOpenRequest.from_dict(obj.get("CanvasProviderOpenRequest")) canvas_provider_open_result = CanvasProviderOpenResult.from_dict(obj.get("CanvasProviderOpenResult")) + canvas_provider_register_request = CanvasProviderRegisterRequest.from_dict(obj.get("CanvasProviderRegisterRequest")) + canvas_provider_unregister_request = CanvasProviderUnregisterRequest.from_dict(obj.get("CanvasProviderUnregisterRequest")) canvas_session_context = CanvasSessionContext.from_dict(obj.get("CanvasSessionContext")) capi_session_options = CapiSessionOptions.from_dict(obj.get("CapiSessionOptions")) command_list = CommandList.from_dict(obj.get("CommandList")) @@ -30146,10 +32015,12 @@ def from_dict(obj: Any) -> 'RPC': 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")) + mcp_elicitation_form_mode = MCPElicitationFormMode(obj.get("McpElicitationFormMode")) mcp_enable_request = MCPEnableRequest.from_dict(obj.get("McpEnableRequest")) 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_failed_server = MCPFailedServer.from_dict(obj.get("McpFailedServer")) mcp_filtered_server = MCPFilteredServer.from_dict(obj.get("McpFilteredServer")) mcp_headers_handle_pending_headers_refresh_request = MCPHeadersHandlePendingHeadersRefreshRequest.from_dict(obj.get("McpHeadersHandlePendingHeadersRefreshRequest")) mcp_headers_handle_pending_headers_refresh_request_request = MCPHeadersHandlePendingHeadersRefreshRequestRequest.from_dict(obj.get("McpHeadersHandlePendingHeadersRefreshRequestRequest")) @@ -30166,9 +32037,13 @@ def from_dict(obj: Any) -> 'RPC': mcp_oauth_login_request = MCPOauthLoginRequest.from_dict(obj.get("McpOauthLoginRequest")) mcp_oauth_login_result = MCPOauthLoginResult.from_dict(obj.get("McpOauthLoginResult")) mcp_oauth_pending_request_response = MCPOauthPendingRequestResponse.from_dict(obj.get("McpOauthPendingRequestResponse")) + mcp_oauth_probe_needs_auth_reason = MCPOauthProbeNeedsAuthReason(obj.get("McpOauthProbeNeedsAuthReason")) + mcp_oauth_probe_request = MCPOauthProbeRequest.from_dict(obj.get("McpOauthProbeRequest")) + mcp_oauth_probe_result = MCPOauthProbeResult.from_dict(obj.get("McpOauthProbeResult")) 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_config = MCPReloadConfig.from_dict(obj.get("McpReloadConfig")) mcp_reload_with_config_request = MCPReloadWithConfigRequest.from_dict(obj.get("McpReloadWithConfigRequest")) mcp_remove_git_hub_result = MCPRemoveGitHubResult.from_dict(obj.get("McpRemoveGitHubResult")) mcp_resource = MCPResource.from_dict(obj.get("McpResource")) @@ -30183,8 +32058,11 @@ def from_dict(obj: Any) -> 'RPC': mcp_resources_read_result = MCPResourcesReadResult.from_dict(obj.get("McpResourcesReadResult")) mcp_resource_template = MCPResourceTemplate.from_dict(obj.get("McpResourceTemplate")) mcp_restart_server_request = MCPRestartServerRequest.from_dict(obj.get("McpRestartServerRequest")) + mcp_safe_for_telemetry = from_union([from_bool, MCPSafeForTelemetryFields.from_dict], obj.get("McpSafeForTelemetry")) + mcp_safe_for_telemetry_fields = MCPSafeForTelemetryFields.from_dict(obj.get("McpSafeForTelemetryFields")) mcp_sampling_execution_action = MCPSamplingExecutionAction(obj.get("McpSamplingExecutionAction")) mcp_sampling_execution_result = MCPSamplingExecutionResult.from_dict(obj.get("McpSamplingExecutionResult")) + mcp_serializable_server_config = MCPSerializableServerConfig.from_dict(obj.get("McpSerializableServerConfig")) mcp_server = MCPServer.from_dict(obj.get("McpServer")) mcp_server_auth_config = from_union([from_bool, MCPServerAuthConfigRedirectPort.from_dict], obj.get("McpServerAuthConfig")) mcp_server_auth_config_redirect_port = MCPServerAuthConfigRedirectPort.from_dict(obj.get("McpServerAuthConfigRedirectPort")) @@ -30193,7 +32071,10 @@ def from_dict(obj: Any) -> 'RPC': mcp_server_config_http = MCPServerConfigHTTP.from_dict(obj.get("McpServerConfigHttp")) mcp_server_config_http_oauth_grant_type = MCPGrantType(obj.get("McpServerConfigHttpOauthGrantType")) mcp_server_config_http_type = MCPServerConfigHTTPType(obj.get("McpServerConfigHttpType")) + mcp_server_config_memory = MCPServerConfigMemory.from_dict(obj.get("McpServerConfigMemory")) + mcp_server_config_memory_type = MCPServerConfigMemoryType(obj.get("McpServerConfigMemoryType")) mcp_server_config_stdio = MCPServerConfigStdio.from_dict(obj.get("McpServerConfigStdio")) + mcp_server_config_stdio_type = MCPServerConfigStdioType(obj.get("McpServerConfigStdioType")) 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")) @@ -30203,6 +32084,7 @@ def from_dict(obj: Any) -> 'RPC': 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_task_metadata = MCPTaskMetadata.from_dict(obj.get("McpTaskMetadata")) mcp_tools = MCPTools.from_dict(obj.get("McpTools")) mcp_tool_ui = MCPToolUI.from_dict(obj.get("McpToolUi")) mcp_tool_ui_visibility = MCPToolUIVisibility(obj.get("McpToolUiVisibility")) @@ -30273,6 +32155,7 @@ def from_dict(obj: Any) -> 'RPC': permission_decision_approve_for_location_approval = _load_PermissionDecisionApproveForLocationApproval(obj.get("PermissionDecisionApproveForLocationApproval")) permission_decision_approve_for_location_approval_commands = PermissionDecisionApproveForLocationApprovalCommands.from_dict(obj.get("PermissionDecisionApproveForLocationApprovalCommands")) permission_decision_approve_for_location_approval_custom_tool = PermissionDecisionApproveForLocationApprovalCustomTool.from_dict(obj.get("PermissionDecisionApproveForLocationApprovalCustomTool")) + permission_decision_approve_for_location_approval_extension_env_access = PermissionDecisionApproveForLocationApprovalExtensionEnvAccess.from_dict(obj.get("PermissionDecisionApproveForLocationApprovalExtensionEnvAccess")) permission_decision_approve_for_location_approval_extension_management = PermissionDecisionApproveForLocationApprovalExtensionManagement.from_dict(obj.get("PermissionDecisionApproveForLocationApprovalExtensionManagement")) permission_decision_approve_for_location_approval_extension_permission_access = PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess.from_dict(obj.get("PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess")) permission_decision_approve_for_location_approval_factory = PermissionDecisionApproveForLocationApprovalFactory.from_dict(obj.get("PermissionDecisionApproveForLocationApprovalFactory")) @@ -30285,6 +32168,7 @@ def from_dict(obj: Any) -> 'RPC': permission_decision_approve_for_session_approval = _load_PermissionDecisionApproveForSessionApproval(obj.get("PermissionDecisionApproveForSessionApproval")) permission_decision_approve_for_session_approval_commands = PermissionDecisionApproveForSessionApprovalCommands.from_dict(obj.get("PermissionDecisionApproveForSessionApprovalCommands")) permission_decision_approve_for_session_approval_custom_tool = PermissionDecisionApproveForSessionApprovalCustomTool.from_dict(obj.get("PermissionDecisionApproveForSessionApprovalCustomTool")) + permission_decision_approve_for_session_approval_extension_env_access = PermissionDecisionApproveForSessionApprovalExtensionEnvAccess.from_dict(obj.get("PermissionDecisionApproveForSessionApprovalExtensionEnvAccess")) permission_decision_approve_for_session_approval_extension_management = PermissionDecisionApproveForSessionApprovalExtensionManagement.from_dict(obj.get("PermissionDecisionApproveForSessionApprovalExtensionManagement")) permission_decision_approve_for_session_approval_extension_permission_access = PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess.from_dict(obj.get("PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess")) permission_decision_approve_for_session_approval_factory = PermissionDecisionApproveForSessionApprovalFactory.from_dict(obj.get("PermissionDecisionApproveForSessionApprovalFactory")) @@ -30337,6 +32221,7 @@ def from_dict(obj: Any) -> 'RPC': permissions_locations_add_tool_approval_details = _load_PermissionsLocationsAddToolApprovalDetails(obj.get("PermissionsLocationsAddToolApprovalDetails")) permissions_locations_add_tool_approval_details_commands = PermissionsLocationsAddToolApprovalDetailsCommands.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsCommands")) permissions_locations_add_tool_approval_details_custom_tool = PermissionsLocationsAddToolApprovalDetailsCustomTool.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsCustomTool")) + permissions_locations_add_tool_approval_details_extension_env_access = PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess")) permissions_locations_add_tool_approval_details_extension_management = PermissionsLocationsAddToolApprovalDetailsExtensionManagement.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsExtensionManagement")) permissions_locations_add_tool_approval_details_extension_permission_access = PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess")) permissions_locations_add_tool_approval_details_factory = PermissionsLocationsAddToolApprovalDetailsFactory.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsFactory")) @@ -30378,6 +32263,7 @@ def from_dict(obj: Any) -> 'RPC': 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_builtin_set_request = PluginsBuiltinSetRequest.from_dict(obj.get("PluginsBuiltinSetRequest")) 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")) @@ -30480,6 +32366,7 @@ def from_dict(obj: Any) -> 'RPC': 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_host_status = RemoteSessionHostStatus(obj.get("RemoteSessionHostStatus")) 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")) @@ -30523,7 +32410,10 @@ def from_dict(obj: Any) -> 'RPC': server_skill_list = ServerSkillList.from_dict(obj.get("ServerSkillList")) session_activity = SessionActivity.from_dict(obj.get("SessionActivity")) session_agent_list_request = SessionAgentListRequest.from_dict(obj.get("SessionAgentListRequest")) + session_auth_login_request = SessionAuthLoginRequest.from_dict(obj.get("SessionAuthLoginRequest")) + session_auth_logout_user_request = SessionAuthLogoutUserRequest.from_dict(obj.get("SessionAuthLogoutUserRequest")) session_auth_status = SessionAuthStatus.from_dict(obj.get("SessionAuthStatus")) + session_auth_switch_request = SessionAuthSwitchRequest.from_dict(obj.get("SessionAuthSwitchRequest")) session_bulk_delete_result = SessionBulkDeleteResult.from_dict(obj.get("SessionBulkDeleteResult")) session_cancel_all_background_agents_result = from_int(obj.get("SessionCancelAllBackgroundAgentsResult")) session_capability = SessionCapability(obj.get("SessionCapability")) @@ -30565,6 +32455,9 @@ def from_dict(obj: Any) -> 'RPC': session_fs_stat_request = SessionFSStatRequest.from_dict(obj.get("SessionFsStatRequest")) session_fs_stat_result = SessionFSStatResult.from_dict(obj.get("SessionFsStatResult")) session_fs_write_file_request = SessionFSWriteFileRequest.from_dict(obj.get("SessionFsWriteFileRequest")) + session_git_hub_auth_get_all_auth_available_result = from_list(SessionAuthStatus.from_dict, obj.get("SessionGitHubAuthGetAllAuthAvailableResult")) + session_git_hub_auth_logout_result = from_bool(obj.get("SessionGitHubAuthLogoutResult")) + session_git_hub_auth_logout_user_result = from_bool(obj.get("SessionGitHubAuthLogoutUserResult")) session_history_compact_request = SessionHistoryCompactRequest.from_dict(obj.get("SessionHistoryCompactRequest")) session_installed_plugin = SessionInstalledPlugin.from_dict(obj.get("SessionInstalledPlugin")) session_installed_plugin_source = from_union([SessionInstalledPluginSource.from_dict, from_str], obj.get("SessionInstalledPluginSource")) @@ -30836,12 +32729,13 @@ def from_dict(obj: Any) -> 'RPC': workspaces_workspace_details_host_type = HostType(obj.get("WorkspacesWorkspaceDetailsHostType")) workspaces_write_autopilot_objective_request = WorkspacesWriteAutopilotObjectiveRequest.from_dict(obj.get("WorkspacesWriteAutopilotObjectiveRequest")) workspaces_write_autopilot_objective_result = WorkspacesWriteAutopilotObjectiveResult.from_dict(obj.get("WorkspacesWriteAutopilotObjectiveResult")) + session_auth_info_result = from_union([HMACAuthInfoClass.from_dict, from_none], obj.get("SessionAuthInfoResult")) session_context_attribution = from_union([SessionContextAttribution.from_dict, from_none], obj.get("SessionContextAttribution")) session_context_info = from_union([SessionContextInfo.from_dict, from_none], obj.get("SessionContextInfo")) subagent_settings = from_union([SubagentSettings.from_dict, from_none], obj.get("SubagentSettings")) 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_all_users, account_get_all_users_result, account_get_current_auth_result, account_get_quota_request, account_get_quota_result, account_login_request, account_login_result, account_logout_request, account_logout_result, account_quota_snapshot, adaptive_thinking_support, agent_discovery_path, agent_discovery_path_list, agent_discovery_path_scope, agent_get_current_result, agent_info, agent_info_source, agent_list, agent_list_request, 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, agents_discover_request, agent_select_request, agent_select_result, agent_set_prompt_request, agents_get_discovery_paths_request, allow_all_permission_set_result, allow_all_permission_state, api_key_auth_info, auth_info, auth_info_type, built_in_model_catalog, built_in_model_catalog_entry, 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_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, capi_session_options, 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, completions_get_trigger_characters_result, completions_request_request, completions_request_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_exclusion_check_paths_request, content_exclusion_check_paths_result, content_exclusion_path_check, content_filter_mode, context_heaviest_message, 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, debug_collect_logs_collected_entry, debug_collect_logs_destination, debug_collect_logs_entry, debug_collect_logs_entry_kind, debug_collect_logs_include, debug_collect_logs_redaction, debug_collect_logs_request, debug_collect_logs_result, debug_collect_logs_result_kind, debug_collect_logs_skipped_entry, debug_collect_logs_source, disable_bypass_permissions_mode, discovered_canvas, discovered_extension, discovered_extension_mode, discovered_extension_plugin, discovered_extensions, discovered_extensions_disable_request, discovered_extensions_enable_request, discovered_extension_source, 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_direction, events_read_result, execute_command_params, execute_command_result, extension, extension_context_push_input, extension_launch_profile, extension_launch_provider_resolve_request, extension_launch_provider_resolve_result, 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_shell_exit, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, factory_abort_request, factory_ack_result, factory_agent_options, factory_agent_request, factory_agent_result, factory_agent_summary, factory_cancel_request, factory_current_phase, factory_declared_limits, factory_durable_operation, factory_execute_request, factory_execute_result, factory_get_run_progress_request, factory_get_run_request, factory_journal_get_request, factory_journal_get_result, factory_journal_put_request, factory_list_runs_request, factory_list_runs_result, factory_log_line, factory_log_line_kind, factory_log_request, factory_phase_observation, factory_phase_status, factory_progress_line, factory_progress_page, factory_resume_request, factory_resume_result, factory_run_consumed, factory_run_detail, factory_run_failure, factory_run_failure_kind, factory_run_limits, factory_run_request, factory_run_result, factory_run_status, factory_run_summary, factory_run_terminal, filter_mapping, fleet_start_request, fleet_start_result, folder_trust_add_params, folder_trust_check_params, folder_trust_check_result, gh_cli_auth_info, git_hub_telemetry_client_info, git_hub_telemetry_event, git_hub_telemetry_notification, handle_pending_tool_call_request, handle_pending_tool_call_result, history_abort_manual_compaction_result, history_cancel_background_compaction_result, history_clear_context_request, history_clear_context_result, history_compact_context_window, history_compact_request, history_compact_result, history_file_restore_skip_reason, history_list_rewind_points_result, history_preview_rewind_request, history_preview_rewind_result, history_rewind_change_type, history_rewind_file_preview, history_rewind_mode, history_rewind_outcome, history_rewind_point, history_rewind_request, history_rewind_result, history_rewind_unavailable_reason, history_skipped_file_restore, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, hook_invoke_request, hook_invoke_response, hook_type, installed_plugin, installed_plugin_info, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, instruction_discovery_path, instruction_discovery_path_kind, instruction_discovery_path_list, instruction_discovery_path_location, instructions_discover_request, instructions_get_discovery_paths_request, instructions_get_sources_result, instruction_source, instruction_source_location, instruction_source_type, interrupt_main_turn_request, interrupt_main_turn_result, llm_inference_headers, llm_inference_http_request_chunk_request, llm_inference_http_request_chunk_result, llm_inference_http_request_start_request, llm_inference_http_request_start_result, llm_inference_http_request_start_transport, llm_inference_http_response_chunk_error, llm_inference_http_response_chunk_request, llm_inference_http_response_chunk_result, llm_inference_http_response_start_request, llm_inference_http_response_start_result, llm_inference_set_provider_result, local_session_metadata_value, log_request, log_result, lsp_initialize_request, managed_settings_read_result, 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_headers_handle_pending_headers_refresh_request, mcp_headers_handle_pending_headers_refresh_request_request, mcp_headers_handle_pending_headers_refresh_request_result, mcp_host_state, mcp_is_server_running_request, mcp_is_server_running_result, mcp_list_tools_request, mcp_list_tools_result, mcp_oauth_authentication_state_changed_request, mcp_oauth_handle_pending_request, mcp_oauth_handle_pending_result, mcp_oauth_login_grant_type, mcp_oauth_login_request, mcp_oauth_login_result, mcp_oauth_pending_request_response, mcp_oauth_respond_request, mcp_oauth_respond_result, mcp_register_external_client_request, mcp_reload_with_config_request, mcp_remove_git_hub_result, mcp_resource, mcp_resource_annotations, mcp_resource_content, mcp_resource_icon, mcp_resources_list_request, mcp_resources_list_result, mcp_resources_list_templates_request, mcp_resources_list_templates_result, mcp_resources_read_request, mcp_resources_read_result, mcp_resource_template, 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_defer_tools, 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_tool_ui, mcp_tool_ui_visibility, mcp_unregister_external_client_request, memory_configuration, metadata_context_attribution_result, metadata_context_heaviest_messages_request, metadata_context_heaviest_messages_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_promo, 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, named_provider_config, 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_factory, 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_factory, 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_context, 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_outcome, permission_decision_reject, permission_decision_request, permission_decision_source, permission_decision_surface, 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_allow_all_mode, 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_factory, 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_read_sql_todos_with_dependencies_result, plan_sql_todo_dependency, 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, provider_add_request, provider_add_result, provider_config, provider_config_azure, provider_config_transport, provider_config_type, provider_config_wire_api, provider_endpoint, provider_endpoint_transport, provider_endpoint_type, provider_endpoint_wire_api, provider_get_endpoint_request, provider_model_config, provider_session_token, provider_token_acquire_request, provider_token_acquire_result, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_actions_job, push_attachment_git_hub_commit, push_attachment_git_hub_file, push_attachment_git_hub_file_diff, push_attachment_git_hub_file_diff_side, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_git_hub_release, push_attachment_git_hub_repository, push_attachment_git_hub_snippet, push_attachment_git_hub_tree_comparison, push_attachment_git_hub_tree_comparison_side, push_attachment_git_hub_url, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, push_git_hub_repo_ref, queue_begin_deferred_idle_drain_request, queue_begin_deferred_idle_drain_result, queue_consume_system_notifications_request, queued_command_handled, queued_command_not_handled, queued_command_result, queue_defer_session_idle_request, queue_duplicate_at_request, queue_duplicate_at_result, queue_enqueue_resume_pending_result, queue_finish_deferred_idle_drain_request, queue_finish_deferred_idle_drain_result, queue_has_pending_result, queue_insert_at_request, queue_insert_at_result, queue_insert_message, queue_move_item_request, queue_move_item_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_at_request, queue_remove_at_result, queue_remove_most_recent_result, queue_send_now_request, queue_send_now_result, queue_set_drain_paused_request, queue_snapshot_result, queue_update_text_request, queue_update_text_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, run_options, sandbox_config, sandbox_config_auth, 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, sandbox_config_user_policy_network_proxy, sandbox_config_user_policy_seatbelt, schedule_add_at_request, schedule_add_cron_request, schedule_add_request, schedule_add_result, schedule_add_self_paced_request, schedule_entry, schedule_has_self_paced_result, schedule_list, schedule_rearm_self_paced_request, 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_message_item, send_messages_request, send_messages_result, send_mode, send_request, send_result, send_system_notification_request, server_agent_list, server_instruction_source_list, server_skill, server_skill_list, session_activity, session_agent_list_request, session_auth_status, session_bulk_delete_result, session_cancel_all_background_agents_result, session_capability, session_commands_list_request, session_completion_item, 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_sqlite_transaction_error, session_fs_sqlite_transaction_error_class, session_fs_sqlite_transaction_request, session_fs_sqlite_transaction_result, session_fs_sqlite_transaction_statement, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_history_compact_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_limit_prediction_baseline_data, session_limit_prediction_client_type, session_limit_prediction_details, session_limit_prediction_predict_request, session_limit_prediction_request, session_limit_prediction_result, session_limit_prediction_source, session_limit_prediction_tier, session_limit_prediction_tier_option, session_limit_prediction_unavailable_reason, session_list, session_list_entry, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_managed_permissions, session_managed_settings, session_mcp_apps_call_tool_result, session_metadata_snapshot, session_mode, session_model_list, session_model_list_request, session_model_price_category, 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_plugins_reload_request, session_provider_get_endpoint_request, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_delete_request, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, session_settings_built_in_tool_availability_snapshot, session_settings_evaluate_predicate_request, session_settings_evaluate_predicate_result, session_settings_job_snapshot, session_settings_model_snapshot, session_settings_online_evaluation_snapshot, session_settings_predicate_name, session_settings_repo_snapshot, session_settings_snapshot, session_settings_validation_snapshot, 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_metadata_request, sessions_get_metadata_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_non_empty_session_ids_request, sessions_list_non_empty_session_ids_result, 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_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_visibility_status, 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_init_profile, shell_init_script, shell_init_script_shell, shell_kill_request, shell_kill_result, shell_kill_signal, shell_options, shutdown_request, skill, skill_discovery_path, skill_discovery_path_list, skill_discovery_scope, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_discovery_paths_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_choice, 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, subagent_settings_entry, subagent_settings_entry_context_tier, 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, tools_update_subagent_settings_result, 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_session_limits_exhausted_request, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_session_limits_exhausted_response, ui_session_limits_exhausted_response_action, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, update_subagent_settings_request, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_requested_shell_command_result, user_setting_metadata, user_settings_get_result, user_settings_set_request, user_settings_set_result, visibility_get_result, visibility_set_request, visibility_set_result, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_add_summary_request, workspaces_add_summary_result, workspaces_autopilot_objective_exists_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_delete_autopilot_objective_result, workspaces_diff_request, workspaces_ensure_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_autopilot_objective_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, workspaces_truncate_summaries_request, workspace_summary_host_type, workspaces_update_metadata_request, workspaces_workspace_details_host_type, workspaces_write_autopilot_objective_request, workspaces_write_autopilot_objective_result, session_context_attribution, session_context_info, subagent_settings, task_progress, workspace_summary) + return RPC(abort_request, abort_result, account_all_users, account_get_all_users_result, account_get_current_auth_result, account_get_quota_request, account_get_quota_result, account_login_request, account_login_result, account_logout_request, account_logout_result, account_quota_snapshot, adaptive_thinking_support, agent_discovery_path, agent_discovery_path_list, agent_discovery_path_scope, agent_get_current_result, agent_info, agent_info_source, agent_list, agent_list_request, 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, agents_discover_request, agent_select_request, agent_select_result, agent_set_prompt_request, agents_get_discovery_paths_request, allow_all_permission_set_result, allow_all_permission_state, api_key_auth_info, auth_info, auth_info_type, auth_validation_error, auth_validation_errors, built_in_model_catalog, built_in_model_catalog_entry, 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_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_provider_register_request, canvas_provider_unregister_request, canvas_session_context, capi_session_options, 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, completions_get_trigger_characters_result, completions_request_request, completions_request_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_exclusion_check_paths_request, content_exclusion_check_paths_result, content_exclusion_path_check, content_filter_mode, context_heaviest_message, 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, debug_collect_logs_collected_entry, debug_collect_logs_destination, debug_collect_logs_entry, debug_collect_logs_entry_kind, debug_collect_logs_include, debug_collect_logs_redaction, debug_collect_logs_request, debug_collect_logs_result, debug_collect_logs_result_kind, debug_collect_logs_skipped_entry, debug_collect_logs_source, disable_bypass_permissions_mode, discovered_canvas, discovered_extension, discovered_extension_mode, discovered_extension_plugin, discovered_extensions, discovered_extensions_disable_request, discovered_extensions_enable_request, discovered_extension_source, 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_direction, events_read_result, execute_command_params, execute_command_result, extension, extension_context_push_input, extension_launch_profile, extension_launch_provider_resolve_request, extension_launch_provider_resolve_result, 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_shell_exit, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, factory_abort_request, factory_ack_result, factory_agent_options, factory_agent_request, factory_agent_result, factory_agent_summary, factory_cancel_request, factory_current_phase, factory_declared_limits, factory_durable_operation, factory_execute_request, factory_execute_result, factory_get_run_progress_request, factory_get_run_request, factory_journal_get_request, factory_journal_get_result, factory_journal_put_request, factory_list_runs_request, factory_list_runs_result, factory_log_line, factory_log_line_kind, factory_log_request, factory_phase_observation, factory_phase_status, factory_progress_line, factory_progress_page, factory_resume_request, factory_resume_result, factory_run_consumed, factory_run_detail, factory_run_failure, factory_run_failure_kind, factory_run_limits, factory_run_request, factory_run_result, factory_run_status, factory_run_summary, factory_run_terminal, filter_mapping, fleet_start_request, fleet_start_result, folder_trust_add_params, folder_trust_check_params, folder_trust_check_result, gh_cli_auth_info, git_hub_telemetry_client_info, git_hub_telemetry_event, git_hub_telemetry_notification, handle_pending_tool_call_request, handle_pending_tool_call_result, history_abort_manual_compaction_result, history_cancel_background_compaction_result, history_clear_context_request, history_clear_context_result, history_compact_context_window, history_compact_request, history_compact_result, history_file_restore_skip_reason, history_list_rewind_points_result, history_preview_rewind_request, history_preview_rewind_result, history_rewind_change_type, history_rewind_file_preview, history_rewind_mode, history_rewind_outcome, history_rewind_point, history_rewind_request, history_rewind_result, history_rewind_unavailable_reason, history_skipped_file_restore, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, hook_invoke_request, hook_invoke_response, hook_type, installed_plugin, installed_plugin_info, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, instruction_discovery_path, instruction_discovery_path_kind, instruction_discovery_path_list, instruction_discovery_path_location, instructions_discover_request, instructions_get_discovery_paths_request, instructions_get_sources_result, instruction_source, instruction_source_location, instruction_source_type, interrupt_main_turn_request, interrupt_main_turn_result, llm_inference_headers, llm_inference_http_request_chunk_request, llm_inference_http_request_chunk_result, llm_inference_http_request_start_request, llm_inference_http_request_start_result, llm_inference_http_request_start_transport, llm_inference_http_response_chunk_error, llm_inference_http_response_chunk_request, llm_inference_http_response_chunk_result, llm_inference_http_response_start_request, llm_inference_http_response_start_result, llm_inference_set_provider_result, local_session_metadata_value, log_request, log_result, lsp_initialize_request, managed_settings_read_result, 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_elicitation_form_mode, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_failed_server, mcp_filtered_server, mcp_headers_handle_pending_headers_refresh_request, mcp_headers_handle_pending_headers_refresh_request_request, mcp_headers_handle_pending_headers_refresh_request_result, mcp_host_state, mcp_is_server_running_request, mcp_is_server_running_result, mcp_list_tools_request, mcp_list_tools_result, mcp_oauth_authentication_state_changed_request, mcp_oauth_handle_pending_request, mcp_oauth_handle_pending_result, mcp_oauth_login_grant_type, mcp_oauth_login_request, mcp_oauth_login_result, mcp_oauth_pending_request_response, mcp_oauth_probe_needs_auth_reason, mcp_oauth_probe_request, mcp_oauth_probe_result, mcp_oauth_respond_request, mcp_oauth_respond_result, mcp_register_external_client_request, mcp_reload_config, mcp_reload_with_config_request, mcp_remove_git_hub_result, mcp_resource, mcp_resource_annotations, mcp_resource_content, mcp_resource_icon, mcp_resources_list_request, mcp_resources_list_result, mcp_resources_list_templates_request, mcp_resources_list_templates_result, mcp_resources_read_request, mcp_resources_read_result, mcp_resource_template, mcp_restart_server_request, mcp_safe_for_telemetry, mcp_safe_for_telemetry_fields, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_serializable_server_config, mcp_server, mcp_server_auth_config, mcp_server_auth_config_redirect_port, mcp_server_config, mcp_server_config_defer_tools, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_memory, mcp_server_config_memory_type, mcp_server_config_stdio, mcp_server_config_stdio_type, 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_task_metadata, mcp_tools, mcp_tool_ui, mcp_tool_ui_visibility, mcp_unregister_external_client_request, memory_configuration, metadata_context_attribution_result, metadata_context_heaviest_messages_request, metadata_context_heaviest_messages_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_promo, 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, named_provider_config, 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_env_access, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_factory, 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_env_access, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_factory, 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_context, 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_outcome, permission_decision_reject, permission_decision_request, permission_decision_source, permission_decision_surface, 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_allow_all_mode, 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_env_access, permissions_locations_add_tool_approval_details_extension_management, permissions_locations_add_tool_approval_details_extension_permission_access, permissions_locations_add_tool_approval_details_factory, 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_read_sql_todos_with_dependencies_result, plan_sql_todo_dependency, plan_sql_todos_row, plan_update_request, plugin, plugin_install_result, plugin_list, plugin_list_result, plugins_builtin_set_request, 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, provider_add_request, provider_add_result, provider_config, provider_config_azure, provider_config_transport, provider_config_type, provider_config_wire_api, provider_endpoint, provider_endpoint_transport, provider_endpoint_type, provider_endpoint_wire_api, provider_get_endpoint_request, provider_model_config, provider_session_token, provider_token_acquire_request, provider_token_acquire_result, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_actions_job, push_attachment_git_hub_commit, push_attachment_git_hub_file, push_attachment_git_hub_file_diff, push_attachment_git_hub_file_diff_side, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_git_hub_release, push_attachment_git_hub_repository, push_attachment_git_hub_snippet, push_attachment_git_hub_tree_comparison, push_attachment_git_hub_tree_comparison_side, push_attachment_git_hub_url, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, push_git_hub_repo_ref, queue_begin_deferred_idle_drain_request, queue_begin_deferred_idle_drain_result, queue_consume_system_notifications_request, queued_command_handled, queued_command_not_handled, queued_command_result, queue_defer_session_idle_request, queue_duplicate_at_request, queue_duplicate_at_result, queue_enqueue_resume_pending_result, queue_finish_deferred_idle_drain_request, queue_finish_deferred_idle_drain_result, queue_has_pending_result, queue_insert_at_request, queue_insert_at_result, queue_insert_message, queue_move_item_request, queue_move_item_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_at_request, queue_remove_at_result, queue_remove_most_recent_result, queue_send_now_request, queue_send_now_result, queue_set_drain_paused_request, queue_snapshot_result, queue_update_text_request, queue_update_text_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_host_status, remote_session_metadata_repository, remote_session_metadata_task_type, remote_session_metadata_value, remote_session_mode, remote_session_repository, run_options, sandbox_config, sandbox_config_auth, 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, sandbox_config_user_policy_network_proxy, sandbox_config_user_policy_seatbelt, schedule_add_at_request, schedule_add_cron_request, schedule_add_request, schedule_add_result, schedule_add_self_paced_request, schedule_entry, schedule_has_self_paced_result, schedule_list, schedule_rearm_self_paced_request, 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_message_item, send_messages_request, send_messages_result, send_mode, send_request, send_result, send_system_notification_request, server_agent_list, server_instruction_source_list, server_skill, server_skill_list, session_activity, session_agent_list_request, session_auth_login_request, session_auth_logout_user_request, session_auth_status, session_auth_switch_request, session_bulk_delete_result, session_cancel_all_background_agents_result, session_capability, session_commands_list_request, session_completion_item, 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_sqlite_transaction_error, session_fs_sqlite_transaction_error_class, session_fs_sqlite_transaction_request, session_fs_sqlite_transaction_result, session_fs_sqlite_transaction_statement, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_git_hub_auth_get_all_auth_available_result, session_git_hub_auth_logout_result, session_git_hub_auth_logout_user_result, session_history_compact_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_limit_prediction_baseline_data, session_limit_prediction_client_type, session_limit_prediction_details, session_limit_prediction_predict_request, session_limit_prediction_request, session_limit_prediction_result, session_limit_prediction_source, session_limit_prediction_tier, session_limit_prediction_tier_option, session_limit_prediction_unavailable_reason, session_list, session_list_entry, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_managed_permissions, session_managed_settings, session_mcp_apps_call_tool_result, session_metadata_snapshot, session_mode, session_model_list, session_model_list_request, session_model_price_category, 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_plugins_reload_request, session_provider_get_endpoint_request, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_delete_request, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, session_settings_built_in_tool_availability_snapshot, session_settings_evaluate_predicate_request, session_settings_evaluate_predicate_result, session_settings_job_snapshot, session_settings_model_snapshot, session_settings_online_evaluation_snapshot, session_settings_predicate_name, session_settings_repo_snapshot, session_settings_snapshot, session_settings_validation_snapshot, 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_metadata_request, sessions_get_metadata_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_non_empty_session_ids_request, sessions_list_non_empty_session_ids_result, 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_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_visibility_status, 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_init_profile, shell_init_script, shell_init_script_shell, shell_kill_request, shell_kill_result, shell_kill_signal, shell_options, shutdown_request, skill, skill_discovery_path, skill_discovery_path_list, skill_discovery_scope, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_discovery_paths_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_choice, 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, subagent_settings_entry, subagent_settings_entry_context_tier, 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, tools_update_subagent_settings_result, 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_session_limits_exhausted_request, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_session_limits_exhausted_response, ui_session_limits_exhausted_response_action, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, update_subagent_settings_request, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_requested_shell_command_result, user_setting_metadata, user_settings_get_result, user_settings_set_request, user_settings_set_result, visibility_get_result, visibility_set_request, visibility_set_result, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_add_summary_request, workspaces_add_summary_result, workspaces_autopilot_objective_exists_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_delete_autopilot_objective_result, workspaces_diff_request, workspaces_ensure_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_autopilot_objective_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, workspaces_truncate_summaries_request, workspace_summary_host_type, workspaces_update_metadata_request, workspaces_workspace_details_host_type, workspaces_write_autopilot_objective_request, workspaces_write_autopilot_objective_result, session_auth_info_result, session_context_attribution, session_context_info, subagent_settings, task_progress, workspace_summary) def to_dict(self) -> dict: result: dict = {} @@ -30893,6 +32787,8 @@ 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["AuthValidationError"] = to_class(AuthValidationError, self.auth_validation_error) + result["AuthValidationErrors"] = from_list(lambda x: to_class(AuthValidationError, x), self.auth_validation_errors) result["BuiltInModelCatalog"] = to_class(BuiltInModelCatalog, self.built_in_model_catalog) result["BuiltInModelCatalogEntry"] = to_class(BuiltInModelCatalogEntry, self.built_in_model_catalog_entry) result["CancelUserRequestedShellCommandResult"] = to_class(CancelUserRequestedShellCommandResult, self.cancel_user_requested_shell_command_result) @@ -30910,6 +32806,8 @@ def to_dict(self) -> dict: result["CanvasProviderInvokeActionRequest"] = to_class(CanvasProviderInvokeActionRequest, self.canvas_provider_invoke_action_request) result["CanvasProviderOpenRequest"] = to_class(CanvasProviderOpenRequest, self.canvas_provider_open_request) result["CanvasProviderOpenResult"] = to_class(CanvasProviderOpenResult, self.canvas_provider_open_result) + result["CanvasProviderRegisterRequest"] = to_class(CanvasProviderRegisterRequest, self.canvas_provider_register_request) + result["CanvasProviderUnregisterRequest"] = to_class(CanvasProviderUnregisterRequest, self.canvas_provider_unregister_request) result["CanvasSessionContext"] = to_class(CanvasSessionContext, self.canvas_session_context) result["CapiSessionOptions"] = to_class(CapiSessionOptions, self.capi_session_options) result["CommandList"] = to_class(CommandList, self.command_list) @@ -31159,10 +33057,12 @@ def to_dict(self) -> dict: 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) + result["McpElicitationFormMode"] = to_enum(MCPElicitationFormMode, self.mcp_elicitation_form_mode) result["McpEnableRequest"] = to_class(MCPEnableRequest, self.mcp_enable_request) 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["McpFailedServer"] = to_class(MCPFailedServer, self.mcp_failed_server) result["McpFilteredServer"] = to_class(MCPFilteredServer, self.mcp_filtered_server) result["McpHeadersHandlePendingHeadersRefreshRequest"] = to_class(MCPHeadersHandlePendingHeadersRefreshRequest, self.mcp_headers_handle_pending_headers_refresh_request) result["McpHeadersHandlePendingHeadersRefreshRequestRequest"] = to_class(MCPHeadersHandlePendingHeadersRefreshRequestRequest, self.mcp_headers_handle_pending_headers_refresh_request_request) @@ -31179,9 +33079,13 @@ def to_dict(self) -> dict: result["McpOauthLoginRequest"] = to_class(MCPOauthLoginRequest, self.mcp_oauth_login_request) result["McpOauthLoginResult"] = to_class(MCPOauthLoginResult, self.mcp_oauth_login_result) result["McpOauthPendingRequestResponse"] = to_class(MCPOauthPendingRequestResponse, self.mcp_oauth_pending_request_response) + result["McpOauthProbeNeedsAuthReason"] = to_enum(MCPOauthProbeNeedsAuthReason, self.mcp_oauth_probe_needs_auth_reason) + result["McpOauthProbeRequest"] = to_class(MCPOauthProbeRequest, self.mcp_oauth_probe_request) + result["McpOauthProbeResult"] = to_class(MCPOauthProbeResult, self.mcp_oauth_probe_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["McpReloadConfig"] = to_class(MCPReloadConfig, self.mcp_reload_config) result["McpReloadWithConfigRequest"] = to_class(MCPReloadWithConfigRequest, self.mcp_reload_with_config_request) result["McpRemoveGitHubResult"] = to_class(MCPRemoveGitHubResult, self.mcp_remove_git_hub_result) result["McpResource"] = to_class(MCPResource, self.mcp_resource) @@ -31196,8 +33100,11 @@ def to_dict(self) -> dict: result["McpResourcesReadResult"] = to_class(MCPResourcesReadResult, self.mcp_resources_read_result) result["McpResourceTemplate"] = to_class(MCPResourceTemplate, self.mcp_resource_template) result["McpRestartServerRequest"] = to_class(MCPRestartServerRequest, self.mcp_restart_server_request) + result["McpSafeForTelemetry"] = from_union([from_bool, lambda x: to_class(MCPSafeForTelemetryFields, x)], self.mcp_safe_for_telemetry) + result["McpSafeForTelemetryFields"] = to_class(MCPSafeForTelemetryFields, self.mcp_safe_for_telemetry_fields) result["McpSamplingExecutionAction"] = to_enum(MCPSamplingExecutionAction, self.mcp_sampling_execution_action) result["McpSamplingExecutionResult"] = to_class(MCPSamplingExecutionResult, self.mcp_sampling_execution_result) + result["McpSerializableServerConfig"] = to_class(MCPSerializableServerConfig, self.mcp_serializable_server_config) result["McpServer"] = to_class(MCPServer, self.mcp_server) result["McpServerAuthConfig"] = from_union([from_bool, lambda x: to_class(MCPServerAuthConfigRedirectPort, x)], self.mcp_server_auth_config) result["McpServerAuthConfigRedirectPort"] = to_class(MCPServerAuthConfigRedirectPort, self.mcp_server_auth_config_redirect_port) @@ -31206,7 +33113,10 @@ def to_dict(self) -> dict: result["McpServerConfigHttp"] = to_class(MCPServerConfigHTTP, self.mcp_server_config_http) result["McpServerConfigHttpOauthGrantType"] = to_enum(MCPGrantType, self.mcp_server_config_http_oauth_grant_type) result["McpServerConfigHttpType"] = to_enum(MCPServerConfigHTTPType, self.mcp_server_config_http_type) + result["McpServerConfigMemory"] = to_class(MCPServerConfigMemory, self.mcp_server_config_memory) + result["McpServerConfigMemoryType"] = to_enum(MCPServerConfigMemoryType, self.mcp_server_config_memory_type) result["McpServerConfigStdio"] = to_class(MCPServerConfigStdio, self.mcp_server_config_stdio) + result["McpServerConfigStdioType"] = to_enum(MCPServerConfigStdioType, self.mcp_server_config_stdio_type) 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) @@ -31216,6 +33126,7 @@ def to_dict(self) -> dict: 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["McpTaskMetadata"] = to_class(MCPTaskMetadata, self.mcp_task_metadata) result["McpTools"] = to_class(MCPTools, self.mcp_tools) result["McpToolUi"] = to_class(MCPToolUI, self.mcp_tool_ui) result["McpToolUiVisibility"] = to_enum(MCPToolUIVisibility, self.mcp_tool_ui_visibility) @@ -31286,6 +33197,7 @@ def to_dict(self) -> dict: result["PermissionDecisionApproveForLocationApproval"] = (self.permission_decision_approve_for_location_approval).to_dict() result["PermissionDecisionApproveForLocationApprovalCommands"] = to_class(PermissionDecisionApproveForLocationApprovalCommands, self.permission_decision_approve_for_location_approval_commands) result["PermissionDecisionApproveForLocationApprovalCustomTool"] = to_class(PermissionDecisionApproveForLocationApprovalCustomTool, self.permission_decision_approve_for_location_approval_custom_tool) + result["PermissionDecisionApproveForLocationApprovalExtensionEnvAccess"] = to_class(PermissionDecisionApproveForLocationApprovalExtensionEnvAccess, self.permission_decision_approve_for_location_approval_extension_env_access) result["PermissionDecisionApproveForLocationApprovalExtensionManagement"] = to_class(PermissionDecisionApproveForLocationApprovalExtensionManagement, self.permission_decision_approve_for_location_approval_extension_management) result["PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess"] = to_class(PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess, self.permission_decision_approve_for_location_approval_extension_permission_access) result["PermissionDecisionApproveForLocationApprovalFactory"] = to_class(PermissionDecisionApproveForLocationApprovalFactory, self.permission_decision_approve_for_location_approval_factory) @@ -31298,6 +33210,7 @@ def to_dict(self) -> dict: result["PermissionDecisionApproveForSessionApproval"] = (self.permission_decision_approve_for_session_approval).to_dict() result["PermissionDecisionApproveForSessionApprovalCommands"] = to_class(PermissionDecisionApproveForSessionApprovalCommands, self.permission_decision_approve_for_session_approval_commands) result["PermissionDecisionApproveForSessionApprovalCustomTool"] = to_class(PermissionDecisionApproveForSessionApprovalCustomTool, self.permission_decision_approve_for_session_approval_custom_tool) + result["PermissionDecisionApproveForSessionApprovalExtensionEnvAccess"] = to_class(PermissionDecisionApproveForSessionApprovalExtensionEnvAccess, self.permission_decision_approve_for_session_approval_extension_env_access) result["PermissionDecisionApproveForSessionApprovalExtensionManagement"] = to_class(PermissionDecisionApproveForSessionApprovalExtensionManagement, self.permission_decision_approve_for_session_approval_extension_management) result["PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess"] = to_class(PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess, self.permission_decision_approve_for_session_approval_extension_permission_access) result["PermissionDecisionApproveForSessionApprovalFactory"] = to_class(PermissionDecisionApproveForSessionApprovalFactory, self.permission_decision_approve_for_session_approval_factory) @@ -31350,6 +33263,7 @@ def to_dict(self) -> dict: result["PermissionsLocationsAddToolApprovalDetails"] = (self.permissions_locations_add_tool_approval_details).to_dict() result["PermissionsLocationsAddToolApprovalDetailsCommands"] = to_class(PermissionsLocationsAddToolApprovalDetailsCommands, self.permissions_locations_add_tool_approval_details_commands) result["PermissionsLocationsAddToolApprovalDetailsCustomTool"] = to_class(PermissionsLocationsAddToolApprovalDetailsCustomTool, self.permissions_locations_add_tool_approval_details_custom_tool) + result["PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess"] = to_class(PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess, self.permissions_locations_add_tool_approval_details_extension_env_access) result["PermissionsLocationsAddToolApprovalDetailsExtensionManagement"] = to_class(PermissionsLocationsAddToolApprovalDetailsExtensionManagement, self.permissions_locations_add_tool_approval_details_extension_management) result["PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess"] = to_class(PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess, self.permissions_locations_add_tool_approval_details_extension_permission_access) result["PermissionsLocationsAddToolApprovalDetailsFactory"] = to_class(PermissionsLocationsAddToolApprovalDetailsFactory, self.permissions_locations_add_tool_approval_details_factory) @@ -31391,6 +33305,7 @@ def to_dict(self) -> dict: 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["PluginsBuiltinSetRequest"] = to_class(PluginsBuiltinSetRequest, self.plugins_builtin_set_request) 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) @@ -31493,6 +33408,7 @@ def to_dict(self) -> dict: 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["RemoteSessionHostStatus"] = to_enum(RemoteSessionHostStatus, self.remote_session_host_status) 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) @@ -31536,7 +33452,10 @@ def to_dict(self) -> dict: result["ServerSkillList"] = to_class(ServerSkillList, self.server_skill_list) result["SessionActivity"] = to_class(SessionActivity, self.session_activity) result["SessionAgentListRequest"] = to_class(SessionAgentListRequest, self.session_agent_list_request) + result["SessionAuthLoginRequest"] = to_class(SessionAuthLoginRequest, self.session_auth_login_request) + result["SessionAuthLogoutUserRequest"] = to_class(SessionAuthLogoutUserRequest, self.session_auth_logout_user_request) result["SessionAuthStatus"] = to_class(SessionAuthStatus, self.session_auth_status) + result["SessionAuthSwitchRequest"] = to_class(SessionAuthSwitchRequest, self.session_auth_switch_request) result["SessionBulkDeleteResult"] = to_class(SessionBulkDeleteResult, self.session_bulk_delete_result) result["SessionCancelAllBackgroundAgentsResult"] = from_int(self.session_cancel_all_background_agents_result) result["SessionCapability"] = to_enum(SessionCapability, self.session_capability) @@ -31578,6 +33497,9 @@ def to_dict(self) -> dict: result["SessionFsStatRequest"] = to_class(SessionFSStatRequest, self.session_fs_stat_request) result["SessionFsStatResult"] = to_class(SessionFSStatResult, self.session_fs_stat_result) result["SessionFsWriteFileRequest"] = to_class(SessionFSWriteFileRequest, self.session_fs_write_file_request) + result["SessionGitHubAuthGetAllAuthAvailableResult"] = from_list(lambda x: to_class(SessionAuthStatus, x), self.session_git_hub_auth_get_all_auth_available_result) + result["SessionGitHubAuthLogoutResult"] = from_bool(self.session_git_hub_auth_logout_result) + result["SessionGitHubAuthLogoutUserResult"] = from_bool(self.session_git_hub_auth_logout_user_result) result["SessionHistoryCompactRequest"] = to_class(SessionHistoryCompactRequest, self.session_history_compact_request) result["SessionInstalledPlugin"] = to_class(SessionInstalledPlugin, self.session_installed_plugin) result["SessionInstalledPluginSource"] = from_union([lambda x: to_class(SessionInstalledPluginSource, x), from_str], self.session_installed_plugin_source) @@ -31849,6 +33771,7 @@ def to_dict(self) -> dict: result["WorkspacesWorkspaceDetailsHostType"] = to_enum(HostType, self.workspaces_workspace_details_host_type) result["WorkspacesWriteAutopilotObjectiveRequest"] = to_class(WorkspacesWriteAutopilotObjectiveRequest, self.workspaces_write_autopilot_objective_request) result["WorkspacesWriteAutopilotObjectiveResult"] = to_class(WorkspacesWriteAutopilotObjectiveResult, self.workspaces_write_autopilot_objective_result) + result["SessionAuthInfoResult"] = from_union([lambda x: to_class(HMACAuthInfoClass, x), from_none], self.session_auth_info_result) result["SessionContextAttribution"] = from_union([lambda x: to_class(SessionContextAttribution, x), from_none], self.session_context_attribution) result["SessionContextInfo"] = from_union([lambda x: to_class(SessionContextInfo, x), from_none], self.session_context_info) result["SubagentSettings"] = from_union([lambda x: to_class(SubagentSettings, x), from_none], self.subagent_settings) @@ -31932,7 +33855,7 @@ def _load_PermissionDecision(obj: Any) -> "PermissionDecision": case _: raise ValueError(f"Unknown PermissionDecision kind: {kind!r}") # Approval to persist for this location -PermissionDecisionApproveForLocationApproval = PermissionDecisionApproveForLocationApprovalCommands | PermissionDecisionApproveForLocationApprovalRead | PermissionDecisionApproveForLocationApprovalWrite | PermissionDecisionApproveForLocationApprovalMCP | PermissionDecisionApproveForLocationApprovalMCPSampling | PermissionDecisionApproveForLocationApprovalMemory | PermissionDecisionApproveForLocationApprovalCustomTool | PermissionDecisionApproveForLocationApprovalExtensionManagement | PermissionDecisionApproveForLocationApprovalFactory | PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess +PermissionDecisionApproveForLocationApproval = PermissionDecisionApproveForLocationApprovalCommands | PermissionDecisionApproveForLocationApprovalRead | PermissionDecisionApproveForLocationApprovalWrite | PermissionDecisionApproveForLocationApprovalMCP | PermissionDecisionApproveForLocationApprovalMCPSampling | PermissionDecisionApproveForLocationApprovalMemory | PermissionDecisionApproveForLocationApprovalCustomTool | PermissionDecisionApproveForLocationApprovalExtensionManagement | PermissionDecisionApproveForLocationApprovalFactory | PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess | PermissionDecisionApproveForLocationApprovalExtensionEnvAccess def _load_PermissionDecisionApproveForLocationApproval(obj: Any) -> "PermissionDecisionApproveForLocationApproval": assert isinstance(obj, dict) @@ -31948,10 +33871,11 @@ def _load_PermissionDecisionApproveForLocationApproval(obj: Any) -> "PermissionD case "extension-management": return PermissionDecisionApproveForLocationApprovalExtensionManagement.from_dict(obj) case "factory": return PermissionDecisionApproveForLocationApprovalFactory.from_dict(obj) case "extension-permission-access": return PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess.from_dict(obj) + case "extension-env-access": return PermissionDecisionApproveForLocationApprovalExtensionEnvAccess.from_dict(obj) case _: raise ValueError(f"Unknown PermissionDecisionApproveForLocationApproval kind: {kind!r}") # Session-scoped approval to remember (tool prompts only; omitted for path/url prompts) -PermissionDecisionApproveForSessionApproval = PermissionDecisionApproveForSessionApprovalCommands | PermissionDecisionApproveForSessionApprovalRead | PermissionDecisionApproveForSessionApprovalWrite | PermissionDecisionApproveForSessionApprovalMCP | PermissionDecisionApproveForSessionApprovalMCPSampling | PermissionDecisionApproveForSessionApprovalMemory | PermissionDecisionApproveForSessionApprovalCustomTool | PermissionDecisionApproveForSessionApprovalExtensionManagement | PermissionDecisionApproveForSessionApprovalFactory | PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess +PermissionDecisionApproveForSessionApproval = PermissionDecisionApproveForSessionApprovalCommands | PermissionDecisionApproveForSessionApprovalRead | PermissionDecisionApproveForSessionApprovalWrite | PermissionDecisionApproveForSessionApprovalMCP | PermissionDecisionApproveForSessionApprovalMCPSampling | PermissionDecisionApproveForSessionApprovalMemory | PermissionDecisionApproveForSessionApprovalCustomTool | PermissionDecisionApproveForSessionApprovalExtensionManagement | PermissionDecisionApproveForSessionApprovalFactory | PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess | PermissionDecisionApproveForSessionApprovalExtensionEnvAccess def _load_PermissionDecisionApproveForSessionApproval(obj: Any) -> "PermissionDecisionApproveForSessionApproval": assert isinstance(obj, dict) @@ -31967,10 +33891,11 @@ def _load_PermissionDecisionApproveForSessionApproval(obj: Any) -> "PermissionDe case "extension-management": return PermissionDecisionApproveForSessionApprovalExtensionManagement.from_dict(obj) case "factory": return PermissionDecisionApproveForSessionApprovalFactory.from_dict(obj) case "extension-permission-access": return PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess.from_dict(obj) + case "extension-env-access": return PermissionDecisionApproveForSessionApprovalExtensionEnvAccess.from_dict(obj) case _: raise ValueError(f"Unknown PermissionDecisionApproveForSessionApproval kind: {kind!r}") # Tool approval to persist and apply -PermissionsLocationsAddToolApprovalDetails = PermissionsLocationsAddToolApprovalDetailsCommands | PermissionsLocationsAddToolApprovalDetailsRead | PermissionsLocationsAddToolApprovalDetailsWrite | PermissionsLocationsAddToolApprovalDetailsMCP | PermissionsLocationsAddToolApprovalDetailsMCPSampling | PermissionsLocationsAddToolApprovalDetailsMemory | PermissionsLocationsAddToolApprovalDetailsCustomTool | PermissionsLocationsAddToolApprovalDetailsExtensionManagement | PermissionsLocationsAddToolApprovalDetailsFactory | PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess +PermissionsLocationsAddToolApprovalDetails = PermissionsLocationsAddToolApprovalDetailsCommands | PermissionsLocationsAddToolApprovalDetailsRead | PermissionsLocationsAddToolApprovalDetailsWrite | PermissionsLocationsAddToolApprovalDetailsMCP | PermissionsLocationsAddToolApprovalDetailsMCPSampling | PermissionsLocationsAddToolApprovalDetailsMemory | PermissionsLocationsAddToolApprovalDetailsCustomTool | PermissionsLocationsAddToolApprovalDetailsExtensionManagement | PermissionsLocationsAddToolApprovalDetailsFactory | PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess | PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess def _load_PermissionsLocationsAddToolApprovalDetails(obj: Any) -> "PermissionsLocationsAddToolApprovalDetails": assert isinstance(obj, dict) @@ -31986,6 +33911,7 @@ def _load_PermissionsLocationsAddToolApprovalDetails(obj: Any) -> "PermissionsLo case "extension-management": return PermissionsLocationsAddToolApprovalDetailsExtensionManagement.from_dict(obj) case "factory": return PermissionsLocationsAddToolApprovalDetailsFactory.from_dict(obj) case "extension-permission-access": return PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess.from_dict(obj) + case "extension-env-access": return PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess.from_dict(obj) case _: raise ValueError(f"Unknown PermissionsLocationsAddToolApprovalDetails kind: {kind!r}") # Attachment union accepted by push input, covering files, directories, GitHub objects, blobs, snippets, and extension context. @@ -32090,6 +34016,7 @@ def _load_TaskInfo(obj: Any) -> "TaskInfo": AccountGetAllUsersResult = list AgentListRequest = Any +AuthValidationErrors = list CanvasActionInvokeResult = Any CanvasJsonSchema = Any CommandsListRequest = Any @@ -32111,6 +34038,7 @@ def _load_TaskInfo(obj: Any) -> "TaskInfo": McpExecuteSamplingRequest = dict McpExecuteSamplingResult = dict McpOauthLoginGrantType = MCPGrantType +McpSafeForTelemetry = bool McpServerAuthConfig = bool McpServerConfigHttpOauthGrantType = MCPGrantType MetadataSnapshotRemoteMetadataTaskType = TaskType @@ -32130,9 +34058,13 @@ def _load_TaskInfo(obj: Any) -> "TaskInfo": ProviderEndpointWireApi = ProviderWireAPI ProviderGetEndpointRequest = Any RemoteSessionMetadataTaskType = TaskType +SessionAuthInfoResult = HMACAuthInfoClass SessionCancelAllBackgroundAgentsResult = int SessionContextHostType = HostType SessionFsReaddirWithTypesEntryType = DebugCollectLogsEntryKind +SessionGitHubAuthGetAllAuthAvailableResult = list +SessionGitHubAuthLogoutResult = bool +SessionGitHubAuthLogoutUserResult = bool SessionLimitPredictionRequest = Any SessionMcpAppsCallToolResult = dict SessionOpenOptionsAdditionalContentExclusionPolicyScope = AdditionalContentExclusionPolicyScope @@ -32310,6 +34242,17 @@ async def disable(self, params: DiscoveredExtensionsDisableRequest, *, timeout: await self._client.request("extensions.disable", params_dict, **_timeout_kwargs(timeout)) +# Experimental: this API group is experimental and may change or be removed. +class ServerPluginsBuiltinApi: + def __init__(self, client: "JsonRpcClient"): + self._client = client + + async def set(self, params: PluginsBuiltinSetRequest, *, timeout: float | None = None) -> None: + "Replaces this server's trusted built-in plugin directories while no sessions are active.\n\nArgs:\n params: Trusted built-in plugin directories to use for this runtime process." + params_dict = {k: v for k, v in params.to_dict().items() if v is not None} + await self._client.request("plugins.builtin.set", params_dict, **_timeout_kwargs(timeout)) + + # Experimental: this API group is experimental and may change or be removed. class ServerPluginsMarketplacesApi: def __init__(self, client: "JsonRpcClient"): @@ -32344,6 +34287,7 @@ async def refresh(self, params: PluginsMarketplacesRefreshRequest, *, timeout: f class ServerPluginsApi: def __init__(self, client: "JsonRpcClient"): self._client = client + self.builtin = ServerPluginsBuiltinApi(client) self.marketplaces = ServerPluginsMarketplacesApi(client) async def list(self, *, timeout: float | None = None) -> PluginListResult: @@ -33289,6 +35233,12 @@ async def login(self, params: MCPOauthLoginRequest, *, timeout: float | None = N params_dict["sessionId"] = self._session_id return MCPOauthLoginResult.from_dict(await self._client.request("session.mcp.oauth.login", params_dict, **_timeout_kwargs(timeout))) + async def probe(self, params: MCPOauthProbeRequest, *, timeout: float | None = None) -> MCPOauthProbeResult: + "Passively probes a configured remote MCP server to classify whether OAuth is required or a cached/override token is accepted. Does not start OAuth, emit pending OAuth requests, or mutate MCP connection state.\n\nArgs:\n params: Remote MCP server name for a passive OAuth status probe.\n\nReturns:\n Passive MCP OAuth probe result. `authenticated` means the server accepted the probe request while an OAuth-origin access token was attached; it does not prove the server required or independently validated that token. The probe does not make a second unauthenticated request. Failed is an expected probe-domain outcome; JSON-RPC errors are reserved for API-call failures." + 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 MCPOauthProbeResult.from_dict(await self._client.request("session.mcp.oauth.probe", params_dict, **_timeout_kwargs(timeout))) + async def respond(self, params: MCPOauthRespondRequest, *, timeout: float | None = None) -> MCPOauthRespondResult: "Responds to a pending MCP OAuth authorization request by its request id.\n\nArgs:\n params: Pending MCP OAuth request id to respond to.\n\nReturns:\n Indicates whether the pending MCP OAuth response was accepted." params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} @@ -34273,6 +36223,80 @@ async def log(self, params: LogRequest, *, timeout: float | None = None) -> LogR return LogResult.from_dict(await self._client.request("session.log", params_dict, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. +class _InternalGitHubAuthApi: + def __init__(self, client: "JsonRpcClient", session_id: str): + self._client = client + self._session_id = session_id + + async def _get_current_auth_info(self, *, timeout: float | None = None) -> AuthInfo | None: + "Gets the current authentication information for internal session hosts.\n\nReturns:\n Current authentication information, or null when no authentication is active.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + _result = await self._client.request("session.gitHubAuth.getCurrentAuthInfo", {"sessionId": self._session_id}, **_timeout_kwargs(timeout)) + return AuthInfo(_result) if _result is not None else None + + async def _get_all_auth_available(self, *, timeout: float | None = None) -> list: + "Gets all authentication accounts available to the internal session host.\n\nReturns:\n Authentication accounts available to the internal session host.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + return list(await self._client.request("session.gitHubAuth.getAllAuthAvailable", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + + async def _refresh_copilot_user(self, *, timeout: float | None = None) -> AuthInfo | None: + "Refreshes Copilot account metadata for the current authentication.\n\nReturns:\n Current authentication information, or null when no authentication is active.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + _result = await self._client.request("session.gitHubAuth.refreshCopilotUser", {"sessionId": self._session_id}, **_timeout_kwargs(timeout)) + return AuthInfo(_result) if _result is not None else None + + async def _login(self, params: SessionAuthLoginRequest, *, timeout: float | None = None) -> AuthInfo: + "Logs in a GitHub user through the internal session host.\n\nArgs:\n params: Internal GitHub login parameters.\n\nReturns:\n Initial authentication info for the session.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + 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 _load_AuthInfo(await self._client.request("session.gitHubAuth.login", params_dict, **_timeout_kwargs(timeout))) + + async def _switch_to_auth(self, params: SessionAuthSwitchRequest, *, timeout: float | None = None) -> None: + "Switches the session to another available authentication.\n\nArgs:\n params: Parameters for switching the session's active authentication.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + 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.gitHubAuth.switchToAuth", params_dict, **_timeout_kwargs(timeout)) + + async def _logout(self, *, timeout: float | None = None) -> bool: + "Logs out the session's current GitHub authentication.\n\nReturns:\n Whether the current authentication was logged out.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + return bool(await self._client.request("session.gitHubAuth.logout", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + + async def _logout_user(self, params: SessionAuthLogoutUserRequest, *, timeout: float | None = None) -> bool: + "Logs out a specific GitHub authentication.\n\nArgs:\n params: Parameters identifying a GitHub authentication to log out.\n\nReturns:\n Whether the requested authentication was logged out.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + 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 bool(await self._client.request("session.gitHubAuth.logoutUser", params_dict, **_timeout_kwargs(timeout))) + + async def _last_auth_errors(self, *, timeout: float | None = None) -> list: + "Gets validation errors from the most recent authentication attempt.\n\nReturns:\n Validation errors from the most recent authentication attempt.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + return list(await self._client.request("session.gitHubAuth.lastAuthErrors", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + + +# Experimental: this API group is experimental and may change or be removed. +class _InternalCanvasProviderApi: + def __init__(self, client: "JsonRpcClient", session_id: str): + self._client = client + self._session_id = session_id + + async def _register(self, params: CanvasProviderRegisterRequest, *, timeout: float | None = None) -> None: + "Registers an internal canvas provider connection and its contributions.\n\nArgs:\n params: Internal canvas provider registration parameters.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + 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.canvas.provider.register", params_dict, **_timeout_kwargs(timeout)) + + async def _unregister(self, params: CanvasProviderUnregisterRequest, *, timeout: float | None = None) -> None: + "Unregisters an internal canvas provider connection.\n\nArgs:\n params: Internal canvas provider unregistration parameters.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + 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.canvas.provider.unregister", params_dict, **_timeout_kwargs(timeout)) + + +# Experimental: this API group is experimental and may change or be removed. +class _InternalCanvasApi: + def __init__(self, client: "JsonRpcClient", session_id: str): + self._client = client + self._session_id = session_id + self.provider = _InternalCanvasProviderApi(client, session_id) + + # Experimental: this API group is experimental and may change or be removed. class _InternalMcpApi: def __init__(self, client: "JsonRpcClient", session_id: str): @@ -34418,6 +36442,8 @@ class _InternalSessionRpc: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client self._session_id = session_id + self.git_hub_auth = _InternalGitHubAuthApi(client, session_id) + self.canvas = _InternalCanvasApi(client, session_id) self.mcp = _InternalMcpApi(client, session_id) self.settings = _InternalSettingsApi(client, session_id) self.queue = _InternalQueueApi(client, session_id) @@ -34783,6 +36809,8 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "ApprovalKind", "AuthInfo", "AuthInfoType", + "AuthValidationError", + "AuthValidationErrors", "BuiltInModelCatalog", "BuiltInModelCatalogEntry", "CancelUserRequestedShellCommandResult", @@ -34803,6 +36831,8 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "CanvasProviderInvokeActionRequest", "CanvasProviderOpenRequest", "CanvasProviderOpenResult", + "CanvasProviderRegisterRequest", + "CanvasProviderUnregisterRequest", "CanvasSessionContext", "CapiSessionOptions", "Categories", @@ -34893,6 +36923,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "ExtensionsApi", "ExtensionsDisableRequest", "ExtensionsEnableRequest", + "ExternalRefMCPOauthHTTPResponse", "ExternalToolResult", "ExternalToolTextResultForLlm", "ExternalToolTextResultForLlmBinaryResultsForLlm", @@ -34973,6 +37004,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "GitHubTelemetryHandler", "GitHubTelemetryNotification", "HMACAuthInfo", + "HMACAuthInfoClass", "HMACAuthInfoType", "HandlePendingToolCallRequest", "HandlePendingToolCallResult", @@ -35073,8 +37105,10 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "MCPDisableRequest", "MCPDiscoverRequest", "MCPDiscoverResult", + "MCPElicitationFormMode", "MCPEnableRequest", "MCPExecuteSamplingParams", + "MCPFailedServer", "MCPFilteredServer", "MCPGrantType", "MCPHeadersHandlePendingHeadersRefreshRequest", @@ -35093,9 +37127,13 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "MCPOauthLoginResult", "MCPOauthPendingRequestResponse", "MCPOauthPendingRequestResponseKind", + "MCPOauthProbeNeedsAuthReason", + "MCPOauthProbeRequest", + "MCPOauthProbeResult", "MCPOauthRespondRequest", "MCPOauthRespondResult", "MCPRegisterExternalClientRequest", + "MCPReloadConfig", "MCPReloadWithConfigRequest", "MCPRemoveGitHubResult", "MCPResource", @@ -35110,15 +37148,22 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "MCPResourcesReadRequest", "MCPResourcesReadResult", "MCPRestartServerRequest", + "MCPSafeForTelemetryFields", "MCPSamplingExecutionAction", "MCPSamplingExecutionResult", + "MCPSerializableServerConfig", + "MCPSerializableServerConfigType", "MCPServer", "MCPServerAuthConfigRedirectPort", "MCPServerConfig", "MCPServerConfigDeferTools", "MCPServerConfigHTTP", "MCPServerConfigHTTPType", + "MCPServerConfigMemory", + "MCPServerConfigMemoryType", "MCPServerConfigStdio", + "MCPServerConfigStdioType", + "MCPServerConfigType", "MCPServerFailureInfo", "MCPServerList", "MCPServerNeedsAuthInfo", @@ -35128,6 +37173,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "MCPStartServerRequest", "MCPStartServersResult", "MCPStopServerRequest", + "MCPTaskMetadata", "MCPToolUI", "MCPToolUIVisibility", "MCPTools", @@ -35156,6 +37202,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "McpOauthApi", "McpOauthLoginGrantType", "McpResourcesApi", + "McpSafeForTelemetry", "McpServerAuthConfig", "McpServerConfigHttpOauthGrantType", "MemoryConfiguration", @@ -35228,6 +37275,8 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "PermissionDecisionApproveForLocationApprovalCommandsKind", "PermissionDecisionApproveForLocationApprovalCustomTool", "PermissionDecisionApproveForLocationApprovalCustomToolKind", + "PermissionDecisionApproveForLocationApprovalExtensionEnvAccess", + "PermissionDecisionApproveForLocationApprovalExtensionEnvAccessKind", "PermissionDecisionApproveForLocationApprovalExtensionManagement", "PermissionDecisionApproveForLocationApprovalExtensionManagementKind", "PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess", @@ -35239,7 +37288,6 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "PermissionDecisionApproveForLocationApprovalMCPSampling", "PermissionDecisionApproveForLocationApprovalMCPSamplingKind", "PermissionDecisionApproveForLocationApprovalMemory", - "PermissionDecisionApproveForLocationApprovalMemoryKind", "PermissionDecisionApproveForLocationApprovalRead", "PermissionDecisionApproveForLocationApprovalReadKind", "PermissionDecisionApproveForLocationApprovalWrite", @@ -35249,6 +37297,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "PermissionDecisionApproveForSessionApproval", "PermissionDecisionApproveForSessionApprovalCommands", "PermissionDecisionApproveForSessionApprovalCustomTool", + "PermissionDecisionApproveForSessionApprovalExtensionEnvAccess", "PermissionDecisionApproveForSessionApprovalExtensionManagement", "PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess", "PermissionDecisionApproveForSessionApprovalFactory", @@ -35323,6 +37372,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "PermissionsLocationsAddToolApprovalDetails", "PermissionsLocationsAddToolApprovalDetailsCommands", "PermissionsLocationsAddToolApprovalDetailsCustomTool", + "PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess", "PermissionsLocationsAddToolApprovalDetailsExtensionManagement", "PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess", "PermissionsLocationsAddToolApprovalDetailsFactory", @@ -35371,6 +37421,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "PluginUpdateAllResult", "PluginUpdateResult", "PluginsApi", + "PluginsBuiltinSetRequest", "PluginsDisableRequest", "PluginsEnableRequest", "PluginsInstallRequest", @@ -35496,6 +37547,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "RemoteNotifySteerableChangedRequest", "RemoteNotifySteerableChangedResult", "RemoteSessionConnectionResult", + "RemoteSessionHostStatus", "RemoteSessionMetadataRepository", "RemoteSessionMetadataTaskType", "RemoteSessionMetadataValue", @@ -35549,6 +37601,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "ServerMcpConfigApi", "ServerModelsApi", "ServerPluginsApi", + "ServerPluginsBuiltinApi", "ServerPluginsMarketplacesApi", "ServerRpc", "ServerRuntimeApi", @@ -35564,7 +37617,11 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "ServerUserSettingsApi", "SessionActivity", "SessionAgentListRequest", + "SessionAuthInfoResult", + "SessionAuthLoginRequest", + "SessionAuthLogoutUserRequest", "SessionAuthStatus", + "SessionAuthSwitchRequest", "SessionBulkDeleteResult", "SessionCancelAllBackgroundAgentsResult", "SessionCapability", @@ -35609,6 +37666,9 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "SessionFSWriteFileRequest", "SessionFsHandler", "SessionFsReaddirWithTypesEntryType", + "SessionGitHubAuthGetAllAuthAvailableResult", + "SessionGitHubAuthLogoutResult", + "SessionGitHubAuthLogoutUserResult", "SessionHistoryCompactRequest", "SessionInstalledPlugin", "SessionInstalledPluginSource", @@ -35774,6 +37834,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "SlashCommandSelectSubcommandResult", "SlashCommandSelectSubcommandResultKind", "SlashCommandTextResult", + "Status", "StickySource", "SubagentSettings", "SubagentSettingsEntry", diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py index 4c3a53e53..b0ae1c3f3 100644 --- a/python/copilot/generated/session_events.py +++ b/python/copilot/generated/session_events.py @@ -156,6 +156,7 @@ class SessionEventType(Enum): PENDING_MESSAGES_MODIFIED = "pending_messages.modified" ASSISTANT_TURN_START = "assistant.turn_start" ASSISTANT_TURN_RETRY = "assistant.turn_retry" + AGENT_INTERRUPTED = "agent.interrupted" ASSISTANT_INTENT = "assistant.intent" ASSISTANT_SERVER_TOOL_PROGRESS = "assistant.server_tool_progress" ASSISTANT_REASONING = "assistant.reasoning" @@ -178,6 +179,7 @@ class SessionEventType(Enum): TOOL_EXECUTION_COMPLETE = "tool.execution_complete" TOOL_SEARCH_ACTIVATED = "tool_search.activated" SKILL_INVOKED = "skill.invoked" + SANDBOX_DECISION = "sandbox.decision" SUBAGENT_STARTED = "subagent.started" SUBAGENT_COMPLETED = "subagent.completed" SUBAGENT_FAILED = "subagent.failed" @@ -1279,6 +1281,83 @@ def to_dict(self) -> dict: return result +@dataclass +class AgentInterruptedData: + "Metadata for work the user interrupted while the agent was running" + activity: AgentInterruptedActivity + elapsed: timedelta + turn: int + api_endpoint: str | None = None + cancel_phase: AgentInterruptedCancelPhase | None = None + interrupted_agent_count: int | None = None + model: str | None = None + output_ttft: timedelta | None = None + reasoning_effort: str | None = None + safe_tool_names: list[str] | None = None + tool_call_ids: list[str] | None = None + tool_names: list[str] | None = None + transport: ModelCallFailureTransport | None = None + + @staticmethod + def from_dict(obj: Any) -> "AgentInterruptedData": + assert isinstance(obj, dict) + activity = parse_enum(AgentInterruptedActivity, obj.get("activity")) + elapsed = from_timedelta(obj.get("elapsedMs")) + turn = from_int(obj.get("turn")) + api_endpoint = from_union([from_none, from_str], obj.get("apiEndpoint")) + cancel_phase = from_union([from_none, lambda x: parse_enum(AgentInterruptedCancelPhase, x)], obj.get("cancelPhase")) + interrupted_agent_count = from_union([from_none, from_int], obj.get("interruptedAgentCount")) + model = from_union([from_none, from_str], obj.get("model")) + output_ttft = from_union([from_none, from_timedelta], obj.get("outputTtftMs")) + reasoning_effort = from_union([from_none, from_str], obj.get("reasoningEffort")) + safe_tool_names = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("safeToolNames")) + tool_call_ids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("toolCallIds")) + tool_names = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("toolNames")) + transport = from_union([from_none, lambda x: parse_enum(ModelCallFailureTransport, x)], obj.get("transport")) + return AgentInterruptedData( + activity=activity, + elapsed=elapsed, + turn=turn, + api_endpoint=api_endpoint, + cancel_phase=cancel_phase, + interrupted_agent_count=interrupted_agent_count, + model=model, + output_ttft=output_ttft, + reasoning_effort=reasoning_effort, + safe_tool_names=safe_tool_names, + tool_call_ids=tool_call_ids, + tool_names=tool_names, + transport=transport, + ) + + def to_dict(self) -> dict: + result: dict = {} + result["activity"] = to_enum(AgentInterruptedActivity, self.activity) + result["elapsedMs"] = to_timedelta(self.elapsed) + result["turn"] = to_int(self.turn) + if self.api_endpoint is not None: + result["apiEndpoint"] = from_union([from_none, from_str], self.api_endpoint) + if self.cancel_phase is not None: + result["cancelPhase"] = from_union([from_none, lambda x: to_enum(AgentInterruptedCancelPhase, x)], self.cancel_phase) + if self.interrupted_agent_count is not None: + result["interruptedAgentCount"] = from_union([from_none, to_int], self.interrupted_agent_count) + if self.model is not None: + result["model"] = from_union([from_none, from_str], self.model) + if self.output_ttft is not None: + result["outputTtftMs"] = from_union([from_none, to_timedelta], self.output_ttft) + if self.reasoning_effort is not None: + result["reasoningEffort"] = from_union([from_none, from_str], self.reasoning_effort) + if self.safe_tool_names is not None: + result["safeToolNames"] = from_union([from_none, lambda x: from_list(from_str, x)], self.safe_tool_names) + if self.tool_call_ids is not None: + result["toolCallIds"] = from_union([from_none, lambda x: from_list(from_str, x)], self.tool_call_ids) + if self.tool_names is not None: + result["toolNames"] = from_union([from_none, lambda x: from_list(from_str, x)], self.tool_names) + if self.transport is not None: + result["transport"] = from_union([from_none, lambda x: to_enum(ModelCallFailureTransport, x)], self.transport) + return result + + @dataclass class AssistantIdleData: "Payload emitted whenever the main agent's processing loop goes idle, including while related background work (running agents or in-flight attached shell commands) is still pending and the session-level idle event is therefore deferred" @@ -1821,6 +1900,7 @@ def to_dict(self) -> dict: class AssistantUsageData: "LLM API call usage metrics including tokens, costs, quotas, and billing information" model: str + accepted_prediction_tokens: int | None = None api_call_id: str | None = None api_endpoint: AssistantUsageApiEndpoint | None = None # Internal: this field is an internal SDK API and is not part of the public surface. @@ -1838,6 +1918,10 @@ class AssistantUsageData: input_tokens: int | None = None interaction_type: str | None = None inter_token_latency: timedelta | None = None + is_auto: bool | None = None + is_byok: bool | None = None + max_output_tokens: int | None = None + max_prompt_tokens: int | None = None # Internal: this field is an internal SDK API and is not part of the public surface. _num_tool_calls: int | None = None output_tokens: int | None = None @@ -1847,7 +1931,9 @@ class AssistantUsageData: # Internal: this field is an internal SDK API and is not part of the public surface. _quota_snapshots: dict[str, _AssistantUsageQuotaSnapshot] | None = None reasoning_effort: str | None = None + reasoning_summary: ReasoningSummary | None = None reasoning_tokens: int | None = None + rejected_prediction_tokens: int | None = None rte: bool | None = None service_request_id: str | None = None time_to_first_token: timedelta | None = None @@ -1855,11 +1941,13 @@ class AssistantUsageData: _tool_counts: dict[str, int] | None = None # Internal: this field is an internal SDK API and is not part of the public surface. _tool_token_count: int | None = None + transport: AssistantUsageTransport | None = None @staticmethod def from_dict(obj: Any) -> "AssistantUsageData": assert isinstance(obj, dict) model = from_str(obj.get("model")) + accepted_prediction_tokens = from_union([from_none, from_int], obj.get("acceptedPredictionTokens")) api_call_id = from_union([from_none, from_str], obj.get("apiCallId")) api_endpoint = from_union([from_none, lambda x: parse_enum(AssistantUsageApiEndpoint, x)], obj.get("apiEndpoint")) _available_tool_count = from_union([from_none, from_int], obj.get("availableToolCount")) @@ -1875,20 +1963,28 @@ def from_dict(obj: Any) -> "AssistantUsageData": input_tokens = from_union([from_none, from_int], obj.get("inputTokens")) interaction_type = from_union([from_none, from_str], obj.get("interactionType")) inter_token_latency = from_union([from_none, from_timedelta], obj.get("interTokenLatencyMs")) + is_auto = from_union([from_none, from_bool], obj.get("isAuto")) + is_byok = from_union([from_none, from_bool], obj.get("isByok")) + max_output_tokens = from_union([from_none, from_int], obj.get("maxOutputTokens")) + max_prompt_tokens = from_union([from_none, from_int], obj.get("maxPromptTokens")) _num_tool_calls = from_union([from_none, from_int], obj.get("numToolCalls")) output_tokens = from_union([from_none, from_int], obj.get("outputTokens")) parent_tool_call_id = from_union([from_none, from_str], obj.get("parentToolCallId")) provider_call_id = from_union([from_none, from_str], obj.get("providerCallId")) _quota_snapshots = from_union([from_none, lambda x: from_dict(_AssistantUsageQuotaSnapshot.from_dict, x)], obj.get("quotaSnapshots")) reasoning_effort = from_union([from_none, from_str], obj.get("reasoningEffort")) + reasoning_summary = from_union([from_none, lambda x: parse_enum(ReasoningSummary, x)], obj.get("reasoningSummary")) reasoning_tokens = from_union([from_none, from_int], obj.get("reasoningTokens")) + rejected_prediction_tokens = from_union([from_none, from_int], obj.get("rejectedPredictionTokens")) rte = from_union([from_none, from_bool], obj.get("rte")) service_request_id = from_union([from_none, from_str], obj.get("serviceRequestId")) time_to_first_token = from_union([from_none, from_timedelta], obj.get("timeToFirstTokenMs")) _tool_counts = from_union([from_none, lambda x: from_dict(from_int, x)], obj.get("toolCounts")) _tool_token_count = from_union([from_none, from_int], obj.get("toolTokenCount")) + transport = from_union([from_none, lambda x: parse_enum(AssistantUsageTransport, x)], obj.get("transport")) return AssistantUsageData( model=model, + accepted_prediction_tokens=accepted_prediction_tokens, api_call_id=api_call_id, api_endpoint=api_endpoint, _available_tool_count=_available_tool_count, @@ -1904,23 +2000,32 @@ def from_dict(obj: Any) -> "AssistantUsageData": input_tokens=input_tokens, interaction_type=interaction_type, inter_token_latency=inter_token_latency, + is_auto=is_auto, + is_byok=is_byok, + max_output_tokens=max_output_tokens, + max_prompt_tokens=max_prompt_tokens, _num_tool_calls=_num_tool_calls, output_tokens=output_tokens, parent_tool_call_id=parent_tool_call_id, provider_call_id=provider_call_id, _quota_snapshots=_quota_snapshots, reasoning_effort=reasoning_effort, + reasoning_summary=reasoning_summary, reasoning_tokens=reasoning_tokens, + rejected_prediction_tokens=rejected_prediction_tokens, rte=rte, service_request_id=service_request_id, time_to_first_token=time_to_first_token, _tool_counts=_tool_counts, _tool_token_count=_tool_token_count, + transport=transport, ) def to_dict(self) -> dict: result: dict = {} result["model"] = from_str(self.model) + if self.accepted_prediction_tokens is not None: + result["acceptedPredictionTokens"] = from_union([from_none, to_int], self.accepted_prediction_tokens) if self.api_call_id is not None: result["apiCallId"] = from_union([from_none, from_str], self.api_call_id) if self.api_endpoint is not None: @@ -1951,6 +2056,14 @@ def to_dict(self) -> dict: result["interactionType"] = from_union([from_none, from_str], self.interaction_type) if self.inter_token_latency is not None: result["interTokenLatencyMs"] = from_union([from_none, to_timedelta], self.inter_token_latency) + if self.is_auto is not None: + result["isAuto"] = from_union([from_none, from_bool], self.is_auto) + if self.is_byok is not None: + result["isByok"] = from_union([from_none, from_bool], self.is_byok) + if self.max_output_tokens is not None: + result["maxOutputTokens"] = from_union([from_none, to_int], self.max_output_tokens) + if self.max_prompt_tokens is not None: + result["maxPromptTokens"] = from_union([from_none, to_int], self.max_prompt_tokens) if self._num_tool_calls is not None: result["numToolCalls"] = from_union([from_none, to_int], self._num_tool_calls) if self.output_tokens is not None: @@ -1963,8 +2076,12 @@ def to_dict(self) -> dict: result["quotaSnapshots"] = from_union([from_none, lambda x: from_dict(lambda x: to_class(_AssistantUsageQuotaSnapshot, x), x)], self._quota_snapshots) if self.reasoning_effort is not None: result["reasoningEffort"] = from_union([from_none, from_str], self.reasoning_effort) + if self.reasoning_summary is not None: + result["reasoningSummary"] = from_union([from_none, lambda x: to_enum(ReasoningSummary, x)], self.reasoning_summary) if self.reasoning_tokens is not None: result["reasoningTokens"] = from_union([from_none, to_int], self.reasoning_tokens) + if self.rejected_prediction_tokens is not None: + result["rejectedPredictionTokens"] = from_union([from_none, to_int], self.rejected_prediction_tokens) if self.rte is not None: result["rte"] = from_union([from_none, from_bool], self.rte) if self.service_request_id is not None: @@ -1975,6 +2092,8 @@ def to_dict(self) -> dict: result["toolCounts"] = from_union([from_none, lambda x: from_dict(to_int, x)], self._tool_counts) if self._tool_token_count is not None: result["toolTokenCount"] = from_union([from_none, to_int], self._tool_token_count) + if self.transport is not None: + result["transport"] = from_union([from_none, lambda x: to_enum(AssistantUsageTransport, x)], self.transport) return result @@ -3314,6 +3433,7 @@ class ExitPlanModeRequestedData: recommended_action: ExitPlanModeAction request_id: str summary: str + model: str | None = None @staticmethod def from_dict(obj: Any) -> "ExitPlanModeRequestedData": @@ -3323,12 +3443,14 @@ def from_dict(obj: Any) -> "ExitPlanModeRequestedData": recommended_action = parse_enum(ExitPlanModeAction, obj.get("recommendedAction")) request_id = from_str(obj.get("requestId")) summary = from_str(obj.get("summary")) + model = from_union([from_none, from_str], obj.get("model")) return ExitPlanModeRequestedData( actions=actions, plan_content=plan_content, recommended_action=recommended_action, request_id=request_id, summary=summary, + model=model, ) def to_dict(self) -> dict: @@ -3338,6 +3460,8 @@ def to_dict(self) -> dict: result["recommendedAction"] = to_enum(ExitPlanModeAction, self.recommended_action) result["requestId"] = from_str(self.request_id) result["summary"] = from_str(self.summary) + if self.model is not None: + result["model"] = from_union([from_none, from_str], self.model) return result @@ -4679,6 +4803,42 @@ def to_dict(self) -> dict: return result +@dataclass +class PermissionPromptRequestExtensionEnvAccess: + "Extension sensitive environment variable access prompt" + environment_variables: list[str] + extension_name: str + kind: ClassVar[str] = "extension-env-access" + # Experimental: this field is part of an experimental API and may change or be removed. + auto_approval: PermissionAutoApproval | None = None + tool_call_id: str | None = None + + @staticmethod + def from_dict(obj: Any) -> "PermissionPromptRequestExtensionEnvAccess": + assert isinstance(obj, dict) + environment_variables = from_list(from_str, obj.get("environmentVariables")) + extension_name = from_str(obj.get("extensionName")) + auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) + tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + return PermissionPromptRequestExtensionEnvAccess( + environment_variables=environment_variables, + extension_name=extension_name, + auto_approval=auto_approval, + tool_call_id=tool_call_id, + ) + + def to_dict(self) -> dict: + result: dict = {} + result["environmentVariables"] = from_list(from_str, self.environment_variables) + result["extensionName"] = from_str(self.extension_name) + result["kind"] = self.kind + if self.auto_approval is not None: + result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) + if self.tool_call_id is not None: + result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + return result + + @dataclass class PermissionPromptRequestExtensionManagement: "Extension management permission prompt" @@ -4901,6 +5061,8 @@ class PermissionPromptRequestMcp: args: Any = None # Experimental: this field is part of an experimental API and may change or be removed. auto_approval: PermissionAutoApproval | None = None + # Experimental: this field is part of an experimental API and may change or be removed. + permission_recommendation: PermissionRecommendation | None = None tool_call_id: str | None = None @staticmethod @@ -4911,6 +5073,7 @@ def from_dict(obj: Any) -> "PermissionPromptRequestMcp": tool_title = from_str(obj.get("toolTitle")) args = obj.get("args") auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) + permission_recommendation = from_union([from_none, lambda x: parse_enum(PermissionRecommendation, x)], obj.get("permissionRecommendation")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionPromptRequestMcp( server_name=server_name, @@ -4918,6 +5081,7 @@ def from_dict(obj: Any) -> "PermissionPromptRequestMcp": tool_title=tool_title, args=args, auto_approval=auto_approval, + permission_recommendation=permission_recommendation, tool_call_id=tool_call_id, ) @@ -4931,6 +5095,8 @@ def to_dict(self) -> dict: result["args"] = self.args if self.auto_approval is not None: result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) + if self.permission_recommendation is not None: + result["permissionRecommendation"] = from_union([from_none, lambda x: to_enum(PermissionRecommendation, x)], self.permission_recommendation) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) return result @@ -5220,6 +5386,36 @@ def to_dict(self) -> dict: return result +@dataclass +class PermissionRequestExtensionEnvAccess: + "Extension sensitive environment variable access request" + environment_variables: list[str] + extension_name: str + kind: ClassVar[str] = "extension-env-access" + tool_call_id: str | None = None + + @staticmethod + def from_dict(obj: Any) -> "PermissionRequestExtensionEnvAccess": + assert isinstance(obj, dict) + environment_variables = from_list(from_str, obj.get("environmentVariables")) + extension_name = from_str(obj.get("extensionName")) + tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + return PermissionRequestExtensionEnvAccess( + environment_variables=environment_variables, + extension_name=extension_name, + tool_call_id=tool_call_id, + ) + + def to_dict(self) -> dict: + result: dict = {} + result["environmentVariables"] = from_list(from_str, self.environment_variables) + result["extensionName"] = from_str(self.extension_name) + result["kind"] = self.kind + if self.tool_call_id is not None: + result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + return result + + @dataclass class PermissionRequestExtensionManagement: "Extension management permission request" @@ -5432,6 +5628,8 @@ class PermissionRequestMcp: tool_name: str tool_title: str args: Any = None + # Experimental: this field is part of an experimental API and may change or be removed. + permission_recommendation: PermissionRecommendation | None = None tool_call_id: str | None = None managed_approval_required: bool | None = None @@ -5443,6 +5641,7 @@ def from_dict(obj: Any) -> "PermissionRequestMcp": tool_name = from_str(obj.get("toolName")) tool_title = from_str(obj.get("toolTitle")) args = obj.get("args") + permission_recommendation = from_union([from_none, lambda x: parse_enum(PermissionRecommendation, x)], obj.get("permissionRecommendation")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestMcp( @@ -5451,6 +5650,7 @@ def from_dict(obj: Any) -> "PermissionRequestMcp": tool_name=tool_name, tool_title=tool_title, args=args, + permission_recommendation=permission_recommendation, tool_call_id=tool_call_id, managed_approval_required=managed_approval_required, ) @@ -5464,6 +5664,8 @@ def to_dict(self) -> dict: result["toolTitle"] = from_str(self.tool_title) if self.args is not None: result["args"] = self.args + if self.permission_recommendation is not None: + result["permissionRecommendation"] = from_union([from_none, lambda x: to_enum(PermissionRecommendation, x)], self.permission_recommendation) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) if self.managed_approval_required is not None: @@ -5964,6 +6166,18 @@ def to_dict(self) -> dict: return result +@dataclass +class SandboxDecisionData: + "Payload of `sandbox.decision`, a bounded governance record of what the process sandbox was configured to do and whether it took effect. Discriminated by `kind`." + @staticmethod + def from_dict(obj: Any) -> "SandboxDecisionData": + assert isinstance(obj, dict) + return SandboxDecisionData() + + def to_dict(self) -> dict: + return {} + + @dataclass class SessionAutopilotObjectiveChangedData: "Autopilot objective state file operation details indicating what changed" @@ -6739,6 +6953,7 @@ class SessionModelChangeData: previous_verbosity: Verbosity | None = None reasoning_effort: str | None = None reasoning_summary: ReasoningSummary | None = None + source: ModelChangeSource | None = None verbosity: Verbosity | None = None @staticmethod @@ -6753,6 +6968,7 @@ def from_dict(obj: Any) -> "SessionModelChangeData": previous_verbosity = from_union([from_none, lambda x: parse_enum(Verbosity, x)], obj.get("previousVerbosity")) reasoning_effort = from_union([from_none, from_str], obj.get("reasoningEffort")) reasoning_summary = from_union([from_none, lambda x: parse_enum(ReasoningSummary, x)], obj.get("reasoningSummary")) + source = from_union([from_none, lambda x: parse_enum(ModelChangeSource, x)], obj.get("source")) verbosity = from_union([from_none, lambda x: parse_enum(Verbosity, x)], obj.get("verbosity")) return SessionModelChangeData( new_model=new_model, @@ -6764,6 +6980,7 @@ def from_dict(obj: Any) -> "SessionModelChangeData": previous_verbosity=previous_verbosity, reasoning_effort=reasoning_effort, reasoning_summary=reasoning_summary, + source=source, verbosity=verbosity, ) @@ -6786,6 +7003,8 @@ def to_dict(self) -> dict: result["reasoningEffort"] = from_union([from_none, from_str], self.reasoning_effort) if self.reasoning_summary is not None: result["reasoningSummary"] = from_union([from_none, lambda x: to_enum(ReasoningSummary, x)], self.reasoning_summary) + if self.source is not None: + result["source"] = from_union([from_none, lambda x: to_enum(ModelChangeSource, x)], self.source) if self.verbosity is not None: result["verbosity"] = from_union([from_none, lambda x: to_enum(Verbosity, x)], self.verbosity) return result @@ -8079,6 +8298,7 @@ class SystemNotificationAgentCompleted: status: SystemNotificationAgentCompletedStatus type: ClassVar[str] = "agent_completed" description: str | None = None + display_name: str | None = None prompt: str | None = None @staticmethod @@ -8088,12 +8308,14 @@ def from_dict(obj: Any) -> "SystemNotificationAgentCompleted": agent_type = from_str(obj.get("agentType")) status = parse_enum(SystemNotificationAgentCompletedStatus, obj.get("status")) description = from_union([from_none, from_str], obj.get("description")) + display_name = from_union([from_none, from_str], obj.get("displayName")) prompt = from_union([from_none, from_str], obj.get("prompt")) return SystemNotificationAgentCompleted( agent_id=agent_id, agent_type=agent_type, status=status, description=description, + display_name=display_name, prompt=prompt, ) @@ -8105,6 +8327,8 @@ def to_dict(self) -> dict: result["type"] = self.type if self.description is not None: result["description"] = from_union([from_none, from_str], self.description) + if self.display_name is not None: + result["displayName"] = from_union([from_none, from_str], self.display_name) if self.prompt is not None: result["prompt"] = from_union([from_none, from_str], self.prompt) return result @@ -8117,6 +8341,7 @@ class SystemNotificationAgentIdle: agent_type: str type: ClassVar[str] = "agent_idle" description: str | None = None + display_name: str | None = None @staticmethod def from_dict(obj: Any) -> "SystemNotificationAgentIdle": @@ -8124,10 +8349,12 @@ def from_dict(obj: Any) -> "SystemNotificationAgentIdle": agent_id = from_str(obj.get("agentId")) agent_type = from_str(obj.get("agentType")) description = from_union([from_none, from_str], obj.get("description")) + display_name = from_union([from_none, from_str], obj.get("displayName")) return SystemNotificationAgentIdle( agent_id=agent_id, agent_type=agent_type, description=description, + display_name=display_name, ) def to_dict(self) -> dict: @@ -8137,6 +8364,8 @@ def to_dict(self) -> dict: result["type"] = self.type if self.description is not None: result["description"] = from_union([from_none, from_str], self.description) + if self.display_name is not None: + result["displayName"] = from_union([from_none, from_str], self.display_name) return result @@ -9516,6 +9745,31 @@ def to_dict(self) -> dict: return result +@dataclass +class UserToolSessionApprovalExtensionEnvAccess: + "Session-scoped tool-approval rule for an extension's access to sensitive environment variables, keyed by extension name and the exact set of variable names." + environment_variables: list[str] + extension_name: str + kind: ClassVar[str] = "extension-env-access" + + @staticmethod + def from_dict(obj: Any) -> "UserToolSessionApprovalExtensionEnvAccess": + assert isinstance(obj, dict) + environment_variables = from_list(from_str, obj.get("environmentVariables")) + extension_name = from_str(obj.get("extensionName")) + return UserToolSessionApprovalExtensionEnvAccess( + environment_variables=environment_variables, + extension_name=extension_name, + ) + + def to_dict(self) -> dict: + result: dict = {} + result["environmentVariables"] = from_list(from_str, self.environment_variables) + result["extensionName"] = from_str(self.extension_name) + result["kind"] = self.kind + return result + + @dataclass class UserToolSessionApprovalExtensionManagement: "Session-scoped tool-approval rule for extension-management operations, optionally narrowed by operation." @@ -9764,6 +10018,7 @@ def _load_PermissionPromptRequest(obj: Any) -> "PermissionPromptRequest": case "extension-management": return PermissionPromptRequestExtensionManagement.from_dict(obj) case "factory": return PermissionPromptRequestFactory.from_dict(obj) case "extension-permission-access": return PermissionPromptRequestExtensionPermissionAccess.from_dict(obj) + case "extension-env-access": return PermissionPromptRequestExtensionEnvAccess.from_dict(obj) case _: raise ValueError(f"Unknown PermissionPromptRequest kind: {kind!r}") @@ -9782,6 +10037,7 @@ def _load_PermissionRequest(obj: Any) -> "PermissionRequest": case "extension-management": return PermissionRequestExtensionManagement.from_dict(obj) case "factory": return PermissionRequestFactory.from_dict(obj) case "extension-permission-access": return PermissionRequestExtensionPermissionAccess.from_dict(obj) + case "extension-env-access": return PermissionRequestExtensionEnvAccess.from_dict(obj) case _: raise ValueError(f"Unknown PermissionRequest kind: {kind!r}") @@ -9843,6 +10099,7 @@ def _load_UserToolSessionApproval(obj: Any) -> "UserToolSessionApproval": case "extension-management": return UserToolSessionApprovalExtensionManagement.from_dict(obj) case "factory": return UserToolSessionApprovalFactory.from_dict(obj) case "extension-permission-access": return UserToolSessionApprovalExtensionPermissionAccess.from_dict(obj) + case "extension-env-access": return UserToolSessionApprovalExtensionEnvAccess.from_dict(obj) case _: raise ValueError(f"Unknown UserToolSessionApproval kind: {kind!r}") @@ -9859,11 +10116,11 @@ def _load_UserToolSessionApproval(obj: Any) -> "UserToolSessionApproval": # Derived user-facing permission prompt details for UI consumers -PermissionPromptRequest = PermissionPromptRequestCommands | PermissionPromptRequestWrite | PermissionPromptRequestRead | PermissionPromptRequestMcp | PermissionPromptRequestUrl | PermissionPromptRequestMemory | PermissionPromptRequestCustomTool | PermissionPromptRequestPath | PermissionPromptRequestHook | PermissionPromptRequestExtensionManagement | PermissionPromptRequestFactory | PermissionPromptRequestExtensionPermissionAccess +PermissionPromptRequest = PermissionPromptRequestCommands | PermissionPromptRequestWrite | PermissionPromptRequestRead | PermissionPromptRequestMcp | PermissionPromptRequestUrl | PermissionPromptRequestMemory | PermissionPromptRequestCustomTool | PermissionPromptRequestPath | PermissionPromptRequestHook | PermissionPromptRequestExtensionManagement | PermissionPromptRequestFactory | PermissionPromptRequestExtensionPermissionAccess | PermissionPromptRequestExtensionEnvAccess # Details of the permission being requested -PermissionRequest = PermissionRequestShell | PermissionRequestWrite | PermissionRequestRead | PermissionRequestMcp | PermissionRequestUrl | PermissionRequestMemory | PermissionRequestCustomTool | PermissionRequestHook | PermissionRequestExtensionManagement | PermissionRequestFactory | PermissionRequestExtensionPermissionAccess +PermissionRequest = PermissionRequestShell | PermissionRequestWrite | PermissionRequestRead | PermissionRequestMcp | PermissionRequestUrl | PermissionRequestMemory | PermissionRequestCustomTool | PermissionRequestHook | PermissionRequestExtensionManagement | PermissionRequestFactory | PermissionRequestExtensionPermissionAccess | PermissionRequestExtensionEnvAccess # Location within a cited source (character, page, or content-block range) that supports a span. @@ -9875,7 +10132,7 @@ def _load_UserToolSessionApproval(obj: Any) -> "UserToolSessionApproval": # The approval to add as a session-scoped rule -UserToolSessionApproval = UserToolSessionApprovalCommands | UserToolSessionApprovalRead | UserToolSessionApprovalWrite | UserToolSessionApprovalMcp | UserToolSessionApprovalMemory | UserToolSessionApprovalCustomTool | UserToolSessionApprovalExtensionManagement | UserToolSessionApprovalFactory | UserToolSessionApprovalExtensionPermissionAccess +UserToolSessionApproval = UserToolSessionApprovalCommands | UserToolSessionApprovalRead | UserToolSessionApprovalWrite | UserToolSessionApprovalMcp | UserToolSessionApprovalMemory | UserToolSessionApprovalCustomTool | UserToolSessionApprovalExtensionManagement | UserToolSessionApprovalFactory | UserToolSessionApprovalExtensionPermissionAccess | UserToolSessionApprovalExtensionEnvAccess # The embedded resource contents, either text or base64-encoded binary @@ -9936,6 +10193,13 @@ class PermissionAllowAllMode(Enum): AUTO = "auto" +# Experimental: this enum is part of an experimental API and may change or be removed. +class PermissionRecommendation(Enum): + "Advisory recommendation the runtime attaches to a permission request whose origin it can vouch for by construction. Unlike the auto-approval judge this does not depend on auto mode and does not evaluate what the tool call does; its absence simply means the runtime has no opinion and the request follows the host's normal approval flow." + # The runtime vouches for the request's origin and recommends approving it without prompting. The host still owns the decision and may deny it; deny rules, managed policy, and the auto-approval safety judge all outrank this recommendation. + APPROVE = "approve" + + class AbortReason(Enum): "Finite reason code describing why the current turn was aborted" # The local user requested the abort, for example by pressing Ctrl+C in the CLI. @@ -9948,6 +10212,26 @@ class AbortReason(Enum): AUTOPILOT_CREDIT_LIMIT = "autopilot_credit_limit" +class AgentInterruptedActivity(Enum): + "What the agent was doing when the user interrupted it." + # A request to the model was open. + MODEL_CALL = "model_call" + # The turn was sleeping between retry attempts. + RETRY_BACKOFF = "retry_backoff" + # One or more tools were executing. + TOOL_CALL = "tool_call" + # Background sub-agents were running while the main loop was idle. + BACKGROUND_AGENT = "background_agent" + + +class AgentInterruptedCancelPhase(Enum): + "Where the interruption landed relative to the first streamed token." + # No output had been produced when the request was cancelled. + PRE_FIRST_TOKEN = "pre_first_token" + # The response was already streaming when the request was cancelled. + MID_STREAM = "mid_stream" + + class AssistantMessageToolRequestType(Enum): "Tool call type: \"function\" for standard tool calls, \"custom\" for grammar-based tool calls. Defaults to \"function\" when absent." # Standard function-style tool call. @@ -9968,6 +10252,14 @@ class AssistantUsageApiEndpoint(Enum): WS_RESPONSES = "ws:/responses" +class AssistantUsageTransport(Enum): + "Transport used for a successful model call" + # HTTP transport, including SSE streams. + HTTP = "http" + # WebSocket transport. + WEBSOCKET = "websocket" + + class AttachmentGitHubReferenceType(Enum): "Type of GitHub reference" # GitHub issue reference. @@ -10278,6 +10570,32 @@ class ModelCallFailureTransport(Enum): WEBSOCKET = "websocket" +class ModelChangeSource(Enum): + "Origin of an effective session model change." + # The user selected a model directly with `/model `. + MODEL_COMMAND = "model_command" + # The user selected the model with `/settings`. + SETTINGS_COMMAND = "settings_command" + # The user selected the model with the `/config` alias. + CONFIG_COMMAND = "config_command" + # The user selected the model in the model picker, including the picker opened by bare `/model`. + MODEL_PICKER = "model_picker" + # Organization-managed settings selected the model. + MANAGED_SETTINGS = "managed_settings" + # Repository settings selected the model. + REPO_SETTINGS = "repo_settings" + # Startup model resolution selected the model. + STARTUP = "startup" + # Selecting an agent selected its configured model. + AGENT = "agent" + # Entering, leaving, or reconfiguring plan mode selected the model. + PLAN_MODE = "plan_mode" + # The runtime selected the model automatically, such as rate-limit recovery or refusal fallback. + AUTOMATIC = "automatic" + # An SDK or RPC caller selected the model. + SDK = "sdk" + + class OmittedBinaryOmittedReason(Enum): "Why the binary data is absent: it exceeded the inline size limit, or its asset was unavailable" # Bytes exceeded the session's inline size limit. @@ -10524,7 +10842,7 @@ class WorkspaceFileChangedOperation(Enum): UPDATE = "update" -SessionEventData = SessionStartData | SessionResumeData | SessionRemoteSteerableChangedData | SessionErrorData | SessionIdleData | SessionTitleChangedData | SessionScheduleCreatedData | SessionScheduleCancelledData | SessionScheduleRearmedData | SessionAutopilotObjectiveChangedData | SessionInfoData | SessionWarningData | SessionModelChangeData | SessionModeChangedData | SessionSessionLimitsChangedData | SessionPermissionsChangedData | SessionPlanChangedData | SessionTodosChangedData | SessionWorkspaceFileChangedData | SessionHandoffData | SessionTruncationData | SessionSnapshotRewindData | SessionShutdownData | SessionUsageCheckpointData | SessionContextChangedData | SessionUsageInfoData | SessionContextClearedData | SessionCompactionStartData | SessionCompactionCompleteData | SessionTaskCompleteData | UserMessageData | PendingMessagesModifiedData | AssistantTurnStartData | AssistantTurnRetryData | AssistantIntentData | AssistantServerToolProgressData | AssistantReasoningData | AssistantReasoningDeltaData | AssistantToolCallDeltaData | AssistantStreamingDeltaData | AssistantMessageData | AssistantMessageStartData | AssistantMessageDeltaData | AssistantTurnEndData | AssistantIdleData | AssistantUsageData | ModelCallFailureData | ModelCallStartData | AbortData | ToolUserRequestedData | ToolExecutionStartData | ToolExecutionPartialResultData | ToolExecutionProgressData | ToolExecutionCompleteData | ToolSearchActivatedData | SkillInvokedData | SubagentStartedData | SubagentCompletedData | SubagentFailedData | SubagentSelectedData | SubagentDeselectedData | HookStartData | HookEndData | HookProgressData | SessionBinaryAssetData | SystemMessageData | SystemNotificationData | PermissionRequestedData | PermissionCompletedData | UserInputRequestedData | UserInputCompletedData | ElicitationRequestedData | ElicitationCompletedData | SamplingRequestedData | SamplingCompletedData | McpOauthRequiredData | McpOauthCompletedData | McpHeadersRefreshRequiredData | McpHeadersRefreshCompletedData | SessionCustomNotificationData | ExternalToolRequestedData | ExternalToolCompletedData | CommandQueuedData | CommandExecuteData | CommandCompletedData | AutoModeSwitchRequestedData | AutoModeSwitchCompletedData | SessionLimitsExhaustedRequestedData | SessionLimitsExhaustedCompletedData | SessionAutoModeResolvedData | SessionManagedSettingsResolvedData | SessionManagedSettingsEnforcedData | CommandsChangedData | CapabilitiesChangedData | ExitPlanModeRequestedData | ExitPlanModeCompletedData | SessionToolsUpdatedData | SessionBackgroundTasksChangedData | FactoryRunUpdatedData | SessionSkillsLoadedData | SessionCustomAgentsUpdatedData | SessionMcpServersLoadedData | SessionMcpServerStatusChangedData | McpToolsListChangedData | McpResourcesListChangedData | McpPromptsListChangedData | SessionExtensionsLoadedData | SessionCanvasOpenedData | SessionCanvasRegistryChangedData | SessionCanvasClosedData | SessionCanvasUnavailableData | SessionCanvasRecordedData | SessionCanvasRemovedData | SessionExtensionsAttachmentsPushedData | McpAppToolCallCompleteData | RawSessionEventData | Data +SessionEventData = SessionStartData | SessionResumeData | SessionRemoteSteerableChangedData | SessionErrorData | SessionIdleData | SessionTitleChangedData | SessionScheduleCreatedData | SessionScheduleCancelledData | SessionScheduleRearmedData | SessionAutopilotObjectiveChangedData | SessionInfoData | SessionWarningData | SessionModelChangeData | SessionModeChangedData | SessionSessionLimitsChangedData | SessionPermissionsChangedData | SessionPlanChangedData | SessionTodosChangedData | SessionWorkspaceFileChangedData | SessionHandoffData | SessionTruncationData | SessionSnapshotRewindData | SessionShutdownData | SessionUsageCheckpointData | SessionContextChangedData | SessionUsageInfoData | SessionContextClearedData | SessionCompactionStartData | SessionCompactionCompleteData | SessionTaskCompleteData | UserMessageData | PendingMessagesModifiedData | AssistantTurnStartData | AssistantTurnRetryData | AgentInterruptedData | AssistantIntentData | AssistantServerToolProgressData | AssistantReasoningData | AssistantReasoningDeltaData | AssistantToolCallDeltaData | AssistantStreamingDeltaData | AssistantMessageData | AssistantMessageStartData | AssistantMessageDeltaData | AssistantTurnEndData | AssistantIdleData | AssistantUsageData | ModelCallFailureData | ModelCallStartData | AbortData | ToolUserRequestedData | ToolExecutionStartData | ToolExecutionPartialResultData | ToolExecutionProgressData | ToolExecutionCompleteData | ToolSearchActivatedData | SkillInvokedData | SandboxDecisionData | SubagentStartedData | SubagentCompletedData | SubagentFailedData | SubagentSelectedData | SubagentDeselectedData | HookStartData | HookEndData | HookProgressData | SessionBinaryAssetData | SystemMessageData | SystemNotificationData | PermissionRequestedData | PermissionCompletedData | UserInputRequestedData | UserInputCompletedData | ElicitationRequestedData | ElicitationCompletedData | SamplingRequestedData | SamplingCompletedData | McpOauthRequiredData | McpOauthCompletedData | McpHeadersRefreshRequiredData | McpHeadersRefreshCompletedData | SessionCustomNotificationData | ExternalToolRequestedData | ExternalToolCompletedData | CommandQueuedData | CommandExecuteData | CommandCompletedData | AutoModeSwitchRequestedData | AutoModeSwitchCompletedData | SessionLimitsExhaustedRequestedData | SessionLimitsExhaustedCompletedData | SessionAutoModeResolvedData | SessionManagedSettingsResolvedData | SessionManagedSettingsEnforcedData | CommandsChangedData | CapabilitiesChangedData | ExitPlanModeRequestedData | ExitPlanModeCompletedData | SessionToolsUpdatedData | SessionBackgroundTasksChangedData | FactoryRunUpdatedData | SessionSkillsLoadedData | SessionCustomAgentsUpdatedData | SessionMcpServersLoadedData | SessionMcpServerStatusChangedData | McpToolsListChangedData | McpResourcesListChangedData | McpPromptsListChangedData | SessionExtensionsLoadedData | SessionCanvasOpenedData | SessionCanvasRegistryChangedData | SessionCanvasClosedData | SessionCanvasUnavailableData | SessionCanvasRecordedData | SessionCanvasRemovedData | SessionExtensionsAttachmentsPushedData | McpAppToolCallCompleteData | RawSessionEventData | Data @dataclass @@ -10584,6 +10902,7 @@ def from_dict(obj: Any) -> "SessionEvent": case SessionEventType.PENDING_MESSAGES_MODIFIED: data = PendingMessagesModifiedData.from_dict(data_obj) case SessionEventType.ASSISTANT_TURN_START: data = AssistantTurnStartData.from_dict(data_obj) case SessionEventType.ASSISTANT_TURN_RETRY: data = AssistantTurnRetryData.from_dict(data_obj) + case SessionEventType.AGENT_INTERRUPTED: data = AgentInterruptedData.from_dict(data_obj) case SessionEventType.ASSISTANT_INTENT: data = AssistantIntentData.from_dict(data_obj) case SessionEventType.ASSISTANT_SERVER_TOOL_PROGRESS: data = AssistantServerToolProgressData.from_dict(data_obj) case SessionEventType.ASSISTANT_REASONING: data = AssistantReasoningData.from_dict(data_obj) @@ -10606,6 +10925,7 @@ def from_dict(obj: Any) -> "SessionEvent": case SessionEventType.TOOL_EXECUTION_COMPLETE: data = ToolExecutionCompleteData.from_dict(data_obj) case SessionEventType.TOOL_SEARCH_ACTIVATED: data = ToolSearchActivatedData.from_dict(data_obj) case SessionEventType.SKILL_INVOKED: data = SkillInvokedData.from_dict(data_obj) + case SessionEventType.SANDBOX_DECISION: data = SandboxDecisionData.from_dict(data_obj) case SessionEventType.SUBAGENT_STARTED: data = SubagentStartedData.from_dict(data_obj) case SessionEventType.SUBAGENT_COMPLETED: data = SubagentCompletedData.from_dict(data_obj) case SessionEventType.SUBAGENT_FAILED: data = SubagentFailedData.from_dict(data_obj) @@ -10701,6 +11021,9 @@ def session_event_to_dict(x: SessionEvent) -> Any: __all__ = [ "AbortData", "AbortReason", + "AgentInterruptedActivity", + "AgentInterruptedCancelPhase", + "AgentInterruptedData", "AssistantIdleData", "AssistantIntentData", "AssistantMessageData", @@ -10721,6 +11044,7 @@ def session_event_to_dict(x: SessionEvent) -> Any: "AssistantUsageCopilotUsage", "AssistantUsageCopilotUsageTokenDetail", "AssistantUsageData", + "AssistantUsageTransport", "Attachment", "AttachmentBlob", "AttachmentDirectory", @@ -10839,6 +11163,7 @@ def session_event_to_dict(x: SessionEvent) -> Any: "ModelCallFailureSource", "ModelCallFailureTransport", "ModelCallStartData", + "ModelChangeSource", "OmittedBinaryOmittedReason", "OmittedBinaryResult", "OmittedBinaryType", @@ -10858,6 +11183,7 @@ def session_event_to_dict(x: SessionEvent) -> Any: "PermissionPromptRequest", "PermissionPromptRequestCommands", "PermissionPromptRequestCustomTool", + "PermissionPromptRequestExtensionEnvAccess", "PermissionPromptRequestExtensionManagement", "PermissionPromptRequestExtensionPermissionAccess", "PermissionPromptRequestFactory", @@ -10869,8 +11195,10 @@ def session_event_to_dict(x: SessionEvent) -> Any: "PermissionPromptRequestRead", "PermissionPromptRequestUrl", "PermissionPromptRequestWrite", + "PermissionRecommendation", "PermissionRequest", "PermissionRequestCustomTool", + "PermissionRequestExtensionEnvAccess", "PermissionRequestExtensionManagement", "PermissionRequestExtensionPermissionAccess", "PermissionRequestFactory", @@ -10897,6 +11225,7 @@ def session_event_to_dict(x: SessionEvent) -> Any: "ReasoningSummary", "SamplingCompletedData", "SamplingRequestedData", + "SandboxDecisionData", "ScheduleOrigin", "SessionAutoModeResolvedData", "SessionAutopilotObjectiveChangedData", @@ -11033,6 +11362,7 @@ def session_event_to_dict(x: SessionEvent) -> Any: "UserToolSessionApproval", "UserToolSessionApprovalCommands", "UserToolSessionApprovalCustomTool", + "UserToolSessionApprovalExtensionEnvAccess", "UserToolSessionApprovalExtensionManagement", "UserToolSessionApprovalExtensionPermissionAccess", "UserToolSessionApprovalFactory", diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs index caf9457a8..1d7daddba 100644 --- a/rust/src/generated/api_types.rs +++ b/rust/src/generated/api_types.rs @@ -10,9 +10,9 @@ use std::collections::HashMap; use serde::{Deserialize, Serialize}; use super::session_events::{ - AbortReason, ContextTier, McpServerSource, McpServerStatus, PermissionPromptRequest, - PermissionRule, ReasoningSummary, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, - UserToolSessionApproval, Verbosity, + AbortReason, ContextTier, McpServerSource, McpServerStatus, ModelChangeSource, + PermissionPromptRequest, PermissionRule, ReasoningSummary, SessionLimitsConfig, SessionMode, + ShutdownType, SkillSource, UserToolSessionApproval, Verbosity, }; use crate::types::{RequestId, SessionEvent, SessionId}; @@ -78,6 +78,8 @@ pub mod rpc_methods { pub const PLUGINS_ENABLE: &str = "plugins.enable"; /// `plugins.disable` pub const PLUGINS_DISABLE: &str = "plugins.disable"; + /// `plugins.builtin.set` + pub const PLUGINS_BUILTIN_SET: &str = "plugins.builtin.set"; /// `plugins.marketplaces.list` pub const PLUGINS_MARKETPLACES_LIST: &str = "plugins.marketplaces.list"; /// `plugins.marketplaces.add` @@ -207,6 +209,23 @@ pub mod rpc_methods { pub const SESSION_GITHUBAUTH_GETSTATUS: &str = "session.gitHubAuth.getStatus"; /// `session.gitHubAuth.setCredentials` pub const SESSION_GITHUBAUTH_SETCREDENTIALS: &str = "session.gitHubAuth.setCredentials"; + /// `session.gitHubAuth.getCurrentAuthInfo` + pub const SESSION_GITHUBAUTH_GETCURRENTAUTHINFO: &str = "session.gitHubAuth.getCurrentAuthInfo"; + /// `session.gitHubAuth.getAllAuthAvailable` + pub const SESSION_GITHUBAUTH_GETALLAUTHAVAILABLE: &str = + "session.gitHubAuth.getAllAuthAvailable"; + /// `session.gitHubAuth.refreshCopilotUser` + pub const SESSION_GITHUBAUTH_REFRESHCOPILOTUSER: &str = "session.gitHubAuth.refreshCopilotUser"; + /// `session.gitHubAuth.login` + pub const SESSION_GITHUBAUTH_LOGIN: &str = "session.gitHubAuth.login"; + /// `session.gitHubAuth.switchToAuth` + pub const SESSION_GITHUBAUTH_SWITCHTOAUTH: &str = "session.gitHubAuth.switchToAuth"; + /// `session.gitHubAuth.logout` + pub const SESSION_GITHUBAUTH_LOGOUT: &str = "session.gitHubAuth.logout"; + /// `session.gitHubAuth.logoutUser` + pub const SESSION_GITHUBAUTH_LOGOUTUSER: &str = "session.gitHubAuth.logoutUser"; + /// `session.gitHubAuth.lastAuthErrors` + pub const SESSION_GITHUBAUTH_LASTAUTHERRORS: &str = "session.gitHubAuth.lastAuthErrors"; /// `session.debug.collectLogs` pub const SESSION_DEBUG_COLLECTLOGS: &str = "session.debug.collectLogs"; /// `session.canvas.list` @@ -219,6 +238,10 @@ pub mod rpc_methods { pub const SESSION_CANVAS_CLOSE: &str = "session.canvas.close"; /// `session.canvas.action.invoke` pub const SESSION_CANVAS_ACTION_INVOKE: &str = "session.canvas.action.invoke"; + /// `session.canvas.provider.register` + pub const SESSION_CANVAS_PROVIDER_REGISTER: &str = "session.canvas.provider.register"; + /// `session.canvas.provider.unregister` + pub const SESSION_CANVAS_PROVIDER_UNREGISTER: &str = "session.canvas.provider.unregister"; /// `session.factory.run` pub const SESSION_FACTORY_RUN: &str = "session.factory.run"; /// `session.factory.resume` @@ -404,6 +427,8 @@ pub mod rpc_methods { "session.mcp.oauth.authenticationStateChanged"; /// `session.mcp.oauth.login` pub const SESSION_MCP_OAUTH_LOGIN: &str = "session.mcp.oauth.login"; + /// `session.mcp.oauth.probe` + pub const SESSION_MCP_OAUTH_PROBE: &str = "session.mcp.oauth.probe"; /// `session.mcp.oauth.respond` pub const SESSION_MCP_OAUTH_RESPOND: &str = "session.mcp.oauth.respond"; /// `session.mcp.headers.handlePendingHeadersRefreshRequest` @@ -1408,14 +1433,19 @@ pub struct AllowAllPermissionState { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CopilotUserResponseEndpoints { + /// Copilot API endpoint URL. #[serde(skip_serializing_if = "Option::is_none")] pub api: Option, + /// Experimental-service endpoint URL. #[serde(skip_serializing_if = "Option::is_none")] pub exp: Option, + /// Origin-tracker endpoint URL. #[serde(rename = "origin-tracker", skip_serializing_if = "Option::is_none")] pub origin_tracker: Option, + /// Copilot proxy endpoint URL. #[serde(skip_serializing_if = "Option::is_none")] pub proxy: Option, + /// Copilot telemetry endpoint URL. #[serde(skip_serializing_if = "Option::is_none")] pub telemetry: Option, } @@ -2251,6 +2281,24 @@ pub struct AttachmentSelection { pub r#type: AttachmentSelectionType, } +/// Validation error from an authentication attempt. +/// +///

+/// +/// **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 AuthValidationError { + /// Optional message returned by GitHub + #[serde(skip_serializing_if = "Option::is_none")] + pub github_message: Option, + /// Authentication validation error message + pub message: String, +} + /// A well-known model in the runtime's built-in catalog. /// ///
@@ -2650,6 +2698,40 @@ pub struct CanvasProviderOpenResult { pub url: Option, } +/// Internal canvas provider registration parameters. +/// +///
+/// +/// **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 CanvasProviderRegisterRequest { + /// Canvas contributions supplied by the provider + pub canvases: Vec, + /// Connection identifier for callback routing + pub connection_id: String, + /// Provider metadata supplied by the host + pub info: serde_json::Value, +} + +/// Internal canvas provider unregistration parameters. +/// +///
+/// +/// **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 CanvasProviderUnregisterRequest { + /// Connection identifier to unregister + pub connection_id: String, +} + /// Options scoped to the built-in CAPI (Copilot API) provider. /// ///
@@ -3235,6 +3317,7 @@ pub struct DebugCollectLogsCollectedEntry { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct DebugCollectLogsDestinationArchive { + /// Destination variant discriminator. pub kind: DebugCollectLogsDestinationArchiveKind, /// When true, create the archive atomically without overwriting an existing file by appending ` (N)` before the extension as needed. Defaults to false. #[serde(skip_serializing_if = "Option::is_none")] @@ -3246,6 +3329,7 @@ pub struct DebugCollectLogsDestinationArchive { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct DebugCollectLogsDestinationDirectory { + /// Destination variant discriminator. pub kind: DebugCollectLogsDestinationDirectoryKind, /// Directory where redacted files should be staged. The directory is created if needed. pub output_directory: String, @@ -4161,23 +4245,39 @@ pub struct FactoryAgentResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct FactoryAgentSummary { + /// Accumulated active agent time in milliseconds. pub active_ms: i64, + /// Prompt-safe live activity text. #[serde(skip_serializing_if = "Option::is_none")] pub activity: Option, + /// Stable direct-agent identifier. pub agent_id: String, + /// Registered agent type. pub agent_type: String, + /// Epoch milliseconds when the agent completed. #[serde(skip_serializing_if = "Option::is_none")] pub completed_at: Option, + /// Friendly, non-unique name intended for display + #[serde(skip_serializing_if = "Option::is_none")] + pub display_name: Option, + /// Friendly, non-unique name intended for display pub label: String, + /// Phase identifier active when the agent was launched, or null. pub phase_id: Option, + /// Model requested when the agent was launched. #[serde(skip_serializing_if = "Option::is_none")] pub requested_model: Option, + /// Concrete model resolved for the agent. #[serde(skip_serializing_if = "Option::is_none")] pub resolved_model: Option, + /// Owning factory run identifier. pub run_id: String, + /// Epoch milliseconds when the agent started. #[serde(skip_serializing_if = "Option::is_none")] pub started_at: Option, + /// Current durable or live agent status. pub status: String, + /// Tool-call identifier that launched the agent. pub tool_call_id: String, } @@ -4207,7 +4307,9 @@ pub struct FactoryCancelRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct FactoryCurrentPhase { + /// Current phase identifier. pub id: String, + /// Zero-based declared phase ordinal, or null for an undeclared phase. pub ordinal: Option, } @@ -4222,12 +4324,16 @@ pub struct FactoryCurrentPhase { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct FactoryDeclaredLimits { + /// Maximum AI credits consumed by subagents and descendants. #[serde(skip_serializing_if = "Option::is_none")] pub max_ai_credits: Option, + /// Maximum concurrently active subagents. #[serde(skip_serializing_if = "Option::is_none")] pub max_concurrent_subagents: Option, + /// Maximum total subagents spawned by the run. #[serde(skip_serializing_if = "Option::is_none")] pub max_total_subagents: Option, + /// Maximum accumulated active execution time in seconds. #[serde(skip_serializing_if = "Option::is_none")] pub timeout_seconds: Option, } @@ -4404,8 +4510,11 @@ pub struct FactoryListRunsRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct FactoryRunConsumed { + /// Accumulated active execution time in milliseconds. pub active_ms: i64, + /// AI usage consumed by the run in nano-AIU. pub nano_aiu: i64, + /// Total subagents spawned by the run. pub subagents: i64, } @@ -4420,12 +4529,16 @@ pub struct FactoryRunConsumed { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct FactoryRunTerminal { + /// Human-readable terminal error. #[serde(skip_serializing_if = "Option::is_none")] pub error: Option, + /// Machine-readable terminal failure. #[serde(skip_serializing_if = "Option::is_none")] pub failure: Option, + /// Human-readable terminal reason. #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option, + /// Prompt-safe preview of the completed result. #[serde(skip_serializing_if = "Option::is_none")] pub result_preview: Option, } @@ -4441,24 +4554,43 @@ pub struct FactoryRunTerminal { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct FactoryRunSummary { + /// Epoch milliseconds when the current active segment started, or null while inactive. pub active_segment_started_at: Option, + /// Approved effective resource ceilings, or null until approved. pub approved: Option, + /// Epoch milliseconds when the run completed, or null while nonterminal. pub completed_at: Option, + /// Durable resource consumption. pub consumed: FactoryRunConsumed, + /// Epoch milliseconds when the run was created. pub created_at: i64, + /// Current phase identity, or null before any phase is entered. pub current_phase: Option, + /// Resource ceilings declared by the factory. pub declared_limits: FactoryDeclaredLimits, + /// Number of phases declared by the factory. pub declared_phase_count: i64, + /// Human-readable factory description. pub description: String, + /// Registered factory name. pub factory_name: String, + /// Number of direct factory agents currently live. pub live_agent_count: i64, + /// Epoch milliseconds when this live-overlay snapshot was observed. pub observed_at: i64, + /// Monotonic durable run revision. pub revision: i64, + /// Factory run identifier. pub run_id: String, + /// Epoch milliseconds when execution first started, or null before start. pub started_at: Option, + /// Current factory run status. pub status: FactoryRunStatus, + /// Terminal run outcome, or null while nonterminal. pub terminal: Option, + /// Total direct factory agents spawned across all attempts. pub total_spawned_agent_count: i64, + /// Epoch milliseconds when the durable run was last updated. pub updated_at: i64, } @@ -4485,6 +4617,7 @@ pub struct FactoryListRunsResult { /// Number of terminal runs older than this page. #[serde(skip_serializing_if = "Option::is_none")] pub omitted_older: Option, + /// Factory run summaries in durable creation order. pub runs: Vec, } @@ -4537,21 +4670,34 @@ pub struct FactoryLogRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct FactoryPhaseObservation { + /// Completed active time accumulated by this phase in milliseconds. pub accumulated_active_ms: i64, + /// Epoch milliseconds when this phase completed; for a skipped phase, the synthetic skip timestamp (equal to `startedAt`). #[serde(skip_serializing_if = "Option::is_none")] pub completed_at: Option, + /// Current live active time for this phase in milliseconds. pub current_active_ms: i64, + /// Optional human-readable phase detail. #[serde(skip_serializing_if = "Option::is_none")] pub detail: Option, + /// Number of times execution entered this phase. pub entry_count: i64, + /// Phase identifier. pub id: String, + /// Most recent run attempt that entered this phase, or `0` if the phase has never been entered. pub last_entered_run_attempt: i64, + /// Direct agents in this phase that are currently live. pub live_agent_count: i64, + /// Zero-based declared phase ordinal, or null for an undeclared phase. pub ordinal: Option, + /// Epoch milliseconds when this phase first started; for a skipped phase, the synthetic skip timestamp (equal to `completedAt`). #[serde(skip_serializing_if = "Option::is_none")] pub started_at: Option, + /// Derived lifecycle state of the phase. pub status: FactoryPhaseStatus, + /// Human-readable phase title. pub title: String, + /// Total direct agents associated with this phase. pub total_agent_count: i64, } @@ -4591,10 +4737,15 @@ pub struct FactoryProgressLine { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct FactoryProgressPage { + /// Whether progress records newer than this page exist. pub has_more_newer: bool, + /// Whether progress records older than this page exist. pub has_more_older: bool, + /// Newest sequence number in this page, or null when empty. pub newest_seq: Option, + /// Oldest sequence number in this page, or null when empty. pub oldest_seq: Option, + /// Progress records in sequence order. pub records: Vec, /// Run revision reflected by this page. pub revision: i64, @@ -4703,27 +4854,49 @@ pub struct FactoryResumeResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct FactoryRunDetail { + /// Epoch milliseconds when the current active segment started, or null while inactive. pub active_segment_started_at: Option, + /// Durable identities and live statuses for direct factory agents. pub agents: Vec, + /// Approved effective resource ceilings, or null until approved. pub approved: Option, + /// Epoch milliseconds when the run completed, or null while nonterminal. pub completed_at: Option, + /// Durable resource consumption. pub consumed: FactoryRunConsumed, + /// Epoch milliseconds when the run was created. pub created_at: i64, + /// Current phase identity, or null before any phase is entered. pub current_phase: Option, + /// Resource ceilings declared by the factory. pub declared_limits: FactoryDeclaredLimits, + /// Number of phases declared by the factory. pub declared_phase_count: i64, + /// Human-readable factory description. pub description: String, + /// Registered factory name. pub factory_name: String, + /// Number of direct factory agents currently live. pub live_agent_count: i64, + /// Epoch milliseconds when this live-overlay snapshot was observed. pub observed_at: i64, + /// Lifecycle and timing observations for each factory phase. pub phases: Vec, + /// Bidirectional page of durable factory progress. pub progress: FactoryProgressPage, + /// Monotonic durable run revision. pub revision: i64, + /// Factory run identifier. pub run_id: String, + /// Epoch milliseconds when execution first started, or null before start. pub started_at: Option, + /// Current factory run status. pub status: FactoryRunStatus, + /// Terminal run outcome, or null while nonterminal. pub terminal: Option, + /// Total direct factory agents spawned across all attempts. pub total_spawned_agent_count: i64, + /// Epoch milliseconds when the durable run was last updated. pub updated_at: i64, } @@ -5475,10 +5648,13 @@ pub struct InstalledPluginInfo { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct InstalledPluginSourceGitHub { + /// Optional repository-relative path to the plugin. #[serde(skip_serializing_if = "Option::is_none")] pub path: Option, + /// Optional Git ref to resolve. #[serde(skip_serializing_if = "Option::is_none")] pub r#ref: Option, + /// GitHub repository in `owner/repo` form. pub repo: String, /// Optional full 40-character hexadecimal commit SHA. #[serde(skip_serializing_if = "Option::is_none")] @@ -5498,6 +5674,7 @@ pub struct InstalledPluginSourceGitHub { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct InstalledPluginSourceLocal { + /// Local filesystem path to the plugin. pub path: String, /// Constant value. Always "local". pub source: InstalledPluginSourceLocalSource, @@ -5514,8 +5691,10 @@ pub struct InstalledPluginSourceLocal { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct InstalledPluginSourceUrl { + /// Optional source-relative path to the plugin. #[serde(skip_serializing_if = "Option::is_none")] pub path: Option, + /// Optional Git ref to resolve. #[serde(skip_serializing_if = "Option::is_none")] pub r#ref: Option, /// Optional full 40-character hexadecimal commit SHA. @@ -5523,6 +5702,7 @@ pub struct InstalledPluginSourceUrl { pub sha: Option, /// Constant value. Always "url". pub source: InstalledPluginSourceUrlSource, + /// URL of the plugin source. pub url: String, } @@ -5726,6 +5906,7 @@ pub struct LlmInferenceHttpRequestStartRequest { /// Identity of the agent invocation (one agentic loop) that issued this request. It remains fixed across physical retries within the invocation and is distinct from the stable trajectory `agentId`. A caller-supplied invocation id always takes precedence (this covers auxiliary calls that have no model call id). Otherwise, first-party CAPI requests fall back to the runtime's agent task id — the same value the runtime emits as the `X-Agent-Task-Id` header — while custom-provider requests fall back to the model call id. #[serde(skip_serializing_if = "Option::is_none")] pub agent_invocation_id: Option, + /// HTTP request headers, preserving multiple values per name. pub headers: HashMap>, /// Coarse classification of the interaction that produced this request. Open string for forward-compatibility; known values include `conversation-agent`, `conversation-subagent`, `conversation-sampling`, `conversation-background`, `conversation-compaction`, and `conversation-user`. Absent when the runtime did not classify the request. Comes from the runtime's per-request agent context independently of transport; on the CAPI transport the runtime derives the upstream `X-Interaction-Type` header from this same context. #[serde(skip_serializing_if = "Option::is_none")] @@ -5822,6 +6003,7 @@ pub struct LlmInferenceHttpResponseChunkResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct LlmInferenceHttpResponseStartRequest { + /// HTTP response headers, preserving multiple values per name. pub headers: HashMap>, /// Matches the requestId from the originating httpRequestStart frame. pub request_id: RequestId, @@ -6700,6 +6882,24 @@ pub struct McpExecuteSamplingParams { pub server_name: String, } +/// MCP server whose connection attempt 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 McpFailedServer { + /// The captured connection failure detail. + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, + /// The config key of the server that failed to connect. + pub name: String, +} + /// MCP server filtered by policy, with name, reason, and optional redacted reason. /// ///
@@ -6730,12 +6930,14 @@ pub struct McpFilteredServer { pub struct McpHeadersHandlePendingHeadersRefreshRequestHeaders { /// Headers to overlay onto the MCP request. Dynamic headers override static config headers but do not replace SDK-managed request headers. pub headers: HashMap, + /// Headers-refresh response variant discriminator. pub kind: McpHeadersHandlePendingHeadersRefreshRequestHeadersKind, } #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpHeadersHandlePendingHeadersRefreshRequestNone { + /// Headers-refresh response variant discriminator. pub kind: McpHeadersHandlePendingHeadersRefreshRequestNoneKind, } @@ -6957,6 +7159,7 @@ pub struct McpOauthPendingRequestResponseToken { /// Token lifetime in seconds, if known. #[serde(skip_serializing_if = "Option::is_none")] pub expires_in: Option, + /// OAuth response variant discriminator. pub kind: McpOauthPendingRequestResponseTokenKind, /// OAuth token type. Defaults to Bearer when omitted. #[serde(skip_serializing_if = "Option::is_none")] @@ -6966,6 +7169,7 @@ pub struct McpOauthPendingRequestResponseToken { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpOauthPendingRequestResponseCancelled { + /// OAuth response variant discriminator. pub kind: McpOauthPendingRequestResponseCancelledKind, } @@ -7053,6 +7257,21 @@ pub struct McpOauthLoginResult { pub authorization_url: Option, } +/// Remote MCP server name for a passive OAuth status probe. +/// +///
+/// +/// **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 McpOauthProbeRequest { + /// Name of the configured remote MCP server to probe. + pub server_name: String, +} + /// Pending MCP OAuth request id to respond to. /// ///
@@ -7107,6 +7326,45 @@ pub(crate) struct McpRegisterExternalClientRequest { pub(crate) transport: serde_json::Value, } +/// In-process 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 McpReloadConfig { + #[serde(skip_serializing_if = "Option::is_none")] + pub active_git_hub_token: Option, + /// Server names the CLI enabled for this session via `--enable-mcp-server`. + #[serde(skip_serializing_if = "Option::is_none")] + pub cli_enabled_servers: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub config_filter: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub disabled_servers: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub enabled_servers: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub force_restart: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub github_mcp_tool_options: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub github_mcp_user_override: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub include_workspace_sources: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mcp3p_enabled: Option, + pub mcp_servers: HashMap, + #[serde(skip_serializing_if = "Option::is_none")] + pub secret_store: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub use_cached_tool_snapshots: Option, +} + /// Opaque MCP reload configuration. /// ///
@@ -7418,6 +7676,23 @@ pub struct McpRestartServerRequest { pub server_name: String, } +/// Per-field MCP telemetry-obfuscation policy. +/// +///
+/// +/// **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 McpSafeForTelemetryFields { + /// Whether MCP tool input names may be included in telemetry without obfuscation. + pub inputs_names: bool, + /// Whether the MCP tool name may be included in telemetry without obfuscation. + pub name: bool, +} + /// Outcome of an MCP sampling execution: success result, failure error, or cancellation. /// ///
@@ -7498,21 +7773,42 @@ pub struct McpServerConfigHttp { /// Set to `true` to use defaults, or provide an object with additional auth or OIDC settings. #[serde(skip_serializing_if = "Option::is_none")] pub auth: Option, + /// Configuration warnings recorded while loading the server. + #[serde(skip_serializing_if = "Option::is_none")] + pub config_warnings: Option>, /// Controls if tools provided by this server can be loaded on demand via tool search (auto) or always included in the initial tool list (never) #[serde(skip_serializing_if = "Option::is_none")] pub defer_tools: Option, + /// Whether secret masking is disabled for calls to this server. + #[serde(skip_serializing_if = "Option::is_none")] + pub disable_secret_masking: Option, /// Set to true to disable persisted MCP tool snapshots for this server. Live tool discovery is unaffected. #[serde(skip_serializing_if = "Option::is_none")] pub disable_tool_cache: Option, + /// Optional human-readable server name. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_name: Option, + /// Event types this server receives as Copilot notifications. + #[serde(skip_serializing_if = "Option::is_none")] + pub events: Option>, + /// Tool names excluded after the include filter is applied. + #[serde(skip_serializing_if = "Option::is_none")] + pub exclude_tools: Option>, /// Content filtering mode to apply to all tools, or a map of tool name to content filtering mode. #[serde(skip_serializing_if = "Option::is_none")] pub filter_mapping: Option, /// HTTP headers to include in requests to the remote MCP server. #[serde(skip_serializing_if = "Option::is_none")] pub headers: Option>, + /// Dynamic-header refresh cache lifetime in milliseconds. + #[serde(skip_serializing_if = "Option::is_none")] + pub headers_refresh_ttl_ms: Option, /// Whether this server is a built-in fallback used when the user has not configured their own server. #[serde(skip_serializing_if = "Option::is_none")] pub is_default_server: Option, + /// Copilot notification types this server may send to the host. + #[serde(skip_serializing_if = "Option::is_none")] + pub notifications: Option>, /// OAuth client ID for a pre-registered remote MCP OAuth client. #[serde(skip_serializing_if = "Option::is_none")] pub oauth_client_id: Option, @@ -7525,7 +7821,25 @@ pub struct McpServerConfigHttp { /// Set to `true` to use defaults, or provide an object with additional auth or OIDC settings. #[serde(skip_serializing_if = "Option::is_none")] pub oidc: Option, - /// Timeout in milliseconds for tool calls to this server. + /// Telemetry-obfuscation policy for this server's tools. + #[serde(skip_serializing_if = "Option::is_none")] + pub safe_for_telemetry: Option, + /// The origin of this server configuration. + #[serde(skip_serializing_if = "Option::is_none")] + pub source: Option, + /// Source file path recorded while loading the config. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_path: Option, + /// Plugin that provided this server. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_plugin: Option, + /// Whether the providing plugin uses the Open Plugin Spec. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_plugin_spec: Option, + /// Version of the plugin that provided this server. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_plugin_version: Option, + /// Timeout in milliseconds for tool discovery and tool calls. #[serde(skip_serializing_if = "Option::is_none")] pub timeout: Option, /// Tools to include. Defaults to all tools if not specified. @@ -7538,6 +7852,81 @@ pub struct McpServerConfigHttp { pub url: String, } +/// In-process MCP server configuration used by embedded SDK 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) struct McpServerConfigMemory { + /// Configuration warnings recorded while loading the server. + #[serde(skip_serializing_if = "Option::is_none")] + pub config_warnings: Option>, + /// Controls whether tools can be loaded on demand. + #[serde(skip_serializing_if = "Option::is_none")] + pub defer_tools: Option, + /// Whether secret masking is disabled for calls to this server. + #[serde(skip_serializing_if = "Option::is_none")] + pub disable_secret_masking: Option, + /// Whether persisted tool snapshots are disabled. + #[serde(skip_serializing_if = "Option::is_none")] + pub disable_tool_cache: Option, + /// Optional human-readable server name. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_name: Option, + /// Event types this server receives as Copilot notifications. + #[serde(skip_serializing_if = "Option::is_none")] + pub events: Option>, + /// Tool names excluded after the include filter is applied. + #[serde(skip_serializing_if = "Option::is_none")] + pub exclude_tools: Option>, + /// Content filtering mode to apply to this server's tools. + #[serde(skip_serializing_if = "Option::is_none")] + pub filter_mapping: Option, + /// Whether this server is a built-in fallback. + #[serde(skip_serializing_if = "Option::is_none")] + pub is_default_server: Option, + /// Copilot notification types this server may send to the host. + #[serde(skip_serializing_if = "Option::is_none")] + pub notifications: Option>, + /// Set to `true` to use default OIDC settings. + #[serde(skip_serializing_if = "Option::is_none")] + pub oidc: Option, + /// Telemetry-obfuscation policy for this server's tools. + #[serde(skip_serializing_if = "Option::is_none")] + pub safe_for_telemetry: Option, + /// In-process MCP server instance. This value cannot cross a JSON-RPC boundary. + #[doc(hidden)] + pub(crate) server_instance: serde_json::Value, + /// The origin of this server configuration. + #[serde(skip_serializing_if = "Option::is_none")] + pub source: Option, + /// Source file path recorded while loading the config. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_path: Option, + /// Plugin that provided this server. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_plugin: Option, + /// Whether the providing plugin uses the Open Plugin Spec. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_plugin_spec: Option, + /// Version of the plugin that provided this server. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_plugin_version: Option, + /// Timeout in milliseconds for tool discovery and tool calls. + #[serde(skip_serializing_if = "Option::is_none")] + pub timeout: Option, + /// Tools to include. Defaults to all tools if not specified. + #[serde(skip_serializing_if = "Option::is_none")] + pub tools: Option>, + #[doc(hidden)] + pub(crate) r#type: McpServerConfigMemoryType, +} + /// Stdio MCP server configuration launched as a child process. /// ///
@@ -7557,33 +7946,72 @@ pub struct McpServerConfigStdio { pub auth: Option, /// Executable command used to start the Stdio MCP server process. pub command: String, + /// Configuration warnings recorded while loading the server. + #[serde(skip_serializing_if = "Option::is_none")] + pub config_warnings: Option>, /// Working directory for the Stdio MCP server process. #[serde(skip_serializing_if = "Option::is_none")] pub cwd: Option, /// Controls if tools provided by this server can be loaded on demand via tool search (auto) or always included in the initial tool list (never) #[serde(skip_serializing_if = "Option::is_none")] pub defer_tools: Option, + /// Whether secret masking is disabled for calls to this server. + #[serde(skip_serializing_if = "Option::is_none")] + pub disable_secret_masking: Option, /// Set to true to disable persisted MCP tool snapshots for this server. Live tool discovery is unaffected. #[serde(skip_serializing_if = "Option::is_none")] pub disable_tool_cache: Option, + /// Optional human-readable server name. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_name: Option, /// Environment variables to pass to the Stdio MCP server process. #[serde(skip_serializing_if = "Option::is_none")] pub env: Option>, + /// Event types this server receives as Copilot notifications. + #[serde(skip_serializing_if = "Option::is_none")] + pub events: Option>, + /// Tool names excluded after the include filter is applied. + #[serde(skip_serializing_if = "Option::is_none")] + pub exclude_tools: Option>, /// Content filtering mode to apply to all tools, or a map of tool name to content filtering mode. #[serde(skip_serializing_if = "Option::is_none")] pub filter_mapping: Option, /// Whether this server is a built-in fallback used when the user has not configured their own server. #[serde(skip_serializing_if = "Option::is_none")] pub is_default_server: Option, + /// Copilot notification types this server may send to the host. + #[serde(skip_serializing_if = "Option::is_none")] + pub notifications: Option>, /// Set to `true` to use defaults, or provide an object with additional auth or OIDC settings. #[serde(skip_serializing_if = "Option::is_none")] pub oidc: Option, - /// Timeout in milliseconds for tool calls to this server. + /// Telemetry-obfuscation policy for this server's tools. + #[serde(skip_serializing_if = "Option::is_none")] + pub safe_for_telemetry: Option, + /// The origin of this server configuration. + #[serde(skip_serializing_if = "Option::is_none")] + pub source: Option, + /// Source file path recorded while loading the config. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_path: Option, + /// Plugin that provided this server. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_plugin: Option, + /// Whether the providing plugin uses the Open Plugin Spec. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_plugin_spec: Option, + /// Version of the plugin that provided this server. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_plugin_version: Option, + /// Timeout in milliseconds for tool discovery and tool calls. #[serde(skip_serializing_if = "Option::is_none")] pub timeout: Option, /// Tools to include. Defaults to all tools if not specified. #[serde(skip_serializing_if = "Option::is_none")] pub tools: Option>, + /// Local transport type. Defaults to stdio when omitted. + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option, } /// MCP servers configured for the session, with their connection status and host-level state. @@ -7666,6 +8094,9 @@ pub struct McpStartServersResult { /// Non-default servers allowed by policy #[serde(skip_serializing_if = "Option::is_none")] pub allowed_servers: Option>, + /// Servers whose connection attempt failed. + #[serde(skip_serializing_if = "Option::is_none")] + pub failed_servers: Option>, /// Servers filtered out before startup pub filtered_servers: Vec, } @@ -7685,6 +8116,22 @@ pub struct McpStopServerRequest { pub server_name: String, } +/// Metadata controlling an MCP task's lifetime. +/// +///
+/// +/// **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 McpTaskMetadata { + /// Task time-to-live. + #[serde(skip_serializing_if = "Option::is_none")] + pub ttl: Option, +} + /// Server name identifying the external client to remove. /// ///
@@ -8339,6 +8786,9 @@ pub struct Model { pub billing: Option, /// Model capabilities and limits pub capabilities: ModelCapabilities, + /// Default reasoning effort level (only present if model supports reasoning effort) + #[serde(skip_serializing_if = "Option::is_none")] + pub default_reasoning_effort: Option, /// Model identifier (e.g., "claude-sonnet-4.5") pub id: String, /// Model capability category for grouping in the model picker @@ -8352,6 +8802,9 @@ pub struct Model { /// Policy state (if applicable) #[serde(skip_serializing_if = "Option::is_none")] pub policy: Option, + /// Context-window tiers this model offers, when the provider advertises them independently of tiered token pricing. Copilot models carry their tiers in `billing.tokenPrices`; a provider that has no pricing to publish (an agent host reached over AHP, for example) declares them here instead, so the model picker can still offer the tier toggle. + #[serde(skip_serializing_if = "Option::is_none")] + pub supported_context_tiers: Option>, /// Supported reasoning effort levels (only present if model supports reasoning effort) #[serde(skip_serializing_if = "Option::is_none")] pub supported_reasoning_efforts: Option>, @@ -8559,6 +9012,9 @@ pub struct ModelSwitchToRequest { /// Reasoning summary mode to request for supported model clients #[serde(skip_serializing_if = "Option::is_none")] pub reasoning_summary: Option, + /// Origin to record on the effective `session.model_change` event. Defaults to `sdk` when omitted. + #[serde(skip_serializing_if = "Option::is_none")] + pub source: Option, /// Output verbosity level to request for supported models #[serde(skip_serializing_if = "Option::is_none")] pub verbosity: Option, @@ -8726,7 +9182,9 @@ pub struct NameSetRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct OptionsUpdateAdditionalContentExclusionPolicyRuleSource { + /// Name of the policy source. pub name: String, + /// Type of the policy source. pub r#type: String, } @@ -8741,10 +9199,13 @@ pub struct OptionsUpdateAdditionalContentExclusionPolicyRuleSource { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct OptionsUpdateAdditionalContentExclusionPolicyRule { + /// Conditions of which at least one must match. #[serde(skip_serializing_if = "Option::is_none")] pub if_any_match: Option>, + /// Conditions none of which may match. #[serde(skip_serializing_if = "Option::is_none")] pub if_none_match: Option>, + /// Path patterns covered by this rule. pub paths: Vec, /// Source descriptor for a `session.options.update` content-exclusion rule, with source name and type. pub source: OptionsUpdateAdditionalContentExclusionPolicyRuleSource, @@ -8761,8 +9222,10 @@ pub struct OptionsUpdateAdditionalContentExclusionPolicyRule { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct OptionsUpdateAdditionalContentExclusionPolicy { + /// Opaque policy update timestamp supplied by the host. #[serde(rename = "last_updated_at")] pub last_updated_at: serde_json::Value, + /// Content-exclusion rules to apply. pub rules: Vec, /// Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. pub scope: OptionsUpdateAdditionalContentExclusionPolicyScope, @@ -8986,6 +9449,25 @@ pub struct PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess pub kind: PermissionDecisionApproveForSessionApprovalExtensionPermissionAccessKind, } +/// Session-scoped approval details for an extension's access to sensitive environment variables, keyed by extension name and the exact set of variable names. +/// +///
+/// +/// **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 PermissionDecisionApproveForSessionApprovalExtensionEnvAccess { + /// Names of the sensitive environment variables this approval covers. Values are never persisted. + pub environment_variables: Vec, + /// Extension name. + pub extension_name: String, + /// Approval covering an extension's request to read sensitive environment variables. + pub kind: PermissionDecisionApproveForSessionApprovalExtensionEnvAccessKind, +} + /// Permission-decision request variant to approve for the rest of the session, with optional tool approval or URL domain. /// ///
@@ -9175,6 +9657,25 @@ pub struct PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess pub kind: PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind, } +/// Location-scoped approval details for an extension's access to sensitive environment variables, keyed by extension name and the exact set of variable names. +/// +///
+/// +/// **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 PermissionDecisionApproveForLocationApprovalExtensionEnvAccess { + /// Names of the sensitive environment variables this approval covers. Values are never persisted. + pub environment_variables: Vec, + /// Extension name. + pub extension_name: String, + /// Approval covering an extension's request to read sensitive environment variables. + pub kind: PermissionDecisionApproveForLocationApprovalExtensionEnvAccessKind, +} + /// Permission-decision request variant to approve and persist a permission for a project location, with approval details and location key. /// ///
@@ -9613,6 +10114,25 @@ pub struct PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess { pub kind: PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccessKind, } +/// Location-persisted tool approval details for an extension's access to sensitive environment variables, keyed by extension name and the exact set of variable names. +/// +///
+/// +/// **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 PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess { + /// Names of the sensitive environment variables this approval covers. Values are never persisted. + pub environment_variables: Vec, + /// Extension name. + pub extension_name: String, + /// Approval covering an extension's request to read sensitive environment variables. + pub kind: PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccessKind, +} + /// Location-scoped tool approval to persist. /// ///
@@ -9892,7 +10412,9 @@ pub struct PermissionRulesSet { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionsConfigureAdditionalContentExclusionPolicyRuleSource { + /// Name of the policy source. pub name: String, + /// Type of the policy source. pub r#type: String, } @@ -9907,10 +10429,13 @@ pub struct PermissionsConfigureAdditionalContentExclusionPolicyRuleSource { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionsConfigureAdditionalContentExclusionPolicyRule { + /// Conditions of which at least one must match. #[serde(skip_serializing_if = "Option::is_none")] pub if_any_match: Option>, + /// Conditions none of which may match. #[serde(skip_serializing_if = "Option::is_none")] pub if_none_match: Option>, + /// Path patterns covered by this rule. pub paths: Vec, /// Source descriptor for a `session.permissions.configure` content-exclusion rule, with source name and type. pub source: PermissionsConfigureAdditionalContentExclusionPolicyRuleSource, @@ -9927,8 +10452,10 @@ pub struct PermissionsConfigureAdditionalContentExclusionPolicyRule { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionsConfigureAdditionalContentExclusionPolicy { + /// Opaque policy update timestamp supplied by the host. #[serde(rename = "last_updated_at")] pub last_updated_at: serde_json::Value, + /// Content-exclusion rules to apply. pub rules: Vec, /// Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` enumeration. pub scope: PermissionsConfigureAdditionalContentExclusionPolicyScope, @@ -10517,6 +11044,21 @@ pub struct PluginListResult { pub plugins: Vec, } +/// Trusted built-in plugin directories to use for this runtime process. +/// +///
+/// +/// **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 PluginsBuiltinSetRequest { + /// Complete replacement set of trusted built-in plugin directories. Every entry must be an absolute local filesystem path no longer than 4096 characters. + pub paths: Vec, +} + /// Plugin names (or specs) to disable. /// ///
@@ -11535,6 +12077,7 @@ pub struct QueueDeferSessionIdleRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct QueueDuplicateAtRequest { + /// Stable opaque ID of the queued item to duplicate. pub id: String, } @@ -11676,6 +12219,7 @@ pub struct QueueInsertMessage { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct QueueInsertAtRequest { + /// Queued message contents and delivery metadata. pub message: QueueInsertMessage, /// Zero-based position in the public visible queue. Values outside the queue clamp to an end. pub position: i64, @@ -11777,6 +12321,7 @@ pub struct QueuePendingItemsResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct QueueRemoveAtRequest { + /// Stable opaque ID of the queued item to remove. pub id: String, } @@ -11821,6 +12366,7 @@ pub struct QueueRemoveMostRecentResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct QueueSendNowRequest { + /// Stable opaque ID of the queued item to steer into the live turn. pub id: String, } @@ -11850,6 +12396,7 @@ pub struct QueueSendNowResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct QueueSetDrainPausedRequest { + /// Whether queued-lane draining should be paused. pub paused: bool, } @@ -11887,9 +12434,12 @@ pub struct QueueSnapshotResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct QueueUpdateTextRequest { + /// Optional replacement prompt displayed to the user. #[serde(skip_serializing_if = "Option::is_none")] pub display_prompt: Option, + /// Stable opaque ID of the queued item to edit. pub id: String, + /// Replacement prompt sent to the model. pub prompt: String, } @@ -12073,7 +12623,7 @@ pub struct RemoteControlStatusActive { 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. + /// In-process prompt-manager handle (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. Retained as an optional compatibility field; native remote control does not populate or consume it. #[doc(hidden)] #[serde(skip_serializing_if = "Option::is_none")] pub(crate) prompt_manager: Option, @@ -12293,6 +12843,12 @@ pub struct RemoteSessionMetadataValue { /// Most recent working directory context. #[serde(skip_serializing_if = "Option::is_none")] pub context: Option, + /// Host-supplied human description of what the session is doing right now ("running tests", "waiting for approval"). Optional in the protocol and absent on hosts that do not publish it, so never rely on it -- it enriches `hostStatus`, it does not replace it. + #[serde(skip_serializing_if = "Option::is_none")] + pub host_activity: Option, + /// Live status as the owning host reports it in its session listing, so a row for a session running elsewhere can show that it is running. Absent for hosts that publish no such status (the cloud task managers), which read as idle. + #[serde(skip_serializing_if = "Option::is_none")] + pub host_status: Option, /// Always true for remote sessions. pub is_remote: bool, /// Last-modified time as an ISO 8601 timestamp. @@ -12522,7 +13078,7 @@ pub struct SandboxConfig { /// Whether to auto-add the current working directory to readwritePaths. Default: true. #[serde(skip_serializing_if = "Option::is_none")] pub add_current_working_directory: Option, - /// Whether to auto-grant read access to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Default: true (enabled by default; set to false to opt out). + /// Whether to auto-grant read access to the tool directories discovered on PATH and in toolchain environment variables (GOROOT, CARGO_HOME, JAVA_HOME, VIRTUAL_ENV, and similar), and to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Set to false to disable every grant listed above: user-installed toolchains (rustup, nvm, pyenv, conda, pipx) then need explicit userPolicy.filesystem entries — readonlyPaths to read them, plus readwriteFiles for a relocated CARGO_HOME's .package-cache and .global-cache, which Cargo locks on every build. Only these developer-tool grants are affected: the working directory (see addCurrentWorkingDirectory), temporary storage, session log paths, and system locations follow their own rules and stay granted, so commands still run. Default: true (enabled by default; set to false to opt out). #[serde(skip_serializing_if = "Option::is_none")] pub allow_dev_tool_access: Option, /// Credential-injection capability flags. @@ -13080,6 +13636,43 @@ pub struct SessionActivity { pub has_active_work: bool, } +/// Internal GitHub login parameters. +/// +///
+/// +/// **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 SessionAuthLoginRequest { + /// GitHub host URL + pub host: String, + /// GitHub login + pub login: String, + /// Whether to persist the token after login + #[serde(skip_serializing_if = "Option::is_none")] + pub persist: Option, + /// GitHub authentication token + pub token: String, +} + +/// Parameters identifying a GitHub authentication to log out. +/// +///
+/// +/// **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 SessionAuthLogoutUserRequest { + /// Authentication information to log out + pub auth_info: serde_json::Value, +} + /// Authentication status and account metadata for the session. /// ///
@@ -13110,6 +13703,24 @@ pub struct SessionAuthStatus { pub status_message: Option, } +/// Parameters for switching the session's active authentication. +/// +///
+/// +/// **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 SessionAuthSwitchRequest { + /// Authentication information to activate + pub auth_info: serde_json::Value, + /// Optional token paired with the authentication information + #[serde(skip_serializing_if = "Option::is_none")] + pub token: Option, +} + /// Map of sessionId -> bytes freed by removing the session's workspace directory. /// ///
@@ -13638,7 +14249,9 @@ pub struct SessionFsSqliteQueryResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsSqliteTransactionError { + /// Machine-readable classification of the transaction failure. pub error_class: SessionFsSqliteTransactionErrorClass, + /// Human-readable transaction failure message. pub message: String, } @@ -13675,6 +14288,7 @@ pub struct SessionFsSqliteTransactionStatement { pub struct SessionFsSqliteTransactionRequest { /// Target session identifier pub session_id: SessionId, + /// Ordered SQL statements to execute in one transaction. pub statements: Vec, } @@ -13689,8 +14303,10 @@ pub struct SessionFsSqliteTransactionRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFsSqliteTransactionResult { + /// Classified transaction failure, when execution did not succeed. #[serde(skip_serializing_if = "Option::is_none")] pub error: Option, + /// Per-statement query results in input order. pub results: Vec, } @@ -13804,10 +14420,13 @@ pub struct SessionInstalledPlugin { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionInstalledPluginSourceGitHub { + /// Optional repository-relative path to the plugin. #[serde(skip_serializing_if = "Option::is_none")] pub path: Option, + /// Optional Git ref to resolve. #[serde(skip_serializing_if = "Option::is_none")] pub r#ref: Option, + /// GitHub repository in `owner/repo` form. pub repo: String, /// Optional full 40-character hexadecimal commit SHA. #[serde(skip_serializing_if = "Option::is_none")] @@ -13827,6 +14446,7 @@ pub struct SessionInstalledPluginSourceGitHub { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionInstalledPluginSourceLocal { + /// Local filesystem path to the plugin. pub path: String, /// Constant value. Always "local". pub source: SessionInstalledPluginSourceLocalSource, @@ -13843,8 +14463,10 @@ pub struct SessionInstalledPluginSourceLocal { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionInstalledPluginSourceUrl { + /// Optional source-relative path to the plugin. #[serde(skip_serializing_if = "Option::is_none")] pub path: Option, + /// Optional Git ref to resolve. #[serde(skip_serializing_if = "Option::is_none")] pub r#ref: Option, /// Optional full 40-character hexadecimal commit SHA. @@ -13852,6 +14474,7 @@ pub struct SessionInstalledPluginSourceUrl { pub sha: Option, /// Constant value. Always "url". pub source: SessionInstalledPluginSourceUrlSource, + /// URL of the plugin source. pub url: String, } @@ -13885,6 +14508,7 @@ pub struct SessionLimitPredictionBaselineData { pub struct SessionLimitPredictionTierOption { /// AI-credit cap for this tier. pub cap: f64, + /// Semantic usage tier. pub tier: SessionLimitPredictionTier, } @@ -13942,6 +14566,7 @@ pub struct SessionLimitPredictionRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionLimitPredictionResultAvailable { + /// Prediction result variant discriminator. pub kind: SessionLimitPredictionResultAvailableKind, /// Predicted session limit details. pub prediction: SessionLimitPredictionDetails, @@ -13950,6 +14575,7 @@ pub struct SessionLimitPredictionResultAvailable { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionLimitPredictionResultUnavailable { + /// Prediction result variant discriminator. pub kind: SessionLimitPredictionResultUnavailableKind, /// Reason no prediction is available. pub reason: SessionLimitPredictionUnavailableReason, @@ -14048,6 +14674,7 @@ pub struct SessionManagedPermissions { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionManagedSettings { + /// Managed permission policy injected by the SDK host. #[serde(skip_serializing_if = "Option::is_none")] pub permissions: Option, } @@ -14146,7 +14773,9 @@ pub struct SessionMetadataSnapshot { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionModelPriceCategory { + /// CAPI model identifier. pub id: String, + /// Cost category assigned to the model. pub price_category: ModelPickerPriceCategory, } @@ -14182,7 +14811,9 @@ pub struct SessionModelList { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource { + /// Name of the policy source. pub name: String, + /// Type of the policy source. pub r#type: String, } @@ -14197,10 +14828,13 @@ pub struct SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionOpenOptionsAdditionalContentExclusionPolicyRule { + /// Conditions of which at least one must match. #[serde(skip_serializing_if = "Option::is_none")] pub if_any_match: Option>, + /// Conditions none of which may match. #[serde(skip_serializing_if = "Option::is_none")] pub if_none_match: Option>, + /// Path patterns covered by this rule. pub paths: Vec, /// Source descriptor for a `sessions.open` content-exclusion rule, with source name and type. pub source: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource, @@ -14217,8 +14851,10 @@ pub struct SessionOpenOptionsAdditionalContentExclusionPolicyRule { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionOpenOptionsAdditionalContentExclusionPolicy { + /// Opaque policy update timestamp supplied by the host. #[serde(rename = "last_updated_at")] pub last_updated_at: serde_json::Value, + /// Content-exclusion rules to apply. pub rules: Vec, /// Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` enumeration. pub scope: SessionOpenOptionsAdditionalContentExclusionPolicyScope, @@ -14916,8 +15552,10 @@ pub struct SessionSetCredentialsResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSettingsBuiltInToolAvailabilitySnapshot { + /// Whether the create-pull-request tool is available. #[serde(skip_serializing_if = "Option::is_none")] pub create_pull_request: Option, + /// Whether the report-progress tool is available. #[serde(skip_serializing_if = "Option::is_none")] pub report_progress: Option, } @@ -14951,6 +15589,7 @@ pub struct SessionSettingsEvaluatePredicateRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSettingsEvaluatePredicateResult { + /// Whether the named settings predicate evaluated to enabled. pub enabled: bool, } @@ -14965,10 +15604,13 @@ pub struct SessionSettingsEvaluatePredicateResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSettingsJobSnapshot { + /// Availability of job-specific built-in tools. #[serde(skip_serializing_if = "Option::is_none")] pub built_in_tool_availability: Option, + /// GitHub Actions event type for the job. #[serde(skip_serializing_if = "Option::is_none")] pub event_type: Option, + /// Whether this is the workflow's trigger job. #[serde(skip_serializing_if = "Option::is_none")] pub is_trigger_job: Option, } @@ -14984,12 +15626,16 @@ pub struct SessionSettingsJobSnapshot { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSettingsModelSnapshot { + /// Agent service callback URL for job and progress updates. #[serde(skip_serializing_if = "Option::is_none")] pub callback_url: Option, + /// Default reasoning effort for the selected model. #[serde(skip_serializing_if = "Option::is_none")] pub default_reasoning_effort: Option, + /// Agent job identifier for the session. #[serde(skip_serializing_if = "Option::is_none")] pub instance_id: Option, + /// Selected model identifier. #[serde(skip_serializing_if = "Option::is_none")] pub model: Option, } @@ -15005,8 +15651,10 @@ pub struct SessionSettingsModelSnapshot { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSettingsOnlineEvaluationSnapshot { + /// Whether online evaluation is disabled. #[serde(skip_serializing_if = "Option::is_none")] pub disable_online_evaluation: Option, + /// Whether online-evaluation output-file generation is enabled. #[serde(skip_serializing_if = "Option::is_none")] pub enable_online_evaluation_output_file: Option, } @@ -15022,28 +15670,40 @@ pub struct SessionSettingsOnlineEvaluationSnapshot { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSettingsRepoSnapshot { + /// Checked-out repository branch. #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, + /// Checked-out commit SHA. #[serde(skip_serializing_if = "Option::is_none")] pub commit: Option, + /// GitHub server host name. #[serde(skip_serializing_if = "Option::is_none")] pub host: Option, + /// Protocol used to access the GitHub host. #[serde(skip_serializing_if = "Option::is_none")] pub host_protocol: Option, + /// GitHub repository database ID. #[serde(skip_serializing_if = "Option::is_none")] pub id: Option, + /// Repository name. #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, + /// GitHub repository owner database ID. #[serde(skip_serializing_if = "Option::is_none")] pub owner_id: Option, + /// Repository owner login. #[serde(skip_serializing_if = "Option::is_none")] pub owner_name: Option, + /// Number of commits in the pull request. #[serde(skip_serializing_if = "Option::is_none")] pub pr_commit_count: Option, + /// Whether the repository is writable. #[serde(skip_serializing_if = "Option::is_none")] pub read_write: Option, + /// GitHub secret-scanning service URL. #[serde(skip_serializing_if = "Option::is_none")] pub secret_scanning_url: Option, + /// GitHub server base URL. #[serde(skip_serializing_if = "Option::is_none")] pub server_url: Option, } @@ -15059,22 +15719,31 @@ pub struct SessionSettingsRepoSnapshot { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSettingsValidationSnapshot { + /// Whether advisory validation is enabled. #[serde(skip_serializing_if = "Option::is_none")] pub advisory_enabled: Option, + /// Whether CodeQL validation is enabled. #[serde(skip_serializing_if = "Option::is_none")] pub codeql_enabled: Option, + /// Whether code-review validation is enabled. #[serde(skip_serializing_if = "Option::is_none")] pub code_review_enabled: Option, + /// Model used for code-review validation. #[serde(skip_serializing_if = "Option::is_none")] pub code_review_model: Option, + /// Dependabot validation timeout budget in seconds. #[serde(skip_serializing_if = "Option::is_none")] pub dependabot_timeout: Option, + /// Whether the memory-store tool is enabled. #[serde(skip_serializing_if = "Option::is_none")] pub memory_store_enabled: Option, + /// Whether the memory-vote tool is enabled. #[serde(skip_serializing_if = "Option::is_none")] pub memory_vote_enabled: Option, + /// Whether secret-scanning validation is enabled. #[serde(skip_serializing_if = "Option::is_none")] pub secret_scanning_enabled: Option, + /// General validation timeout budget in seconds. #[serde(skip_serializing_if = "Option::is_none")] pub timeout: Option, } @@ -15090,17 +15759,26 @@ pub struct SessionSettingsValidationSnapshot { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSettingsSnapshot { + /// Name of the SDK client that created the session. #[serde(skip_serializing_if = "Option::is_none")] pub client_name: Option, + /// Redacted job settings. pub job: SessionSettingsJobSnapshot, + /// Redacted model routing settings. pub model: SessionSettingsModelSnapshot, + /// Online-evaluation settings safe for SDK consumers. pub online_evaluation: SessionSettingsOnlineEvaluationSnapshot, + /// Redacted repository and host settings. pub repo: SessionSettingsRepoSnapshot, + /// Session start time as Unix epoch milliseconds. #[serde(skip_serializing_if = "Option::is_none")] pub start_time_ms: Option, + /// Session timeout in milliseconds. #[serde(skip_serializing_if = "Option::is_none")] pub timeout_ms: Option, + /// Redacted validation and memory-tool settings. pub validation: SessionSettingsValidationSnapshot, + /// Agent runtime version selector copied from the session settings, such as `latest` or a runtime release identifier. #[serde(skip_serializing_if = "Option::is_none")] pub version: Option, } @@ -16424,6 +17102,9 @@ pub struct TaskAgentInfo { pub completed_at: Option, /// Short description of the task pub description: String, + /// Friendly, non-unique name intended for display + #[serde(skip_serializing_if = "Option::is_none")] + pub display_name: Option, /// Error message when the task failed #[serde(skip_serializing_if = "Option::is_none")] pub error: Option, @@ -16794,7 +17475,7 @@ pub struct TasksStartAgentRequest { /// Optional model override #[serde(skip_serializing_if = "Option::is_none")] pub model: Option, - /// Short name for the agent, used to generate a human-readable ID + /// Friendly, non-unique name used when displaying the agent pub name: String, /// Task prompt for the agent pub prompt: String, @@ -17104,10 +17785,19 @@ pub struct UIElicitationSchema { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationRequest { + /// MCP request metadata. + #[serde(rename = "_meta", skip_serializing_if = "Option::is_none")] + pub meta: Option>, /// Message describing what information is needed from the user pub message: String, + /// Elicitation mode. Omitted and form are equivalent for structured elicitation. + #[serde(skip_serializing_if = "Option::is_none")] + pub mode: Option, /// JSON Schema describing the form fields to present to the user pub requested_schema: UIElicitationSchema, + /// MCP task metadata. + #[serde(skip_serializing_if = "Option::is_none")] + pub task: Option, } /// The elicitation response (accept with form values, decline, or cancel) @@ -17121,6 +17811,9 @@ pub struct UIElicitationRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationResponse { + /// MCP response metadata. + #[serde(rename = "_meta", skip_serializing_if = "Option::is_none")] + pub meta: Option>, /// The user's response: accept (submitted), decline (rejected), or cancel (dismissed) pub action: UIElicitationResponseAction, /// The form values submitted by the user (present when action is 'accept') @@ -18017,8 +18710,10 @@ pub struct WorkspacesAddSummaryRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorkspacesAddSummaryResult { + /// Metadata for the persisted summary. #[serde(skip_serializing_if = "Option::is_none")] pub summary: Option, + /// Refreshed metadata for the containing workspace. #[serde(skip_serializing_if = "Option::is_none")] pub workspace: Option, } @@ -18126,41 +18821,57 @@ pub struct WorkspacesEnsureRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorkspacesGetWorkspaceResultWorkspace { + /// Current Git branch. #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, + /// Whether the per-session Chronicle upgrade prompt was dismissed for the workspace. #[serde( rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none" )] pub chronicle_sync_dismissed: Option, + /// Name of the client that created the workspace. #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, + /// Timestamp when the workspace was created. #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] pub created_at: Option, + /// Current working directory associated with the workspace. #[serde(skip_serializing_if = "Option::is_none")] pub cwd: Option, + /// Git repository root associated with the workspace. #[serde(rename = "git_root", skip_serializing_if = "Option::is_none")] pub git_root: Option, /// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. #[serde(rename = "host_type", skip_serializing_if = "Option::is_none")] pub host_type: Option, + /// Stable workspace identifier. pub id: String, + /// Most recent Mission Control event identifier observed for the workspace. #[serde(rename = "mc_last_event_id", skip_serializing_if = "Option::is_none")] pub mc_last_event_id: Option, + /// Mission Control session identifier associated with the workspace. #[serde(rename = "mc_session_id", skip_serializing_if = "Option::is_none")] pub mc_session_id: Option, + /// Mission Control task identifier associated with the workspace. #[serde(rename = "mc_task_id", skip_serializing_if = "Option::is_none")] pub mc_task_id: Option, + /// Workspace display name. #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, + /// Whether the workspace session can be steered remotely. #[serde(rename = "remote_steerable", skip_serializing_if = "Option::is_none")] pub remote_steerable: Option, + /// Repository identifier associated with the workspace. #[serde(skip_serializing_if = "Option::is_none")] pub repository: Option, + /// Number of persisted summaries in the workspace. #[serde(rename = "summary_count", skip_serializing_if = "Option::is_none")] pub summary_count: Option, + /// Timestamp when the workspace was last updated. #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] pub updated_at: Option, + /// Whether the workspace name was explicitly chosen by the user. #[serde(rename = "user_named", skip_serializing_if = "Option::is_none")] pub user_named: Option, } @@ -19190,6 +19901,81 @@ pub struct SessionGitHubAuthSetCredentialsResult { 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 SessionGitHubAuthGetCurrentAuthInfoParams { + /// Target session identifier + 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 SessionGitHubAuthGetAllAuthAvailableParams { + /// Target session identifier + 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 SessionGitHubAuthRefreshCopilotUserParams { + /// Target session identifier + 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 SessionGitHubAuthLogoutParams { + /// Target session identifier + 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 SessionGitHubAuthLastAuthErrorsParams { + /// Target session identifier + pub session_id: SessionId, +} + /// Result of collecting a redacted debug bundle. /// ///
@@ -19429,6 +20215,7 @@ pub struct SessionFactoryListRunsResult { /// Number of terminal runs older than this page. #[serde(skip_serializing_if = "Option::is_none")] pub omitted_older: Option, + /// Factory run summaries in durable creation order. pub runs: Vec, } @@ -19443,27 +20230,49 @@ pub struct SessionFactoryListRunsResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFactoryGetRunDetailResult { + /// Epoch milliseconds when the current active segment started, or null while inactive. pub active_segment_started_at: Option, + /// Durable identities and live statuses for direct factory agents. pub agents: Vec, + /// Approved effective resource ceilings, or null until approved. pub approved: Option, + /// Epoch milliseconds when the run completed, or null while nonterminal. pub completed_at: Option, + /// Durable resource consumption. pub consumed: FactoryRunConsumed, + /// Epoch milliseconds when the run was created. pub created_at: i64, + /// Current phase identity, or null before any phase is entered. pub current_phase: Option, + /// Resource ceilings declared by the factory. pub declared_limits: FactoryDeclaredLimits, + /// Number of phases declared by the factory. pub declared_phase_count: i64, + /// Human-readable factory description. pub description: String, + /// Registered factory name. pub factory_name: String, + /// Number of direct factory agents currently live. pub live_agent_count: i64, + /// Epoch milliseconds when this live-overlay snapshot was observed. pub observed_at: i64, + /// Lifecycle and timing observations for each factory phase. pub phases: Vec, + /// Bidirectional page of durable factory progress. pub progress: FactoryProgressPage, + /// Monotonic durable run revision. pub revision: i64, + /// Factory run identifier. pub run_id: String, + /// Epoch milliseconds when execution first started, or null before start. pub started_at: Option, + /// Current factory run status. pub status: FactoryRunStatus, + /// Terminal run outcome, or null while nonterminal. pub terminal: Option, + /// Total direct factory agents spawned across all attempts. pub total_spawned_agent_count: i64, + /// Epoch milliseconds when the durable run was last updated. pub updated_at: i64, } @@ -19478,10 +20287,15 @@ pub struct SessionFactoryGetRunDetailResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFactoryGetRunProgressResult { + /// Whether progress records newer than this page exist. pub has_more_newer: bool, + /// Whether progress records older than this page exist. pub has_more_older: bool, + /// Newest sequence number in this page, or null when empty. pub newest_seq: Option, + /// Oldest sequence number in this page, or null when empty. pub oldest_seq: Option, + /// Progress records in sequence order. pub records: Vec, /// Run revision reflected by this page. pub revision: i64, @@ -19858,41 +20672,57 @@ pub struct SessionWorkspacesGetWorkspaceParams { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionWorkspacesGetWorkspaceResultWorkspace { + /// Current Git branch. #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, + /// Whether the per-session Chronicle upgrade prompt was dismissed for the workspace. #[serde( rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none" )] pub chronicle_sync_dismissed: Option, + /// Name of the client that created the workspace. #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, + /// Timestamp when the workspace was created. #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] pub created_at: Option, + /// Current working directory associated with the workspace. #[serde(skip_serializing_if = "Option::is_none")] pub cwd: Option, + /// Git repository root associated with the workspace. #[serde(rename = "git_root", skip_serializing_if = "Option::is_none")] pub git_root: Option, /// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. #[serde(rename = "host_type", skip_serializing_if = "Option::is_none")] pub host_type: Option, + /// Stable workspace identifier. pub id: String, + /// Most recent Mission Control event identifier observed for the workspace. #[serde(rename = "mc_last_event_id", skip_serializing_if = "Option::is_none")] pub mc_last_event_id: Option, + /// Mission Control session identifier associated with the workspace. #[serde(rename = "mc_session_id", skip_serializing_if = "Option::is_none")] pub mc_session_id: Option, + /// Mission Control task identifier associated with the workspace. #[serde(rename = "mc_task_id", skip_serializing_if = "Option::is_none")] pub mc_task_id: Option, + /// Workspace display name. #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, + /// Whether the workspace session can be steered remotely. #[serde(rename = "remote_steerable", skip_serializing_if = "Option::is_none")] pub remote_steerable: Option, + /// Repository identifier associated with the workspace. #[serde(skip_serializing_if = "Option::is_none")] pub repository: Option, + /// Number of persisted summaries in the workspace. #[serde(rename = "summary_count", skip_serializing_if = "Option::is_none")] pub summary_count: Option, + /// Timestamp when the workspace was last updated. #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] pub updated_at: Option, + /// Whether the workspace name was explicitly chosen by the user. #[serde(rename = "user_named", skip_serializing_if = "Option::is_none")] pub user_named: Option, } @@ -19918,41 +20748,57 @@ pub struct SessionWorkspacesGetWorkspaceResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionWorkspacesUpdateMetadataResultWorkspace { + /// Current Git branch. #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, + /// Whether the per-session Chronicle upgrade prompt was dismissed for the workspace. #[serde( rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none" )] pub chronicle_sync_dismissed: Option, + /// Name of the client that created the workspace. #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, + /// Timestamp when the workspace was created. #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] pub created_at: Option, + /// Current working directory associated with the workspace. #[serde(skip_serializing_if = "Option::is_none")] pub cwd: Option, + /// Git repository root associated with the workspace. #[serde(rename = "git_root", skip_serializing_if = "Option::is_none")] pub git_root: Option, /// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. #[serde(rename = "host_type", skip_serializing_if = "Option::is_none")] pub host_type: Option, + /// Stable workspace identifier. pub id: String, + /// Most recent Mission Control event identifier observed for the workspace. #[serde(rename = "mc_last_event_id", skip_serializing_if = "Option::is_none")] pub mc_last_event_id: Option, + /// Mission Control session identifier associated with the workspace. #[serde(rename = "mc_session_id", skip_serializing_if = "Option::is_none")] pub mc_session_id: Option, + /// Mission Control task identifier associated with the workspace. #[serde(rename = "mc_task_id", skip_serializing_if = "Option::is_none")] pub mc_task_id: Option, + /// Workspace display name. #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, + /// Whether the workspace session can be steered remotely. #[serde(rename = "remote_steerable", skip_serializing_if = "Option::is_none")] pub remote_steerable: Option, + /// Repository identifier associated with the workspace. #[serde(skip_serializing_if = "Option::is_none")] pub repository: Option, + /// Number of persisted summaries in the workspace. #[serde(rename = "summary_count", skip_serializing_if = "Option::is_none")] pub summary_count: Option, + /// Timestamp when the workspace was last updated. #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] pub updated_at: Option, + /// Whether the workspace name was explicitly chosen by the user. #[serde(rename = "user_named", skip_serializing_if = "Option::is_none")] pub user_named: Option, } @@ -19978,41 +20824,57 @@ pub struct SessionWorkspacesUpdateMetadataResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionWorkspacesEnsureResultWorkspace { + /// Current Git branch. #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, + /// Whether the per-session Chronicle upgrade prompt was dismissed for the workspace. #[serde( rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none" )] pub chronicle_sync_dismissed: Option, + /// Name of the client that created the workspace. #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, + /// Timestamp when the workspace was created. #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] pub created_at: Option, + /// Current working directory associated with the workspace. #[serde(skip_serializing_if = "Option::is_none")] pub cwd: Option, + /// Git repository root associated with the workspace. #[serde(rename = "git_root", skip_serializing_if = "Option::is_none")] pub git_root: Option, /// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. #[serde(rename = "host_type", skip_serializing_if = "Option::is_none")] pub host_type: Option, + /// Stable workspace identifier. pub id: String, + /// Most recent Mission Control event identifier observed for the workspace. #[serde(rename = "mc_last_event_id", skip_serializing_if = "Option::is_none")] pub mc_last_event_id: Option, + /// Mission Control session identifier associated with the workspace. #[serde(rename = "mc_session_id", skip_serializing_if = "Option::is_none")] pub mc_session_id: Option, + /// Mission Control task identifier associated with the workspace. #[serde(rename = "mc_task_id", skip_serializing_if = "Option::is_none")] pub mc_task_id: Option, + /// Workspace display name. #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, + /// Whether the workspace session can be steered remotely. #[serde(rename = "remote_steerable", skip_serializing_if = "Option::is_none")] pub remote_steerable: Option, + /// Repository identifier associated with the workspace. #[serde(skip_serializing_if = "Option::is_none")] pub repository: Option, + /// Number of persisted summaries in the workspace. #[serde(rename = "summary_count", skip_serializing_if = "Option::is_none")] pub summary_count: Option, + /// Timestamp when the workspace was last updated. #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] pub updated_at: Option, + /// Whether the workspace name was explicitly chosen by the user. #[serde(rename = "user_named", skip_serializing_if = "Option::is_none")] pub user_named: Option, } @@ -20136,8 +20998,10 @@ pub struct SessionWorkspacesReadCheckpointResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionWorkspacesAddSummaryResult { + /// Metadata for the persisted summary. #[serde(skip_serializing_if = "Option::is_none")] pub summary: Option, + /// Refreshed metadata for the containing workspace. #[serde(skip_serializing_if = "Option::is_none")] pub workspace: Option, } @@ -20145,41 +21009,57 @@ pub struct SessionWorkspacesAddSummaryResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionWorkspacesTruncateSummariesResultWorkspace { + /// Current Git branch. #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, + /// Whether the per-session Chronicle upgrade prompt was dismissed for the workspace. #[serde( rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none" )] pub chronicle_sync_dismissed: Option, + /// Name of the client that created the workspace. #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, + /// Timestamp when the workspace was created. #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] pub created_at: Option, + /// Current working directory associated with the workspace. #[serde(skip_serializing_if = "Option::is_none")] pub cwd: Option, + /// Git repository root associated with the workspace. #[serde(rename = "git_root", skip_serializing_if = "Option::is_none")] pub git_root: Option, /// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. #[serde(rename = "host_type", skip_serializing_if = "Option::is_none")] pub host_type: Option, + /// Stable workspace identifier. pub id: String, + /// Most recent Mission Control event identifier observed for the workspace. #[serde(rename = "mc_last_event_id", skip_serializing_if = "Option::is_none")] pub mc_last_event_id: Option, + /// Mission Control session identifier associated with the workspace. #[serde(rename = "mc_session_id", skip_serializing_if = "Option::is_none")] pub mc_session_id: Option, + /// Mission Control task identifier associated with the workspace. #[serde(rename = "mc_task_id", skip_serializing_if = "Option::is_none")] pub mc_task_id: Option, + /// Workspace display name. #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, + /// Whether the workspace session can be steered remotely. #[serde(rename = "remote_steerable", skip_serializing_if = "Option::is_none")] pub remote_steerable: Option, + /// Repository identifier associated with the workspace. #[serde(skip_serializing_if = "Option::is_none")] pub repository: Option, + /// Number of persisted summaries in the workspace. #[serde(rename = "summary_count", skip_serializing_if = "Option::is_none")] pub summary_count: Option, + /// Timestamp when the workspace was last updated. #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] pub updated_at: Option, + /// Whether the workspace name was explicitly chosen by the user. #[serde(rename = "user_named", skip_serializing_if = "Option::is_none")] pub user_named: Option, } @@ -20978,6 +21858,9 @@ pub struct SessionMcpReloadWithConfigResult { /// Non-default servers allowed by policy #[serde(skip_serializing_if = "Option::is_none")] pub allowed_servers: Option>, + /// Servers whose connection attempt failed. + #[serde(skip_serializing_if = "Option::is_none")] + pub failed_servers: Option>, /// Servers filtered out before startup pub filtered_servers: Vec, } @@ -21638,6 +22521,9 @@ pub struct SessionUiEphemeralQueryResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionUiElicitationResult { + /// MCP response metadata. + #[serde(rename = "_meta", skip_serializing_if = "Option::is_none")] + pub meta: Option>, /// The user's response: accept (submitted), decline (rejected), or cancel (dismissed) pub action: UIElicitationResponseAction, /// The form values submitted by the user (present when action is 'accept') @@ -22525,17 +23411,26 @@ pub struct SessionSettingsSnapshotParams { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSettingsSnapshotResult { + /// Name of the SDK client that created the session. #[serde(skip_serializing_if = "Option::is_none")] pub client_name: Option, + /// Redacted job settings. pub job: SessionSettingsJobSnapshot, + /// Redacted model routing settings. pub model: SessionSettingsModelSnapshot, + /// Online-evaluation settings safe for SDK consumers. pub online_evaluation: SessionSettingsOnlineEvaluationSnapshot, + /// Redacted repository and host settings. pub repo: SessionSettingsRepoSnapshot, + /// Session start time as Unix epoch milliseconds. #[serde(skip_serializing_if = "Option::is_none")] pub start_time_ms: Option, + /// Session timeout in milliseconds. #[serde(skip_serializing_if = "Option::is_none")] pub timeout_ms: Option, + /// Redacted validation and memory-tool settings. pub validation: SessionSettingsValidationSnapshot, + /// Agent runtime version selector copied from the session settings, such as `latest` or a runtime release identifier. #[serde(skip_serializing_if = "Option::is_none")] pub version: Option, } @@ -23673,6 +24568,16 @@ pub struct CanvasOpenResult { pub url: Option, } +/// Validation errors from the most recent authentication attempt. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+pub type AuthValidationErrors = Vec; + /// HTTP headers as a map from lowercased header name to a list of values. Multi-valued headers (e.g. Set-Cookie) preserve all values. /// ///
@@ -23723,6 +24628,46 @@ pub type AccountGetAllUsersResult = Vec; ///
pub type SessionCancelAllBackgroundAgentsResult = i64; +/// Authentication accounts available to the internal session host. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+pub type SessionGitHubAuthGetAllAuthAvailableResult = Vec; + +/// Whether the current authentication was logged out. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+pub type SessionGitHubAuthLogoutResult = bool; + +/// Whether the requested authentication was logged out. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+pub type SessionGitHubAuthLogoutUserResult = bool; + +/// Validation errors from the most recent authentication attempt. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+pub type SessionGitHubAuthLastAuthErrorsResult = Vec; + /// Standard MCP CallToolResult /// ///
@@ -24442,6 +25387,7 @@ pub enum DebugCollectLogsSource { Unknown, } +/// Destination variant discriminator. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum DebugCollectLogsDestinationArchiveKind { #[serde(rename = "archive")] @@ -24449,6 +25395,7 @@ pub enum DebugCollectLogsDestinationArchiveKind { Archive, } +/// Destination variant discriminator. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum DebugCollectLogsDestinationDirectoryKind { #[serde(rename = "directory")] @@ -25653,6 +26600,25 @@ pub enum McpAppsSetHostContextDetailsTheme { Unknown, } +/// Structured MCP elicitation 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, PartialEq, Eq, Serialize, Deserialize)] +pub enum McpElicitationFormMode { + #[serde(rename = "form")] + Form, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Headers-refresh response variant discriminator. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum McpHeadersHandlePendingHeadersRefreshRequestHeadersKind { #[serde(rename = "headers")] @@ -25660,6 +26626,7 @@ pub enum McpHeadersHandlePendingHeadersRefreshRequestHeadersKind { Headers, } +/// Headers-refresh response variant discriminator. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum McpHeadersHandlePendingHeadersRefreshRequestNoneKind { #[serde(rename = "none")] @@ -25704,6 +26671,7 @@ pub enum McpToolUiVisibility { Unknown, } +/// OAuth response variant discriminator. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum McpOauthPendingRequestResponseTokenKind { #[serde(rename = "token")] @@ -25711,6 +26679,7 @@ pub enum McpOauthPendingRequestResponseTokenKind { Token, } +/// OAuth response variant discriminator. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum McpOauthPendingRequestResponseCancelledKind { #[serde(rename = "cancelled")] @@ -25755,6 +26724,31 @@ pub enum McpOauthLoginGrantType { Unknown, } +/// Why a passive MCP OAuth probe determined authentication is needed. +/// +///
+/// +/// **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 McpOauthProbeNeedsAuthReason { + /// No token was sent and the server requires authentication. + #[serde(rename = "initial")] + Initial, + /// A cached token was sent and rejected. + #[serde(rename = "refresh")] + Refresh, + /// The server returned a 403 insufficient_scope challenge, indicating additional scopes or audience are needed. + #[serde(rename = "upscope")] + Upscope, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// 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. /// ///
@@ -25846,6 +26840,46 @@ pub enum McpServerConfigHttpType { Unknown, } +/// In-process MCP transport 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 McpServerConfigMemoryType { + #[serde(rename = "memory")] + Memory, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Local MCP transport 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 McpServerConfigStdioType { + /// Legacy alias for the local stdio transport. + #[serde(rename = "local")] + Local, + /// Server communicates over stdio with a local child process. + #[serde(rename = "stdio")] + Stdio, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// 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". /// ///
@@ -26285,6 +27319,14 @@ pub enum PermissionDecisionApproveForSessionApprovalExtensionPermissionAccessKin ExtensionPermissionAccess, } +/// Approval covering an extension's request to read sensitive environment variables. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionDecisionApproveForSessionApprovalExtensionEnvAccessKind { + #[serde(rename = "extension-env-access")] + #[default] + ExtensionEnvAccess, +} + /// Session-scoped approval to remember (tool prompts only; omitted for path/url prompts) /// ///
@@ -26306,6 +27348,7 @@ pub enum PermissionDecisionApproveForSessionApproval { ExtensionManagement(PermissionDecisionApproveForSessionApprovalExtensionManagement), Factory(PermissionDecisionApproveForSessionApprovalFactory), ExtensionPermissionAccess(PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess), + ExtensionEnvAccess(PermissionDecisionApproveForSessionApprovalExtensionEnvAccess), } /// Approve and remember for the rest of the session @@ -26396,6 +27439,14 @@ pub enum PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKi ExtensionPermissionAccess, } +/// Approval covering an extension's request to read sensitive environment variables. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionDecisionApproveForLocationApprovalExtensionEnvAccessKind { + #[serde(rename = "extension-env-access")] + #[default] + ExtensionEnvAccess, +} + /// Approval to persist for this location /// ///
@@ -26419,6 +27470,7 @@ pub enum PermissionDecisionApproveForLocationApproval { ExtensionPermissionAccess( PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess, ), + ExtensionEnvAccess(PermissionDecisionApproveForLocationApprovalExtensionEnvAccess), } /// Approve and persist for this project location @@ -26716,6 +27768,14 @@ pub enum PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccessKind ExtensionPermissionAccess, } +/// Approval covering an extension's request to read sensitive environment variables. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccessKind { + #[serde(rename = "extension-env-access")] + #[default] + ExtensionEnvAccess, +} + /// Tool approval to persist and apply /// ///
@@ -26737,6 +27797,7 @@ pub enum PermissionsLocationsAddToolApprovalDetails { ExtensionManagement(PermissionsLocationsAddToolApprovalDetailsExtensionManagement), Factory(PermissionsLocationsAddToolApprovalDetailsFactory), ExtensionPermissionAccess(PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess), + ExtensionEnvAccess(PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess), } /// Whether the location is a git repo or directory @@ -27188,6 +28249,34 @@ pub enum RemoteSessionMode { Unknown, } +/// What a remote host says one of its sessions is doing right now. Deliberately coarse: this is what a host can report for EVERY session in a catalogue listing, without a client subscribing to each one. AHP's `SessionSummary.status` is the source today; `input-needed` covers both a permission prompt and an `ask_user` question, since the summary does not say which. +/// +///
+/// +/// **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 RemoteSessionHostStatus { + /// No turn is running. + #[serde(rename = "idle")] + Idle, + /// A turn is running. + #[serde(rename = "working")] + Working, + /// The session is blocked on the user: a permission prompt or an `ask_user` question. + #[serde(rename = "input-needed")] + InputNeeded, + /// The session ended its last turn in an error. + #[serde(rename = "error")] + Error, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Whether the remote task originated from CCA or CLI `--remote`. /// ///
@@ -27472,6 +28561,7 @@ pub enum SessionLimitPredictionSource { Unknown, } +/// Prediction result variant discriminator. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionLimitPredictionResultAvailableKind { #[serde(rename = "available")] @@ -27479,6 +28569,7 @@ pub enum SessionLimitPredictionResultAvailableKind { Available, } +/// Prediction result variant discriminator. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionLimitPredictionResultUnavailableKind { #[serde(rename = "unavailable")] diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs index fae4d7e16..a42fca697 100644 --- a/rust/src/generated/rpc.rs +++ b/rust/src/generated/rpc.rs @@ -1124,6 +1124,13 @@ pub struct ClientRpcPlugins<'a> { } impl<'a> ClientRpcPlugins<'a> { + /// `plugins.builtin.*` sub-namespace. + pub fn builtin(&self) -> ClientRpcPluginsBuiltin<'a> { + ClientRpcPluginsBuiltin { + client: self.client, + } + } + /// `plugins.marketplaces.*` sub-namespace. pub fn marketplaces(&self) -> ClientRpcPluginsMarketplaces<'a> { ClientRpcPluginsMarketplaces { @@ -1311,6 +1318,38 @@ impl<'a> ClientRpcPlugins<'a> { } } +/// `plugins.builtin.*` RPCs. +#[derive(Clone, Copy)] +pub struct ClientRpcPluginsBuiltin<'a> { + pub(crate) client: &'a Client, +} + +impl<'a> ClientRpcPluginsBuiltin<'a> { + /// Replaces this server's trusted built-in plugin directories while no sessions are active. + /// + /// Wire method: `plugins.builtin.set`. + /// + /// # Parameters + /// + /// * `params` - Trusted built-in plugin directories to use for this runtime 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 set(&self, params: PluginsBuiltinSetRequest) -> Result<(), Error> { + let wire_params = serde_json::to_value(params)?; + let _value = self + .client + .call(rpc_methods::PLUGINS_BUILTIN_SET, Some(wire_params)) + .await?; + Ok(()) + } +} + /// `plugins.marketplaces.*` RPCs. #[derive(Clone, Copy)] pub struct ClientRpcPluginsMarketplaces<'a> { @@ -3589,6 +3628,13 @@ impl<'a> SessionRpcCanvas<'a> { } } + /// `session.canvas.provider.*` sub-namespace. + pub fn provider(&self) -> SessionRpcCanvasProvider<'a> { + SessionRpcCanvasProvider { + session: self.session, + } + } + /// Lists canvases declared for the session. /// /// Wire method: `session.canvas.list`. @@ -3737,6 +3783,78 @@ impl<'a> SessionRpcCanvasAction<'a> { } } +/// `session.canvas.provider.*` RPCs. +#[derive(Clone, Copy)] +pub struct SessionRpcCanvasProvider<'a> { + pub(crate) session: &'a Session, +} + +impl<'a> SessionRpcCanvasProvider<'a> { + /// Registers an internal canvas provider connection and its contributions. + /// + /// Wire method: `session.canvas.provider.register`. + /// + /// # Parameters + /// + /// * `params` - Internal canvas provider registration parameters. + /// + ///
+ /// + /// **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 register( + &self, + params: CanvasProviderRegisterRequest, + ) -> 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_CANVAS_PROVIDER_REGISTER, + Some(wire_params), + ) + .await?; + Ok(()) + } + + /// Unregisters an internal canvas provider connection. + /// + /// Wire method: `session.canvas.provider.unregister`. + /// + /// # Parameters + /// + /// * `params` - Internal canvas provider unregistration parameters. + /// + ///
+ /// + /// **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 unregister( + &self, + params: CanvasProviderUnregisterRequest, + ) -> 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_CANVAS_PROVIDER_UNREGISTER, + Some(wire_params), + ) + .await?; + Ok(()) + } +} + /// `session.commands.*` RPCs. #[derive(Clone, Copy)] pub struct SessionRpcCommands<'a> { @@ -4876,6 +4994,243 @@ impl<'a> SessionRpcGitHubAuth<'a> { .await?; Ok(serde_json::from_value(_value)?) } + + /// Gets the current authentication information for internal session hosts. + /// + /// Wire method: `session.gitHubAuth.getCurrentAuthInfo`. + /// + /// # Returns + /// + /// Current authentication information, or null when no authentication is 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(crate) async fn get_current_auth_info(&self) -> Result { + let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_GITHUBAUTH_GETCURRENTAUTHINFO, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Gets all authentication accounts available to the internal session host. + /// + /// Wire method: `session.gitHubAuth.getAllAuthAvailable`. + /// + /// # Returns + /// + /// Authentication accounts available to the internal session host. + /// + ///
+ /// + /// **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_all_auth_available( + &self, + ) -> Result { + let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_GITHUBAUTH_GETALLAUTHAVAILABLE, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Refreshes Copilot account metadata for the current authentication. + /// + /// Wire method: `session.gitHubAuth.refreshCopilotUser`. + /// + /// # Returns + /// + /// Current authentication information, or null when no authentication is 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(crate) async fn refresh_copilot_user(&self) -> Result { + let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_GITHUBAUTH_REFRESHCOPILOTUSER, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Logs in a GitHub user through the internal session host. + /// + /// Wire method: `session.gitHubAuth.login`. + /// + /// # Parameters + /// + /// * `params` - Internal GitHub login parameters. + /// + /// # Returns + /// + /// Initial authentication info 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(crate) async fn login(&self, params: SessionAuthLoginRequest) -> 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_GITHUBAUTH_LOGIN, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Switches the session to another available authentication. + /// + /// Wire method: `session.gitHubAuth.switchToAuth`. + /// + /// # Parameters + /// + /// * `params` - Parameters for switching the session's active authentication. + /// + ///
+ /// + /// **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 switch_to_auth( + &self, + params: SessionAuthSwitchRequest, + ) -> 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_GITHUBAUTH_SWITCHTOAUTH, + Some(wire_params), + ) + .await?; + Ok(()) + } + + /// Logs out the session's current GitHub authentication. + /// + /// Wire method: `session.gitHubAuth.logout`. + /// + /// # Returns + /// + /// Whether the current authentication was logged out. + /// + ///
+ /// + /// **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 logout(&self) -> Result { + let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_GITHUBAUTH_LOGOUT, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Logs out a specific GitHub authentication. + /// + /// Wire method: `session.gitHubAuth.logoutUser`. + /// + /// # Parameters + /// + /// * `params` - Parameters identifying a GitHub authentication to log out. + /// + /// # Returns + /// + /// Whether the requested authentication was logged out. + /// + ///
+ /// + /// **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 logout_user( + &self, + params: SessionAuthLogoutUserRequest, + ) -> 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_GITHUBAUTH_LOGOUTUSER, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Gets validation errors from the most recent authentication attempt. + /// + /// Wire method: `session.gitHubAuth.lastAuthErrors`. + /// + /// # Returns + /// + /// Validation errors from the most recent authentication attempt. + /// + ///
+ /// + /// **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 last_auth_errors(&self) -> Result { + let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_GITHUBAUTH_LASTAUTHERRORS, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } } /// `session.history.*` RPCs. @@ -6221,6 +6576,36 @@ impl<'a> SessionRpcMcpOauth<'a> { Ok(serde_json::from_value(_value)?) } + /// Passively probes a configured remote MCP server to classify whether OAuth is required or a cached/override token is accepted. Does not start OAuth, emit pending OAuth requests, or mutate MCP connection state. + /// + /// Wire method: `session.mcp.oauth.probe`. + /// + /// # Parameters + /// + /// * `params` - Remote MCP server name for a passive OAuth status probe. + /// + /// # Returns + /// + /// Passive MCP OAuth probe result. `authenticated` means the server accepted the probe request while an OAuth-origin access token was attached; it does not prove the server required or independently validated that token. The probe does not make a second unauthenticated request. Failed is an expected probe-domain outcome; JSON-RPC errors are reserved for API-call failures. + /// + ///
+ /// + /// **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 probe(&self, params: McpOauthProbeRequest) -> 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_PROBE, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + /// Responds to a pending MCP OAuth authorization request by its request id. /// /// Wire method: `session.mcp.oauth.respond`. diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs index 913499a6f..50ee95d7d 100644 --- a/rust/src/generated/session_events.rs +++ b/rust/src/generated/session_events.rs @@ -79,6 +79,8 @@ pub enum SessionEventType { AssistantTurnStart, #[serde(rename = "assistant.turn_retry")] AssistantTurnRetry, + #[serde(rename = "agent.interrupted")] + AgentInterrupted, #[serde(rename = "assistant.intent")] AssistantIntent, #[serde(rename = "assistant.server_tool_progress")] @@ -123,6 +125,8 @@ pub enum SessionEventType { ToolSearchActivated, #[serde(rename = "skill.invoked")] SkillInvoked, + #[serde(rename = "sandbox.decision")] + SandboxDecision, #[serde(rename = "subagent.started")] SubagentStarted, #[serde(rename = "subagent.completed")] @@ -398,6 +402,8 @@ pub enum SessionEventData { AssistantTurnStart(AssistantTurnStartData), #[serde(rename = "assistant.turn_retry")] AssistantTurnRetry(AssistantTurnRetryData), + #[serde(rename = "agent.interrupted")] + AgentInterrupted(AgentInterruptedData), #[serde(rename = "assistant.intent")] AssistantIntent(AssistantIntentData), #[serde(rename = "assistant.server_tool_progress")] @@ -442,6 +448,8 @@ pub enum SessionEventData { ToolSearchActivated(ToolSearchActivatedData), #[serde(rename = "skill.invoked")] SkillInvoked(SkillInvokedData), + #[serde(rename = "sandbox.decision")] + SandboxDecision(SandboxDecisionData), #[serde(rename = "subagent.started")] SubagentStarted(SubagentStartedData), #[serde(rename = "subagent.completed")] @@ -994,6 +1002,9 @@ pub struct SessionModelChangeData { /// Reasoning summary mode after the model change, if applicable #[serde(skip_serializing_if = "Option::is_none")] pub reasoning_summary: Option, + /// Origin of the effective model change, when known. + #[serde(skip_serializing_if = "Option::is_none")] + pub source: Option, /// Output verbosity level after the model change, if applicable #[serde(skip_serializing_if = "Option::is_none")] pub verbosity: Option, @@ -1623,6 +1634,48 @@ pub struct AssistantTurnRetryData { pub turn_id: String, } +/// Session event "agent.interrupted". Metadata for work the user interrupted while the agent was running +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct AgentInterruptedData { + /// What the agent was doing when the user interrupted it + pub activity: AgentInterruptedActivity, + /// For an interrupted model call: the provider endpoint the request targeted + #[serde(skip_serializing_if = "Option::is_none")] + pub api_endpoint: Option, + /// For an interrupted model call: whether the user interrupted before any token arrived or while the response was streaming + #[serde(skip_serializing_if = "Option::is_none")] + pub cancel_phase: Option, + /// How long the interrupted work had been running, in milliseconds + pub elapsed_ms: f64, + /// For an interrupted background-agent batch: how many background sub-agents the stop swept. Counts accepted cancellations, so an agent cancelled as a cascade of its interrupted parent is covered by that parent rather than counted again. + #[serde(skip_serializing_if = "Option::is_none")] + pub interrupted_agent_count: Option, + /// For an interrupted model call: the model the request targeted + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, + /// For a mid-stream interrupt: the observed time to first observable output, in milliseconds. Deliberately distinct from the `ttftMs` reported on a successful model call, which measures time to first stream event. + #[serde(skip_serializing_if = "Option::is_none")] + pub output_ttft_ms: Option, + /// For an interrupted model call: the reasoning effort the request asked for + #[serde(skip_serializing_if = "Option::is_none")] + pub reasoning_effort: Option, + /// Subset of `toolNames` whose tool metadata marks the tool name as safe to record unhashed in telemetry. + #[serde(skip_serializing_if = "Option::is_none")] + pub safe_tool_names: Option>, + /// Tool call identifiers that were still running + #[serde(skip_serializing_if = "Option::is_none")] + pub tool_call_ids: Option>, + /// Names of the tools that were still running. More than one when the model requested a parallel fan-out. + #[serde(skip_serializing_if = "Option::is_none")] + pub tool_names: Option>, + /// For an interrupted model call: the transport the request used + #[serde(skip_serializing_if = "Option::is_none")] + pub transport: Option, + /// Zero-based agentic-loop iteration the interrupt landed in + pub turn: i64, +} + /// Session event "assistant.intent". Agent intent description for current activity or plan #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -1651,6 +1704,7 @@ pub struct AssistantReasoningData { pub content: String, /// Unique identifier for this reasoning block pub reasoning_id: String, + /// Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. #[serde(skip_serializing_if = "Option::is_none")] pub rte: Option, } @@ -1786,13 +1840,18 @@ pub struct Citations { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AssistantMessageServerTools { + /// Advisor model identifier associated with the server-tool payload. #[serde(skip_serializing_if = "Option::is_none")] pub advisor_model: Option, + /// Provider function-call namespaces keyed by function-call identifier. #[serde(skip_serializing_if = "Option::is_none")] pub function_call_namespaces: Option>, + /// Provider-native server-tool call and output items preserved verbatim for replay. #[serde(skip_serializing_if = "Option::is_none")] pub items: Option>, + /// Model provider that produced this server-tool payload. pub provider: String, + /// Raw provider content blocks retained for verbatim round-tripping. #[serde(skip_serializing_if = "Option::is_none")] pub raw_content_blocks: Option>, } @@ -1887,6 +1946,7 @@ pub struct AssistantMessageData { /// GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs #[serde(skip_serializing_if = "Option::is_none")] pub request_id: Option, + /// Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. #[serde(skip_serializing_if = "Option::is_none")] pub rte: Option, /// Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping @@ -2022,6 +2082,9 @@ pub(crate) struct AssistantUsageQuotaSnapshot { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AssistantUsageData { + /// Number of accepted speculative prediction tokens + #[serde(skip_serializing_if = "Option::is_none")] + pub accepted_prediction_tokens: Option, /// Completion ID from the model provider (e.g., chatcmpl-abc123) #[serde(skip_serializing_if = "Option::is_none")] pub api_call_id: Option, @@ -2075,6 +2138,18 @@ pub struct AssistantUsageData { /// Average inter-token latency in milliseconds. Only available for streaming requests #[serde(skip_serializing_if = "Option::is_none")] pub inter_token_latency_ms: Option, + /// Whether Auto mode was selected for this model call + #[serde(skip_serializing_if = "Option::is_none")] + pub is_auto: Option, + /// Whether this model call used a bring-your-own-key provider + #[serde(skip_serializing_if = "Option::is_none")] + pub is_byok: Option, + /// Requested maximum output tokens used for this model call + #[serde(skip_serializing_if = "Option::is_none")] + pub max_output_tokens: Option, + /// Effective maximum prompt-token limit used for this model call + #[serde(skip_serializing_if = "Option::is_none")] + pub max_prompt_tokens: Option, /// Model identifier used for this API call pub model: String, /// Number of tool calls returned by the model @@ -2099,9 +2174,16 @@ pub struct AssistantUsageData { /// Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max") #[serde(skip_serializing_if = "Option::is_none")] pub reasoning_effort: Option, + /// Reasoning summary mode used for this model call, if applicable + #[serde(skip_serializing_if = "Option::is_none")] + pub reasoning_summary: Option, /// Number of output tokens used for reasoning (e.g., chain-of-thought) #[serde(skip_serializing_if = "Option::is_none")] pub reasoning_tokens: Option, + /// Number of rejected speculative prediction tokens + #[serde(skip_serializing_if = "Option::is_none")] + pub rejected_prediction_tokens: Option, + /// Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. #[serde(skip_serializing_if = "Option::is_none")] pub rte: Option, /// Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation @@ -2118,6 +2200,9 @@ pub struct AssistantUsageData { #[doc(hidden)] #[serde(skip_serializing_if = "Option::is_none")] pub(crate) tool_token_count: Option, + /// Transport used for this model call (http or websocket) + #[serde(skip_serializing_if = "Option::is_none")] + pub transport: Option, } /// Content-free structural summary of the failing request for diagnosing malformed 4xx calls @@ -2200,6 +2285,7 @@ pub struct ModelCallFailureData { /// Content-free structural summary of the failing request. Contains only counts and shape flags (no prompt content), so it is safe for unrestricted telemetry. Populated only for client-error (4xx) failures. #[serde(skip_serializing_if = "Option::is_none")] pub request_fingerprint: Option, + /// Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. #[serde(skip_serializing_if = "Option::is_none")] pub rte: Option, /// Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation @@ -2330,6 +2416,7 @@ pub struct ToolExecutionStartData { #[deprecated] #[serde(skip_serializing_if = "Option::is_none")] pub parent_tool_call_id: Option, + /// Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. #[serde(skip_serializing_if = "Option::is_none")] pub rte: Option, /// Shell-tool path hints derived from the command at start time for shell tools (bash/powershell/local_shell). Produced by the same shell-aware extractor as PermissionRequestShell.possiblePaths, so it is present even when the command is auto-approved and no permission request fires. Absent for non-shell tools. @@ -2561,12 +2648,16 @@ pub struct ToolExecutionCompleteContentResource { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolExecutionCompleteUIResourceMetaUICsp { + /// Domains the UI resource may use as document base URIs. #[serde(skip_serializing_if = "Option::is_none")] pub base_uri_domains: Option>, + /// Domains the UI resource may connect to. #[serde(skip_serializing_if = "Option::is_none")] pub connect_domains: Option>, + /// Domains the UI resource may embed as nested frames. #[serde(skip_serializing_if = "Option::is_none")] pub frame_domains: Option>, + /// Domains from which the UI resource may load scripts, styles, images, and other resources. #[serde(skip_serializing_if = "Option::is_none")] pub resource_domains: Option>, } @@ -2616,11 +2707,13 @@ pub struct ToolExecutionCompleteUIResourceMetaUI { /// CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. #[serde(skip_serializing_if = "Option::is_none")] pub csp: Option, + /// Optional dedicated origin for the rendered MCP Apps UI resource. #[serde(skip_serializing_if = "Option::is_none")] pub domain: Option, /// Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. #[serde(skip_serializing_if = "Option::is_none")] pub permissions: Option, + /// Whether the host should render a border around the MCP Apps UI resource. #[serde(skip_serializing_if = "Option::is_none")] pub prefers_border: Option, } @@ -2772,6 +2865,7 @@ pub struct ToolExecutionCompleteData { /// Tool execution result on success #[serde(skip_serializing_if = "Option::is_none")] pub result: Option, + /// Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable. #[serde(skip_serializing_if = "Option::is_none")] pub rte: Option, /// Whether this tool execution ran inside a sandbox container @@ -2835,6 +2929,11 @@ pub struct SkillInvokedData { pub trigger: Option, } +/// Session event "sandbox.decision". Payload of `sandbox.decision`, a bounded governance record of what the process sandbox was configured to do and whether it took effect. Discriminated by `kind`. +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SandboxDecisionData {} + /// Session event "subagent.started". Sub-agent startup details including parent tool call and agent information #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -3176,6 +3275,16 @@ pub struct PermissionRequestMcp { /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. #[serde(skip_serializing_if = "Option::is_none")] pub managed_approval_required: Option, + /// Advisory runtime permission recommendation. The SDK host remains responsible for deciding the request and may reject it. + /// + ///
+ /// + /// **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 permission_recommendation: Option, /// Whether this MCP tool is read-only (no side effects) pub read_only: bool, /// Name of the MCP server providing the tool @@ -3328,12 +3437,16 @@ pub struct PermissionRequestFactory { pub approval_key: String, /// Whether this factory is eligible for persistent approval pub can_persist_approval: bool, + /// Factory-declared AI-credit limit before any run/resume caller override is applied. #[serde(skip_serializing_if = "Option::is_none")] pub declared_max_ai_credits: Option, + /// Factory-declared concurrent-subagent limit before any run/resume caller override is applied. #[serde(skip_serializing_if = "Option::is_none")] pub declared_max_concurrent_subagents: Option, + /// Factory-declared total-subagent limit before any run/resume caller override is applied. #[serde(skip_serializing_if = "Option::is_none")] pub declared_max_total_subagents: Option, + /// Factory-declared active-time limit in seconds before any run/resume caller override is applied. #[serde(skip_serializing_if = "Option::is_none")] pub declared_timeout_seconds: Option, /// Factory description @@ -3384,6 +3497,21 @@ pub struct PermissionRequestExtensionPermissionAccess { pub tool_call_id: Option, } +/// Extension sensitive environment variable access request +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionRequestExtensionEnvAccess { + /// Names of the sensitive environment variables the extension is requesting. Values never appear here. + pub environment_variables: Vec, + /// Name of the extension requesting environment variable access + pub extension_name: String, + /// Permission kind discriminator + pub kind: PermissionRequestExtensionEnvAccessKind, + /// Tool call ID that triggered this permission request + #[serde(skip_serializing_if = "Option::is_none")] + pub tool_call_id: Option, +} + /// Auto-approval judge information attached to a permission request. Present (non-null) only when the session's allow-all mode is "auto"; its absence means auto mode was off and the judge did not evaluate the request. The `recommendation` conveys the judge's disposition for this request. /// ///
@@ -3525,6 +3653,16 @@ pub struct PermissionPromptRequestMcp { pub auto_approval: Option, /// Prompt kind discriminator pub kind: PermissionPromptRequestMcpKind, + /// Advisory runtime permission recommendation. The host remains responsible for deciding the request and may reject it. + /// + ///
+ /// + /// **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 permission_recommendation: Option, /// Name of the MCP server providing the tool pub server_name: String, /// Tool call ID that triggered this permission request @@ -3737,12 +3875,16 @@ pub struct PermissionPromptRequestFactory { pub auto_approval: Option, /// Whether this factory is eligible for persistent approval pub can_persist_approval: bool, + /// Factory-declared AI-credit limit before any run/resume caller override is applied. #[serde(skip_serializing_if = "Option::is_none")] pub declared_max_ai_credits: Option, + /// Factory-declared concurrent-subagent limit before any run/resume caller override is applied. #[serde(skip_serializing_if = "Option::is_none")] pub declared_max_concurrent_subagents: Option, + /// Factory-declared total-subagent limit before any run/resume caller override is applied. #[serde(skip_serializing_if = "Option::is_none")] pub declared_max_total_subagents: Option, + /// Factory-declared active-time limit in seconds before any run/resume caller override is applied. #[serde(skip_serializing_if = "Option::is_none")] pub declared_timeout_seconds: Option, /// Factory description @@ -3800,6 +3942,31 @@ pub struct PermissionPromptRequestExtensionPermissionAccess { pub tool_call_id: Option, } +/// Extension sensitive environment variable access prompt +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionPromptRequestExtensionEnvAccess { + /// Auto-approval judge information for this request; present only when auto mode is enabled. + /// + ///
+ /// + /// **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 auto_approval: Option, + /// Names of the sensitive environment variables the extension is requesting. Values never appear here. + pub environment_variables: Vec, + /// Name of the extension requesting environment variable access + pub extension_name: String, + /// Prompt kind discriminator + pub kind: PermissionPromptRequestExtensionEnvAccessKind, + /// Tool call ID that triggered this permission request + #[serde(skip_serializing_if = "Option::is_none")] + pub tool_call_id: Option, +} + /// Session event "permission.requested". Permission request notification requiring client approval with request details #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -3915,6 +4082,18 @@ pub struct UserToolSessionApprovalExtensionPermissionAccess { pub kind: UserToolSessionApprovalExtensionPermissionAccessKind, } +/// Session-scoped tool-approval rule for an extension's access to sensitive environment variables, keyed by extension name and the exact set of variable names. +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct UserToolSessionApprovalExtensionEnvAccess { + /// Names of the sensitive environment variables this approval covers. Values are never persisted. + pub environment_variables: Vec, + /// Extension name + pub extension_name: String, + /// Extension environment access approval kind + pub kind: UserToolSessionApprovalExtensionEnvAccessKind, +} + /// Permission response variant that approves a request and remembers the provided approval for the rest of the session. #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -4557,6 +4736,9 @@ pub struct CapabilitiesChangedData { pub struct ExitPlanModeRequestedData { /// Available actions the user can take pub actions: Vec, + /// Model the session had selected when the plan was authored, when one is known + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, /// Full content of the plan file pub plan_content: String, /// Recommended action to preselect for the user @@ -4613,6 +4795,7 @@ pub struct SessionBackgroundTasksChangedData {} pub struct FactoryRunUpdatedData { /// Monotonic revision now available for the run. pub revision: i64, + /// Factory run identifier. pub run_id: String, } @@ -5147,6 +5330,48 @@ pub enum AutopilotObjectiveChangedStatus { Unknown, } +/// Origin of an effective session model change. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum ModelChangeSource { + /// The user selected a model directly with `/model `. + #[serde(rename = "model_command")] + ModelCommand, + /// The user selected the model with `/settings`. + #[serde(rename = "settings_command")] + SettingsCommand, + /// The user selected the model with the `/config` alias. + #[serde(rename = "config_command")] + ConfigCommand, + /// The user selected the model in the model picker, including the picker opened by bare `/model`. + #[serde(rename = "model_picker")] + ModelPicker, + /// Organization-managed settings selected the model. + #[serde(rename = "managed_settings")] + ManagedSettings, + /// Repository settings selected the model. + #[serde(rename = "repo_settings")] + RepoSettings, + /// Startup model resolution selected the model. + #[serde(rename = "startup")] + Startup, + /// Selecting an agent selected its configured model. + #[serde(rename = "agent")] + Agent, + /// Entering, leaving, or reconfiguring plan mode selected the model. + #[serde(rename = "plan_mode")] + PlanMode, + /// The runtime selected the model automatically, such as rate-limit recovery or refusal fallback. + #[serde(rename = "automatic")] + Automatic, + /// An SDK or RPC caller selected the model. + #[serde(rename = "sdk")] + Sdk, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// The session mode the agent is operating in #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionMode { @@ -5334,6 +5559,57 @@ pub enum UserMessageDelivery { Unknown, } +/// What the agent was doing when the user interrupted it. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum AgentInterruptedActivity { + /// A request to the model was open. + #[serde(rename = "model_call")] + ModelCall, + /// The turn was sleeping between retry attempts. + #[serde(rename = "retry_backoff")] + RetryBackoff, + /// One or more tools were executing. + #[serde(rename = "tool_call")] + ToolCall, + /// Background sub-agents were running while the main loop was idle. + #[serde(rename = "background_agent")] + BackgroundAgent, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Where the interruption landed relative to the first streamed token. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum AgentInterruptedCancelPhase { + /// No output had been produced when the request was cancelled. + #[serde(rename = "pre_first_token")] + PreFirstToken, + /// The response was already streaming when the request was cancelled. + #[serde(rename = "mid_stream")] + MidStream, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Transport used for a failed model call +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum ModelCallFailureTransport { + /// HTTP transport, including SSE streams. + #[serde(rename = "http")] + Http, + /// WebSocket transport. + #[serde(rename = "websocket")] + Websocket, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Tool call type: "function" for standard tool calls, "custom" for grammar-based tool calls. Defaults to "function" when absent. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum AssistantMessageToolRequestType { @@ -5395,6 +5671,21 @@ pub enum AssistantUsageApiEndpoint { Unknown, } +/// Transport used for a successful model call +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum AssistantUsageTransport { + /// HTTP transport, including SSE streams. + #[serde(rename = "http")] + Http, + /// WebSocket transport. + #[serde(rename = "websocket")] + Websocket, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// For HTTP 400 failures only: whether the response carried a structured CAPI error envelope (structured_error, a deterministic validation failure) or no error body (bodyless, the transient gateway/proxy signature). Absent for non-400 failures. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ModelCallFailureBadRequestKind { @@ -5443,21 +5734,6 @@ pub enum ModelCallFailureSource { Unknown, } -/// Transport used for a failed model call -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum ModelCallFailureTransport { - /// HTTP transport, including SSE streams. - #[serde(rename = "http")] - Http, - /// WebSocket transport. - #[serde(rename = "websocket")] - Websocket, - /// Unknown variant for forward compatibility. - #[default] - #[serde(other)] - Unknown, -} - /// Finite reason code describing why the current turn was aborted #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum AbortReason { @@ -5681,6 +5957,25 @@ pub enum PermissionRequestMcpKind { Mcp, } +/// Advisory recommendation the runtime attaches to a permission request whose origin it can vouch for by construction. Unlike the auto-approval judge this does not depend on auto mode and does not evaluate what the tool call does; its absence simply means the runtime has no opinion and the request follows the host's normal approval flow. +/// +///
+/// +/// **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 PermissionRecommendation { + /// The runtime vouches for the request's origin and recommends approving it without prompting. The host still owns the decision and may deny it; deny rules, managed policy, and the auto-approval safety judge all outrank this recommendation. + #[serde(rename = "approve")] + Approve, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Permission kind discriminator #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionRequestUrlKind { @@ -5782,6 +6077,14 @@ pub enum PermissionRequestExtensionPermissionAccessKind { ExtensionPermissionAccess, } +/// Permission kind discriminator +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionRequestExtensionEnvAccessKind { + #[serde(rename = "extension-env-access")] + #[default] + ExtensionEnvAccess, +} + /// Details of the permission being requested #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -5797,6 +6100,7 @@ pub enum PermissionRequest { ExtensionManagement(PermissionRequestExtensionManagement), Factory(PermissionRequestFactory), ExtensionPermissionAccess(PermissionRequestExtensionPermissionAccess), + ExtensionEnvAccess(PermissionRequestExtensionEnvAccess), } /// Why the auto-approval judge produced no usable recommendation. Present only alongside an `error` recommendation, where the human-readable reason is a fixed string and therefore cannot distinguish these cases. Intended to make a judge failure reportable by a consumer that has no access to the host's logs. @@ -5972,6 +6276,14 @@ pub enum PermissionPromptRequestExtensionPermissionAccessKind { ExtensionPermissionAccess, } +/// Prompt kind discriminator +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionPromptRequestExtensionEnvAccessKind { + #[serde(rename = "extension-env-access")] + #[default] + ExtensionEnvAccess, +} + /// Derived user-facing permission prompt details for UI consumers #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -5988,6 +6300,7 @@ pub enum PermissionPromptRequest { ExtensionManagement(PermissionPromptRequestExtensionManagement), Factory(PermissionPromptRequestFactory), ExtensionPermissionAccess(PermissionPromptRequestExtensionPermissionAccess), + ExtensionEnvAccess(PermissionPromptRequestExtensionEnvAccess), } /// The permission request was approved @@ -6070,6 +6383,14 @@ pub enum UserToolSessionApprovalExtensionPermissionAccessKind { ExtensionPermissionAccess, } +/// Extension environment access approval kind +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum UserToolSessionApprovalExtensionEnvAccessKind { + #[serde(rename = "extension-env-access")] + #[default] + ExtensionEnvAccess, +} + /// The approval to add as a session-scoped rule #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -6083,6 +6404,7 @@ pub enum UserToolSessionApproval { ExtensionManagement(UserToolSessionApprovalExtensionManagement), Factory(UserToolSessionApprovalFactory), ExtensionPermissionAccess(UserToolSessionApprovalExtensionPermissionAccess), + ExtensionEnvAccess(UserToolSessionApprovalExtensionEnvAccess), } /// Approved and remembered for the rest of the session diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json index 17a839f0d..7b3bf6310 100644 --- a/test/harness/package-lock.json +++ b/test/harness/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "devDependencies": { - "@github/copilot": "^1.0.79", + "@github/copilot": "^1.0.80-0", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14", @@ -501,9 +501,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.79.tgz", - "integrity": "sha512-uHBm2BYbKJgyfiKp1WokX7QUNHGvzEX0zaGeb3qM3CybP06rsJrX3JgQe95qwwma6vQz0ah9gV68ERW2JqaKRA==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.80-0.tgz", + "integrity": "sha512-y2LqQT9JHL5NSfSLWwUbuDCEanCYz8o+GNqpAh3/DG8LCctLVPMdVTyIoDIWDk/8GUjh9FakA/jS+MMV/ugbpQ==", "dev": true, "license": "SEE LICENSE IN LICENSE.md", "dependencies": { @@ -513,20 +513,20 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.79", - "@github/copilot-darwin-x64": "1.0.79", - "@github/copilot-linux-arm64": "1.0.79", - "@github/copilot-linux-x64": "1.0.79", - "@github/copilot-linuxmusl-arm64": "1.0.79", - "@github/copilot-linuxmusl-x64": "1.0.79", - "@github/copilot-win32-arm64": "1.0.79", - "@github/copilot-win32-x64": "1.0.79" + "@github/copilot-darwin-arm64": "1.0.80-0", + "@github/copilot-darwin-x64": "1.0.80-0", + "@github/copilot-linux-arm64": "1.0.80-0", + "@github/copilot-linux-x64": "1.0.80-0", + "@github/copilot-linuxmusl-arm64": "1.0.80-0", + "@github/copilot-linuxmusl-x64": "1.0.80-0", + "@github/copilot-win32-arm64": "1.0.80-0", + "@github/copilot-win32-x64": "1.0.80-0" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.79.tgz", - "integrity": "sha512-rsw7JoMvlcxXb0yx08oIeEc0x2hUEwKSfhX9ESKfdMVt0Ckrzm4OEvNUyzOpOnLJ9+l3h/aI+u1w5g2ZU2K7UA==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.80-0.tgz", + "integrity": "sha512-gsRLSyPd4j15zivQLYOyvzb4sGrGS4p6e2Dwv1KIvcJ2IAwANyCcfXAXy0F0xB+B+mQgvCwCdkK1Rmjy+9ftow==", "cpu": [ "arm64" ], @@ -541,9 +541,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.79.tgz", - "integrity": "sha512-D983e2lXYnq+KhjA8mTZXonY1+LGfJN9BM195J73shUvx49nRJmibDHWLvVtGeYc+43evGUOAQrOqOspAhhWPQ==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.80-0.tgz", + "integrity": "sha512-D7PrkVmPb91MPa8H5nY9DfxWWR4Je+KZY/gmkJYDryTrWO7CabfE29yKqBwhi+WuBpVYWttDF3C1TeYTdOYpkg==", "cpu": [ "x64" ], @@ -558,9 +558,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.79.tgz", - "integrity": "sha512-qqaNkvi92Wg+4OZk/kTWC2nUG72G0vV6eRAo5+PnKaPmjdX1GsI0a+lPxXPEbzX0zYLi/8yrUyANwyyNEsGgXA==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.80-0.tgz", + "integrity": "sha512-b1LAUiv7bY9cNXiilztDZTt5+M29axFWF354eg8VXRGaWXfT77ctgfLb1UiTBABUKlIfHOuodq1cjtSOnYDtPg==", "cpu": [ "arm64" ], @@ -575,9 +575,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.79.tgz", - "integrity": "sha512-wzotZfvHkItutciLFMXZT2k9Qiii4Ta8tsVDCMQ7CP8hPxV91FyJ1yf3+FFSSfPvWrfYM6BOAiqIuX+LjgRuiw==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.80-0.tgz", + "integrity": "sha512-FvbdftgJzbU7yagRMO9Sitd7UOF8T4Amkbuss+rweZBOJBgsBWDvUJWCf9m06iuHaLYoICiGp94BFMowHyBIoQ==", "cpu": [ "x64" ], @@ -592,9 +592,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.79.tgz", - "integrity": "sha512-INtRSARl7DdNm2MXnn4GJuK+Y7QD24ANox02uH8htNQwRlNvdvg+YGS1V/mYgLDXFepeUjMjzTNC+i70+kh5uw==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.80-0.tgz", + "integrity": "sha512-AwoUp+RVRqAyTiqMnlKx8gIldxghZQxet31sWsLBDE/AS5Dv/ohx0wQ7aouKORUMkh+ZtIK+WmgyR7de1hRDPQ==", "cpu": [ "arm64" ], @@ -609,9 +609,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.79.tgz", - "integrity": "sha512-LxJAIfPP6Ok/9qpXGZuhnAft3W9JVcK9tbO3jWXcGDJT3v+2NtutyjmP/A7/cDXdTruXVQ4MybwAgacN8Gj/sg==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.80-0.tgz", + "integrity": "sha512-9RCoTNtaDnC2r68ecHrpORmTjaSaV9hUdRJb9nsh46En9SSkcEl4yvQ14Fl9HJ95BhKHqE6krf7YxCgAKTQ3bA==", "cpu": [ "x64" ], @@ -626,9 +626,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.79.tgz", - "integrity": "sha512-5wg/ayCBTVy4g4FdO/9BJZRVARY0sgjAn9rBkw5BSJMv4u7Mvxg5Sftlift+V5UWxTyCSHAELZ5IHKvox4Yi8w==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.80-0.tgz", + "integrity": "sha512-ypxN5LRkXgvEDjSYOQ9lMXrZAC+NVWeIBSd/ywGiA4wg7XtH2VBbaiYMPvX6R6xIrn4LUK+/UlYwwIqf8laXhw==", "cpu": [ "arm64" ], @@ -643,9 +643,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.79", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.79.tgz", - "integrity": "sha512-FTpThWwwCDYnLdE0pfdo5zpAQLLVg36kmC2IKyVMuCYv9iPe7rE1mz7ng/UITN9M3TAMBrwHSvCV3pITvw4W8Q==", + "version": "1.0.80-0", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.80-0.tgz", + "integrity": "sha512-uKrkfKblj+sIthys3a/RYU5muLtMd5Wc5NstbCJHD7DLqGbDK7Fec9REBr4/NHGGI/24FJhCXJNEBPgE5urgew==", "cpu": [ "x64" ], diff --git a/test/harness/package.json b/test/harness/package.json index 7903a8f4e..ca377444d 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.79", + "@github/copilot": "^1.0.80-0", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14",