From 286200c73836b8200b00e39070824e9d90208da0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 25 Aug 2026 21:35:35 +0000 Subject: [PATCH 01/11] Update @github/copilot to 1.0.81-10 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code --- dotnet/src/Generated/Rpc.cs | 576 +++++++++++- dotnet/src/Generated/SessionEvents.cs | 204 ++++ go/rpc/zrpc.go | 394 +++++++- go/rpc/zrpc_encoding.go | 168 +++- go/rpc/zsession_encoding.go | 6 + go/rpc/zsession_events.go | 73 ++ go/zsession_events.go | 9 + java/pom.xml | 2 +- java/scripts/codegen/package-lock.json | 72 +- java/scripts/codegen/package.json | 2 +- .../generated/AssistantMessageEvent.java | 2 + .../AssistantMessageReasoningBlocks.java | 30 + .../generated/AssistantUsageEvent.java | 2 + .../ManagedSettingsEnforcedEscalation.java | 4 +- .../generated/ModelCallFinishedEvent.java | 51 + .../generated/ModelCallFinishedOutcome.java | 39 + .../copilot/generated/SessionEvent.java | 2 + .../SessionManagedSettingsResolvedEvent.java | 2 + .../generated/SubagentCompletedEvent.java | 10 + .../generated/SubagentFailedEvent.java | 10 + .../copilot/generated/rpc/AuthInfo.java | 1 + .../copilot/generated/rpc/AuthInfoType.java | 2 + .../generated/rpc/ConnectClientInfo.java | 33 + .../copilot/generated/rpc/ConnectParams.java | 2 + ...ode.java => GitHubTokenAcquireReason.java} | 21 +- .../rpc/GitHubTokenAcquireRequest.java | 33 + .../rpc/GitHubTokenAcquireResult.java | 35 + .../GitHubTokenAcquireResultCancelled.java | 30 + .../rpc/GitHubTokenAcquireResultToken.java | 51 + .../generated/rpc/InstalledPlugin.java | 4 +- .../generated/rpc/InstalledPluginInfo.java | 4 +- .../github/copilot/generated/rpc/Model.java | 8 +- .../copilot/generated/rpc/ModelMessage.java | 29 + .../generated/rpc/ModelWarningText.java | 27 + .../generated/rpc/PermissionPathsConfig.java | 2 +- .../copilot/generated/rpc/SandboxConfig.java | 2 +- .../generated/rpc/SandboxConfigSource.java | 45 + .../generated/rpc/SessionInstalledPlugin.java | 4 +- .../rpc/SessionManagedPermissions.java | 4 +- .../generated/rpc/SessionOpenOptions.java | 6 +- .../rpc/SessionOptionsUpdateParams.java | 4 + .../rpc/SessionPermissionsPathsAddParams.java | 2 +- .../rpc/SessionQueuePendingItemsResult.java | 4 +- .../copilot/generated/rpc/TokenAuthInfo.java | 7 + .../generated/rpc/TokenProviderAuthInfo.java | 51 + nodejs/package-lock.json | 54 +- nodejs/package.json | 2 +- nodejs/samples/package-lock.json | 2 +- nodejs/src/generated/rpc.ts | 302 +++++- nodejs/src/generated/session-events.ts | 140 ++- python/copilot/generated/rpc.py | 881 ++++++++++++++---- python/copilot/generated/session_events.py | 157 +++- rust/src/generated/api_types.rs | 332 ++++++- rust/src/generated/rpc.rs | 2 +- rust/src/generated/session_events.rs | 108 +++ test/harness/package-lock.json | 55 +- test/harness/package.json | 2 +- 57 files changed, 3708 insertions(+), 398 deletions(-) create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageReasoningBlocks.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/ModelCallFinishedEvent.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/ModelCallFinishedOutcome.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectClientInfo.java rename java/sdk/src/generated/java/com/github/copilot/generated/rpc/{DisableBypassPermissionsMode.java => GitHubTokenAcquireReason.java} (57%) create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireRequest.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResult.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResultCancelled.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResultToken.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelMessage.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelWarningText.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigSource.java create mode 100644 java/sdk/src/generated/java/com/github/copilot/generated/rpc/TokenProviderAuthInfo.java diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs index 97f9b52762..3b9445f726 100644 --- a/dotnet/src/Generated/Rpc.cs +++ b/dotnet/src/Generated/Rpc.cs @@ -61,10 +61,35 @@ internal sealed class ConnectResult public string Version { get; set; } = string.Empty; } +/// Identity of the integrating host, declared once on the `server.connect` handshake so telemetry from this connection is attributed to a single, consistent surface. All fields are optional; omit them to keep the default attribution. +[Experimental(Diagnostics.Experimental)] +internal sealed class ConnectClientInfo +{ + /// Name of the host editor, e.g. `"vscode"`. + [JsonPropertyName("editorName")] + public string? EditorName { get; set; } + + /// Version of the host editor, e.g. `"1.124.2"`. Ignored unless it looks like a version string. + [JsonPropertyName("editorVersion")] + public string? EditorVersion { get; set; } + + /// Name of the Copilot extension within the host, e.g. `"copilot-chat"`. + [JsonPropertyName("extensionName")] + public string? ExtensionName { get; set; } + + /// Version of the Copilot extension within the host, e.g. `"0.54.0"`. Ignored unless it looks like a version string. + [JsonPropertyName("extensionVersion")] + public string? ExtensionVersion { get; set; } +} + /// Connection-level opt-ins for the `server.connect` handshake. Transport authentication is consumed by the native protocol boundary before dispatch. [Experimental(Diagnostics.Experimental)] internal sealed class ConnectRequest { + /// Identity of the integrating host. Optional; omit it to keep the default attribution. + [JsonPropertyName("clientInfo")] + public ConnectClientInfo? ClientInfo { get; set; } + /// Opt this connection in to GitHub telemetry forwarding for its lifetime. When set, the runtime forwards every internal telemetry event it emits — across all sessions, plus sessionless events — to this connection over the `gitHubTelemetry.event` notification. Regular events are also written to the runtime's normal GitHub/CTS path (dual-write); host-only compatibility events are forward-only and intentionally skip that path. Intended for first-party hosts that re-emit the events into their own telemetry stores. Both unrestricted and restricted events are forwarded, each tagged with a `restricted` discriminator; a backstop drops restricted events when restricted telemetry is disabled — using the process-global gate for ordinary events and an explicit session-scoped decision for host-only events. [JsonPropertyName("enableGitHubTelemetryForwarding")] public bool? EnableGitHubTelemetryForwarding { get; set; } @@ -282,6 +307,19 @@ public sealed class ModelCapabilities public ModelCapabilitiesSupports? Supports { get; set; } } +/// A service-published message about a model, carrying a stable machine-readable code alongside human-readable text. +[Experimental(Diagnostics.Experimental)] +public sealed class ModelMessage +{ + /// Stable machine-readable identifier for the message, such as `client_version_deprecated`. Hosts can key custom presentation off this; unrecognized codes should fall back to displaying `message`. + [JsonPropertyName("code")] + public string Code { get; set; } = string.Empty; + + /// Human-readable message text intended for display to the user. + [JsonPropertyName("message")] + public string Message { get; set; } = string.Empty; +} + /// Policy state (if applicable). [Experimental(Diagnostics.Experimental)] public sealed class ModelPolicy @@ -295,6 +333,15 @@ public sealed class ModelPolicy public string? Terms { get; set; } } +/// Service-published warning text that hosts should display when presenting a model. +[Experimental(Diagnostics.Experimental)] +public sealed class ModelWarningText +{ + /// Data-retention warning for the model. The text may contain Markdown links and should be rendered as Markdown when supported. + [JsonPropertyName("dataRetention")] + public string? DataRetention { get; set; } +} + /// Copilot model metadata, including identifier, display name, capabilities, policy, billing, reasoning efforts, and picker categories. [Experimental(Diagnostics.Experimental)] public sealed class Model @@ -315,6 +362,10 @@ public sealed class Model [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; + /// Informational notices the service published for this model, such as an upcoming change or a recommended alternative. Present only when the service published at least one notice. Hosts should surface these without implying anything is wrong with the model. + [JsonPropertyName("infoMessages")] + public IList? InfoMessages { get; set; } + /// Model capability category for grouping in the model picker. [JsonPropertyName("modelPickerCategory")] public ModelPickerCategory? ModelPickerCategory { get; set; } @@ -338,6 +389,14 @@ public sealed class Model /// Supported reasoning effort levels (only present if model supports reasoning effort). [JsonPropertyName("supportedReasoningEfforts")] public IList? SupportedReasoningEfforts { get; set; } + + /// Warnings the service published for this model, such as a deprecated client version. Present only when the service published at least one warning. The model remains usable; hosts should surface these as advisory rather than blocking. + [JsonPropertyName("warningMessages")] + public IList? WarningMessages { get; set; } + + /// Warning text the service requires hosts to surface for this model. Present only when the service published at least one warning. + [JsonPropertyName("warningText")] + public ModelWarningText? WarningText { get; set; } } /// List of Copilot models available to the resolved user, including capabilities and billing metadata. @@ -491,6 +550,7 @@ internal sealed class AccountGetQuotaRequest [JsonDerivedType(typeof(AuthInfoHmac), "hmac")] [JsonDerivedType(typeof(AuthInfoEnv), "env")] [JsonDerivedType(typeof(AuthInfoToken), "token")] +[JsonDerivedType(typeof(AuthInfoTokenProvider), "token-provider")] [JsonDerivedType(typeof(AuthInfoCopilotApiToken), "copilot-api-token")] [JsonDerivedType(typeof(AuthInfoUser), "user")] [JsonDerivedType(typeof(AuthInfoGhCli), "gh-cli")] @@ -898,11 +958,39 @@ public partial class AuthInfoToken : AuthInfo [JsonPropertyName("host")] public required string Host { get; set; } + /// Opaque native GitHub credential registration backing this token identity, when applicable. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("registrationId")] + public string? RegistrationId { get; set; } + /// The token value itself. Treat as a secret. [JsonPropertyName("token")] public required string Token { get; set; } } +/// Authentication-info variant backed by an SDK GitHub token callback. It carries routing metadata but never a plaintext token. +/// The token-provider variant of . +[Experimental(Diagnostics.Experimental)] +public partial class AuthInfoTokenProvider : AuthInfo +{ + /// + [JsonIgnore] + public override string Type => "token-provider"; + + /// Snapshot of the authenticated user's Copilot subscription info, if known. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("copilotUser")] + public CopilotUserResponse? CopilotUser { get; set; } + + /// Authentication host. + [JsonPropertyName("host")] + public required string Host { get; set; } + + /// Opaque SDK callback registration identifier. + [JsonPropertyName("registrationId")] + public required string RegistrationId { get; set; } +} + /// Authentication-info variant for direct Copilot API token auth sourced from environment variables, with public GitHub host. /// The copilot-api-token variant of . [Experimental(Diagnostics.Experimental)] @@ -2695,6 +2783,10 @@ public sealed class InstalledPluginInfo [JsonPropertyName("enabled")] public bool Enabled { get; set; } + /// Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — a plugin belonging to a directory/local marketplace, which is loaded from its real directory on every pass instead of a copy under the installed-plugins cache. Its presence is what marks a listed plugin as live: such a plugin is always present on disk, so `enabled` is its only meaningful state and it is never "not installed". + [JsonPropertyName("installedFrom")] + public string? InstalledFrom { get; set; } + /// Marketplace the plugin came from. Empty string ("") for direct repo / URL / local installs. [JsonPropertyName("marketplace")] public string Marketplace { get; set; } = string.Empty; @@ -4462,6 +4554,10 @@ public sealed class InstalledPlugin [JsonPropertyName("installed_at")] public string InstalledAt { get; set; } = string.Empty; + /// Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key. + [JsonPropertyName("installed_from")] + public string? InstalledFrom { get; set; } + /// Marketplace the plugin came from (empty string for direct repo installs). [JsonPropertyName("marketplace")] public string Marketplace { get; set; } = string.Empty; @@ -5350,13 +5446,204 @@ public sealed class SessionSetCredentialsResult public bool Success { get; set; } } +/// Authentication credentials accepted by session.gitHubAuth.setCredentials. Session-owned token-provider identities cannot be installed through this method. +/// Polymorphic base type discriminated by type. +[Experimental(Diagnostics.Experimental)] +[JsonPolymorphic( + TypeDiscriminatorPropertyName = "type", + UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] +[JsonDerivedType(typeof(SettableAuthInfoHmac), "hmac")] +[JsonDerivedType(typeof(SettableAuthInfoEnv), "env")] +[JsonDerivedType(typeof(SettableAuthInfoToken), "token")] +[JsonDerivedType(typeof(SettableAuthInfoCopilotApiToken), "copilot-api-token")] +[JsonDerivedType(typeof(SettableAuthInfoUser), "user")] +[JsonDerivedType(typeof(SettableAuthInfoGhCli), "gh-cli")] +[JsonDerivedType(typeof(SettableAuthInfoApiKey), "api-key")] +public partial class SettableAuthInfo +{ + /// The type discriminator. + [JsonPropertyName("type")] + public virtual string Type { get; set; } = string.Empty; +} + + +/// Authentication-info input variant for GitHub-internal HMAC auth, carrying the public GitHub host and HMAC secret. +/// The hmac variant of . +[Experimental(Diagnostics.Experimental)] +public partial class SettableAuthInfoHmac : SettableAuthInfo +{ + /// + [JsonIgnore] + public override string Type => "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. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("copilotUser")] + public CopilotUserResponse? CopilotUser { get; set; } + + /// HMAC secret used to sign requests. + [JsonPropertyName("hmac")] + public required string Hmac { get; set; } + + /// Authentication host. HMAC auth always targets the public GitHub host. + [JsonPropertyName("host")] + public required string Host { get; set; } +} + +/// Authentication-info input variant for a token sourced from an environment variable, with host, optional login, token, and env var name. +/// The env variant of . +[Experimental(Diagnostics.Experimental)] +public partial class SettableAuthInfoEnv : SettableAuthInfo +{ + /// + [JsonIgnore] + public override string Type => "env"; + + /// 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. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("copilotUser")] + public CopilotUserResponse? CopilotUser { get; set; } + + /// Name of the environment variable the token was sourced from. + [JsonPropertyName("envVar")] + public required string EnvVar { get; set; } + + /// Authentication host (e.g. https://github.com or a GHES host). + [JsonPropertyName("host")] + public required string Host { get; set; } + + /// User login associated with the token. Undefined for server-to-server tokens (those starting with `ghs_`). + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("login")] + public string? Login { get; set; } + + /// The token value itself. Treat as a secret. + [JsonPropertyName("token")] + public required string Token { get; set; } +} + +/// Token authentication accepted by session.gitHubAuth.setCredentials. +/// The token variant of . +[Experimental(Diagnostics.Experimental)] +public partial class SettableAuthInfoToken : SettableAuthInfo +{ + /// + [JsonIgnore] + public override string Type => "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. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("copilotUser")] + public CopilotUserResponse? CopilotUser { get; set; } + + /// Authentication host. + [JsonPropertyName("host")] + public required string Host { get; set; } + + /// The token value itself. Treat as a secret. + [JsonPropertyName("token")] + public required string Token { get; set; } +} + +/// Authentication-info variant for direct Copilot API token auth sourced from environment variables, with public GitHub host. +/// The copilot-api-token variant of . +[Experimental(Diagnostics.Experimental)] +public partial class SettableAuthInfoCopilotApiToken : SettableAuthInfo +{ + /// + [JsonIgnore] + public override string Type => "copilot-api-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. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("copilotUser")] + public CopilotUserResponse? CopilotUser { get; set; } + + /// Authentication host (always the public GitHub host). + [JsonPropertyName("host")] + public required string Host { get; set; } +} + +/// Authentication-info variant for OAuth user auth, with host and login; the token remains in the runtime secret store. +/// The user variant of . +[Experimental(Diagnostics.Experimental)] +public partial class SettableAuthInfoUser : SettableAuthInfo +{ + /// + [JsonIgnore] + public override string Type => "user"; + + /// 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. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("copilotUser")] + public CopilotUserResponse? CopilotUser { get; set; } + + /// Authentication host. + [JsonPropertyName("host")] + public required string Host { get; set; } + + /// OAuth user login. + [JsonPropertyName("login")] + public required string Login { get; set; } +} + +/// Authentication-info input variant for GitHub CLI credentials, carrying host, login, and the `gh auth token` value. +/// The gh-cli variant of . +[Experimental(Diagnostics.Experimental)] +public partial class SettableAuthInfoGhCli : SettableAuthInfo +{ + /// + [JsonIgnore] + public override string Type => "gh-cli"; + + /// 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. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("copilotUser")] + public CopilotUserResponse? CopilotUser { get; set; } + + /// Authentication host. + [JsonPropertyName("host")] + public required string Host { get; set; } + + /// User login as reported by `gh auth status`. + [JsonPropertyName("login")] + public required string Login { get; set; } + + /// The token returned by `gh auth token`. Treat as a secret. + [JsonPropertyName("token")] + public required string Token { get; set; } +} + +/// Authentication-info input variant for API-key authentication to a non-GitHub LLM provider, carrying the secret `apiKey` and host. +/// The api-key variant of . +[Experimental(Diagnostics.Experimental)] +public partial class SettableAuthInfoApiKey : SettableAuthInfo +{ + /// + [JsonIgnore] + public override string Type => "api-key"; + + /// The API key. Treat as a secret. + [JsonPropertyName("apiKey")] + public required string ApiKey { get; set; } + + /// 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. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("copilotUser")] + public CopilotUserResponse? CopilotUser { get; set; } + + /// Authentication host. + [JsonPropertyName("host")] + public required string Host { get; set; } +} + /// New auth credentials to install on the session. Omit to leave credentials unchanged. [Experimental(Diagnostics.Experimental)] internal sealed class SessionSetCredentialsParams { /// The new auth credentials to install on the session. When omitted or `undefined`, the call is a no-op and the session's existing credentials are preserved. The runtime installs the supplied value immediately for outbound model/API requests. When the credential carries a raw token (`token`, `env`, or `gh-cli`) but no `copilotUser`, the runtime additionally re-resolves `copilotUser` server-side (best-effort, asynchronously, after the synchronous install) so plan/quota/billing metadata regains fidelity; on resolution failure the verbatim credential remains installed. It does NOT otherwise validate the credential. Several variants carry secret material; treat this method's params as containing secrets at rest and in transit. [JsonPropertyName("credentials")] - public AuthInfo? Credentials { get; set; } + public SettableAuthInfo? Credentials { get; set; } /// Target session identifier. [JsonPropertyName("sessionId")] @@ -5383,6 +5670,10 @@ public sealed class AuthIdentity [JsonPropertyName("login")] public string? Login { get; set; } + /// Opaque SDK GitHub credential registration backing this identity. Routing metadata only; never a credential. + [JsonPropertyName("registrationId")] + public string? RegistrationId { get; set; } + /// Authentication type. [JsonPropertyName("type")] public AuthInfoType Type { get; set; } @@ -9384,7 +9675,7 @@ public partial class McpOauthPendingRequestResponseToken : McpOauthPendingReques [JsonPropertyName("expiresIn")] public long? ExpiresIn { get; set; } - /// OAuth token type. Defaults to Bearer when omitted. + /// OAuth token type. Defaults to bearer when omitted. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("tokenType")] public string? TokenType { get; set; } @@ -10588,6 +10879,10 @@ public sealed class SessionInstalledPlugin [JsonPropertyName("installed_at")] public string InstalledAt { get; set; } = string.Empty; + /// Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key. + [JsonPropertyName("installed_from")] + public string? InstalledFrom { get; set; } + /// Marketplace the plugin came from (empty string for direct repo installs). [JsonPropertyName("marketplace")] public string Marketplace { get; set; } = string.Empty; @@ -10802,7 +11097,7 @@ public sealed class SandboxConfig [JsonPropertyName("addCurrentWorkingDirectory")] public bool? AddCurrentWorkingDirectory { get; set; } - /// 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). + /// 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 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; } @@ -11035,6 +11330,10 @@ internal sealed class SessionUpdateOptionsParams [JsonPropertyName("includedBuiltinAgents")] public IList? IncludedBuiltinAgents { get; set; } + /// Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available. Set to null to remove the allowlist restriction. + [JsonPropertyName("includedBuiltinSkills")] + public IList? IncludedBuiltinSkills { get; set; } + /// Full set of installed plugins for the session. Replaces the existing list; the runtime invalidates the skills cache only when the list materially changes. [JsonPropertyName("installedPlugins")] public IList? InstalledPlugins { get; set; } @@ -11095,6 +11394,11 @@ internal sealed class SessionUpdateOptionsParams [JsonPropertyName("sandboxConfig")] public SandboxConfig? SandboxConfig { get; set; } + /// Origin of the sandbox choice. The runtime uses this only for internal telemetry provenance; managed policy is derived independently. + [JsonInclude] + [JsonPropertyName("sandboxConfigSource")] + internal SandboxConfigSource? SandboxConfigSource { get; set; } + /// Replaces the session's capability set with the given list. Use to enable or disable capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the field to leave the existing capability set unchanged. [JsonPropertyName("sessionCapabilities")] public IList? SessionCapabilities { get; set; } @@ -13485,7 +13789,7 @@ public sealed class PermissionsConfigureAdditionalContentExclusionPolicy [Experimental(Diagnostics.Experimental)] public sealed class PermissionPathsConfig { - /// Additional directories to allow tool access to (in addition to the session's working directory). When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion). + /// Additional directories to allow tool access to (in addition to the session's working directory). Conventional `.github/skills/` and `.github/agents/` definitions under them also join the session catalogs when their subsystem gates are enabled, so supplying a directory is a trust decision for configuration stored there. When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion). [JsonPropertyName("additionalDirectories")] public IList? AdditionalDirectories { get; set; } @@ -14466,7 +14770,7 @@ public sealed class PermissionsPathsAddResult [Experimental(Diagnostics.Experimental)] internal sealed class PermissionPathsAddParams { - /// Directory to add to the allow-list. The runtime resolves and validates the path before adding. + /// Directory to add to the allow-list. The runtime resolves and validates the path before adding, then loads conventional `.github/skills/` and `.github/agents/` definitions under it when their subsystem gates are enabled. Adding the directory is therefore also a trust decision for configuration stored there. [JsonPropertyName("path")] public string Path { get; set; } = string.Empty; @@ -16233,6 +16537,10 @@ public sealed class QueuePendingItems [Experimental(Diagnostics.Experimental)] public sealed class QueuePendingItemsResult { + /// How many leading entries of `steeringMessages` have already been folded into the running turn (and so have an emitted `user.message`), as opposed to still waiting for one. Absent for hosts that do not distinguish the two. + [JsonPropertyName("inFlightSteeringCount")] + public long? InFlightSteeringCount { get; set; } + /// Pending queued items in submission order. Includes user messages, queued slash commands, and queued model changes; omits internal system items. [JsonPropertyName("items")] public IList Items { get => field ??= []; set; } @@ -18301,6 +18609,74 @@ public sealed class GitHubTelemetryNotification public string? SessionId { get; set; } } +/// SDK host response to a GitHub credential request. +/// Polymorphic base type discriminated by kind. +[Experimental(Diagnostics.Experimental)] +[JsonPolymorphic( + TypeDiscriminatorPropertyName = "kind", + UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] +[JsonDerivedType(typeof(GitHubTokenAcquireResultToken), "token")] +[JsonDerivedType(typeof(GitHubTokenAcquireResultCancelled), "cancelled")] +public partial class GitHubTokenAcquireResult +{ + /// The type discriminator. + [JsonPropertyName("kind")] + public virtual string Kind { get; set; } = string.Empty; +} + + +/// The token variant of . +[Experimental(Diagnostics.Experimental)] +public partial class GitHubTokenAcquireResultToken : GitHubTokenAcquireResult +{ + /// + [JsonIgnore] + public override string Kind => "token"; + + /// GitHub access token acquired by the SDK host. + [JsonPropertyName("accessToken")] + public required string AccessToken { get; set; } + + /// Remaining token lifetime in seconds when callback execution completes. It must exceed the one-hour preflight refresh threshold. + [JsonPropertyName("expiresIn")] + public required long ExpiresIn { get; set; } + + /// OAuth token type. Defaults to bearer when omitted. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("tokenType")] + public string? TokenType { get; set; } +} + +/// The cancelled variant of . +[Experimental(Diagnostics.Experimental)] +public partial class GitHubTokenAcquireResultCancelled : GitHubTokenAcquireResult +{ + /// + [JsonIgnore] + public override string Kind => "cancelled"; +} + +/// Asks the SDK client to acquire a GitHub access token from an opaque callback registration. +[Experimental(Diagnostics.Experimental)] +public sealed class GitHubTokenAcquireRequest +{ + /// Effective GitHub host for which the callback must return a token. + [JsonPropertyName("host")] + public string Host { get; set; } = string.Empty; + + /// Why the runtime is requesting a GitHub credential. + [JsonPropertyName("reason")] + public GitHubTokenAcquireReason Reason { get; set; } + + /// Opaque identifier generated by the SDK for this callback registration. + [JsonPropertyName("registrationId")] + public string RegistrationId { get; set; } = string.Empty; + + /// Session receiving the token. Absent only before a cloud session has been assigned its id. + [JsonPropertyName("sessionId")] + public string? SessionId { get; set; } +} + /// Resolved Anthropic adaptive-thinking capability for a model. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] @@ -22563,6 +22939,9 @@ public AuthInfoType(string value) /// Authentication from a GitHub token. public static AuthInfoType Token { get; } = new("token"); + /// Authentication from an SDK GitHub token callback. + public static AuthInfoType TokenProvider { get; } = new("token-provider"); + /// Authentication from a Copilot API token. public static AuthInfoType CopilotApiToken { get; } = new("copilot-api-token"); @@ -25168,6 +25547,84 @@ public override void Write(Utf8JsonWriter writer, OptionsUpdateReasoningSummary } +/// Origin of the sandbox choice supplied by an internal client. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct SandboxConfigSource : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public SandboxConfigSource(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The client applied the default because no sandbox preference was configured. + public static SandboxConfigSource NeverConfigured { get; } = new("never_configured"); + + /// The user's persisted settings enabled the sandbox. + public static SandboxConfigSource UserEnabled { get; } = new("user_enabled"); + + /// The user's persisted settings disabled the sandbox. + public static SandboxConfigSource UserDisabled { get; } = new("user_disabled"); + + /// A command-line flag selected the sandbox state for this session. + public static SandboxConfigSource SessionFlag { get; } = new("session_flag"); + + /// The user disabled the sandbox for the current session. + public static SandboxConfigSource SessionDisabled { get; } = new("session_disabled"); + + /// The client disabled the sandbox because the host cannot enforce it. + public static SandboxConfigSource UnsupportedHost { get; } = new("unsupported_host"); + + /// A repository policy selected the sandbox state. + public static SandboxConfigSource RepositoryPolicy { get; } = new("repository_policy"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SandboxConfigSource left, SandboxConfigSource right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SandboxConfigSource left, SandboxConfigSource right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is SandboxConfigSource other && Equals(other); + + /// + public bool Equals(SandboxConfigSource 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 SandboxConfigSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, SandboxConfigSource value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SandboxConfigSource)); + } + } +} + + /// Session capability enabled for this session. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] @@ -28824,6 +29281,69 @@ public override void Write(Utf8JsonWriter writer, LlmInferenceHttpRequestStartTr } +/// Why the runtime is requesting a GitHub credential. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct GitHubTokenAcquireReason : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public GitHubTokenAcquireReason(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The runtime is acquiring the registration's first credential. + public static GitHubTokenAcquireReason Initial { get; } = new("initial"); + + /// The runtime is replacing a credential that is approaching expiry. + public static GitHubTokenAcquireReason Refresh { get; } = new("refresh"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(GitHubTokenAcquireReason left, GitHubTokenAcquireReason right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(GitHubTokenAcquireReason left, GitHubTokenAcquireReason right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is GitHubTokenAcquireReason other && Equals(other); + + /// + public bool Equals(GitHubTokenAcquireReason 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 GitHubTokenAcquireReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, GitHubTokenAcquireReason value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(GitHubTokenAcquireReason)); + } + } +} + + /// Provides server-scoped RPC methods (no session required). public sealed class ServerRpc { @@ -28847,13 +29367,14 @@ public async Task PingAsync(string? message = null, CancellationToke /// Performs the SDK server connection handshake and validates the optional connection token. Marked internal because this is JSON-RPC transport plumbing invoked automatically by an SDK client's own `connect()` wrapper, not a user-facing method. Stays internal as long as the SDK client owns the handshake; would only become public if the SDK ever exposed the raw schema surface to consumers without a connection wrapper. /// Opt this connection in to GitHub telemetry forwarding for its lifetime. When set, the runtime forwards every internal telemetry event it emits — across all sessions, plus sessionless events — to this connection over the `gitHubTelemetry.event` notification. Regular events are also written to the runtime's normal GitHub/CTS path (dual-write); host-only compatibility events are forward-only and intentionally skip that path. Intended for first-party hosts that re-emit the events into their own telemetry stores. Both unrestricted and restricted events are forwarded, each tagged with a `restricted` discriminator; a backstop drops restricted events when restricted telemetry is disabled — using the process-global gate for ordinary events and an explicit session-scoped decision for host-only events. + /// Identity of the integrating host. Optional; omit it to keep the default attribution. /// Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN. /// The to monitor for cancellation requests. The default is . /// Handshake result reporting the server's protocol version and package version on success. [Experimental(Diagnostics.Experimental)] - internal async Task ConnectAsync(bool? enableGitHubTelemetryForwarding = null, string? token = null, CancellationToken cancellationToken = default) + internal async Task ConnectAsync(bool? enableGitHubTelemetryForwarding = null, ConnectClientInfo? clientInfo = null, string? token = null, CancellationToken cancellationToken = default) { - var request = new ConnectRequest { EnableGitHubTelemetryForwarding = enableGitHubTelemetryForwarding, Token = token }; + var request = new ConnectRequest { EnableGitHubTelemetryForwarding = enableGitHubTelemetryForwarding, ClientInfo = clientInfo, Token = token }; return await CopilotClient.InvokeRpcAsync(_rpc, "connect", [request], cancellationToken); } @@ -30665,7 +31186,7 @@ public async Task GetStatusAsync(CancellationToken cancellati /// The new auth credentials to install on the session. When omitted or `undefined`, the call is a no-op and the session's existing credentials are preserved. The runtime installs the supplied value immediately for outbound model/API requests. When the credential carries a raw token (`token`, `env`, or `gh-cli`) but no `copilotUser`, the runtime additionally re-resolves `copilotUser` server-side (best-effort, asynchronously, after the synchronous install) so plan/quota/billing metadata regains fidelity; on resolution failure the verbatim credential remains installed. It does NOT otherwise validate the credential. Several variants carry secret material; treat this method's params as containing secrets at rest and in transit. /// The to monitor for cancellation requests. The default is . /// Indicates whether the credential update succeeded. - public async Task SetCredentialsAsync(AuthInfo? credentials = null, CancellationToken cancellationToken = default) + public async Task SetCredentialsAsync(SettableAuthInfo? credentials = null, CancellationToken cancellationToken = default) { _session.ThrowIfDisposed(); @@ -32631,10 +33152,12 @@ internal OptionsApi(CopilotSession session) /// Use shell.initProfile instead. Shell init profile (`None` or `NonInteractive`). /// PowerShell process flags applied to built-in and user-requested shell commands. /// Resolved sandbox configuration. + /// Origin of the sandbox choice. The runtime uses this only for internal telemetry provenance; managed policy is derived independently. /// Whether interactive shell sessions are logged. /// How env values are passed to MCP servers (`direct` inlines literal values; `indirect` resolves at launch). /// Whether to include instructions from every MCP server in the system prompt instead of only allowlisted servers. /// Additional directories to search for skills. + /// Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available. Set to null to remove the allowlist restriction. /// Skill IDs that should be excluded from this session. /// Whether to discover custom instructions on demand after successful file views (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md surfacing). Combined with `skipCustomInstructions`. /// Maximum decoded byte size of a single model-facing binary tool result (e.g. an image) persisted inline in session events and re-presented to the model on later turns / resume. Larger results are persisted as a metadata-only marker and shown to the model as a short text note. Defaults to 10 MB. @@ -32667,11 +33190,11 @@ internal OptionsApi(CopilotSession session) /// Optional session limits. Pass null to clear the session limits. /// The to monitor for cancellation requests. The default is . /// Indicates whether the session options patch was applied successfully. - public async Task UpdateAsync(string? model = null, ModelCapabilitiesOverride? modelCapabilitiesOverrides = null, string? reasoningEffort = null, OptionsUpdateReasoningSummary? reasoningSummary = null, Verbosity? verbosity = null, string? clientName = null, string? lspClientName = null, string? integrationId = null, IDictionary? featureFlags = null, bool? isExperimentalMode = null, ProviderConfig? provider = null, CapiSessionOptions? capi = null, string? workingDirectory = null, IList? availableTools = null, IList? excludedTools = null, IList? includedBuiltinAgents = null, IList? excludedBuiltinAgents = null, OptionsUpdateToolFilterPrecedence? toolFilterPrecedence = null, bool? enableScriptSafety = null, ShellOptions? shell = null, string? shellInitProfile = null, IList? shellProcessFlags = null, SandboxConfig? sandboxConfig = null, bool? logInteractiveShells = null, OptionsUpdateEnvValueMode? envValueMode = null, bool? allowAllMcpServerInstructions = null, IList? skillDirectories = null, IList? disabledSkills = null, bool? enableOnDemandInstructionDiscovery = null, long? maxInlineBinaryBytes = null, IList? installedPlugins = null, bool? customAgentsLocalOnly = null, bool? suppressCustomAgentPrompt = null, bool? skipCustomInstructions = null, IList? disabledInstructionSources = null, bool? coauthorEnabled = null, string? trajectoryFile = null, bool? enableStreaming = null, string? copilotUrl = null, bool? askUserDisabled = null, bool? continueOnAutoMode = null, bool? runningInInteractiveMode = null, bool? enableReasoningSummaries = null, string? agentContext = null, string? eventsLogDirectory = null, bool? eventsLogIncludesSubagents = null, IList? additionalContentExclusionPolicies = null, bool? manageScheduleEnabled = null, IList? sessionCapabilities = null, bool? skipEmbeddingRetrieval = null, string? organizationCustomInstructions = null, bool? enableFileHooks = null, bool? enableHostGitOperations = null, bool? enableSessionStore = null, bool? enableSkills = null, OptionsUpdateContextTier? contextTier = null, SessionLimitsConfig? sessionLimits = null, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string? model = null, ModelCapabilitiesOverride? modelCapabilitiesOverrides = null, string? reasoningEffort = null, OptionsUpdateReasoningSummary? reasoningSummary = null, Verbosity? verbosity = null, string? clientName = null, string? lspClientName = null, string? integrationId = null, IDictionary? featureFlags = null, bool? isExperimentalMode = null, ProviderConfig? provider = null, CapiSessionOptions? capi = null, string? workingDirectory = null, IList? availableTools = null, IList? excludedTools = null, IList? includedBuiltinAgents = null, IList? excludedBuiltinAgents = null, OptionsUpdateToolFilterPrecedence? toolFilterPrecedence = null, bool? enableScriptSafety = null, ShellOptions? shell = null, string? shellInitProfile = null, IList? shellProcessFlags = null, SandboxConfig? sandboxConfig = null, SandboxConfigSource? sandboxConfigSource = null, bool? logInteractiveShells = null, OptionsUpdateEnvValueMode? envValueMode = null, bool? allowAllMcpServerInstructions = null, IList? skillDirectories = null, IList? includedBuiltinSkills = null, IList? disabledSkills = null, bool? enableOnDemandInstructionDiscovery = null, long? maxInlineBinaryBytes = null, IList? installedPlugins = null, bool? customAgentsLocalOnly = null, bool? suppressCustomAgentPrompt = null, bool? skipCustomInstructions = null, IList? disabledInstructionSources = null, bool? coauthorEnabled = null, string? trajectoryFile = null, bool? enableStreaming = null, string? copilotUrl = null, bool? askUserDisabled = null, bool? continueOnAutoMode = null, bool? runningInInteractiveMode = null, bool? enableReasoningSummaries = null, string? agentContext = null, string? eventsLogDirectory = null, bool? eventsLogIncludesSubagents = null, IList? additionalContentExclusionPolicies = null, bool? manageScheduleEnabled = null, IList? sessionCapabilities = null, bool? skipEmbeddingRetrieval = null, string? organizationCustomInstructions = null, bool? enableFileHooks = null, bool? enableHostGitOperations = null, bool? enableSessionStore = null, bool? enableSkills = null, OptionsUpdateContextTier? contextTier = null, SessionLimitsConfig? sessionLimits = null, CancellationToken cancellationToken = default) { _session.ThrowIfDisposed(); - var request = new SessionUpdateOptionsParams { SessionId = _session.SessionId, Model = model, ModelCapabilitiesOverrides = modelCapabilitiesOverrides, ReasoningEffort = reasoningEffort, ReasoningSummary = reasoningSummary, Verbosity = verbosity, ClientName = clientName, LspClientName = lspClientName, IntegrationId = integrationId, FeatureFlags = featureFlags, IsExperimentalMode = isExperimentalMode, Provider = provider, Capi = capi, WorkingDirectory = workingDirectory, AvailableTools = availableTools, ExcludedTools = excludedTools, IncludedBuiltinAgents = includedBuiltinAgents, ExcludedBuiltinAgents = excludedBuiltinAgents, ToolFilterPrecedence = toolFilterPrecedence, EnableScriptSafety = enableScriptSafety, Shell = shell, ShellInitProfile = shellInitProfile, ShellProcessFlags = shellProcessFlags, SandboxConfig = sandboxConfig, LogInteractiveShells = logInteractiveShells, EnvValueMode = envValueMode, AllowAllMcpServerInstructions = allowAllMcpServerInstructions, SkillDirectories = skillDirectories, DisabledSkills = disabledSkills, EnableOnDemandInstructionDiscovery = enableOnDemandInstructionDiscovery, MaxInlineBinaryBytes = maxInlineBinaryBytes, InstalledPlugins = installedPlugins, CustomAgentsLocalOnly = customAgentsLocalOnly, SuppressCustomAgentPrompt = suppressCustomAgentPrompt, SkipCustomInstructions = skipCustomInstructions, DisabledInstructionSources = disabledInstructionSources, CoauthorEnabled = coauthorEnabled, TrajectoryFile = trajectoryFile, EnableStreaming = enableStreaming, CopilotUrl = copilotUrl, AskUserDisabled = askUserDisabled, ContinueOnAutoMode = continueOnAutoMode, RunningInInteractiveMode = runningInInteractiveMode, EnableReasoningSummaries = enableReasoningSummaries, AgentContext = agentContext, EventsLogDirectory = eventsLogDirectory, EventsLogIncludesSubagents = eventsLogIncludesSubagents, AdditionalContentExclusionPolicies = additionalContentExclusionPolicies, ManageScheduleEnabled = manageScheduleEnabled, SessionCapabilities = sessionCapabilities, SkipEmbeddingRetrieval = skipEmbeddingRetrieval, OrganizationCustomInstructions = organizationCustomInstructions, EnableFileHooks = enableFileHooks, EnableHostGitOperations = enableHostGitOperations, EnableSessionStore = enableSessionStore, EnableSkills = enableSkills, ContextTier = contextTier, SessionLimits = sessionLimits }; + var request = new SessionUpdateOptionsParams { SessionId = _session.SessionId, Model = model, ModelCapabilitiesOverrides = modelCapabilitiesOverrides, ReasoningEffort = reasoningEffort, ReasoningSummary = reasoningSummary, Verbosity = verbosity, ClientName = clientName, LspClientName = lspClientName, IntegrationId = integrationId, FeatureFlags = featureFlags, IsExperimentalMode = isExperimentalMode, Provider = provider, Capi = capi, WorkingDirectory = workingDirectory, AvailableTools = availableTools, ExcludedTools = excludedTools, IncludedBuiltinAgents = includedBuiltinAgents, ExcludedBuiltinAgents = excludedBuiltinAgents, ToolFilterPrecedence = toolFilterPrecedence, EnableScriptSafety = enableScriptSafety, Shell = shell, ShellInitProfile = shellInitProfile, ShellProcessFlags = shellProcessFlags, SandboxConfig = sandboxConfig, SandboxConfigSource = sandboxConfigSource, LogInteractiveShells = logInteractiveShells, EnvValueMode = envValueMode, AllowAllMcpServerInstructions = allowAllMcpServerInstructions, SkillDirectories = skillDirectories, IncludedBuiltinSkills = includedBuiltinSkills, DisabledSkills = disabledSkills, EnableOnDemandInstructionDiscovery = enableOnDemandInstructionDiscovery, MaxInlineBinaryBytes = maxInlineBinaryBytes, InstalledPlugins = installedPlugins, CustomAgentsLocalOnly = customAgentsLocalOnly, SuppressCustomAgentPrompt = suppressCustomAgentPrompt, SkipCustomInstructions = skipCustomInstructions, DisabledInstructionSources = disabledInstructionSources, CoauthorEnabled = coauthorEnabled, TrajectoryFile = trajectoryFile, EnableStreaming = enableStreaming, CopilotUrl = copilotUrl, AskUserDisabled = askUserDisabled, ContinueOnAutoMode = continueOnAutoMode, RunningInInteractiveMode = runningInInteractiveMode, EnableReasoningSummaries = enableReasoningSummaries, AgentContext = agentContext, EventsLogDirectory = eventsLogDirectory, EventsLogIncludesSubagents = eventsLogIncludesSubagents, AdditionalContentExclusionPolicies = additionalContentExclusionPolicies, ManageScheduleEnabled = manageScheduleEnabled, SessionCapabilities = sessionCapabilities, SkipEmbeddingRetrieval = skipEmbeddingRetrieval, OrganizationCustomInstructions = organizationCustomInstructions, EnableFileHooks = enableFileHooks, EnableHostGitOperations = enableHostGitOperations, EnableSessionStore = enableSessionStore, EnableSkills = enableSkills, ContextTier = contextTier, SessionLimits = sessionLimits }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.options.update", [request], cancellationToken); } } @@ -33388,8 +33911,8 @@ public async Task ListAsync(CancellationToken cancellationT return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.permissions.paths.list", [request], cancellationToken); } - /// Adds a directory to the session's allow-list. - /// Directory to add to the allow-list. The runtime resolves and validates the path before adding. + /// Adds a directory to the session's allow-list and activates conventional skill and agent definitions under it. + /// Directory to add to the allow-list. The runtime resolves and validates the path before adding, then loads conventional `.github/skills/` and `.github/agents/` definitions under it when their subsystem gates are enabled. Adding the directory is therefore also a trust decision for configuration stored there. /// The to monitor for cancellation requests. The default is . /// Indicates whether the operation succeeded. public async Task AddAsync(string path, CancellationToken cancellationToken = default) @@ -34786,6 +35309,17 @@ public interface IGitHubTelemetryHandler Task EventAsync(GitHubTelemetryNotification request, CancellationToken cancellationToken = default); } +/// Handles `gitHubToken` client global API methods. +[Experimental(Diagnostics.Experimental)] +public interface IGitHubTokenHandler +{ + /// Asks the SDK client to mint a GitHub access token for a session whose configuration supplied a GitHub token provider. The runtime acquires the initial token during bootstrap and refreshes it during expiry preflight when one hour or less remains. + /// Asks the SDK client to acquire a GitHub access token from an opaque callback registration. + /// The to monitor for cancellation requests. The default is . + /// SDK host response to a GitHub credential request. + Task GetTokenAsync(GitHubTokenAcquireRequest request, CancellationToken cancellationToken = default); +} + /// Provides all client global API handler groups for a connection. public sealed class ClientGlobalApiHandlers { @@ -34797,6 +35331,9 @@ public sealed class ClientGlobalApiHandlers /// Optional handler for GitHubTelemetry client global API methods. public IGitHubTelemetryHandler? GitHubTelemetry { get; set; } + + /// Optional handler for GitHubToken client global API methods. + public IGitHubTokenHandler? GitHubToken { get; set; } } /// Registers client global API handlers on a JSON-RPC connection. @@ -34830,6 +35367,11 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH var handler = handlers.GitHubTelemetry ?? throw new InvalidOperationException("No gitHubTelemetry client-global handler registered"); await handler.EventAsync(request, cancellationToken); }), singleObjectParam: true); + rpc.SetLocalRpcMethod("gitHubToken.getToken", (Func>)(async (request, cancellationToken) => + { + var handler = handlers.GitHubToken ?? throw new InvalidOperationException("No gitHubToken client-global handler registered"); + return await handler.GetTokenAsync(request, cancellationToken); + }), singleObjectParam: true); } } @@ -34857,6 +35399,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.AssistantMessageDeltaData), TypeInfoPropertyName = "SessionEventsAssistantMessageDeltaData")] [JsonSerializable(typeof(GitHub.Copilot.AssistantMessageDeltaEvent), TypeInfoPropertyName = "SessionEventsAssistantMessageDeltaEvent")] [JsonSerializable(typeof(GitHub.Copilot.AssistantMessageEvent), TypeInfoPropertyName = "SessionEventsAssistantMessageEvent")] +[JsonSerializable(typeof(GitHub.Copilot.AssistantMessageReasoningBlocks), TypeInfoPropertyName = "SessionEventsAssistantMessageReasoningBlocks")] [JsonSerializable(typeof(GitHub.Copilot.AssistantMessageServerTools), TypeInfoPropertyName = "SessionEventsAssistantMessageServerTools")] [JsonSerializable(typeof(GitHub.Copilot.AssistantMessageStartData), TypeInfoPropertyName = "SessionEventsAssistantMessageStartData")] [JsonSerializable(typeof(GitHub.Copilot.AssistantMessageStartEvent), TypeInfoPropertyName = "SessionEventsAssistantMessageStartEvent")] @@ -35028,6 +35571,9 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.ModelCallFailureRequestFingerprint), TypeInfoPropertyName = "SessionEventsModelCallFailureRequestFingerprint")] [JsonSerializable(typeof(GitHub.Copilot.ModelCallFailureSource), TypeInfoPropertyName = "SessionEventsModelCallFailureSource")] [JsonSerializable(typeof(GitHub.Copilot.ModelCallFailureTransport), TypeInfoPropertyName = "SessionEventsModelCallFailureTransport")] +[JsonSerializable(typeof(GitHub.Copilot.ModelCallFinishedData), TypeInfoPropertyName = "SessionEventsModelCallFinishedData")] +[JsonSerializable(typeof(GitHub.Copilot.ModelCallFinishedEvent), TypeInfoPropertyName = "SessionEventsModelCallFinishedEvent")] +[JsonSerializable(typeof(GitHub.Copilot.ModelCallFinishedOutcome), TypeInfoPropertyName = "SessionEventsModelCallFinishedOutcome")] [JsonSerializable(typeof(GitHub.Copilot.ModelCallStartData), TypeInfoPropertyName = "SessionEventsModelCallStartData")] [JsonSerializable(typeof(GitHub.Copilot.ModelCallStartEvent), TypeInfoPropertyName = "SessionEventsModelCallStartEvent")] [JsonSerializable(typeof(GitHub.Copilot.ModelChangeSource), TypeInfoPropertyName = "SessionEventsModelChangeSource")] @@ -35283,6 +35829,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(CompletionsRequestRequest))] [JsonSerializable(typeof(CompletionsRequestResult))] [JsonSerializable(typeof(ConfigureSessionExtensionsParams))] +[JsonSerializable(typeof(ConnectClientInfo))] [JsonSerializable(typeof(ConnectRemoteSessionParams))] [JsonSerializable(typeof(ConnectRequest))] [JsonSerializable(typeof(ConnectResult))] @@ -35374,6 +35921,8 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHubTelemetryClientInfo))] [JsonSerializable(typeof(GitHubTelemetryEvent))] [JsonSerializable(typeof(GitHubTelemetryNotification))] +[JsonSerializable(typeof(GitHubTokenAcquireRequest))] +[JsonSerializable(typeof(GitHubTokenAcquireResult))] [JsonSerializable(typeof(HandlePendingToolCallRequest))] [JsonSerializable(typeof(HandlePendingToolCallResult))] [JsonSerializable(typeof(HistoryAbortManualCompactionResult))] @@ -35560,6 +36109,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(ModelCapabilitiesOverrideSupports))] [JsonSerializable(typeof(ModelCapabilitiesSupports))] [JsonSerializable(typeof(ModelList))] +[JsonSerializable(typeof(ModelMessage))] [JsonSerializable(typeof(ModelPickerPersistenceRequest))] [JsonSerializable(typeof(ModelPickerSettingsContext))] [JsonSerializable(typeof(ModelPickerSettingsContextEnvironment))] @@ -35569,6 +36119,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(ModelSwitchConfirmation))] [JsonSerializable(typeof(ModelSwitchToRequest))] [JsonSerializable(typeof(ModelSwitchToResult))] +[JsonSerializable(typeof(ModelWarningText))] [JsonSerializable(typeof(ModelsListRequest))] [JsonSerializable(typeof(MoveMcpLoadingToBackgroundResult))] [JsonSerializable(typeof(NameGetResult))] @@ -35949,6 +36500,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(SessionsStartRemoteControlRequest))] [JsonSerializable(typeof(SessionsStopRemoteControlRequest))] [JsonSerializable(typeof(SessionsTransferRemoteControlRequest))] +[JsonSerializable(typeof(SettableAuthInfo))] [JsonSerializable(typeof(ShellCancelUserRequestedRequest))] [JsonSerializable(typeof(ShellCredentials))] [JsonSerializable(typeof(ShellExecRequest))] diff --git a/dotnet/src/Generated/SessionEvents.cs b/dotnet/src/Generated/SessionEvents.cs index fa0563a8e4..ccfda24fa3 100644 --- a/dotnet/src/Generated/SessionEvents.cs +++ b/dotnet/src/Generated/SessionEvents.cs @@ -68,6 +68,7 @@ namespace GitHub.Copilot; [JsonDerivedType(typeof(McpResourcesListChangedEvent), "mcp.resources.list_changed")] [JsonDerivedType(typeof(McpToolsListChangedEvent), "mcp.tools.list_changed")] [JsonDerivedType(typeof(ModelCallFailureEvent), "model.call_failure")] +[JsonDerivedType(typeof(ModelCallFinishedEvent), "model.call_finished")] [JsonDerivedType(typeof(ModelCallStartEvent), "model.call_start")] [JsonDerivedType(typeof(PendingMessagesModifiedEvent), "pending_messages.modified")] [JsonDerivedType(typeof(PermissionCompletedEvent), "permission.completed")] @@ -825,6 +826,19 @@ public sealed partial class ModelCallFailureEvent : SessionEvent public required ModelCallFailureData Data { get; set; } } +/// Final lifecycle outcome for one logical model dispatch. A logical dispatch may include internal reconnect or fallback work, so event count is not provider HTTP-request count. +/// Represents the model.call_finished event. +public sealed partial class ModelCallFinishedEvent : SessionEvent +{ + /// + [JsonIgnore] + public override string Type => "model.call_finished"; + + /// The model.call_finished event payload. + [JsonPropertyName("data")] + public required ModelCallFinishedData Data { get; set; } +} + /// Model API dispatch metadata for internal telemetry. /// Represents the model.call_start event. public sealed partial class ModelCallStartEvent : SessionEvent @@ -3039,6 +3053,11 @@ public sealed partial class AssistantMessageData [JsonPropertyName("phase")] public string? Phase { get; set; } + /// Neutral provider-tagged reasoning content blocks preserved verbatim for round-tripping. `reasoningText` and `reasoningOpaque` are a lossy derived view of these blocks, retained for display. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("reasoningBlocks")] + public AssistantMessageReasoningBlocks? ReasoningBlocks { get; set; } + /// Opaque/encrypted extended thinking data from Anthropic models. Session-bound and stripped on resume. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("reasoningOpaque")] @@ -3281,6 +3300,12 @@ public sealed partial class AssistantUsageData [JsonPropertyName("outputTokens")] public long? OutputTokens { get; set; } + /// Time to first observable model output in milliseconds. Includes text, reasoning, and tool-call output; only available for streaming requests that produce observable output. + [JsonConverter(typeof(MillisecondsTimeSpanConverter))] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("outputTtftMs")] + public TimeSpan? OutputTtft { get; set; } + /// Parent tool call ID when this usage originates from a sub-agent. [EditorBrowsable(EditorBrowsableState.Never)] #if NET5_0_OR_GREATER @@ -3610,6 +3635,37 @@ public sealed partial class ModelCallFailureData public ModelCallFailureTransport? Transport { get; set; } } +/// Final lifecycle outcome for one logical model dispatch. A logical dispatch may include internal reconnect or fallback work, so event count is not provider HTTP-request count. +public sealed partial class ModelCallFinishedData +{ + /// Whether an accepted successful response requested the exact name and command semantics of a built-in file edit tool, including an external tool explicitly replacing that built-in name. Absent when the logical dispatch did not produce an accepted response. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("containsBuiltInFileEditRequest")] + public bool? ContainsBuiltInFileEditRequest { get; set; } + + /// Monotonic elapsed time spent in the logical model dispatch, including any internal transport reconnect or fallback and excluding orchestrator retry backoff, tool execution, confirmations, and post-response processing. + [JsonConverter(typeof(MillisecondsTimeSpanConverter))] + [JsonPropertyName("dispatchDurationMs")] + public required TimeSpan DispatchDuration { get; set; } + + /// Version of the built-in file-edit semantic classifier used for this event. + [JsonPropertyName("editClassifierVersion")] + public required long EditClassifierVersion { get; set; } + + /// Identifier of the user interaction that owns the model dispatch, matching assistant.turn_start.interactionId when available. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("interactionId")] + public string? InteractionId { get; set; } + + /// Final outcome after post-response acceptance processing. + [JsonPropertyName("outcome")] + public required ModelCallFinishedOutcome Outcome { get; set; } + + /// Agent-loop iteration within the interaction that initiated the model dispatch. + [JsonPropertyName("turnId")] + public required string TurnId { get; set; } +} + /// Model API dispatch metadata for internal telemetry. public sealed partial class ModelCallStartData { @@ -3933,12 +3989,37 @@ public sealed partial class SubagentCompletedData [JsonPropertyName("cancelled")] public bool? Cancelled { get; set; } + /// Whether the first model actually dispatched matched the user's configured preference. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("configuredModelMatchesActual")] + public bool? ConfiguredModelMatchesActual { get; set; } + + /// Concrete model the user configured for this sub-agent via `/subagents`, when present. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("configuredModelPreference")] + public string? ConfiguredModelPreference { get; set; } + /// Wall-clock duration of the sub-agent execution in milliseconds. [JsonConverter(typeof(MillisecondsTimeSpanConverter))] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("durationMs")] public TimeSpan? Duration { get; set; } + /// Whether the explicit task-call model matched the user's configured preference. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("explicitModelMatchesPreference")] + public bool? ExplicitModelMatchesPreference { get; set; } + + /// Explicit model supplied by the parent agent on the task call, when present. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("explicitModelOverride")] + public string? ExplicitModelOverride { get; set; } + + /// First model for which the sub-agent started an inference request, when one was dispatched. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("firstDispatchedModel")] + public string? FirstDispatchedModel { get; set; } + /// Model used by the sub-agent. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("model")] @@ -3970,6 +4051,16 @@ public sealed partial class SubagentFailedData [JsonPropertyName("agentName")] public required string AgentName { get; set; } + /// Whether the first model actually dispatched matched the user's configured preference. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("configuredModelMatchesActual")] + public bool? ConfiguredModelMatchesActual { get; set; } + + /// Concrete model the user configured for this sub-agent via `/subagents`, when present. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("configuredModelPreference")] + public string? ConfiguredModelPreference { get; set; } + /// Wall-clock duration of the sub-agent execution in milliseconds. [JsonConverter(typeof(MillisecondsTimeSpanConverter))] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] @@ -3980,6 +4071,21 @@ public sealed partial class SubagentFailedData [JsonPropertyName("error")] public required string Error { get; set; } + /// Whether the explicit task-call model matched the user's configured preference. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("explicitModelMatchesPreference")] + public bool? ExplicitModelMatchesPreference { get; set; } + + /// Explicit model supplied by the parent agent on the task call, when present. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("explicitModelOverride")] + public string? ExplicitModelOverride { get; set; } + + /// First model for which the sub-agent started an inference request, when one was dispatched. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("firstDispatchedModel")] + public string? FirstDispatchedModel { get; set; } + /// Model selected for the sub-agent, when known. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("model")] @@ -4721,6 +4827,11 @@ public sealed partial class SessionManagedSettingsResolvedData [JsonPropertyName("permissionsAllowIntersected")] public bool? PermissionsAllowIntersected { get; set; } + /// Whether the effective sandbox policy forces the sandbox on *only* because managed policy could not be determined, rather than because the policy requires it. Lets clients tell a user whose `--no-sandbox` was overridden that the sandbox stayed on as a fail-closed fallback, instead of attributing it to an administrator who set no such policy. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("sandboxEnabledByUndeterminedPolicy")] + public bool? SandboxEnabledByUndeterminedPolicy { get; set; } + /// Whether the server (account/org) managed-settings layer was present. [JsonPropertyName("serverManaged")] public required bool ServerManaged { get; set; } @@ -6189,6 +6300,21 @@ public sealed partial class Citations public required CitationSpan[] Spans { get; set; } } +/// Neutral provider-tagged reasoning content blocks preserved verbatim for round-tripping. +/// Nested data type for AssistantMessageReasoningBlocks. +[Experimental(Diagnostics.Experimental)] +public sealed partial class AssistantMessageReasoningBlocks +{ + /// Provider-native reasoning content blocks (e.g. Anthropic `thinking` / `redacted_thinking`) preserved verbatim, in order. A single response can carry several, each signed over the content preceding it, so dropping or reordering any of them invalidates the rest. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("blocks")] + public JsonElement[]? Blocks { get; set; } + + /// Model provider that produced these reasoning blocks. + [JsonPropertyName("provider")] + public required string Provider { get; set; } +} + /// Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping. /// Nested data type for AssistantMessageServerTools. [Experimental(Diagnostics.Experimental)] @@ -8288,6 +8414,11 @@ public sealed partial class PermissionPromptRequestMcp : PermissionPromptRequest [JsonPropertyName("assistedApproval")] public PermissionAssistedApproval? AssistedApproval { get; set; } + /// Whether the host may offer a server-wide "approve all tools from this server" blanket. Absent is treated as true; the runtime sends false when managed policy disables bypass-permissions mode, which forbids the server-wide escalation while still allowing per-tool approval. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("canOfferServerWideApproval")] + public bool? CanOfferServerWideApproval { 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)] @@ -11341,6 +11472,73 @@ public override void Write(Utf8JsonWriter writer, ModelCallFailureSource value, } } +/// Final outcome of one logical model dispatch after response acceptance processing. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct ModelCallFinishedOutcome : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public ModelCallFinishedOutcome(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The provider response was accepted for continued agent processing. + public static ModelCallFinishedOutcome Success { get; } = new("success"); + + /// The dispatch ended with a provider or transport error. + public static ModelCallFinishedOutcome Error { get; } = new("error"); + + /// The dispatch was cancelled before an accepted response was produced. + public static ModelCallFinishedOutcome Cancelled { get; } = new("cancelled"); + + /// The provider response was rejected during post-response acceptance processing. + public static ModelCallFinishedOutcome Rejected { get; } = new("rejected"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(ModelCallFinishedOutcome left, ModelCallFinishedOutcome right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(ModelCallFinishedOutcome left, ModelCallFinishedOutcome right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is ModelCallFinishedOutcome other && Equals(other); + + /// + public bool Equals(ModelCallFinishedOutcome 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 ModelCallFinishedOutcome Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, ModelCallFinishedOutcome value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelCallFinishedOutcome)); + } + } +} + /// Finite reason code describing why the current turn was aborted. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -13403,6 +13601,9 @@ public ManagedSettingsEnforcedEscalation(string value) /// Unrestricted URL fetch access. public static ManagedSettingsEnforcedEscalation UnrestrictedUrls { get; } = new("unrestricted_urls"); + /// A server-wide MCP "Always Allow" (or `--allow-tool <server>`) blanket that would auto-approve every tool from an MCP server. Capped to per-tool approval; each tool still prompts. + public static ManagedSettingsEnforcedEscalation ServerWideMcpApproval { get; } = new("server_wide_mcp_approval"); + /// Returns a value indicating whether two instances are equivalent. public static bool operator ==(ManagedSettingsEnforcedEscalation left, ManagedSettingsEnforcedEscalation right) => left.Equals(right); @@ -14010,6 +14211,7 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu [JsonSerializable(typeof(AssistantMessageDeltaData))] [JsonSerializable(typeof(AssistantMessageDeltaEvent))] [JsonSerializable(typeof(AssistantMessageEvent))] +[JsonSerializable(typeof(AssistantMessageReasoningBlocks))] [JsonSerializable(typeof(AssistantMessageServerTools))] [JsonSerializable(typeof(AssistantMessageStartData))] [JsonSerializable(typeof(AssistantMessageStartEvent))] @@ -14149,6 +14351,8 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu [JsonSerializable(typeof(ModelCallFailureData))] [JsonSerializable(typeof(ModelCallFailureEvent))] [JsonSerializable(typeof(ModelCallFailureRequestFingerprint))] +[JsonSerializable(typeof(ModelCallFinishedData))] +[JsonSerializable(typeof(ModelCallFinishedEvent))] [JsonSerializable(typeof(ModelCallStartData))] [JsonSerializable(typeof(ModelCallStartEvent))] [JsonSerializable(typeof(OmittedBinaryResult))] diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go index 69b44cef4c..ad82a27823 100644 --- a/go/rpc/zrpc.go +++ b/go/rpc/zrpc.go @@ -866,6 +866,9 @@ type AuthIdentity struct { Host string `json:"host"` // Authenticated login, when available Login *string `json:"login,omitempty"` + // Opaque SDK GitHub credential registration backing this identity. Routing metadata only; + // never a credential. + RegistrationID *string `json:"registrationId,omitempty"` // Authentication type Type AuthInfoType `json:"type"` } @@ -999,6 +1002,8 @@ type TokenAuthInfo struct { CopilotUser *CopilotUserResponse `json:"copilotUser,omitempty"` // Authentication host. Host string `json:"host"` + // Opaque native GitHub credential registration backing this token identity, when applicable. + RegistrationID *string `json:"registrationId,omitempty"` // The token value itself. Treat as a secret. Token string `json:"token"` } @@ -1008,6 +1013,24 @@ func (TokenAuthInfo) Type() AuthInfoType { return AuthInfoTypeToken } +// Authentication-info variant backed by an SDK GitHub token callback. It carries routing +// metadata but never a plaintext token. +// Experimental: TokenProviderAuthInfo is part of an experimental API and may change or be +// removed. +type TokenProviderAuthInfo struct { + // Snapshot of the authenticated user's Copilot subscription info, if known. + CopilotUser *CopilotUserResponse `json:"copilotUser,omitempty"` + // Authentication host. + Host string `json:"host"` + // Opaque SDK callback registration identifier. + RegistrationID string `json:"registrationId"` +} + +func (TokenProviderAuthInfo) authInfo() {} +func (TokenProviderAuthInfo) Type() AuthInfoType { + return AuthInfoTypeTokenProvider +} + // Authentication-info variant for OAuth user auth, with host and login; the token remains // in the runtime secret store. // Experimental: UserAuthInfo is part of an experimental API and may change or be removed. @@ -1949,6 +1972,25 @@ type ConfigureSessionExtensionsParams struct { SessionID string `json:"sessionId"` } +// Identity of the integrating host, declared once on the `server.connect` handshake so +// telemetry from this connection is attributed to a single, consistent surface. All fields +// are optional; omit them to keep the default attribution. +// Experimental: ConnectClientInfo is part of an experimental API and may change or be +// removed. +// Internal: ConnectClientInfo is an internal SDK API and is not part of the public surface. +type ConnectClientInfo struct { + // Name of the host editor, e.g. `"vscode"`. + EditorName *string `json:"editorName,omitempty"` + // Version of the host editor, e.g. `"1.124.2"`. Ignored unless it looks like a version + // string. + EditorVersion *string `json:"editorVersion,omitempty"` + // Name of the Copilot extension within the host, e.g. `"copilot-chat"`. + ExtensionName *string `json:"extensionName,omitempty"` + // Version of the Copilot extension within the host, e.g. `"0.54.0"`. Ignored unless it + // looks like a version string. + ExtensionVersion *string `json:"extensionVersion,omitempty"` +} + // Metadata for a connected remote session. // Experimental: ConnectedRemoteSessionMetadata is part of an experimental API and may // change or be removed. @@ -2002,6 +2044,10 @@ type ConnectRemoteSessionParams struct { // Experimental: ConnectRequest is part of an experimental API and may change or be removed. // Internal: ConnectRequest is an internal SDK API and is not part of the public surface. type ConnectRequest struct { + // Identity of the integrating host. Optional; omit it to keep the default attribution. + // Internal: ClientInfo is part of the SDK's internal API surface and is not intended for + // external use. + ClientInfo *ConnectClientInfo `json:"clientInfo,omitempty"` // Opt this connection in to GitHub telemetry forwarding for its lifetime. When set, the // runtime forwards every internal telemetry event it emits — across all sessions, plus // sessionless events — to this connection over the `gitHubTelemetry.event` notification. @@ -3765,6 +3811,61 @@ type GitHubTelemetryNotification struct { SessionID *string `json:"sessionId,omitempty"` } +// Asks the SDK client to acquire a GitHub access token from an opaque callback registration. +// Experimental: GitHubTokenAcquireRequest is part of an experimental API and may change or +// be removed. +type GitHubTokenAcquireRequest struct { + // Effective GitHub host for which the callback must return a token. + Host string `json:"host"` + // Why the runtime is requesting a GitHub credential. + Reason GitHubTokenAcquireReason `json:"reason"` + // Opaque identifier generated by the SDK for this callback registration. + RegistrationID string `json:"registrationId"` + // Session receiving the token. Absent only before a cloud session has been assigned its id. + SessionID *string `json:"sessionId,omitempty"` +} + +// SDK host response to a GitHub credential request. +// Experimental: GitHubTokenAcquireResult is part of an experimental API and may change or +// be removed. +type GitHubTokenAcquireResult interface { + githubTokenAcquireResult() + Kind() GitHubTokenAcquireResultKind +} + +type RawGitHubTokenAcquireResultData struct { + Discriminator GitHubTokenAcquireResultKind + Raw json.RawMessage +} + +func (RawGitHubTokenAcquireResultData) githubTokenAcquireResult() {} +func (r RawGitHubTokenAcquireResultData) Kind() GitHubTokenAcquireResultKind { + return r.Discriminator +} + +type GitHubTokenAcquireResultCancelled struct { +} + +func (GitHubTokenAcquireResultCancelled) githubTokenAcquireResult() {} +func (GitHubTokenAcquireResultCancelled) Kind() GitHubTokenAcquireResultKind { + return GitHubTokenAcquireResultKindCancelled +} + +type GitHubTokenAcquireResultToken struct { + // GitHub access token acquired by the SDK host. + AccessToken string `json:"accessToken"` + // Remaining token lifetime in seconds when callback execution completes. It must exceed the + // one-hour preflight refresh threshold. + ExpiresIn int64 `json:"expiresIn"` + // OAuth token type. Defaults to bearer when omitted. + TokenType *string `json:"tokenType,omitempty"` +} + +func (GitHubTokenAcquireResultToken) githubTokenAcquireResult() {} +func (GitHubTokenAcquireResultToken) Kind() GitHubTokenAcquireResultKind { + return GitHubTokenAcquireResultKindToken +} + // Pending external tool call request ID, with the tool result or an error describing why it // failed. // Experimental: HandlePendingToolCallRequest is part of an experimental API and may change @@ -4074,6 +4175,12 @@ type InstalledPlugin struct { Enabled bool `json:"enabled"` // Installation timestamp InstalledAt string `json:"installed_at"` + // Absolute path of the marketplace directory a live plugin was resolved from. Present only + // on live, never-persisted records — those synthesized at session start for a + // directory/local marketplace, whose cache_path points at the real plugin directory on disk + // rather than a copy under the installed-plugins cache. Its presence is what marks a record + // as live, and no record carrying it is ever written to the persisted installedPlugins key. + InstalledFrom *string `json:"installed_from,omitempty"` // Marketplace the plugin came from (empty string for direct repo installs) Marketplace string `json:"marketplace"` // Plugin name @@ -4100,6 +4207,13 @@ type InstalledPluginInfo struct { DirectSourceID *string `json:"directSourceId,omitempty"` // Whether the plugin is currently enabled for new sessions Enabled bool `json:"enabled"` + // Absolute path of the marketplace directory a live plugin was resolved from. Present only + // on live, never-persisted records — a plugin belonging to a directory/local marketplace, + // which is loaded from its real directory on every pass instead of a copy under the + // installed-plugins cache. Its presence is what marks a listed plugin as live: such a + // plugin is always present on disk, so `enabled` is its only meaningful state and it is + // never "not installed". + InstalledFrom *string `json:"installedFrom,omitempty"` // Marketplace the plugin came from. Empty string ("") for direct repo / URL / local // installs. Marketplace string `json:"marketplace"` @@ -5257,7 +5371,7 @@ type MCPOauthPendingRequestResponseToken struct { AccessToken string `json:"accessToken"` // Token lifetime in seconds, if known. ExpiresIn *int64 `json:"expiresIn,omitempty"` - // OAuth token type. Defaults to Bearer when omitted. + // OAuth token type. Defaults to bearer when omitted. TokenType *string `json:"tokenType,omitempty"` } @@ -6669,6 +6783,10 @@ type Model struct { DefaultReasoningEffort *string `json:"defaultReasoningEffort,omitempty"` // Model identifier (e.g., "claude-sonnet-4.5") ID string `json:"id"` + // Informational notices the service published for this model, such as an upcoming change or + // a recommended alternative. Present only when the service published at least one notice. + // Hosts should surface these without implying anything is wrong with the model. + InfoMessages []ModelMessage `json:"infoMessages,omitzero"` // Model capability category for grouping in the model picker ModelPickerCategory *ModelPickerCategory `json:"modelPickerCategory,omitempty"` // Relative cost tier for token-based billing users @@ -6684,6 +6802,13 @@ type Model struct { SupportedContextTiers []string `json:"supportedContextTiers,omitzero"` // Supported reasoning effort levels (only present if model supports reasoning effort) SupportedReasoningEfforts []string `json:"supportedReasoningEfforts,omitzero"` + // Warnings the service published for this model, such as a deprecated client version. + // Present only when the service published at least one warning. The model remains usable; + // hosts should surface these as advisory rather than blocking. + WarningMessages []ModelMessage `json:"warningMessages,omitzero"` + // Warning text the service requires hosts to surface for this model. Present only when the + // service published at least one warning. + WarningText *ModelWarningText `json:"warningText,omitempty"` } // Managed, repository, and CLI model overrides to overlay onto the session at startup. @@ -6906,6 +7031,18 @@ type ModelListRequest struct { SkipCache *bool `json:"skipCache,omitempty"` } +// A service-published message about a model, carrying a stable machine-readable code +// alongside human-readable text. +// Experimental: ModelMessage is part of an experimental API and may change or be removed. +type ModelMessage struct { + // Stable machine-readable identifier for the message, such as `client_version_deprecated`. + // Hosts can key custom presentation off this; unrecognized codes should fall back to + // displaying `message`. + Code string `json:"code"` + // Human-readable message text intended for display to the user. + Message string `json:"message"` +} + // Experimental: ModelPickerPersistenceRequest is part of an experimental API and may change // or be removed. type ModelPickerPersistenceRequest struct { @@ -7050,6 +7187,15 @@ type ModelSwitchToResult struct { Warning *string `json:"warning,omitempty"` } +// Service-published warning text that hosts should display when presenting a model. +// Experimental: ModelWarningText is part of an experimental API and may change or be +// removed. +type ModelWarningText struct { + // Data-retention warning for the model. The text may contain Markdown links and should be + // rendered as Markdown when supported. + DataRetention *string `json:"dataRetention,omitempty"` +} + // Agent interaction mode to apply to the session. // Experimental: ModeSetRequest is part of an experimental API and may change or be removed. type ModeSetRequest struct { @@ -7926,7 +8072,9 @@ type PermissionLocationResolveResult struct { // be removed. type PermissionPathsAddParams struct { // Directory to add to the allow-list. The runtime resolves and validates the path before - // adding. + // adding, then loads conventional `.github/skills/` and `.github/agents/` definitions under + // it when their subsystem gates are enabled. Adding the directory is therefore also a trust + // decision for configuration stored there. Path string `json:"path"` } @@ -7953,9 +8101,11 @@ type PermissionPathsAllowedCheckResult struct { // removed. type PermissionPathsConfig struct { // Additional directories to allow tool access to (in addition to the session's working - // directory). When `unrestricted` is true, these are still pre-populated on the - // UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention - // completion). + // directory). Conventional `.github/skills/` and `.github/agents/` definitions under them + // also join the session catalogs when their subsystem gates are enabled, so supplying a + // directory is a trust decision for configuration stored there. When `unrestricted` is + // true, these are still pre-populated on the UnrestrictedPathManager so they remain visible + // via getDirectories() (e.g. for @-mention completion). AdditionalDirectories []string `json:"additionalDirectories,omitzero"` // Whether to include the system temp directory in the allowed list (defaults to true). // Ignored when `unrestricted` is true. @@ -9589,6 +9739,10 @@ type QueuePendingItems struct { // Experimental: QueuePendingItemsResult is part of an experimental API and may change or be // removed. type QueuePendingItemsResult struct { + // How many leading entries of `steeringMessages` have already been folded into the running + // turn (and so have an emitted `user.message`), as opposed to still waiting for one. Absent + // for hosts that do not distinguish the two. + InFlightSteeringCount *int64 `json:"inFlightSteeringCount,omitempty"` // Pending queued items in submission order. Includes user messages, queued slash commands, // and queued model changes; omits internal system items. Items []QueuePendingItems `json:"items"` @@ -10002,9 +10156,9 @@ type SandboxConfig struct { // 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 + // default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and + // 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 — @@ -10533,6 +10687,9 @@ type SessionAuthInfoResult struct { Host string `json:"host"` // Authenticated login, when available Login *string `json:"login,omitempty"` + // Opaque SDK GitHub credential registration backing this identity. Routing metadata only; + // never a credential. + RegistrationID *string `json:"registrationId,omitempty"` // Authentication type Type AuthInfoType `json:"type"` } @@ -11187,6 +11344,12 @@ type SessionInstalledPlugin struct { Enabled bool `json:"enabled"` // Installation timestamp (ISO-8601) InstalledAt string `json:"installed_at"` + // Absolute path of the marketplace directory a live plugin was resolved from. Present only + // on live, never-persisted records — those synthesized at session start for a + // directory/local marketplace, whose cache_path points at the real plugin directory on disk + // rather than a copy under the installed-plugins cache. Its presence is what marks a record + // as live, and no record carrying it is ever written to the persisted installedPlugins key. + InstalledFrom *string `json:"installed_from,omitempty"` // Marketplace the plugin came from (empty string for direct repo installs) Marketplace string `json:"marketplace"` // Plugin name @@ -11474,8 +11637,12 @@ type SessionManagedPermissions struct { Ask []string `json:"ask,omitzero"` // Permission rules that block matching operations. Deny has highest precedence. Deny []string `json:"deny,omitzero"` - // When set to `disable`, prevents bypass/allow-all permission modes. - DisableBypassPermissionsMode *DisableBypassPermissionsMode `json:"disableBypassPermissionsMode,omitempty"` + // When set to `disable`, prevents bypass/allow-all permission modes. `allow-auto-only` + // blocks full allow-all but permits advisory auto-approval. Any other value is accepted + // rather than failing the session, but is enforced as `disable`: the key is only present to + // restrict something, so a mode this runtime cannot interpret fails closed to the most + // restrictive one it knows. Omit the key entirely to impose no restriction. + DisableBypassPermissionsMode *string `json:"disableBypassPermissionsMode,omitempty"` } // Managed settings an SDK host may inject at session startup. Only permissions are accepted @@ -11636,11 +11803,15 @@ type SessionOpenOptions struct { AdditionalContentExclusionPolicies []SessionOpenOptionsAdditionalContentExclusionPolicy `json:"additionalContentExclusionPolicies,omitzero"` // Additional directories the agent may access beyond the working directory. Each entry is // granted to the session's file-access allow-list and surfaced to the model (system prompt - // context and `@`-mention completion). Absolute paths are recommended; a relative path is - // resolved against the session's working directory. Nonexistent or unresolvable entries are - // skipped with a warning. This is applied on both session creation and resume, and is not - // persisted: a resumed session that omits this option does not retain previously supplied - // directories (re-supply them, exactly as the CLI re-passes `--add-dir`). + // context and `@`-mention completion). Conventional `.github/skills/` and `.github/agents/` + // definitions under each directory also join the session's project catalogs when their + // existing subsystem gates are enabled: added-root skills require both + // `enableConfigDiscovery` and effective `enableSkills`; added-root agents require + // `enableConfigDiscovery`. Supplying a directory therefore activates configuration from it + // and should be treated as a trust decision. Absolute paths are recommended; a relative + // path is resolved against the session's working directory. Nonexistent or unresolvable + // entries are skipped with a warning. This is applied during session creation and cold + // resume and is not persisted, so a cold resume must re-supply the directories. AdditionalDirectories []string `json:"additionalDirectories,omitzero"` // Runtime context discriminator for agent filtering. AgentContext *string `json:"agentContext,omitempty"` @@ -11739,6 +11910,10 @@ type SessionOpenOptions struct { // are available, subject to runtime availability and exclusions. Custom agents with the // same name remain available. IncludedBuiltinAgents []string `json:"includedBuiltinAgents,omitzero"` + // Built-in skill names to include in this session. When specified, only these + // runtime-bundled skills are available. Skills from other sources with the same name remain + // available. + IncludedBuiltinSkills []string `json:"includedBuiltinSkills,omitzero"` // Installed plugins visible to the session. InstalledPlugins []InstalledPlugin `json:"installedPlugins,omitzero"` // Stable integration identifier for analytics. @@ -11789,6 +11964,11 @@ type SessionOpenOptions struct { RunningInInteractiveMode *bool `json:"runningInInteractiveMode,omitempty"` // Resolved sandbox configuration. SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` + // Origin of the sandbox choice. The runtime uses this only for internal telemetry + // provenance; managed policy is derived independently. + // Internal: SandboxConfigSource is part of the SDK's internal API surface and is not + // intended for external use. + SandboxConfigSource *SandboxConfigSource `json:"sandboxConfigSource,omitempty"` // Capabilities enabled for this session. SessionCapabilities []SessionCapability `json:"sessionCapabilities,omitzero"` // Optional stable session identifier to use for a new session. @@ -12219,7 +12399,7 @@ type SessionSetCredentialsParams struct { // verbatim credential remains installed. It does NOT otherwise validate the credential. // Several variants carry secret material; treat this method's params as containing secrets // at rest and in transit. - Credentials AuthInfo `json:"credentials,omitempty"` + Credentials SettableAuthInfo `json:"credentials,omitempty"` } // Indicates whether the credential update succeeded. @@ -12837,6 +13017,10 @@ type SessionUpdateOptionsParams struct { // are available, subject to runtime availability and exclusions. Custom agents with the // same name remain available. Set to null to remove the allowlist restriction. IncludedBuiltinAgents []string `json:"includedBuiltinAgents,omitzero"` + // Built-in skill names to include in this session. When specified, only these + // runtime-bundled skills are available. Skills from other sources with the same name remain + // available. Set to null to remove the allowlist restriction. + IncludedBuiltinSkills []string `json:"includedBuiltinSkills,omitzero"` // Full set of installed plugins for the session. Replaces the existing list; the runtime // invalidates the skills cache only when the list materially changes. InstalledPlugins []SessionInstalledPlugin `json:"installedPlugins,omitzero"` @@ -12875,6 +13059,11 @@ type SessionUpdateOptionsParams struct { RunningInInteractiveMode *bool `json:"runningInInteractiveMode,omitempty"` // Resolved sandbox configuration. SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` + // Origin of the sandbox choice. The runtime uses this only for internal telemetry + // provenance; managed policy is derived independently. + // Internal: SandboxConfigSource is part of the SDK's internal API surface and is not + // intended for external use. + SandboxConfigSource *SandboxConfigSource `json:"sandboxConfigSource,omitempty"` // Replaces the session's capability set with the given list. Use to enable or disable // capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the // field to leave the existing capability set unchanged. @@ -12948,6 +13137,68 @@ type SessionWorkingDirectoryContext struct { type SessionWorkspacesCreateFileResult struct { } +// Authentication credentials accepted by session.gitHubAuth.setCredentials. Session-owned +// token-provider identities cannot be installed through this method. +// Experimental: SettableAuthInfo is part of an experimental API and may change or be +// removed. +type SettableAuthInfo interface { + settableAuthInfo() + settableAuthInfoType() SettableAuthInfoType +} + +type RawSettableAuthInfoData struct { + Discriminator SettableAuthInfoType + Raw json.RawMessage +} + +func (RawSettableAuthInfoData) settableAuthInfo() {} +func (r RawSettableAuthInfoData) settableAuthInfoType() SettableAuthInfoType { + return r.Discriminator +} +func (APIKeyAuthInfo) settableAuthInfo() {} +func (APIKeyAuthInfo) settableAuthInfoType() SettableAuthInfoType { + return SettableAuthInfoTypeAPIKey +} +func (CopilotAPITokenAuthInfo) settableAuthInfo() {} +func (CopilotAPITokenAuthInfo) settableAuthInfoType() SettableAuthInfoType { + return SettableAuthInfoTypeCopilotAPIToken +} +func (EnvAuthInfo) settableAuthInfo() {} +func (EnvAuthInfo) settableAuthInfoType() SettableAuthInfoType { + return SettableAuthInfoTypeEnv +} +func (GhCLIAuthInfo) settableAuthInfo() {} +func (GhCLIAuthInfo) settableAuthInfoType() SettableAuthInfoType { + return SettableAuthInfoTypeGhCLI +} +func (HMACAuthInfo) settableAuthInfo() {} +func (HMACAuthInfo) settableAuthInfoType() SettableAuthInfoType { + return SettableAuthInfoTypeHMAC +} + +// Token authentication accepted by session.gitHubAuth.setCredentials. +// Experimental: SettableTokenAuthInfo is part of an experimental API and may change or be +// removed. +type SettableTokenAuthInfo struct { + // 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. + CopilotUser *CopilotUserResponse `json:"copilotUser,omitempty"` + // Authentication host. + Host string `json:"host"` + // The token value itself. Treat as a secret. + Token string `json:"token"` +} + +func (SettableTokenAuthInfo) settableAuthInfo() {} +func (SettableTokenAuthInfo) settableAuthInfoType() SettableAuthInfoType { + return SettableAuthInfoTypeToken +} +func (UserAuthInfo) settableAuthInfo() {} +func (UserAuthInfo) settableAuthInfoType() SettableAuthInfoType { + return SettableAuthInfoTypeUser +} + // User-requested shell execution cancellation handle. // Experimental: ShellCancelUserRequestedRequest is part of an experimental API and may // change or be removed. @@ -15551,6 +15802,7 @@ const ( AuthInfoTypeGhCLI AuthInfoType = "gh-cli" AuthInfoTypeHMAC AuthInfoType = "hmac" AuthInfoTypeToken AuthInfoType = "token" + AuthInfoTypeTokenProvider AuthInfoType = "token-provider" AuthInfoTypeUser AuthInfoType = "user" ) @@ -16018,14 +16270,6 @@ const ( DebugCollectLogsSourceShellLog DebugCollectLogsSource = "shell-log" ) -// Experimental: DisableBypassPermissionsMode is part of an experimental API and may change -// or be removed. -type DisableBypassPermissionsMode string - -const ( - DisableBypassPermissionsModeDisable DisableBypassPermissionsMode = "disable" -) - // Effective extension loading and agent-management mode // Experimental: DiscoveredExtensionMode is part of an experimental API and may change or be // removed. @@ -16296,6 +16540,28 @@ const ( FactoryRunStatusRunning FactoryRunStatus = "running" ) +// Why the runtime is requesting a GitHub credential. +// Experimental: GitHubTokenAcquireReason is part of an experimental API and may change or +// be removed. +type GitHubTokenAcquireReason string + +const ( + // The runtime is acquiring the registration's first credential. + GitHubTokenAcquireReasonInitial GitHubTokenAcquireReason = "initial" + // The runtime is replacing a credential that is approaching expiry. + GitHubTokenAcquireReasonRefresh GitHubTokenAcquireReason = "refresh" +) + +// Kind discriminator for GitHubTokenAcquireResult. +// Experimental: GitHubTokenAcquireResultKind is part of an experimental API and may change +// or be removed. +type GitHubTokenAcquireResultKind string + +const ( + GitHubTokenAcquireResultKindCancelled GitHubTokenAcquireResultKind = "cancelled" + GitHubTokenAcquireResultKindToken GitHubTokenAcquireResultKind = "token" +) + // What initiated this compaction request, recorded as the `trigger` on the persisted // `session.compaction_start` / `session.compaction_complete` events. When absent, the // compaction is persisted without trigger attribution (initiator unknown). @@ -16692,6 +16958,8 @@ const ( ) // Kind discriminator for MCPOauthPendingRequestResponse. +// Experimental: MCPOauthPendingRequestResponseKind is part of an experimental API and may +// change or be removed. type MCPOauthPendingRequestResponseKind string const ( @@ -17729,6 +17997,28 @@ const ( RemoteSessionModeOn RemoteSessionMode = "on" ) +// Origin of the sandbox choice supplied by an internal client. +// Experimental: SandboxConfigSource is part of an experimental API and may change or be +// removed. +type SandboxConfigSource string + +const ( + // The client applied the default because no sandbox preference was configured. + SandboxConfigSourceNeverConfigured SandboxConfigSource = "never_configured" + // A repository policy selected the sandbox state. + SandboxConfigSourceRepositoryPolicy SandboxConfigSource = "repository_policy" + // The user disabled the sandbox for the current session. + SandboxConfigSourceSessionDisabled SandboxConfigSource = "session_disabled" + // A command-line flag selected the sandbox state for this session. + SandboxConfigSourceSessionFlag SandboxConfigSource = "session_flag" + // The client disabled the sandbox because the host cannot enforce it. + SandboxConfigSourceUnsupportedHost SandboxConfigSource = "unsupported_host" + // The user's persisted settings disabled the sandbox. + SandboxConfigSourceUserDisabled SandboxConfigSource = "user_disabled" + // The user's persisted settings enabled the sandbox. + SandboxConfigSourceUserEnabled SandboxConfigSource = "user_enabled" +) + // The UI mode the agent was in when this message was sent. Defaults to the session's // current mode. // Experimental: SendAgentMode is part of an experimental API and may change or be removed. @@ -18190,6 +18480,19 @@ const ( SessionWorkingDirectoryContextHostTypeGitHub SessionWorkingDirectoryContextHostType = "github" ) +// Type discriminator for SettableAuthInfo. +type SettableAuthInfoType string + +const ( + SettableAuthInfoTypeAPIKey SettableAuthInfoType = "api-key" + SettableAuthInfoTypeCopilotAPIToken SettableAuthInfoType = "copilot-api-token" + SettableAuthInfoTypeEnv SettableAuthInfoType = "env" + SettableAuthInfoTypeGhCLI SettableAuthInfoType = "gh-cli" + SettableAuthInfoTypeHMAC SettableAuthInfoType = "hmac" + SettableAuthInfoTypeToken SettableAuthInfoType = "token" + SettableAuthInfoTypeUser SettableAuthInfoType = "user" +) + // Controls automatic non-interactive profile loading where supported. Explicit initScripts // are unaffected. // Experimental: ShellInitProfile is part of an experimental API and may change or be @@ -23456,6 +23759,9 @@ func (a *OptionsAPI) Update(ctx context.Context, params *SessionUpdateOptionsPar if params.IncludedBuiltinAgents != nil { req["includedBuiltinAgents"] = params.IncludedBuiltinAgents } + if params.IncludedBuiltinSkills != nil { + req["includedBuiltinSkills"] = params.IncludedBuiltinSkills + } if params.InstalledPlugins != nil { req["installedPlugins"] = params.InstalledPlugins } @@ -23501,6 +23807,9 @@ func (a *OptionsAPI) Update(ctx context.Context, params *SessionUpdateOptionsPar if params.SandboxConfig != nil { req["sandboxConfig"] = *params.SandboxConfig } + if params.SandboxConfigSource != nil { + req["sandboxConfigSource"] = *params.SandboxConfigSource + } if params.SessionCapabilities != nil { req["sessionCapabilities"] = params.SessionCapabilities } @@ -23973,7 +24282,8 @@ func (s *PermissionsAPI) Locations() *PermissionsLocationsAPI { // removed. type PermissionsPathsAPI sessionAPI -// Adds a directory to the session's allow-list. +// Adds a directory to the session's allow-list and activates conventional skill and agent +// definitions under it. // // RPC method: session.permissions.paths.add. // @@ -28107,6 +28417,21 @@ type GitHubTelemetryHandler interface { Event(request *GitHubTelemetryNotification) error } +// Experimental: GitHubTokenHandler contains experimental APIs that may change or be removed. +type GitHubTokenHandler interface { + // GetToken asks the SDK client to mint a GitHub access token for a session whose + // configuration supplied a GitHub token provider. The runtime acquires the initial token + // during bootstrap and refreshes it during expiry preflight when one hour or less remains. + // + // RPC method: gitHubToken.getToken. + // + // Parameters: Asks the SDK client to acquire a GitHub access token from an opaque callback + // registration. + // + // Returns: SDK host response to a GitHub credential request. + GetToken(request *GitHubTokenAcquireRequest) (GitHubTokenAcquireResult, error) +} + // Experimental: HooksHandler contains experimental APIs that may change or be removed. type HooksHandler interface { // Invoke dispatches one SDK callback hook from the runtime to the connection that @@ -28159,6 +28484,7 @@ type LlmInferenceHandler interface { type ClientGlobalAPIHandlers struct { ExtensionLaunchProvider ExtensionLaunchProviderHandler GitHubTelemetry GitHubTelemetryHandler + GitHubToken GitHubTokenHandler Hooks HooksHandler LlmInference LlmInferenceHandler } @@ -28208,6 +28534,24 @@ func RegisterClientGlobalAPIHandlers(client *jsonrpc2.Client, handlers *ClientGl } return nil, nil }) + client.SetRequestHandler("gitHubToken.getToken", func(params json.RawMessage) (json.RawMessage, *jsonrpc2.Error) { + var request GitHubTokenAcquireRequest + if err := json.Unmarshal(params, &request); err != nil { + return nil, &jsonrpc2.Error{Code: -32602, Message: fmt.Sprintf("Invalid params: %v", err)} + } + if handlers == nil || handlers.GitHubToken == nil { + return nil, &jsonrpc2.Error{Code: -32603, Message: "No gitHubToken client-global handler registered"} + } + result, err := handlers.GitHubToken.GetToken(&request) + if err != nil { + return nil, clientGlobalHandlerError(err) + } + raw, err := json.Marshal(result) + if err != nil { + return nil, &jsonrpc2.Error{Code: -32603, Message: fmt.Sprintf("Failed to marshal response: %v", err)} + } + return raw, nil + }) client.SetRequestHandler("hooks.invoke", func(params json.RawMessage) (json.RawMessage, *jsonrpc2.Error) { var request HookInvokeRequest if err := json.Unmarshal(params, &request); err != nil { diff --git a/go/rpc/zrpc_encoding.go b/go/rpc/zrpc_encoding.go index fadbc5da1b..78788660f5 100644 --- a/go/rpc/zrpc_encoding.go +++ b/go/rpc/zrpc_encoding.go @@ -57,6 +57,12 @@ func unmarshalAuthInfo(data []byte) (AuthInfo, error) { return nil, err } return &d, nil + case AuthInfoTypeTokenProvider: + var d TokenProviderAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil case AuthInfoTypeUser: var d UserAuthInfo if err := json.Unmarshal(data, &d); err != nil { @@ -145,6 +151,17 @@ func (r TokenAuthInfo) MarshalJSON() ([]byte, error) { }) } +func (r TokenProviderAuthInfo) MarshalJSON() ([]byte, error) { + type alias TokenProviderAuthInfo + return json.Marshal(struct { + Type AuthInfoType `json:"type"` + alias + }{ + Type: r.Type(), + alias: alias(r), + }) +} + func (r UserAuthInfo) MarshalJSON() ([]byte, error) { type alias UserAuthInfo return json.Marshal(struct { @@ -1728,6 +1745,69 @@ func unmarshalFilterMapping(data []byte) (FilterMapping, error) { return nil, errors.New("data did not match any union variant for FilterMapping") } +func unmarshalGitHubTokenAcquireResult(data []byte) (GitHubTokenAcquireResult, error) { + if string(data) == "null" { + return nil, nil + } + type rawUnion struct { + Kind GitHubTokenAcquireResultKind `json:"kind"` + } + var raw rawUnion + if err := json.Unmarshal(data, &raw); err != nil { + return nil, err + } + + switch raw.Kind { + case GitHubTokenAcquireResultKindCancelled: + var d GitHubTokenAcquireResultCancelled + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case GitHubTokenAcquireResultKindToken: + var d GitHubTokenAcquireResultToken + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + default: + return &RawGitHubTokenAcquireResultData{Discriminator: raw.Kind, Raw: data}, nil + } +} + +func (r RawGitHubTokenAcquireResultData) MarshalJSON() ([]byte, error) { + if r.Raw != nil { + return r.Raw, nil + } + return json.Marshal(struct { + Kind GitHubTokenAcquireResultKind `json:"kind"` + }{ + Kind: r.Discriminator, + }) +} + +func (r GitHubTokenAcquireResultCancelled) MarshalJSON() ([]byte, error) { + type alias GitHubTokenAcquireResultCancelled + return json.Marshal(struct { + Kind GitHubTokenAcquireResultKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + +func (r GitHubTokenAcquireResultToken) MarshalJSON() ([]byte, error) { + type alias GitHubTokenAcquireResultToken + return json.Marshal(struct { + Kind GitHubTokenAcquireResultKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + func (r *HandlePendingToolCallRequest) UnmarshalJSON(data []byte) error { type rawHandlePendingToolCallRequest struct { Error *string `json:"error,omitempty"` @@ -5311,6 +5391,7 @@ func (r *SessionOpenOptions) UnmarshalJSON(data []byte) error { ExpAssignments any `json:"expAssignments,omitempty"` FeatureFlags map[string]bool `json:"featureFlags,omitzero"` IncludedBuiltinAgents []string `json:"includedBuiltinAgents,omitzero"` + IncludedBuiltinSkills []string `json:"includedBuiltinSkills,omitzero"` InstalledPlugins []InstalledPlugin `json:"installedPlugins,omitzero"` IntegrationID *string `json:"integrationId,omitempty"` IsExperimentalMode *bool `json:"isExperimentalMode,omitempty"` @@ -5332,6 +5413,7 @@ func (r *SessionOpenOptions) UnmarshalJSON(data []byte) error { RemoteSteerable *bool `json:"remoteSteerable,omitempty"` RunningInInteractiveMode *bool `json:"runningInInteractiveMode,omitempty"` SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` + SandboxConfigSource *SandboxConfigSource `json:"sandboxConfigSource,omitempty"` SessionCapabilities []SessionCapability `json:"sessionCapabilities,omitzero"` SessionID *string `json:"sessionId,omitempty"` SessionLimits *SessionLimitsConfig `json:"sessionLimits,omitempty"` @@ -5389,6 +5471,7 @@ func (r *SessionOpenOptions) UnmarshalJSON(data []byte) error { r.ExpAssignments = raw.ExpAssignments r.FeatureFlags = raw.FeatureFlags r.IncludedBuiltinAgents = raw.IncludedBuiltinAgents + r.IncludedBuiltinSkills = raw.IncludedBuiltinSkills r.InstalledPlugins = raw.InstalledPlugins r.IntegrationID = raw.IntegrationID r.IsExperimentalMode = raw.IsExperimentalMode @@ -5410,6 +5493,7 @@ func (r *SessionOpenOptions) UnmarshalJSON(data []byte) error { r.RemoteSteerable = raw.RemoteSteerable r.RunningInInteractiveMode = raw.RunningInInteractiveMode r.SandboxConfig = raw.SandboxConfig + r.SandboxConfigSource = raw.SandboxConfigSource r.SessionCapabilities = raw.SessionCapabilities r.SessionID = raw.SessionID r.SessionLimits = raw.SessionLimits @@ -5573,6 +5657,88 @@ func (r SessionsOpenResumeLast) MarshalJSON() ([]byte, error) { }) } +func unmarshalSettableAuthInfo(data []byte) (SettableAuthInfo, error) { + if string(data) == "null" { + return nil, nil + } + type rawUnion struct { + Type SettableAuthInfoType `json:"type"` + } + var raw rawUnion + if err := json.Unmarshal(data, &raw); err != nil { + return nil, err + } + + switch raw.Type { + case SettableAuthInfoTypeAPIKey: + var d APIKeyAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SettableAuthInfoTypeCopilotAPIToken: + var d CopilotAPITokenAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SettableAuthInfoTypeEnv: + var d EnvAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SettableAuthInfoTypeGhCLI: + var d GhCLIAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SettableAuthInfoTypeHMAC: + var d HMACAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SettableAuthInfoTypeToken: + var d SettableTokenAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SettableAuthInfoTypeUser: + var d UserAuthInfo + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + default: + return &RawSettableAuthInfoData{Discriminator: raw.Type, Raw: data}, nil + } +} + +func (r RawSettableAuthInfoData) MarshalJSON() ([]byte, error) { + if r.Raw != nil { + return r.Raw, nil + } + return json.Marshal(struct { + Type SettableAuthInfoType `json:"type"` + }{ + Type: r.Discriminator, + }) +} + +func (r SettableTokenAuthInfo) MarshalJSON() ([]byte, error) { + type alias SettableTokenAuthInfo + return json.Marshal(struct { + Type SettableAuthInfoType `json:"type"` + alias + }{ + Type: r.settableAuthInfoType(), + alias: alias(r), + }) +} + func (r *SessionSetCredentialsParams) UnmarshalJSON(data []byte) error { type rawSessionSetCredentialsParams struct { Credentials json.RawMessage `json:"credentials,omitempty"` @@ -5582,7 +5748,7 @@ func (r *SessionSetCredentialsParams) UnmarshalJSON(data []byte) error { return err } if raw.Credentials != nil { - value, err := unmarshalAuthInfo(raw.Credentials) + value, err := unmarshalSettableAuthInfo(raw.Credentials) if err != nil { return err } diff --git a/go/rpc/zsession_encoding.go b/go/rpc/zsession_encoding.go index fb7412d396..5c5d3bca27 100644 --- a/go/rpc/zsession_encoding.go +++ b/go/rpc/zsession_encoding.go @@ -299,6 +299,12 @@ func (e *SessionEvent) UnmarshalJSON(data []byte) error { return err } e.Data = &d + case SessionEventTypeModelCallFinished: + var d ModelCallFinishedData + if err := json.Unmarshal(raw.Data, &d); err != nil { + return err + } + e.Data = &d case SessionEventTypeModelCallStart: var d ModelCallStartData if err := json.Unmarshal(raw.Data, &d); err != nil { diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go index 82b0470dbf..282d616be0 100644 --- a/go/rpc/zsession_events.go +++ b/go/rpc/zsession_events.go @@ -103,6 +103,7 @@ const ( SessionEventTypeMCPResourcesListChanged SessionEventType = "mcp.resources.list_changed" SessionEventTypeMCPToolsListChanged SessionEventType = "mcp.tools.list_changed" SessionEventTypeModelCallFailure SessionEventType = "model.call_failure" + SessionEventTypeModelCallFinished SessionEventType = "model.call_finished" SessionEventTypeModelCallStart SessionEventType = "model.call_start" SessionEventTypePendingMessagesModified SessionEventType = "pending_messages.modified" SessionEventTypePermissionCompleted SessionEventType = "permission.completed" @@ -339,6 +340,8 @@ type AssistantMessageData struct { ParentToolCallID *string `json:"parentToolCallId,omitempty"` // Generation phase for phased-output models (e.g., thinking vs. response phases) Phase *string `json:"phase,omitempty"` + // Neutral provider-tagged reasoning content blocks preserved verbatim for round-tripping. `reasoningText` and `reasoningOpaque` are a lossy derived view of these blocks, retained for display. + ReasoningBlocks *AssistantMessageReasoningBlocks `json:"reasoningBlocks,omitempty"` // Opaque/encrypted extended thinking data from Anthropic models. Session-bound and stripped on resume. ReasoningOpaque *string `json:"reasoningOpaque,omitempty"` // Readable reasoning text from the model's extended thinking @@ -753,6 +756,8 @@ type SessionManagedSettingsResolvedData struct { ManagedKeys []string `json:"managedKeys"` // Whether at least two managed sources supplied permission allowlists, so enforcement intersects them and the flattened settings payload omits `permissions.allow`. PermissionsAllowIntersected *bool `json:"permissionsAllowIntersected,omitempty"` + // Whether the effective sandbox policy forces the sandbox on *only* because managed policy could not be determined, rather than because the policy requires it. Lets clients tell a user whose `--no-sandbox` was overridden that the sandbox stayed on as a fail-closed fallback, instead of attributing it to an administrator who set no such policy. + SandboxEnabledByUndeterminedPolicy *bool `json:"sandboxEnabledByUndeterminedPolicy,omitempty"` // Whether the server (account/org) managed-settings layer was present ServerManaged bool `json:"serverManaged"` // The effective (resolved) managed settings values, so clients can render exactly what is enforced. Absent when no managed policy is in force. @@ -942,6 +947,25 @@ type ModelCallFailureData struct { func (*ModelCallFailureData) sessionEventData() {} func (*ModelCallFailureData) Type() SessionEventType { return SessionEventTypeModelCallFailure } +// Final lifecycle outcome for one logical model dispatch. A logical dispatch may include internal reconnect or fallback work, so event count is not provider HTTP-request count. +type ModelCallFinishedData struct { + // Whether an accepted successful response requested the exact name and command semantics of a built-in file edit tool, including an external tool explicitly replacing that built-in name. Absent when the logical dispatch did not produce an accepted response. + ContainsBuiltInFileEditRequest *bool `json:"containsBuiltInFileEditRequest,omitempty"` + // Monotonic elapsed time spent in the logical model dispatch, including any internal transport reconnect or fallback and excluding orchestrator retry backoff, tool execution, confirmations, and post-response processing + DispatchDurationMs float64 `json:"dispatchDurationMs"` + // Version of the built-in file-edit semantic classifier used for this event + EditClassifierVersion int64 `json:"editClassifierVersion"` + // Identifier of the user interaction that owns the model dispatch, matching assistant.turn_start.interactionId when available + InteractionID *string `json:"interactionId,omitempty"` + // Final outcome after post-response acceptance processing + Outcome ModelCallFinishedOutcome `json:"outcome"` + // Agent-loop iteration within the interaction that initiated the model dispatch + TurnID string `json:"turnId"` +} + +func (*ModelCallFinishedData) sessionEventData() {} +func (*ModelCallFinishedData) Type() SessionEventType { return SessionEventTypeModelCallFinished } + // Hook invocation completion details including output, success status, and error information type HookEndData struct { // Error details when the hook failed @@ -1047,6 +1071,8 @@ type AssistantUsageData struct { NumToolCalls *int64 `json:"numToolCalls,omitempty"` // Number of output tokens produced OutputTokens *int64 `json:"outputTokens,omitempty"` + // Time to first observable model output in milliseconds. Includes text, reasoning, and tool-call output; only available for streaming requests that produce observable output. + OutputTtftMs *float64 `json:"outputTtftMs,omitempty"` // Parent tool call ID when this usage originates from a sub-agent // Deprecated: ParentToolCallID is deprecated. ParentToolCallID *string `json:"parentToolCallId,omitempty"` @@ -2105,8 +2131,18 @@ type SubagentCompletedData struct { AgentName string `json:"agentName"` // Whether the sub-agent was torn down by cancellation - its own abort, or an ancestor being killed - instead of finishing its work. Cancellation is not a failure, so the run still reports completion; this distinguishes a torn-down sub-agent from one that ran to the end. Cancelled *bool `json:"cancelled,omitempty"` + // Whether the first model actually dispatched matched the user's configured preference + ConfiguredModelMatchesActual *bool `json:"configuredModelMatchesActual,omitempty"` + // Concrete model the user configured for this sub-agent via `/subagents`, when present + ConfiguredModelPreference *string `json:"configuredModelPreference,omitempty"` // Wall-clock duration of the sub-agent execution in milliseconds DurationMs *int64 `json:"durationMs,omitempty"` + // Whether the explicit task-call model matched the user's configured preference + ExplicitModelMatchesPreference *bool `json:"explicitModelMatchesPreference,omitempty"` + // Explicit model supplied by the parent agent on the task call, when present + ExplicitModelOverride *string `json:"explicitModelOverride,omitempty"` + // First model for which the sub-agent started an inference request, when one was dispatched + FirstDispatchedModel *string `json:"firstDispatchedModel,omitempty"` // Model used by the sub-agent Model *string `json:"model,omitempty"` // Tool call ID of the parent tool invocation that spawned this sub-agent @@ -2126,10 +2162,20 @@ type SubagentFailedData struct { AgentDisplayName string `json:"agentDisplayName"` // Internal name of the sub-agent AgentName string `json:"agentName"` + // Whether the first model actually dispatched matched the user's configured preference + ConfiguredModelMatchesActual *bool `json:"configuredModelMatchesActual,omitempty"` + // Concrete model the user configured for this sub-agent via `/subagents`, when present + ConfiguredModelPreference *string `json:"configuredModelPreference,omitempty"` // Wall-clock duration of the sub-agent execution in milliseconds DurationMs *int64 `json:"durationMs,omitempty"` // Error message describing why the sub-agent failed Error string `json:"error"` + // Whether the explicit task-call model matched the user's configured preference + ExplicitModelMatchesPreference *bool `json:"explicitModelMatchesPreference,omitempty"` + // Explicit model supplied by the parent agent on the task call, when present + ExplicitModelOverride *string `json:"explicitModelOverride,omitempty"` + // First model for which the sub-agent started an inference request, when one was dispatched + FirstDispatchedModel *string `json:"firstDispatchedModel,omitempty"` // Model selected for the sub-agent, when known Model *string `json:"model,omitempty"` // Tool call ID of the parent tool invocation that spawned this sub-agent @@ -2426,6 +2472,15 @@ func (*SessionWorkspaceFileChangedData) Type() SessionEventType { return SessionEventTypeSessionWorkspaceFileChanged } +// Neutral provider-tagged reasoning content blocks preserved verbatim for round-tripping +// Experimental: AssistantMessageReasoningBlocks is part of an experimental API and may change or be removed. +type AssistantMessageReasoningBlocks struct { + // Provider-native reasoning content blocks (e.g. Anthropic `thinking` / `redacted_thinking`) preserved verbatim, in order. A single response can carry several, each signed over the content preceding it, so dropping or reordering any of them invalidates the rest. + Blocks []any `json:"blocks,omitzero"` + // Model provider that produced these reasoning blocks. + Provider string `json:"provider"` +} + // 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 { @@ -3108,6 +3163,8 @@ type PermissionPromptRequestMCP struct { // Assisted-approval judge information for this request; present only in assisted mode. // Experimental: AssistedApproval is part of an experimental API and may change or be removed. AssistedApproval *PermissionAssistedApproval `json:"assistedApproval,omitempty"` + // Whether the host may offer a server-wide "approve all tools from this server" blanket. Absent is treated as true; the runtime sends false when managed policy disables bypass-permissions mode, which forbids the server-wide escalation while still allowing per-tool approval. + CanOfferServerWideApproval *bool `json:"canOfferServerWideApproval,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"` @@ -4710,6 +4767,8 @@ const ( ManagedSettingsEnforcedEscalationApproveAll ManagedSettingsEnforcedEscalation = "approve_all" // Assisted mode — keeps normal prompt paths and adds an LLM recommendation, distinct from allow-all. ManagedSettingsEnforcedEscalationAssistedApproval ManagedSettingsEnforcedEscalation = "assisted_approval" + // A server-wide MCP "Always Allow" (or `--allow-tool `) blanket that would auto-approve every tool from an MCP server. Capped to per-tool approval; each tool still prompts. + ManagedSettingsEnforcedEscalationServerWideMCPApproval ManagedSettingsEnforcedEscalation = "server_wide_mcp_approval" // Unrestricted filesystem access outside the session's allowed directories. ManagedSettingsEnforcedEscalationUnrestrictedPaths ManagedSettingsEnforcedEscalation = "unrestricted_paths" // Unrestricted URL fetch access. @@ -4843,6 +4902,20 @@ const ( ModelCallFailureTransportWebsocket ModelCallFailureTransport = "websocket" ) +// Final outcome of one logical model dispatch after response acceptance processing +type ModelCallFinishedOutcome string + +const ( + // The dispatch was cancelled before an accepted response was produced. + ModelCallFinishedOutcomeCancelled ModelCallFinishedOutcome = "cancelled" + // The dispatch ended with a provider or transport error. + ModelCallFinishedOutcomeError ModelCallFinishedOutcome = "error" + // The provider response was rejected during post-response acceptance processing. + ModelCallFinishedOutcomeRejected ModelCallFinishedOutcome = "rejected" + // The provider response was accepted for continued agent processing. + ModelCallFinishedOutcomeSuccess ModelCallFinishedOutcome = "success" +) + // Binary result type discriminator. Use "image" for images and "resource" for other binary data. type OmittedBinaryType string diff --git a/go/zsession_events.go b/go/zsession_events.go index 711943b45d..11a1bd666f 100644 --- a/go/zsession_events.go +++ b/go/zsession_events.go @@ -16,6 +16,7 @@ type ( AssistantIntentData = rpc.AssistantIntentData AssistantMessageData = rpc.AssistantMessageData AssistantMessageDeltaData = rpc.AssistantMessageDeltaData + AssistantMessageReasoningBlocks = rpc.AssistantMessageReasoningBlocks AssistantMessageServerTools = rpc.AssistantMessageServerTools AssistantMessageStartData = rpc.AssistantMessageStartData AssistantMessageToolRequest = rpc.AssistantMessageToolRequest @@ -155,6 +156,8 @@ type ( ModelCallFailureRequestFingerprint = rpc.ModelCallFailureRequestFingerprint ModelCallFailureSource = rpc.ModelCallFailureSource ModelCallFailureTransport = rpc.ModelCallFailureTransport + ModelCallFinishedData = rpc.ModelCallFinishedData + ModelCallFinishedOutcome = rpc.ModelCallFinishedOutcome ModelCallStartData = rpc.ModelCallStartData ModelChangeSource = rpc.ModelChangeSource OmittedBinaryOmittedReason = rpc.OmittedBinaryOmittedReason @@ -498,6 +501,7 @@ const ( ManagedSettingsEnforcedEscalationAllowAll = rpc.ManagedSettingsEnforcedEscalationAllowAll ManagedSettingsEnforcedEscalationApproveAll = rpc.ManagedSettingsEnforcedEscalationApproveAll ManagedSettingsEnforcedEscalationAssistedApproval = rpc.ManagedSettingsEnforcedEscalationAssistedApproval + ManagedSettingsEnforcedEscalationServerWideMCPApproval = rpc.ManagedSettingsEnforcedEscalationServerWideMCPApproval ManagedSettingsEnforcedEscalationUnrestrictedPaths = rpc.ManagedSettingsEnforcedEscalationUnrestrictedPaths ManagedSettingsEnforcedEscalationUnrestrictedURLs = rpc.ManagedSettingsEnforcedEscalationUnrestrictedURLs ManagedSettingsResolvedSourceClient = rpc.ManagedSettingsResolvedSourceClient @@ -542,6 +546,10 @@ const ( ModelCallFailureSourceTopLevel = rpc.ModelCallFailureSourceTopLevel ModelCallFailureTransportHTTP = rpc.ModelCallFailureTransportHTTP ModelCallFailureTransportWebsocket = rpc.ModelCallFailureTransportWebsocket + ModelCallFinishedOutcomeCancelled = rpc.ModelCallFinishedOutcomeCancelled + ModelCallFinishedOutcomeError = rpc.ModelCallFinishedOutcomeError + ModelCallFinishedOutcomeRejected = rpc.ModelCallFinishedOutcomeRejected + ModelCallFinishedOutcomeSuccess = rpc.ModelCallFinishedOutcomeSuccess ModelChangeSourceAgent = rpc.ModelChangeSourceAgent ModelChangeSourceAutomatic = rpc.ModelChangeSourceAutomatic ModelChangeSourceConfigCommand = rpc.ModelChangeSourceConfigCommand @@ -660,6 +668,7 @@ const ( SessionEventTypeMCPResourcesListChanged = rpc.SessionEventTypeMCPResourcesListChanged SessionEventTypeMCPToolsListChanged = rpc.SessionEventTypeMCPToolsListChanged SessionEventTypeModelCallFailure = rpc.SessionEventTypeModelCallFailure + SessionEventTypeModelCallFinished = rpc.SessionEventTypeModelCallFinished SessionEventTypeModelCallStart = rpc.SessionEventTypeModelCallStart SessionEventTypePendingMessagesModified = rpc.SessionEventTypePendingMessagesModified SessionEventTypePermissionCompleted = rpc.SessionEventTypePermissionCompleted diff --git a/java/pom.xml b/java/pom.xml index d6b0ee3d33..366756ca28 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.81-6 + ^1.0.81-10 true diff --git a/java/scripts/codegen/package-lock.json b/java/scripts/codegen/package-lock.json index be096fe130..a81af6e0d1 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.81-6", + "@github/copilot": "^1.0.81-10", "json-schema": "^0.4.0", "tsx": "^4.23.12" } @@ -428,9 +428,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.81-6", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.81-6.tgz", - "integrity": "sha512-hT29nRkf0EJE3N6lqeLOPszbdEyALZ+fjYG9zKX5a3L5r+o+m4/KF+8l2gn2yORNqOzwUYNj2vnVzKqeYYNLGg==", + "version": "1.0.81-10", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.81-10.tgz", + "integrity": "sha512-Ac99EvN16s4hKRhJLSEn1HMNaZ6MD8BzIey1zzJNBQy1/yP4PQDZ2CWitEq+XQQEi+6SsqeJRqXOKiWk1EyK7g==", "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.81-6", - "@github/copilot-darwin-x64": "1.0.81-6", - "@github/copilot-linux-arm64": "1.0.81-6", - "@github/copilot-linux-x64": "1.0.81-6", - "@github/copilot-linuxmusl-arm64": "1.0.81-6", - "@github/copilot-linuxmusl-x64": "1.0.81-6", - "@github/copilot-win32-arm64": "1.0.81-6", - "@github/copilot-win32-x64": "1.0.81-6" + "@github/copilot-darwin-arm64": "1.0.81-10", + "@github/copilot-darwin-x64": "1.0.81-10", + "@github/copilot-linux-arm64": "1.0.81-10", + "@github/copilot-linux-x64": "1.0.81-10", + "@github/copilot-linuxmusl-arm64": "1.0.81-10", + "@github/copilot-linuxmusl-x64": "1.0.81-10", + "@github/copilot-win32-arm64": "1.0.81-10", + "@github/copilot-win32-x64": "1.0.81-10" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.81-6", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.81-6.tgz", - "integrity": "sha512-nALa4e8Jc/g5ltIHrpHBHByJ5rlgzoZFylZIrkQY+B9vr3L57d5F6fOiTbf/OF9blFQX7artWRE1K0TmowGNCA==", + "version": "1.0.81-10", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.81-10.tgz", + "integrity": "sha512-s90Av0iwjTSU6Gky8T9wI1PJdlfbdUcPAVgKDtimaOiAwcdLG4fKTpGxrk96KJrnOHHK3x9SiXsw/pW0ThAH/A==", "cpu": [ "arm64" ], @@ -466,9 +466,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.81-6", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.81-6.tgz", - "integrity": "sha512-K+bp799DejrsmxMNyaFAmKo4xnLJXBb8hkv9N8OCQukmTSoRpfqhv2oTDfgVFadwllt+py/FIdxKTZQYvPGGGw==", + "version": "1.0.81-10", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.81-10.tgz", + "integrity": "sha512-8RnPI4J311oJQ0GPB6JxuLJq4JNY/KF9ZIIQm8KpxXBY6d+6fmmAsMDEk7OiF/Asl2I7+LTi+qU2ZVhP7FYhbg==", "cpu": [ "x64" ], @@ -482,9 +482,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.81-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.81-6.tgz", - "integrity": "sha512-aEpnfTTjOxpesFo9jqk/phZUivOhNHbdBRfBrS2NiCPrQZFBYUC4wRVo/Xo2PMMQ4J07b6fU7JJQPoUUkKy5Wg==", + "version": "1.0.81-10", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.81-10.tgz", + "integrity": "sha512-2UtK5CBrE6ZVSIzU2KHeIgO8N7056axjbF2lE6WuK+H+oJJ4v3w5eQkalqGzRHhkaPfCW4kT1lDMhZFW+XbLjA==", "cpu": [ "arm64" ], @@ -498,9 +498,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.81-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.81-6.tgz", - "integrity": "sha512-NFqonFfJCyA7d3bNoYeLWUQ69zelPr9TTnLpAHCi3scFZqbEvMBDFxW2XsKWwfYuuR9XzfU7/tgOUgq3gmL5aA==", + "version": "1.0.81-10", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.81-10.tgz", + "integrity": "sha512-61+KAfo1TBARrBfss3w4dfmRVSf0PiFg0c9JNuT9HjoNnytl7maJBPEgUvI4YBcxScNEAlCMXaUUG3Tuuh1g+w==", "cpu": [ "x64" ], @@ -514,9 +514,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.81-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.81-6.tgz", - "integrity": "sha512-EE99DFTAgTq6eOFDiiv+OUROD2pDQIrzyyJEfUS9K8JanwNc+Py8vTxrJ0yK0slpJ+Fue5uDRno6c9ys8OM59g==", + "version": "1.0.81-10", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.81-10.tgz", + "integrity": "sha512-CR6KRPCFoGkaD8I2an1FyrT5avF1U5aTbwW2sYCP7w1KExYFknxEL8ES6BkFuPEA7YcjmLa0SOq26Z+TgIVHSg==", "cpu": [ "arm64" ], @@ -530,9 +530,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.81-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.81-6.tgz", - "integrity": "sha512-90HRKx25EjhlQNOCCdbiC0Ck0fSKyp8XUxUoCvuNdoigdUP54ZGS07dkyJiJq9KZaKilxZBSpXiNt8t5ETA2Sg==", + "version": "1.0.81-10", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.81-10.tgz", + "integrity": "sha512-fvZfyEOfRkvUDPXY6UUjAqV8Mkf08PQV+jgtiAFUryuas5VP9cYaAmQSmNpzNMNi3kSX/ycUJe7oc3zXZ8ylog==", "cpu": [ "x64" ], @@ -546,9 +546,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.81-6", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.81-6.tgz", - "integrity": "sha512-1dRSHF/7PFzB+AGORg8BJh2n1+N7+sIJDLqozrC9INWFp1t6ercptIXgJTF/V7UZVGQLO4LBBK1HH/QhzUmrfA==", + "version": "1.0.81-10", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.81-10.tgz", + "integrity": "sha512-n30PPBgCT4Iq9MgH6is6L3eUEE+sF6xB2fb+dGsclj5j/hCkT7+ef0j8YcAGipsvGfzGAuywIsWlvF7fzYsOKQ==", "cpu": [ "arm64" ], @@ -562,9 +562,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.81-6", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.81-6.tgz", - "integrity": "sha512-lIbN1mk6Rm9bWrWU4/UfrC5OCga7XcBi2LBz5roDnNcuG8mKEevDcNOtbEYz/TaJg+WBMoTbGfXBVd1hGy2DTA==", + "version": "1.0.81-10", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.81-10.tgz", + "integrity": "sha512-lb8kvhrXwGCN3LeRDQfLHsUp+F43XvPYznaYK1sPtK1kFGa4/kL690tasoSEvzu8ZKoTY6kZ6YmDbUZgqOislw==", "cpu": [ "x64" ], diff --git a/java/scripts/codegen/package.json b/java/scripts/codegen/package.json index 18bdca9bcd..f619ebd627 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.81-6", + "@github/copilot": "^1.0.81-10", "json-schema": "^0.4.0", "tsx": "^4.23.12" } 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 785e3b49d1..41147f3c55 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 @@ -73,6 +73,8 @@ public record AssistantMessageEventData( @JsonProperty("apiCallId") String apiCallId, /** Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping */ @JsonProperty("serverTools") AssistantMessageServerTools serverTools, + /** Neutral provider-tagged reasoning content blocks preserved verbatim for round-tripping. `reasoningText` and `reasoningOpaque` are a lossy derived view of these blocks, retained for display. */ + @JsonProperty("reasoningBlocks") AssistantMessageReasoningBlocks reasoningBlocks, /** Identifier for the agent loop turn that produced this message, matching the corresponding assistant.turn_start event */ @JsonProperty("turnId") String turnId, /** Tool call ID of the parent tool invocation when this event originates from a sub-agent */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageReasoningBlocks.java b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageReasoningBlocks.java new file mode 100644 index 0000000000..d2ad87f7c4 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageReasoningBlocks.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Neutral provider-tagged reasoning content blocks preserved verbatim for round-tripping + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record AssistantMessageReasoningBlocks( + /** Model provider that produced these reasoning blocks. */ + @JsonProperty("provider") String provider, + /** Provider-native reasoning content blocks (e.g. Anthropic `thinking` / `redacted_thinking`) preserved verbatim, in order. A single response can carry several, each signed over the content preceding it, so dropping or reordering any of them invalidates the rest. */ + @JsonProperty("blocks") List blocks +) { +} 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 6d94a553da..ff4cfddec8 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 @@ -56,6 +56,8 @@ public record AssistantUsageEventData( @JsonProperty("duration") Long duration, /** Time to first token in milliseconds. Only available for streaming requests */ @JsonProperty("timeToFirstTokenMs") Double timeToFirstTokenMs, + /** Time to first observable model output in milliseconds. Includes text, reasoning, and tool-call output; only available for streaming requests that produce observable output. */ + @JsonProperty("outputTtftMs") Double outputTtftMs, /** Average inter-token latency in milliseconds. Only available for streaming requests */ @JsonProperty("interTokenLatencyMs") Double interTokenLatencyMs, /** What initiated this API call (e.g., "sub-agent", "mcp-sampling"); absent for user-initiated calls */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/ManagedSettingsEnforcedEscalation.java b/java/sdk/src/generated/java/com/github/copilot/generated/ManagedSettingsEnforcedEscalation.java index 3b4f9917fc..619fb326e1 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/ManagedSettingsEnforcedEscalation.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/ManagedSettingsEnforcedEscalation.java @@ -25,7 +25,9 @@ public enum ManagedSettingsEnforcedEscalation { /** The {@code unrestricted_paths} variant. */ UNRESTRICTED_PATHS("unrestricted_paths"), /** The {@code unrestricted_urls} variant. */ - UNRESTRICTED_URLS("unrestricted_urls"); + UNRESTRICTED_URLS("unrestricted_urls"), + /** The {@code server_wide_mcp_approval} variant. */ + SERVER_WIDE_MCP_APPROVAL("server_wide_mcp_approval"); private final String value; ManagedSettingsEnforcedEscalation(String value) { this.value = value; } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/ModelCallFinishedEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/ModelCallFinishedEvent.java new file mode 100644 index 0000000000..a1b424e807 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/ModelCallFinishedEvent.java @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * 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 "model.call_finished". Final lifecycle outcome for one logical model dispatch. A logical dispatch may include internal reconnect or fallback work, so event count is not provider HTTP-request count. + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class ModelCallFinishedEvent extends SessionEvent { + + @Override + public String getType() { return "model.call_finished"; } + + @JsonProperty("data") + private ModelCallFinishedEventData data; + + public ModelCallFinishedEventData getData() { return data; } + public void setData(ModelCallFinishedEventData data) { this.data = data; } + + /** Data payload for {@link ModelCallFinishedEvent}. */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record ModelCallFinishedEventData( + /** Agent-loop iteration within the interaction that initiated the model dispatch */ + @JsonProperty("turnId") String turnId, + /** Identifier of the user interaction that owns the model dispatch, matching assistant.turn_start.interactionId when available */ + @JsonProperty("interactionId") String interactionId, + /** Monotonic elapsed time spent in the logical model dispatch, including any internal transport reconnect or fallback and excluding orchestrator retry backoff, tool execution, confirmations, and post-response processing */ + @JsonProperty("dispatchDurationMs") Double dispatchDurationMs, + /** Final outcome after post-response acceptance processing */ + @JsonProperty("outcome") ModelCallFinishedOutcome outcome, + /** Whether an accepted successful response requested the exact name and command semantics of a built-in file edit tool, including an external tool explicitly replacing that built-in name. Absent when the logical dispatch did not produce an accepted response. */ + @JsonProperty("containsBuiltInFileEditRequest") Boolean containsBuiltInFileEditRequest, + /** Version of the built-in file-edit semantic classifier used for this event */ + @JsonProperty("editClassifierVersion") Long editClassifierVersion + ) { + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/ModelCallFinishedOutcome.java b/java/sdk/src/generated/java/com/github/copilot/generated/ModelCallFinishedOutcome.java new file mode 100644 index 0000000000..8b86ed0281 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/ModelCallFinishedOutcome.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; + +/** + * Final outcome of one logical model dispatch after response acceptance processing + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum ModelCallFinishedOutcome { + /** The {@code success} variant. */ + SUCCESS("success"), + /** The {@code error} variant. */ + ERROR("error"), + /** The {@code cancelled} variant. */ + CANCELLED("cancelled"), + /** The {@code rejected} variant. */ + REJECTED("rejected"); + + private final String value; + ModelCallFinishedOutcome(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static ModelCallFinishedOutcome fromValue(String value) { + for (ModelCallFinishedOutcome v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown ModelCallFinishedOutcome value: " + value); + } +} 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 a1da651ddb..0acc3df712 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 @@ -74,6 +74,7 @@ @JsonSubTypes.Type(value = AssistantUsageEvent.class, name = "assistant.usage"), @JsonSubTypes.Type(value = PromptCacheBreakEvent.class, name = "prompt_cache_break"), @JsonSubTypes.Type(value = ModelCallFailureEvent.class, name = "model.call_failure"), + @JsonSubTypes.Type(value = ModelCallFinishedEvent.class, name = "model.call_finished"), @JsonSubTypes.Type(value = ModelCallStartEvent.class, name = "model.call_start"), @JsonSubTypes.Type(value = AbortEvent.class, name = "abort"), @JsonSubTypes.Type(value = ToolUserRequestedEvent.class, name = "tool.user_requested"), @@ -198,6 +199,7 @@ public abstract sealed class SessionEvent permits AssistantUsageEvent, PromptCacheBreakEvent, ModelCallFailureEvent, + ModelCallFinishedEvent, ModelCallStartEvent, AbortEvent, ToolUserRequestedEvent, diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SessionManagedSettingsResolvedEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/SessionManagedSettingsResolvedEvent.java index f935f44627..ac3763248a 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/SessionManagedSettingsResolvedEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/SessionManagedSettingsResolvedEvent.java @@ -45,6 +45,8 @@ public record SessionManagedSettingsResolvedEventData( @JsonProperty("clientManaged") Boolean clientManaged, /** Whether managed policy could not be determined (e.g. a failed server fetch) and the session fell back to the fail-closed restriction. When true, restrictions such as disabling bypass-permissions are enforced even though `settings` may be absent. */ @JsonProperty("failClosed") Boolean failClosed, + /** Whether the effective sandbox policy forces the sandbox on *only* because managed policy could not be determined, rather than because the policy requires it. Lets clients tell a user whose `--no-sandbox` was overridden that the sandbox stayed on as a fail-closed fallback, instead of attributing it to an administrator who set no such policy. */ + @JsonProperty("sandboxEnabledByUndeterminedPolicy") Boolean sandboxEnabledByUndeterminedPolicy, /** Whether enterprise policy disables bypass-permissions ("yolo") mode for this session. Deny-wins across layers, and forced on when `failClosed` is true. */ @JsonProperty("bypassPermissionsDisabled") Boolean bypassPermissionsDisabled, /** Whether at least two managed sources supplied permission allowlists, so enforcement intersects them and the flattened settings payload omits `permissions.allow`. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SubagentCompletedEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/SubagentCompletedEvent.java index f7300ddbf4..62f6803652 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/SubagentCompletedEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/SubagentCompletedEvent.java @@ -42,6 +42,16 @@ public record SubagentCompletedEventData( @JsonProperty("agentDisplayName") String agentDisplayName, /** Model used by the sub-agent */ @JsonProperty("model") String model, + /** First model for which the sub-agent started an inference request, when one was dispatched */ + @JsonProperty("firstDispatchedModel") String firstDispatchedModel, + /** Concrete model the user configured for this sub-agent via `/subagents`, when present */ + @JsonProperty("configuredModelPreference") String configuredModelPreference, + /** Explicit model supplied by the parent agent on the task call, when present */ + @JsonProperty("explicitModelOverride") String explicitModelOverride, + /** Whether the explicit task-call model matched the user's configured preference */ + @JsonProperty("explicitModelMatchesPreference") Boolean explicitModelMatchesPreference, + /** Whether the first model actually dispatched matched the user's configured preference */ + @JsonProperty("configuredModelMatchesActual") Boolean configuredModelMatchesActual, /** Total number of tool calls made by the sub-agent */ @JsonProperty("totalToolCalls") Long totalToolCalls, /** Total tokens (input + output) consumed by the sub-agent */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SubagentFailedEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/SubagentFailedEvent.java index 6a48544ce9..1d1413c64d 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/SubagentFailedEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/SubagentFailedEvent.java @@ -44,6 +44,16 @@ public record SubagentFailedEventData( @JsonProperty("error") String error, /** Model selected for the sub-agent, when known */ @JsonProperty("model") String model, + /** First model for which the sub-agent started an inference request, when one was dispatched */ + @JsonProperty("firstDispatchedModel") String firstDispatchedModel, + /** Concrete model the user configured for this sub-agent via `/subagents`, when present */ + @JsonProperty("configuredModelPreference") String configuredModelPreference, + /** Explicit model supplied by the parent agent on the task call, when present */ + @JsonProperty("explicitModelOverride") String explicitModelOverride, + /** Whether the explicit task-call model matched the user's configured preference */ + @JsonProperty("explicitModelMatchesPreference") Boolean explicitModelMatchesPreference, + /** Whether the first model actually dispatched matched the user's configured preference */ + @JsonProperty("configuredModelMatchesActual") Boolean configuredModelMatchesActual, /** Total number of tool calls made before the sub-agent failed */ @JsonProperty("totalToolCalls") Long totalToolCalls, /** Total tokens (input + output) consumed before the sub-agent failed */ 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 index 83040d7fa4..5d82a47f85 100644 --- 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 @@ -22,6 +22,7 @@ @JsonSubTypes.Type(value = HMACAuthInfo.class, name = "hmac"), @JsonSubTypes.Type(value = EnvAuthInfo.class, name = "env"), @JsonSubTypes.Type(value = TokenAuthInfo.class, name = "token"), + @JsonSubTypes.Type(value = TokenProviderAuthInfo.class, name = "token-provider"), @JsonSubTypes.Type(value = CopilotApiTokenAuthInfo.class, name = "copilot-api-token"), @JsonSubTypes.Type(value = UserAuthInfo.class, name = "user"), @JsonSubTypes.Type(value = GhCliAuthInfo.class, name = "gh-cli"), diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthInfoType.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthInfoType.java index 1fb4b43ba4..5f81c8cf84 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthInfoType.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthInfoType.java @@ -28,6 +28,8 @@ public enum AuthInfoType { API_KEY("api-key"), /** The {@code token} variant. */ TOKEN("token"), + /** The {@code token-provider} variant. */ + TOKEN_PROVIDER("token-provider"), /** The {@code copilot-api-token} variant. */ COPILOT_API_TOKEN("copilot-api-token"); diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectClientInfo.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectClientInfo.java new file mode 100644 index 0000000000..e5b6b6f24d --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectClientInfo.java @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identity of the integrating host, declared once on the `server.connect` handshake so telemetry from this connection is attributed to a single, consistent surface. All fields are optional; omit them to keep the default attribution. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record ConnectClientInfo( + /** Name of the host editor, e.g. `"vscode"`. */ + @JsonProperty("editorName") String editorName, + /** Version of the host editor, e.g. `"1.124.2"`. Ignored unless it looks like a version string. */ + @JsonProperty("editorVersion") String editorVersion, + /** Name of the Copilot extension within the host, e.g. `"copilot-chat"`. */ + @JsonProperty("extensionName") String extensionName, + /** Version of the Copilot extension within the host, e.g. `"0.54.0"`. Ignored unless it looks like a version string. */ + @JsonProperty("extensionVersion") String extensionVersion +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectParams.java index d59f8fd6b0..05f2534970 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectParams.java @@ -26,6 +26,8 @@ public record ConnectParams( /** Opt this connection in to GitHub telemetry forwarding for its lifetime. When set, the runtime forwards every internal telemetry event it emits — across all sessions, plus sessionless events — to this connection over the `gitHubTelemetry.event` notification. Regular events are also written to the runtime's normal GitHub/CTS path (dual-write); host-only compatibility events are forward-only and intentionally skip that path. Intended for first-party hosts that re-emit the events into their own telemetry stores. Both unrestricted and restricted events are forwarded, each tagged with a `restricted` discriminator; a backstop drops restricted events when restricted telemetry is disabled — using the process-global gate for ordinary events and an explicit session-scoped decision for host-only events. */ @JsonProperty("enableGitHubTelemetryForwarding") Boolean enableGitHubTelemetryForwarding, + /** Identity of the integrating host. Optional; omit it to keep the default attribution. */ + @JsonProperty("clientInfo") ConnectClientInfo clientInfo, /** Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN */ @JsonProperty("token") String token ) { diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/DisableBypassPermissionsMode.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireReason.java similarity index 57% rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/DisableBypassPermissionsMode.java rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireReason.java index 1e6b1e7db6..9f18889a03 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/DisableBypassPermissionsMode.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireReason.java @@ -9,20 +9,27 @@ import javax.annotation.processing.Generated; +/** + * Why the runtime is requesting a GitHub credential. + * + * @since 1.0.0 + */ @javax.annotation.processing.Generated("copilot-sdk-codegen") -public enum DisableBypassPermissionsMode { - /** The {@code disable} variant. */ - DISABLE("disable"); +public enum GitHubTokenAcquireReason { + /** The {@code initial} variant. */ + INITIAL("initial"), + /** The {@code refresh} variant. */ + REFRESH("refresh"); private final String value; - DisableBypassPermissionsMode(String value) { this.value = value; } + GitHubTokenAcquireReason(String value) { this.value = value; } @com.fasterxml.jackson.annotation.JsonValue public String getValue() { return value; } @com.fasterxml.jackson.annotation.JsonCreator - public static DisableBypassPermissionsMode fromValue(String value) { - for (DisableBypassPermissionsMode v : values()) { + public static GitHubTokenAcquireReason fromValue(String value) { + for (GitHubTokenAcquireReason v : values()) { if (v.value.equals(value)) return v; } - throw new IllegalArgumentException("Unknown DisableBypassPermissionsMode value: " + value); + throw new IllegalArgumentException("Unknown GitHubTokenAcquireReason value: " + value); } } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireRequest.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireRequest.java new file mode 100644 index 0000000000..59ba9d8ed5 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireRequest.java @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Asks the SDK client to acquire a GitHub access token from an opaque callback registration. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record GitHubTokenAcquireRequest( + /** Opaque identifier generated by the SDK for this callback registration. */ + @JsonProperty("registrationId") String registrationId, + /** Effective GitHub host for which the callback must return a token. */ + @JsonProperty("host") String host, + /** Session receiving the token. Absent only before a cloud session has been assigned its id. */ + @JsonProperty("sessionId") String sessionId, + /** Why the runtime is requesting a GitHub credential. */ + @JsonProperty("reason") GitHubTokenAcquireReason reason +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResult.java new file mode 100644 index 0000000000..a20724c337 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResult.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.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import javax.annotation.processing.Generated; + +/** + * SDK host response to a GitHub credential request. + * + * @since 1.0.0 + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = GitHubTokenAcquireResultToken.class, name = "token"), + @JsonSubTypes.Type(value = GitHubTokenAcquireResultCancelled.class, name = "cancelled") +}) +@JsonIgnoreProperties(ignoreUnknown = true) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public abstract class GitHubTokenAcquireResult { + + /** + * Returns the discriminator value for this variant. + * + * @return the kind discriminator + */ + public abstract String getKind(); +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResultCancelled.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResultCancelled.java new file mode 100644 index 0000000000..40ab8d5f74 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResultCancelled.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Variant {@code cancelled} of {@link GitHubTokenAcquireResult}. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class GitHubTokenAcquireResultCancelled extends GitHubTokenAcquireResult { + + @JsonProperty("kind") + private final String kind = "cancelled"; + + @Override + public String getKind() { return kind; } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResultToken.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResultToken.java new file mode 100644 index 0000000000..cc250a54fd --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResultToken.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; + +/** + * Variant {@code token} of {@link GitHubTokenAcquireResult}. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class GitHubTokenAcquireResultToken extends GitHubTokenAcquireResult { + + @JsonProperty("kind") + private final String kind = "token"; + + @Override + public String getKind() { return kind; } + + /** GitHub access token acquired by the SDK host. */ + @JsonProperty("accessToken") + private String accessToken; + + /** OAuth token type. Defaults to bearer when omitted. */ + @JsonProperty("tokenType") + private String tokenType; + + /** Remaining token lifetime in seconds when callback execution completes. It must exceed the one-hour preflight refresh threshold. */ + @JsonProperty("expiresIn") + private Long expiresIn; + + public String getAccessToken() { return accessToken; } + public void setAccessToken(String accessToken) { this.accessToken = accessToken; } + + public String getTokenType() { return tokenType; } + public void setTokenType(String tokenType) { this.tokenType = tokenType; } + + public Long getExpiresIn() { return expiresIn; } + public void setExpiresIn(Long expiresIn) { this.expiresIn = expiresIn; } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/InstalledPlugin.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/InstalledPlugin.java index 3da690f47b..e372049403 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/InstalledPlugin.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/InstalledPlugin.java @@ -36,6 +36,8 @@ public record InstalledPlugin( /** Source for direct repo installs (when marketplace is empty) */ @JsonProperty("source") Object source, /** Per-plugin source fingerprint (a SHA-256 hash of the plugin's catalog source spec plus its resolved source subtree — NOT a Git commit SHA) captured at marketplace install/update time. Auto-update compares it against the freshly recomputed fingerprint to detect a content change that does not bump the version. Absent for pre-existing installs and for direct (non-marketplace) installs. */ - @JsonProperty("source_sha") String sourceSha + @JsonProperty("source_sha") String sourceSha, + /** Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key. */ + @JsonProperty("installed_from") String installedFrom ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/InstalledPluginInfo.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/InstalledPluginInfo.java index 2f4895690f..2c81e95f2b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/InstalledPluginInfo.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/InstalledPluginInfo.java @@ -30,6 +30,8 @@ public record InstalledPluginInfo( /** Installed version (when reported by the plugin manifest) */ @JsonProperty("version") String version, /** Whether the plugin is currently enabled for new sessions */ - @JsonProperty("enabled") Boolean enabled + @JsonProperty("enabled") Boolean enabled, + /** Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — a plugin belonging to a directory/local marketplace, which is loaded from its real directory on every pass instead of a copy under the installed-plugins cache. Its presence is what marks a listed plugin as live: such a plugin is always present on disk, so `enabled` is its only meaningful state and it is never "not installed". */ + @JsonProperty("installedFrom") String installedFrom ) { } 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 8aadae4a22..a652e8f4f6 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 @@ -41,6 +41,12 @@ public record Model( /** Model capability category for grouping in the model picker */ @JsonProperty("modelPickerCategory") ModelPickerCategory modelPickerCategory, /** Relative cost tier for token-based billing users */ - @JsonProperty("modelPickerPriceCategory") ModelPickerPriceCategory modelPickerPriceCategory + @JsonProperty("modelPickerPriceCategory") ModelPickerPriceCategory modelPickerPriceCategory, + /** Warning text the service requires hosts to surface for this model. Present only when the service published at least one warning. */ + @JsonProperty("warningText") ModelWarningText warningText, + /** Informational notices the service published for this model, such as an upcoming change or a recommended alternative. Present only when the service published at least one notice. Hosts should surface these without implying anything is wrong with the model. */ + @JsonProperty("infoMessages") List infoMessages, + /** Warnings the service published for this model, such as a deprecated client version. Present only when the service published at least one warning. The model remains usable; hosts should surface these as advisory rather than blocking. */ + @JsonProperty("warningMessages") List warningMessages ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelMessage.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelMessage.java new file mode 100644 index 0000000000..35e8a17386 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelMessage.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; + +/** + * A service-published message about a model, carrying a stable machine-readable code alongside human-readable text. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record ModelMessage( + /** Stable machine-readable identifier for the message, such as `client_version_deprecated`. Hosts can key custom presentation off this; unrecognized codes should fall back to displaying `message`. */ + @JsonProperty("code") String code, + /** Human-readable message text intended for display to the user. */ + @JsonProperty("message") String message +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelWarningText.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelWarningText.java new file mode 100644 index 0000000000..817be420c5 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelWarningText.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; + +/** + * Service-published warning text that hosts should display when presenting a model. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record ModelWarningText( + /** Data-retention warning for the model. The text may contain Markdown links and should be rendered as Markdown when supported. */ + @JsonProperty("dataRetention") String dataRetention +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionPathsConfig.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionPathsConfig.java index 29aef6c66f..56dbd73dd8 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionPathsConfig.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionPathsConfig.java @@ -24,7 +24,7 @@ public record PermissionPathsConfig( /** If true, the runtime allows access to all paths without prompting. Equivalent to constructing an UnrestrictedPathManager. */ @JsonProperty("unrestricted") Boolean unrestricted, - /** Additional directories to allow tool access to (in addition to the session's working directory). When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion). */ + /** Additional directories to allow tool access to (in addition to the session's working directory). Conventional `.github/skills/` and `.github/agents/` definitions under them also join the session catalogs when their subsystem gates are enabled, so supplying a directory is a trust decision for configuration stored there. When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion). */ @JsonProperty("additionalDirectories") List additionalDirectories, /** Whether to include the system temp directory in the allowed list (defaults to true). Ignored when `unrestricted` is true. */ @JsonProperty("includeTempDirectory") Boolean includeTempDirectory, 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 cae6b6868f..9194ea9661 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 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). */ + /** 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 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/SandboxConfigSource.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigSource.java new file mode 100644 index 0000000000..73760b08a2 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigSource.java @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Origin of the sandbox choice supplied by an internal client. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum SandboxConfigSource { + /** The {@code never_configured} variant. */ + NEVER_CONFIGURED("never_configured"), + /** The {@code user_enabled} variant. */ + USER_ENABLED("user_enabled"), + /** The {@code user_disabled} variant. */ + USER_DISABLED("user_disabled"), + /** The {@code session_flag} variant. */ + SESSION_FLAG("session_flag"), + /** The {@code session_disabled} variant. */ + SESSION_DISABLED("session_disabled"), + /** The {@code unsupported_host} variant. */ + UNSUPPORTED_HOST("unsupported_host"), + /** The {@code repository_policy} variant. */ + REPOSITORY_POLICY("repository_policy"); + + private final String value; + SandboxConfigSource(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static SandboxConfigSource fromValue(String value) { + for (SandboxConfigSource v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown SandboxConfigSource value: " + value); + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionInstalledPlugin.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionInstalledPlugin.java index 1109f5f231..db8ea12026 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionInstalledPlugin.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionInstalledPlugin.java @@ -36,6 +36,8 @@ public record SessionInstalledPlugin( /** Source descriptor for direct repo installs (when marketplace is empty) */ @JsonProperty("source") Object source, /** Per-plugin source fingerprint (a SHA-256 hash of the plugin's catalog source spec plus its resolved source subtree — NOT a Git commit SHA) captured at marketplace install/update time. Auto-update compares it against the freshly recomputed fingerprint to detect a content change that does not bump the version. Absent for pre-existing installs and for direct (non-marketplace) installs. */ - @JsonProperty("source_sha") String sourceSha + @JsonProperty("source_sha") String sourceSha, + /** Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key. */ + @JsonProperty("installed_from") String installedFrom ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionManagedPermissions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionManagedPermissions.java index 79698b27c4..8d52a1eb1e 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionManagedPermissions.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionManagedPermissions.java @@ -22,8 +22,8 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionManagedPermissions( - /** When set to `disable`, prevents bypass/allow-all permission modes. */ - @JsonProperty("disableBypassPermissionsMode") DisableBypassPermissionsMode disableBypassPermissionsMode, + /** When set to `disable`, prevents bypass/allow-all permission modes. `allow-auto-only` blocks full allow-all but permits advisory auto-approval. Any other value is accepted rather than failing the session, but is enforced as `disable`: the key is only present to restrict something, so a mode this runtime cannot interpret fails closed to the most restrictive one it knows. Omit the key entirely to impose no restriction. */ + @JsonProperty("disableBypassPermissionsMode") String disableBypassPermissionsMode, /** Permission rules that block matching operations. Deny has highest precedence. */ @JsonProperty("deny") List deny, /** Permission rules that require explicit human approval. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptions.java index 002f5e82de..34706a68e1 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptions.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOpenOptions.java @@ -67,7 +67,7 @@ public record SessionOpenOptions( @JsonProperty("models") List models, /** Working directory to anchor the session. */ @JsonProperty("workingDirectory") String workingDirectory, - /** Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied on both session creation and resume, and is not persisted: a resumed session that omits this option does not retain previously supplied directories (re-supply them, exactly as the CLI re-passes `--add-dir`). */ + /** Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Conventional `.github/skills/` and `.github/agents/` definitions under each directory also join the session's project catalogs when their existing subsystem gates are enabled: added-root skills require both `enableConfigDiscovery` and effective `enableSkills`; added-root agents require `enableConfigDiscovery`. Supplying a directory therefore activates configuration from it and should be treated as a trust decision. Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied during session creation and cold resume and is not persisted, so a cold resume must re-supply the directories. */ @JsonProperty("additionalDirectories") List additionalDirectories, /** Pre-resolved working-directory context for session startup. */ @JsonProperty("workingDirectoryContext") SessionContext workingDirectoryContext, @@ -99,6 +99,8 @@ public record SessionOpenOptions( @JsonProperty("shellProcessFlags") List shellProcessFlags, /** Resolved sandbox configuration. */ @JsonProperty("sandboxConfig") SandboxConfig sandboxConfig, + /** Origin of the sandbox choice. The runtime uses this only for internal telemetry provenance; managed policy is derived independently. */ + @JsonProperty("sandboxConfigSource") SandboxConfigSource sandboxConfigSource, /** Whether interactive shell sessions are logged. */ @JsonProperty("logInteractiveShells") Boolean logInteractiveShells, /** How MCP server environment values are interpreted. */ @@ -109,6 +111,8 @@ public record SessionOpenOptions( @JsonProperty("allowAllMcpServerInstructions") Boolean allowAllMcpServerInstructions, /** Additional directories to search for skills. */ @JsonProperty("skillDirectories") List skillDirectories, + /** Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available. */ + @JsonProperty("includedBuiltinSkills") List includedBuiltinSkills, /** Skill IDs disabled for this session. */ @JsonProperty("disabledSkills") List disabledSkills, /** Installed plugins visible to the session. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java index 080b47866b..2e8a069a4b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java @@ -74,6 +74,8 @@ public record SessionOptionsUpdateParams( @JsonProperty("shellProcessFlags") List shellProcessFlags, /** Resolved sandbox configuration. */ @JsonProperty("sandboxConfig") SandboxConfig sandboxConfig, + /** Origin of the sandbox choice. The runtime uses this only for internal telemetry provenance; managed policy is derived independently. */ + @JsonProperty("sandboxConfigSource") SandboxConfigSource sandboxConfigSource, /** Whether interactive shell sessions are logged. */ @JsonProperty("logInteractiveShells") Boolean logInteractiveShells, /** How env values are passed to MCP servers (`direct` inlines literal values; `indirect` resolves at launch). */ @@ -82,6 +84,8 @@ public record SessionOptionsUpdateParams( @JsonProperty("allowAllMcpServerInstructions") Boolean allowAllMcpServerInstructions, /** Additional directories to search for skills. */ @JsonProperty("skillDirectories") List skillDirectories, + /** Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available. Set to null to remove the allowlist restriction. */ + @JsonProperty("includedBuiltinSkills") List includedBuiltinSkills, /** Skill IDs that should be excluded from this session. */ @JsonProperty("disabledSkills") List disabledSkills, /** Whether to discover custom instructions on demand after successful file views (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md surfacing). Combined with `skipCustomInstructions`. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsAddParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsAddParams.java index e5f35a2264..48ee26e0d9 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsAddParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsAddParams.java @@ -26,7 +26,7 @@ public record SessionPermissionsPathsAddParams( /** Target session identifier */ @JsonProperty("sessionId") String sessionId, - /** Directory to add to the allow-list. The runtime resolves and validates the path before adding. */ + /** Directory to add to the allow-list. The runtime resolves and validates the path before adding, then loads conventional `.github/skills/` and `.github/agents/` definitions under it when their subsystem gates are enabled. Adding the directory is therefore also a trust decision for configuration stored there. */ @JsonProperty("path") String path ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueuePendingItemsResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueuePendingItemsResult.java index 7b096480ca..a74d54e245 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueuePendingItemsResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionQueuePendingItemsResult.java @@ -28,6 +28,8 @@ public record SessionQueuePendingItemsResult( /** Pending queued items in submission order. Includes user messages, queued slash commands, and queued model changes; omits internal system items. */ @JsonProperty("items") List items, /** Display text for messages currently in the immediate steering queue (interjections sent during a running turn). */ - @JsonProperty("steeringMessages") List steeringMessages + @JsonProperty("steeringMessages") List steeringMessages, + /** How many leading entries of `steeringMessages` have already been folded into the running turn (and so have an emitted `user.message`), as opposed to still waiting for one. Absent for hosts that do not distinguish the two. */ + @JsonProperty("inFlightSteeringCount") Long inFlightSteeringCount ) { } 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 index a4333a61ab..77f580b862 100644 --- 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 @@ -36,6 +36,10 @@ public final class TokenAuthInfo extends AuthInfo { @JsonProperty("token") private String token; + /** Opaque native GitHub credential registration backing this token identity, when applicable. */ + @JsonProperty("registrationId") + private String registrationId; + /** 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; @@ -46,6 +50,9 @@ public final class TokenAuthInfo extends AuthInfo { public String getToken() { return token; } public void setToken(String token) { this.token = token; } + public String getRegistrationId() { return registrationId; } + public void setRegistrationId(String registrationId) { this.registrationId = registrationId; } + 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/TokenProviderAuthInfo.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/TokenProviderAuthInfo.java new file mode 100644 index 0000000000..6bdb811e2b --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/TokenProviderAuthInfo.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 backed by an SDK GitHub token callback. It carries routing metadata but never a plaintext token. + * + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class TokenProviderAuthInfo extends AuthInfo { + + @JsonProperty("type") + private final String type = "token-provider"; + + @Override + public String getType() { return type; } + + /** Authentication host. */ + @JsonProperty("host") + private String host; + + /** Opaque SDK callback registration identifier. */ + @JsonProperty("registrationId") + private String registrationId; + + /** Snapshot of the authenticated user's Copilot subscription info, if known. */ + @JsonProperty("copilotUser") + private CopilotUserResponse copilotUser; + + public String getHost() { return host; } + public void setHost(String host) { this.host = host; } + + public String getRegistrationId() { return registrationId; } + public void setRegistrationId(String registrationId) { this.registrationId = registrationId; } + + 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 b17b6f55b3..c931069940 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.81-6", + "@github/copilot": "^1.0.81-10", "koffi": "^3.1.0", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" @@ -658,8 +658,8 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.81-6", - "integrity": "sha512-hT29nRkf0EJE3N6lqeLOPszbdEyALZ+fjYG9zKX5a3L5r+o+m4/KF+8l2gn2yORNqOzwUYNj2vnVzKqeYYNLGg==", + "version": "1.0.81-10", + "integrity": "sha512-Ac99EvN16s4hKRhJLSEn1HMNaZ6MD8BzIey1zzJNBQy1/yP4PQDZ2CWitEq+XQQEi+6SsqeJRqXOKiWk1EyK7g==", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "detect-libc": "^2.1.2" @@ -668,19 +668,19 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.81-6", - "@github/copilot-darwin-x64": "1.0.81-6", - "@github/copilot-linux-arm64": "1.0.81-6", - "@github/copilot-linux-x64": "1.0.81-6", - "@github/copilot-linuxmusl-arm64": "1.0.81-6", - "@github/copilot-linuxmusl-x64": "1.0.81-6", - "@github/copilot-win32-arm64": "1.0.81-6", - "@github/copilot-win32-x64": "1.0.81-6" + "@github/copilot-darwin-arm64": "1.0.81-10", + "@github/copilot-darwin-x64": "1.0.81-10", + "@github/copilot-linux-arm64": "1.0.81-10", + "@github/copilot-linux-x64": "1.0.81-10", + "@github/copilot-linuxmusl-arm64": "1.0.81-10", + "@github/copilot-linuxmusl-x64": "1.0.81-10", + "@github/copilot-win32-arm64": "1.0.81-10", + "@github/copilot-win32-x64": "1.0.81-10" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.81-6", - "integrity": "sha512-nALa4e8Jc/g5ltIHrpHBHByJ5rlgzoZFylZIrkQY+B9vr3L57d5F6fOiTbf/OF9blFQX7artWRE1K0TmowGNCA==", + "version": "1.0.81-10", + "integrity": "sha512-s90Av0iwjTSU6Gky8T9wI1PJdlfbdUcPAVgKDtimaOiAwcdLG4fKTpGxrk96KJrnOHHK3x9SiXsw/pW0ThAH/A==", "cpu": [ "arm64" ], @@ -694,8 +694,8 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.81-6", - "integrity": "sha512-K+bp799DejrsmxMNyaFAmKo4xnLJXBb8hkv9N8OCQukmTSoRpfqhv2oTDfgVFadwllt+py/FIdxKTZQYvPGGGw==", + "version": "1.0.81-10", + "integrity": "sha512-8RnPI4J311oJQ0GPB6JxuLJq4JNY/KF9ZIIQm8KpxXBY6d+6fmmAsMDEk7OiF/Asl2I7+LTi+qU2ZVhP7FYhbg==", "cpu": [ "x64" ], @@ -709,8 +709,8 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.81-6", - "integrity": "sha512-aEpnfTTjOxpesFo9jqk/phZUivOhNHbdBRfBrS2NiCPrQZFBYUC4wRVo/Xo2PMMQ4J07b6fU7JJQPoUUkKy5Wg==", + "version": "1.0.81-10", + "integrity": "sha512-2UtK5CBrE6ZVSIzU2KHeIgO8N7056axjbF2lE6WuK+H+oJJ4v3w5eQkalqGzRHhkaPfCW4kT1lDMhZFW+XbLjA==", "cpu": [ "arm64" ], @@ -724,8 +724,8 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.81-6", - "integrity": "sha512-NFqonFfJCyA7d3bNoYeLWUQ69zelPr9TTnLpAHCi3scFZqbEvMBDFxW2XsKWwfYuuR9XzfU7/tgOUgq3gmL5aA==", + "version": "1.0.81-10", + "integrity": "sha512-61+KAfo1TBARrBfss3w4dfmRVSf0PiFg0c9JNuT9HjoNnytl7maJBPEgUvI4YBcxScNEAlCMXaUUG3Tuuh1g+w==", "cpu": [ "x64" ], @@ -739,8 +739,8 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.81-6", - "integrity": "sha512-EE99DFTAgTq6eOFDiiv+OUROD2pDQIrzyyJEfUS9K8JanwNc+Py8vTxrJ0yK0slpJ+Fue5uDRno6c9ys8OM59g==", + "version": "1.0.81-10", + "integrity": "sha512-CR6KRPCFoGkaD8I2an1FyrT5avF1U5aTbwW2sYCP7w1KExYFknxEL8ES6BkFuPEA7YcjmLa0SOq26Z+TgIVHSg==", "cpu": [ "arm64" ], @@ -754,8 +754,8 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.81-6", - "integrity": "sha512-90HRKx25EjhlQNOCCdbiC0Ck0fSKyp8XUxUoCvuNdoigdUP54ZGS07dkyJiJq9KZaKilxZBSpXiNt8t5ETA2Sg==", + "version": "1.0.81-10", + "integrity": "sha512-fvZfyEOfRkvUDPXY6UUjAqV8Mkf08PQV+jgtiAFUryuas5VP9cYaAmQSmNpzNMNi3kSX/ycUJe7oc3zXZ8ylog==", "cpu": [ "x64" ], @@ -769,8 +769,8 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.81-6", - "integrity": "sha512-1dRSHF/7PFzB+AGORg8BJh2n1+N7+sIJDLqozrC9INWFp1t6ercptIXgJTF/V7UZVGQLO4LBBK1HH/QhzUmrfA==", + "version": "1.0.81-10", + "integrity": "sha512-n30PPBgCT4Iq9MgH6is6L3eUEE+sF6xB2fb+dGsclj5j/hCkT7+ef0j8YcAGipsvGfzGAuywIsWlvF7fzYsOKQ==", "cpu": [ "arm64" ], @@ -784,8 +784,8 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.81-6", - "integrity": "sha512-lIbN1mk6Rm9bWrWU4/UfrC5OCga7XcBi2LBz5roDnNcuG8mKEevDcNOtbEYz/TaJg+WBMoTbGfXBVd1hGy2DTA==", + "version": "1.0.81-10", + "integrity": "sha512-lb8kvhrXwGCN3LeRDQfLHsUp+F43XvPYznaYK1sPtK1kFGa4/kL690tasoSEvzu8ZKoTY6kZ6YmDbUZgqOislw==", "cpu": [ "x64" ], diff --git a/nodejs/package.json b/nodejs/package.json index 1d41026534..de507419fe 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -56,7 +56,7 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.81-6", + "@github/copilot": "^1.0.81-10", "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 62199ea95a..2b055e025b 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.81-6", + "@github/copilot": "^1.0.81-10", "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 0174e476bf..65b7c3701a 100644 --- a/nodejs/src/generated/rpc.ts +++ b/nodejs/src/generated/rpc.ts @@ -28,6 +28,7 @@ export type AuthInfo = | HMACAuthInfo | EnvAuthInfo | TokenAuthInfo + | TokenProviderAuthInfo | CopilotApiTokenAuthInfo | UserAuthInfo | GhCliAuthInfo @@ -263,6 +264,8 @@ export type AuthInfoType = | "api-key" /** Authentication from a GitHub token. */ | "token" + /** Authentication from an SDK GitHub token callback. */ + | "token-provider" /** Authentication from a Copilot API token. */ | "copilot-api-token"; /** @@ -834,9 +837,6 @@ export type DebugCollectLogsResultKind = | "archive" /** A directory containing redacted files was written. */ | "directory"; - -/** @experimental */ -export type DisableBypassPermissionsMode = "disable"; /** * Persisted extension discovery source * @@ -1182,6 +1182,50 @@ export type FilterMapping = [k: string]: ContentFilterMode; } | ContentFilterMode; +/** + * Why the runtime is requesting a GitHub credential. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "GitHubTokenAcquireReason". + */ +/** @experimental */ +export type GitHubTokenAcquireReason = + /** The runtime is acquiring the registration's first credential. */ + | "initial" + /** The runtime is replacing a credential that is approaching expiry. */ + | "refresh"; +/** + * SDK host response to a GitHub credential request. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "GitHubTokenAcquireResult". + */ +/** @experimental */ +export type GitHubTokenAcquireResult = + | { + /** + * GitHub access token acquired by the SDK host. + */ + accessToken: string; + /** + * OAuth token type. Defaults to bearer when omitted. + */ + tokenType?: string; + /** + * Remaining token lifetime in seconds when callback execution completes. It must exceed the one-hour preflight refresh threshold. + */ + expiresIn: number; + /** + * GitHub credential response variant discriminator. + */ + kind: "token"; + } + | { + /** + * GitHub credential response variant discriminator. + */ + kind: "cancelled"; + }; /** * Optional compaction parameters. * @@ -1843,7 +1887,7 @@ export type McpOauthPendingRequestResponse = */ accessToken: string; /** - * OAuth token type. Defaults to Bearer when omitted. + * OAuth token type. Defaults to bearer when omitted. */ tokenType?: string; /** @@ -2828,6 +2872,29 @@ export type RemoteSessionMetadataTaskType = | "cca" /** CLI remote task. */ | "cli"; +/** + * Origin of the sandbox choice supplied by an internal client. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SandboxConfigSource". + */ +/** @experimental */ +/** @internal */ +export type SandboxConfigSource = + /** The client applied the default because no sandbox preference was configured. */ + | "never_configured" + /** The user's persisted settings enabled the sandbox. */ + | "user_enabled" + /** The user's persisted settings disabled the sandbox. */ + | "user_disabled" + /** A command-line flag selected the sandbox state for this session. */ + | "session_flag" + /** The user disabled the sandbox for the current session. */ + | "session_disabled" + /** The client disabled the sandbox because the host cannot enforce it. */ + | "unsupported_host" + /** A repository policy selected the sandbox state. */ + | "repository_policy"; /** * Current authentication information, or null when no authentication is active. * @@ -3241,6 +3308,21 @@ export type SessionsOpenProgressStatus = | "in-progress" /** The step has completed successfully. */ | "complete"; +/** + * Authentication credentials accepted by session.gitHubAuth.setCredentials. Session-owned token-provider identities cannot be installed through this method. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SettableAuthInfo". + */ +/** @experimental */ +export type SettableAuthInfo = + | HMACAuthInfo + | EnvAuthInfo + | SettableTokenAuthInfo + | CopilotApiTokenAuthInfo + | UserAuthInfo + | GhCliAuthInfo + | ApiKeyAuthInfo; /** * Rust-owned settings predicates exposed across the SDK boundary. Raw feature-flag names are intentionally not part of the contract. * @@ -4181,6 +4263,32 @@ export interface TokenAuthInfo { * The token value itself. Treat as a secret. */ token: string; + /** + * Opaque native GitHub credential registration backing this token identity, when applicable. + */ + registrationId?: string; + copilotUser?: CopilotUserResponse; +} +/** + * Authentication-info variant backed by an SDK GitHub token callback. It carries routing metadata but never a plaintext token. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "TokenProviderAuthInfo". + */ +/** @experimental */ +export interface TokenProviderAuthInfo { + /** + * SDK callback-backed GitHub token authentication. + */ + type: "token-provider"; + /** + * Authentication host. + */ + host: string; + /** + * Opaque SDK callback registration identifier. + */ + registrationId: string; copilotUser?: CopilotUserResponse; } /** @@ -4831,6 +4939,10 @@ export interface AuthIdentity { * Name of the environment variable that supplied the credential, when applicable */ envVar?: string; + /** + * Opaque SDK GitHub credential registration backing this identity. Routing metadata only; never a credential. + */ + registrationId?: string; copilotUser?: CopilotUserResponse; } /** @@ -6199,6 +6311,32 @@ export interface ConfigureSessionExtensionsParams { */ controller?: OpaqueInProcessValue; } +/** + * Identity of the integrating host, declared once on the `server.connect` handshake so telemetry from this connection is attributed to a single, consistent surface. All fields are optional; omit them to keep the default attribution. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ConnectClientInfo". + */ +/** @experimental */ +/** @internal */ +export interface ConnectClientInfo { + /** + * Name of the host editor, e.g. `"vscode"`. + */ + editorName?: string; + /** + * Version of the host editor, e.g. `"1.124.2"`. Ignored unless it looks like a version string. + */ + editorVersion?: string; + /** + * Name of the Copilot extension within the host, e.g. `"copilot-chat"`. + */ + extensionName?: string; + /** + * Version of the Copilot extension within the host, e.g. `"0.54.0"`. Ignored unless it looks like a version string. + */ + extensionVersion?: string; +} /** * Metadata for a connected remote session. * @@ -6293,6 +6431,7 @@ export interface ConnectRequest { * Opt this connection in to GitHub telemetry forwarding for its lifetime. When set, the runtime forwards every internal telemetry event it emits — across all sessions, plus sessionless events — to this connection over the `gitHubTelemetry.event` notification. Regular events are also written to the runtime's normal GitHub/CTS path (dual-write); host-only compatibility events are forward-only and intentionally skip that path. Intended for first-party hosts that re-emit the events into their own telemetry stores. Both unrestricted and restricted events are forwarded, each tagged with a `restricted` discriminator; a backstop drops restricted events when restricted telemetry is disabled — using the process-global gate for ordinary events and an explicit session-scoped decision for host-only events. */ enableGitHubTelemetryForwarding?: boolean; + clientInfo?: ConnectClientInfo; /** * Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN */ @@ -8304,6 +8443,28 @@ export interface GitHubTelemetryNotification { restricted: boolean; event: GitHubTelemetryEvent; } +/** + * Asks the SDK client to acquire a GitHub access token from an opaque callback registration. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "GitHubTokenAcquireRequest". + */ +/** @experimental */ +export interface GitHubTokenAcquireRequest { + /** + * Opaque identifier generated by the SDK for this callback registration. + */ + registrationId: string; + /** + * Effective GitHub host for which the callback must return a token. + */ + host: string; + /** + * Session receiving the token. Absent only before a cloud session has been assigned its id. + */ + sessionId?: string; + reason: GitHubTokenAcquireReason; +} /** * Pending external tool call request ID, with the tool result or an error describing why it failed. * @@ -8728,6 +8889,10 @@ export interface InstalledPlugin { * Per-plugin source fingerprint (a SHA-256 hash of the plugin's catalog source spec plus its resolved source subtree — NOT a Git commit SHA) captured at marketplace install/update time. Auto-update compares it against the freshly recomputed fingerprint to detect a content change that does not bump the version. Absent for pre-existing installs and for direct (non-marketplace) installs. */ source_sha?: string; + /** + * Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key. + */ + installed_from?: string; } /** * Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or full commit SHA, and optional subpath. @@ -8832,6 +8997,10 @@ export interface InstalledPluginInfo { * Whether the plugin is currently enabled for new sessions */ enabled: boolean; + /** + * Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — a plugin belonging to a directory/local marketplace, which is loaded from its real directory on every pass instead of a copy under the installed-plugins cache. Its presence is what marks a listed plugin as live: such a plugin is always present on disk, so `enabled` is its only meaningful state and it is never "not installed". + */ + installedFrom?: string; } /** * Canonical file or directory where custom instructions can be discovered or created, with location, kind, preference, and project path. @@ -11851,6 +12020,15 @@ export interface Model { supportedContextTiers?: string[]; modelPickerCategory?: ModelPickerCategory; modelPickerPriceCategory?: ModelPickerPriceCategory; + warningText?: ModelWarningText; + /** + * Informational notices the service published for this model, such as an upcoming change or a recommended alternative. Present only when the service published at least one notice. Hosts should surface these without implying anything is wrong with the model. + */ + infoMessages?: ModelMessage[]; + /** + * Warnings the service published for this model, such as a deprecated client version. Present only when the service published at least one warning. The model remains usable; hosts should surface these as advisory rather than blocking. + */ + warningMessages?: ModelMessage[]; } /** * Model capabilities and limits @@ -12073,6 +12251,36 @@ export interface ModelBillingPromo { */ message?: string; } +/** + * Service-published warning text that hosts should display when presenting a model. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ModelWarningText". + */ +/** @experimental */ +export interface ModelWarningText { + /** + * Data-retention warning for the model. The text may contain Markdown links and should be rendered as Markdown when supported. + */ + dataRetention?: string; +} +/** + * A service-published message about a model, carrying a stable machine-readable code alongside human-readable text. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ModelMessage". + */ +/** @experimental */ +export interface ModelMessage { + /** + * Stable machine-readable identifier for the message, such as `client_version_deprecated`. Hosts can key custom presentation off this; unrecognized codes should fall back to displaying `message`. + */ + code: string; + /** + * Human-readable message text intended for display to the user. + */ + message: string; +} /** * Managed, repository, and CLI model overrides to overlay onto the session at startup. * @@ -13584,7 +13792,7 @@ export interface PermissionLocationResolveResult { /** @experimental */ export interface PermissionPathsAddParams { /** - * Directory to add to the allow-list. The runtime resolves and validates the path before adding. + * Directory to add to the allow-list. The runtime resolves and validates the path before adding, then loads conventional `.github/skills/` and `.github/agents/` definitions under it when their subsystem gates are enabled. Adding the directory is therefore also a trust decision for configuration stored there. */ path: string; } @@ -13627,7 +13835,7 @@ export interface PermissionPathsConfig { */ unrestricted?: boolean; /** - * Additional directories to allow tool access to (in addition to the session's working directory). When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion). + * Additional directories to allow tool access to (in addition to the session's working directory). Conventional `.github/skills/` and `.github/agents/` definitions under them also join the session catalogs when their subsystem gates are enabled, so supplying a directory is a trust decision for configuration stored there. When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion). */ additionalDirectories?: string[]; /** @@ -15550,6 +15758,10 @@ export interface QueuePendingItemsResult { * Display text for messages currently in the immediate steering queue (interjections sent during a running turn). */ steeringMessages: string[]; + /** + * How many leading entries of `steeringMessages` have already been folded into the running turn (and so have an emitted `user.message`), as opposed to still waiting for one. Absent for hosts that do not distinguish the two. + */ + inFlightSteeringCount?: number; } /** * Parameters for removing a queued item by stable id. @@ -16140,7 +16352,7 @@ export interface SandboxConfig { addCurrentWorkingDirectory?: boolean; auth?: SandboxConfigAuth; /** - * 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). + * 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 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; } @@ -17462,6 +17674,10 @@ export interface SessionInstalledPlugin { * Per-plugin source fingerprint (a SHA-256 hash of the plugin's catalog source spec plus its resolved source subtree — NOT a Git commit SHA) captured at marketplace install/update time. Auto-update compares it against the freshly recomputed fingerprint to detect a content change that does not bump the version. Absent for pre-existing installs and for direct (non-marketplace) installs. */ source_sha?: string; + /** + * Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key. + */ + installed_from?: string; } /** * Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or full commit SHA, and optional subpath. @@ -17665,7 +17881,10 @@ export interface SessionLoadDeferredRepoHooksResult { */ /** @experimental */ export interface SessionManagedPermissions { - disableBypassPermissionsMode?: DisableBypassPermissionsMode; + /** + * When set to `disable`, prevents bypass/allow-all permission modes. `allow-auto-only` blocks full allow-all but permits advisory auto-approval. Any other value is accepted rather than failing the session, but is enforced as `disable`: the key is only present to restrict something, so a mode this runtime cannot interpret fails closed to the most restrictive one it knows. Omit the key entirely to impose no restriction. + */ + disableBypassPermissionsMode?: string; /** * Permission rules that block matching operations. Deny has highest precedence. */ @@ -17876,7 +18095,7 @@ export interface SessionOpenOptions { */ workingDirectory?: string; /** - * Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied on both session creation and resume, and is not persisted: a resumed session that omits this option does not retain previously supplied directories (re-supply them, exactly as the CLI re-passes `--add-dir`). + * Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Conventional `.github/skills/` and `.github/agents/` definitions under each directory also join the session's project catalogs when their existing subsystem gates are enabled: added-root skills require both `enableConfigDiscovery` and effective `enableSkills`; added-root agents require `enableConfigDiscovery`. Supplying a directory therefore activates configuration from it and should be treated as a trust decision. Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied during session creation and cold resume and is not persisted, so a cold resume must re-supply the directories. */ additionalDirectories?: string[]; workingDirectoryContext?: SessionContext; @@ -17931,6 +18150,12 @@ export interface SessionOpenOptions { */ shellProcessFlags?: string[]; sandboxConfig?: SandboxConfig; + /** + * Origin of the sandbox choice. The runtime uses this only for internal telemetry provenance; managed policy is derived independently. + * + * @internal + */ + sandboxConfigSource?: SandboxConfigSource; /** * Whether interactive shell sessions are logged. */ @@ -17948,6 +18173,10 @@ export interface SessionOpenOptions { * Additional directories to search for skills. */ skillDirectories?: string[]; + /** + * Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available. + */ + includedBuiltinSkills?: string[]; /** * Skill IDs disabled for this session. */ @@ -18514,7 +18743,29 @@ export interface SessionsEnrichMetadataRequest { */ /** @experimental */ export interface SessionSetCredentialsParams { - credentials?: AuthInfo; + credentials?: SettableAuthInfo; +} +/** + * Token authentication accepted by session.gitHubAuth.setCredentials. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SettableTokenAuthInfo". + */ +/** @experimental */ +export interface SettableTokenAuthInfo { + /** + * SDK-side token authentication; the host configured the token directly via the SDK. + */ + type: "token"; + /** + * Authentication host. + */ + host: string; + /** + * The token value itself. Treat as a secret. + */ + token: string; + copilotUser?: CopilotUserResponse; } /** * Indicates whether the credential update succeeded. @@ -19321,6 +19572,12 @@ export interface SessionUpdateOptionsParams { */ shellProcessFlags?: string[]; sandboxConfig?: SandboxConfig; + /** + * Origin of the sandbox choice. The runtime uses this only for internal telemetry provenance; managed policy is derived independently. + * + * @internal + */ + sandboxConfigSource?: SandboxConfigSource; /** * Whether interactive shell sessions are logged. */ @@ -19334,6 +19591,10 @@ export interface SessionUpdateOptionsParams { * Additional directories to search for skills. */ skillDirectories?: string[]; + /** + * Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available. Set to null to remove the allowlist restriction. + */ + includedBuiltinSkills?: string[] | null; /** * Skill IDs that should be excluded from this session. */ @@ -24645,7 +24906,7 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin list: async (): Promise => connection.sendRequest("session.permissions.paths.list", { sessionId }), /** - * Adds a directory to the session's allow-list. + * Adds a directory to the session's allow-list and activates conventional skill and agent definitions under it. * * @param params Directory path to add to the session's allowed directories. * @@ -25801,11 +26062,25 @@ export interface GitHubTelemetryHandler { event(params: GitHubTelemetryNotification): Promise; } +/** Handler for `gitHubToken` client global API methods. */ +/** @experimental */ +export interface GitHubTokenHandler { + /** + * Asks the SDK client to mint a GitHub access token for a session whose configuration supplied a GitHub token provider. The runtime acquires the initial token during bootstrap and refreshes it during expiry preflight when one hour or less remains. + * + * @param params Asks the SDK client to acquire a GitHub access token from an opaque callback registration. + * + * @returns SDK host response to a GitHub credential request. + */ + getToken(params: GitHubTokenAcquireRequest): Promise; +} + /** All client global API handler groups. */ export interface ClientGlobalApiHandlers { extensionLaunchProvider?: ExtensionLaunchProviderHandler; llmInference?: LlmInferenceHandler; gitHubTelemetry?: GitHubTelemetryHandler; + gitHubToken?: GitHubTokenHandler; } /** @@ -25839,4 +26114,9 @@ export function registerClientGlobalApiHandlers( if (!handler) return; await handler.event(params); }); + connection.onRequest("gitHubToken.getToken", async (params: GitHubTokenAcquireRequest) => { + const handler = handlers.gitHubToken; + if (!handler) throw new Error("No gitHubToken client-global handler registered"); + return handler.getToken(params); + }); } diff --git a/nodejs/src/generated/session-events.ts b/nodejs/src/generated/session-events.ts index fdb82ab14e..3ec55aacda 100644 --- a/nodejs/src/generated/session-events.ts +++ b/nodejs/src/generated/session-events.ts @@ -56,6 +56,7 @@ export type SessionEvent = | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent + | ModelCallFinishedEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent @@ -434,6 +435,18 @@ export type ModelCallFailureTransport = | "http" /** WebSocket transport. */ | "websocket"; +/** + * Final outcome of one logical model dispatch after response acceptance processing + */ +export type ModelCallFinishedOutcome = + /** The provider response was accepted for continued agent processing. */ + | "success" + /** The dispatch ended with a provider or transport error. */ + | "error" + /** The dispatch was cancelled before an accepted response was produced. */ + | "cancelled" + /** The provider response was rejected during post-response acceptance processing. */ + | "rejected"; /** * Finite reason code describing why the current turn was aborted */ @@ -855,7 +868,9 @@ export type ManagedSettingsEnforcedEscalation = /** Unrestricted filesystem access outside the session's allowed directories. */ | "unrestricted_paths" /** Unrestricted URL fetch access. */ - | "unrestricted_urls"; + | "unrestricted_urls" + /** A server-wide MCP "Always Allow" (or `--allow-tool `) blanket that would auto-approve every tool from an MCP server. Capped to per-tool approval; each tool still prompts. */ + | "server_wide_mcp_approval"; /** * Exit plan mode action */ @@ -3849,6 +3864,7 @@ export interface AssistantMessageData { * Generation phase for phased-output models (e.g., thinking vs. response phases) */ phase?: string; + reasoningBlocks?: AssistantMessageReasoningBlocks; /** * Opaque/encrypted extended thinking data from Anthropic models. Session-bound and stripped on resume. */ @@ -4011,6 +4027,20 @@ export interface CitationLocationBlock { */ type: "block"; } +/** + * Neutral provider-tagged reasoning content blocks preserved verbatim for round-tripping + */ +/** @experimental */ +export interface AssistantMessageReasoningBlocks { + /** + * Provider-native reasoning content blocks (e.g. Anthropic `thinking` / `redacted_thinking`) preserved verbatim, in order. A single response can carry several, each signed over the content preceding it, so dropping or reordering any of them invalidates the rest. + */ + blocks?: JsonValue[]; + /** + * Model provider that produced these reasoning blocks. + */ + provider: string; +} /** * Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping */ @@ -4390,6 +4420,10 @@ export interface AssistantUsageData { * Number of output tokens produced */ outputTokens?: number; + /** + * Time to first observable model output in milliseconds. Includes text, reasoning, and tool-call output; only available for streaming requests that produce observable output. + */ + outputTtftMs?: number; /** * @deprecated * Parent tool call ID when this usage originates from a sub-agent @@ -4706,6 +4740,62 @@ export interface ModelCallFailureRequestFingerprint { */ toolResultMessageCount: number; } +/** + * Session event "model.call_finished". Final lifecycle outcome for one logical model dispatch. A logical dispatch may include internal reconnect or fallback work, so event count is not provider HTTP-request count. + */ +export interface ModelCallFinishedEvent { + /** + * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events. + */ + agentId?: string; + data: ModelCallFinishedData; + /** + * Always true for events that are transient and not persisted to the session event log on disk. + */ + ephemeral: true; + /** + * Unique event identifier (UUID v4), generated when the event is emitted + */ + id: string; + /** + * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event. + */ + parentId: string | null; + /** + * ISO 8601 timestamp when the event was created + */ + timestamp: string; + /** + * Type discriminator. Always "model.call_finished". + */ + type: "model.call_finished"; +} +/** + * Final lifecycle outcome for one logical model dispatch. A logical dispatch may include internal reconnect or fallback work, so event count is not provider HTTP-request count. + */ +export interface ModelCallFinishedData { + /** + * Whether an accepted successful response requested the exact name and command semantics of a built-in file edit tool, including an external tool explicitly replacing that built-in name. Absent when the logical dispatch did not produce an accepted response. + */ + containsBuiltInFileEditRequest?: boolean; + /** + * Monotonic elapsed time spent in the logical model dispatch, including any internal transport reconnect or fallback and excluding orchestrator retry backoff, tool execution, confirmations, and post-response processing + */ + dispatchDurationMs: number; + /** + * Version of the built-in file-edit semantic classifier used for this event + */ + editClassifierVersion: number; + /** + * Identifier of the user interaction that owns the model dispatch, matching assistant.turn_start.interactionId when available + */ + interactionId?: string; + outcome: ModelCallFinishedOutcome; + /** + * Agent-loop iteration within the interaction that initiated the model dispatch + */ + turnId: string; +} /** * Session event "abort". Turn abort information including the reason for termination */ @@ -5789,10 +5879,30 @@ export interface SubagentCompletedData { * Whether the sub-agent was torn down by cancellation - its own abort, or an ancestor being killed - instead of finishing its work. Cancellation is not a failure, so the run still reports completion; this distinguishes a torn-down sub-agent from one that ran to the end. */ cancelled?: boolean; + /** + * Whether the first model actually dispatched matched the user's configured preference + */ + configuredModelMatchesActual?: boolean; + /** + * Concrete model the user configured for this sub-agent via `/subagents`, when present + */ + configuredModelPreference?: string; /** * Wall-clock duration of the sub-agent execution in milliseconds */ durationMs?: number; + /** + * Whether the explicit task-call model matched the user's configured preference + */ + explicitModelMatchesPreference?: boolean; + /** + * Explicit model supplied by the parent agent on the task call, when present + */ + explicitModelOverride?: string; + /** + * First model for which the sub-agent started an inference request, when one was dispatched + */ + firstDispatchedModel?: string; /** * Model used by the sub-agent */ @@ -5852,6 +5962,14 @@ export interface SubagentFailedData { * Internal name of the sub-agent */ agentName: string; + /** + * Whether the first model actually dispatched matched the user's configured preference + */ + configuredModelMatchesActual?: boolean; + /** + * Concrete model the user configured for this sub-agent via `/subagents`, when present + */ + configuredModelPreference?: string; /** * Wall-clock duration of the sub-agent execution in milliseconds */ @@ -5860,6 +5978,18 @@ export interface SubagentFailedData { * Error message describing why the sub-agent failed */ error: string; + /** + * Whether the explicit task-call model matched the user's configured preference + */ + explicitModelMatchesPreference?: boolean; + /** + * Explicit model supplied by the parent agent on the task call, when present + */ + explicitModelOverride?: string; + /** + * First model for which the sub-agent started an inference request, when one was dispatched + */ + firstDispatchedModel?: string; /** * Model selected for the sub-agent, when known */ @@ -7172,6 +7302,10 @@ export interface PermissionPromptRequestMcp { * @experimental */ assistedApproval?: PermissionAssistedApproval; + /** + * Whether the host may offer a server-wide "approve all tools from this server" blanket. Absent is treated as true; the runtime sends false when managed policy disables bypass-permissions mode, which forbids the server-wide escalation while still allowing per-tool approval. + */ + canOfferServerWideApproval?: boolean; /** * Prompt kind discriminator */ @@ -9097,6 +9231,10 @@ export interface ManagedSettingsResolvedData { * Whether at least two managed sources supplied permission allowlists, so enforcement intersects them and the flattened settings payload omits `permissions.allow`. */ permissionsAllowIntersected?: boolean; + /** + * Whether the effective sandbox policy forces the sandbox on *only* because managed policy could not be determined, rather than because the policy requires it. Lets clients tell a user whose `--no-sandbox` was overridden that the sandbox stayed on as a fail-closed fallback, instead of attributing it to an administrator who set no such policy. + */ + sandboxEnabledByUndeterminedPolicy?: boolean; /** * Whether the server (account/org) managed-settings layer was present */ diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py index d7c86509e8..ca782bd363 100644 --- a/python/copilot/generated/rpc.py +++ b/python/copilot/generated/rpc.py @@ -271,6 +271,7 @@ class AuthInfoType(Enum): GH_CLI = "gh-cli" HMAC = "hmac" TOKEN = "token" + TOKEN_PROVIDER = "token-provider" USER = "user" # Experimental: this type is part of an experimental API and may change or be removed. @@ -1752,59 +1753,68 @@ def to_dict(self) -> dict: 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 ConnectRemoteSessionParams: - """Remote session connection parameters.""" +class _ConnectClientInfo: + """Identity of the integrating host, declared once on the `server.connect` handshake so + telemetry from this connection is attributed to a single, consistent surface. All fields + are optional; omit them to keep the default attribution. - session_id: str - """Session ID to connect to.""" + Identity of the integrating host. Optional; omit it to keep the default attribution. + """ + editor_name: str | None = None + """Name of the host editor, e.g. `"vscode"`.""" + + editor_version: str | None = None + """Version of the host editor, e.g. `"1.124.2"`. Ignored unless it looks like a version + string. + """ + extension_name: str | None = None + """Name of the Copilot extension within the host, e.g. `"copilot-chat"`.""" + + extension_version: str | None = None + """Version of the Copilot extension within the host, e.g. `"0.54.0"`. Ignored unless it + looks like a version string. + """ @staticmethod - def from_dict(obj: Any) -> 'ConnectRemoteSessionParams': + def from_dict(obj: Any) -> '_ConnectClientInfo': assert isinstance(obj, dict) - session_id = from_str(obj.get("sessionId")) - return ConnectRemoteSessionParams(session_id) + editor_name = from_union([from_str, from_none], obj.get("editorName")) + editor_version = from_union([from_str, from_none], obj.get("editorVersion")) + extension_name = from_union([from_str, from_none], obj.get("extensionName")) + extension_version = from_union([from_str, from_none], obj.get("extensionVersion")) + return _ConnectClientInfo(editor_name, editor_version, extension_name, extension_version) def to_dict(self) -> dict: result: dict = {} - result["sessionId"] = from_str(self.session_id) + if self.editor_name is not None: + result["editorName"] = from_union([from_str, from_none], self.editor_name) + if self.editor_version is not None: + result["editorVersion"] = from_union([from_str, from_none], self.editor_version) + if self.extension_name is not None: + result["extensionName"] = from_union([from_str, from_none], self.extension_name) + if self.extension_version is not None: + result["extensionVersion"] = from_union([from_str, from_none], self.extension_version) 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 _ConnectRequest: - """Connection-level opt-ins for the `server.connect` handshake. Transport authentication is - consumed by the native protocol boundary before dispatch. - """ - enable_git_hub_telemetry_forwarding: bool | None = None - """Opt this connection in to GitHub telemetry forwarding for its lifetime. When set, the - runtime forwards every internal telemetry event it emits — across all sessions, plus - sessionless events — to this connection over the `gitHubTelemetry.event` notification. - Regular events are also written to the runtime's normal GitHub/CTS path (dual-write); - host-only compatibility events are forward-only and intentionally skip that path. - Intended for first-party hosts that re-emit the events into their own telemetry stores. - Both unrestricted and restricted events are forwarded, each tagged with a `restricted` - discriminator; a backstop drops restricted events when restricted telemetry is disabled — - using the process-global gate for ordinary events and an explicit session-scoped decision - for host-only events. - """ - token: str | None = None - """Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN""" +class ConnectRemoteSessionParams: + """Remote session connection parameters.""" + + session_id: str + """Session ID to connect to.""" @staticmethod - def from_dict(obj: Any) -> '_ConnectRequest': + def from_dict(obj: Any) -> 'ConnectRemoteSessionParams': assert isinstance(obj, dict) - enable_git_hub_telemetry_forwarding = from_union([from_bool, from_none], obj.get("enableGitHubTelemetryForwarding")) - token = from_union([from_str, from_none], obj.get("token")) - return _ConnectRequest(enable_git_hub_telemetry_forwarding, token) + session_id = from_str(obj.get("sessionId")) + return ConnectRemoteSessionParams(session_id) def to_dict(self) -> dict: result: dict = {} - if self.enable_git_hub_telemetry_forwarding is not None: - result["enableGitHubTelemetryForwarding"] = from_union([from_bool, from_none], self.enable_git_hub_telemetry_forwarding) - if self.token is not None: - result["token"] = from_union([from_str, from_none], self.token) + result["sessionId"] = from_str(self.session_id) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -2396,12 +2406,6 @@ def to_dict(self) -> dict: result["path"] = from_union([from_str, from_none], self.path) return result -# Experimental: this type is part of an experimental API and may change or be removed. -class DisableBypassPermissionsMode(Enum): - """When set to `disable`, prevents bypass/allow-all permission modes.""" - - DISABLE = "disable" - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class DiscoveredExtensionPlugin: @@ -3578,6 +3582,16 @@ def to_dict(self) -> dict: result["is_staff"] = from_union([from_bool, from_none], self.is_staff) return result +class GitHubTokenAcquireReason(Enum): + """Why the runtime is requesting a GitHub credential.""" + + INITIAL = "initial" + REFRESH = "refresh" + +class GitHubTokenAcquireResultKind(Enum): + CANCELLED = "cancelled" + TOKEN = "token" + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class HandlePendingToolCallResult: @@ -5474,10 +5488,6 @@ def to_dict(self) -> dict: result["serverName"] = from_union([from_str, from_none], self.server_name) return result -class MCPOauthPendingRequestResponseKind(Enum): - CANCELLED = "cancelled" - TOKEN = "token" - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPOauthHandlePendingResult: @@ -6698,6 +6708,33 @@ def to_dict(self) -> dict: result["supported_media_types"] = from_list(from_str, self.supported_media_types) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class ModelMessage: + """A service-published message about a model, carrying a stable machine-readable code + alongside human-readable text. + """ + code: str + """Stable machine-readable identifier for the message, such as `client_version_deprecated`. + Hosts can key custom presentation off this; unrecognized codes should fall back to + displaying `message`. + """ + message: str + """Human-readable message text intended for display to the user.""" + + @staticmethod + def from_dict(obj: Any) -> 'ModelMessage': + assert isinstance(obj, dict) + code = from_str(obj.get("code")) + message = from_str(obj.get("message")) + return ModelMessage(code, message) + + def to_dict(self) -> dict: + result: dict = {} + result["code"] = from_str(self.code) + result["message"] = from_str(self.message) + return result + # 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 @@ -6717,6 +6754,31 @@ class ModelPolicyState(Enum): ENABLED = "enabled" UNCONFIGURED = "unconfigured" +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class ModelWarningText: + """Warning text the service requires hosts to surface for this model. Present only when the + service published at least one warning. + + Service-published warning text that hosts should display when presenting a model. + """ + data_retention: str | None = None + """Data-retention warning for the model. The text may contain Markdown links and should be + rendered as Markdown when supported. + """ + + @staticmethod + def from_dict(obj: Any) -> 'ModelWarningText': + assert isinstance(obj, dict) + data_retention = from_union([from_str, from_none], obj.get("dataRetention")) + return ModelWarningText(data_retention) + + def to_dict(self) -> dict: + result: dict = {} + if self.data_retention is not None: + result["dataRetention"] = from_union([from_str, from_none], self.data_retention) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ModelCapabilitiesOverrideLimitsVision: @@ -7249,7 +7311,9 @@ class PermissionPathsAddParams: path: str """Directory to add to the allow-list. The runtime resolves and validates the path before - adding. + adding, then loads conventional `.github/skills/` and `.github/agents/` definitions under + it when their subsystem gates are enabled. Adding the directory is therefore also a trust + decision for configuration stored there. """ @staticmethod @@ -9560,6 +9624,22 @@ def to_dict(self) -> dict: result["keychainAccess"] = from_union([from_bool, from_none], self.keychain_access) return result +# Experimental: this type is part of an experimental API and may change or be removed. +# Internal: this type is an internal SDK API and is not part of the public surface. +class _SandboxConfigSource(Enum): + """Origin of the sandbox choice supplied by an internal client. + + Origin of the sandbox choice. The runtime uses this only for internal telemetry + provenance; managed policy is derived independently. + """ + NEVER_CONFIGURED = "never_configured" + REPOSITORY_POLICY = "repository_policy" + SESSION_DISABLED = "session_disabled" + SESSION_FLAG = "session_flag" + UNSUPPORTED_HOST = "unsupported_host" + USER_DISABLED = "user_disabled" + USER_ENABLED = "user_enabled" + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ScheduleAddAtRequest: @@ -10863,6 +10943,53 @@ def to_dict(self) -> dict: result["startupPrompts"] = from_list(from_str, self.startup_prompts) return result +# 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. + + 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. + """ + ask: list[str] | None = None + """Permission rules that require explicit human approval.""" + + deny: list[str] | None = None + """Permission rules that block matching operations. Deny has highest precedence.""" + + disable_bypass_permissions_mode: str | None = None + """When set to `disable`, prevents bypass/allow-all permission modes. `allow-auto-only` + blocks full allow-all but permits advisory auto-approval. Any other value is accepted + rather than failing the session, but is enforced as `disable`: the key is only present to + restrict something, so a mode this runtime cannot interpret fails closed to the most + restrictive one it knows. Omit the key entirely to impose no restriction. + """ + + @staticmethod + def from_dict(obj: Any) -> 'SessionManagedPermissions': + assert isinstance(obj, dict) + allow = from_union([lambda x: from_list(from_str, x), from_none], obj.get("allow")) + ask = from_union([lambda x: from_list(from_str, x), from_none], obj.get("ask")) + deny = from_union([lambda x: from_list(from_str, x), from_none], obj.get("deny")) + disable_bypass_permissions_mode = from_union([from_str, from_none], obj.get("disableBypassPermissionsMode")) + return SessionManagedPermissions(allow, ask, deny, disable_bypass_permissions_mode) + + def to_dict(self) -> dict: + result: dict = {} + if self.allow is not None: + result["allow"] = from_union([lambda x: from_list(from_str, x), from_none], self.allow) + if self.ask is not None: + result["ask"] = from_union([lambda x: from_list(from_str, x), from_none], self.ask) + if self.deny is not None: + result["deny"] = from_union([lambda x: from_list(from_str, x), from_none], self.deny) + if self.disable_bypass_permissions_mode is not None: + result["disableBypassPermissionsMode"] = from_union([from_str, from_none], self.disable_bypass_permissions_mode) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionModelListRequest: @@ -11114,12 +11241,21 @@ def to_dict(self) -> dict: result["skipped"] = from_list(from_str, self.skipped) return result +class SettableAuthInfoType(Enum): + API_KEY = "api-key" + COPILOT_API_TOKEN = "copilot-api-token" + ENV = "env" + GH_CLI = "gh-cli" + HMAC = "hmac" + TOKEN = "token" + USER = "user" + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionSetCredentialsParams: """New auth credentials to install on the session. Omit to leave credentials unchanged.""" - credentials: AuthInfo | None = None + credentials: SettableAuthInfo | None = None """The new auth credentials to install on the session. When omitted or `undefined`, the call is a no-op and the session's existing credentials are preserved. The runtime installs the supplied value immediately for outbound model/API requests. When the credential carries a @@ -11134,7 +11270,7 @@ class SessionSetCredentialsParams: @staticmethod def from_dict(obj: Any) -> 'SessionSetCredentialsParams': assert isinstance(obj, dict) - credentials = from_union([_load_AuthInfo, from_none], obj.get("credentials")) + credentials = from_union([_load_SettableAuthInfo, from_none], obj.get("credentials")) return SessionSetCredentialsParams(credentials) def to_dict(self) -> dict: @@ -12228,6 +12364,9 @@ def to_dict(self) -> dict: result["expectedFromSessionId"] = from_union([from_str, from_none], self.expected_from_session_id) return result +class SettableTokenAuthInfoType(Enum): + TOKEN = "token" + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ShellCancelUserRequestedRequest: @@ -13236,8 +13375,8 @@ def to_dict(self) -> dict: result["features"] = from_dict(from_str, self.features) return result -class TokenAuthInfoType(Enum): - TOKEN = "token" +class TokenProviderAuthInfoType(Enum): + TOKEN_PROVIDER = "token-provider" # Experimental: this type is part of an experimental API and may change or be removed. @dataclass @@ -15499,6 +15638,49 @@ def to_dict(self) -> dict: result["origin"] = from_union([lambda x: to_enum(CommandsInvocationOrigin, x), from_none], self.origin) 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 _ConnectRequest: + """Connection-level opt-ins for the `server.connect` handshake. Transport authentication is + consumed by the native protocol boundary before dispatch. + """ + client_info: _ConnectClientInfo | None = None + """Identity of the integrating host. Optional; omit it to keep the default attribution.""" + + enable_git_hub_telemetry_forwarding: bool | None = None + """Opt this connection in to GitHub telemetry forwarding for its lifetime. When set, the + runtime forwards every internal telemetry event it emits — across all sessions, plus + sessionless events — to this connection over the `gitHubTelemetry.event` notification. + Regular events are also written to the runtime's normal GitHub/CTS path (dual-write); + host-only compatibility events are forward-only and intentionally skip that path. + Intended for first-party hosts that re-emit the events into their own telemetry stores. + Both unrestricted and restricted events are forwarded, each tagged with a `restricted` + discriminator; a backstop drops restricted events when restricted telemetry is disabled — + using the process-global gate for ordinary events and an explicit session-scoped decision + for host-only events. + """ + token: str | None = None + """Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN""" + + @staticmethod + def from_dict(obj: Any) -> '_ConnectRequest': + assert isinstance(obj, dict) + client_info = from_union([_ConnectClientInfo.from_dict, from_none], obj.get("clientInfo")) + enable_git_hub_telemetry_forwarding = from_union([from_bool, from_none], obj.get("enableGitHubTelemetryForwarding")) + token = from_union([from_str, from_none], obj.get("token")) + return _ConnectRequest(client_info, enable_git_hub_telemetry_forwarding, token) + + def to_dict(self) -> dict: + result: dict = {} + if self.client_info is not None: + result["clientInfo"] = from_union([lambda x: to_class(_ConnectClientInfo, x), from_none], self.client_info) + if self.enable_git_hub_telemetry_forwarding is not None: + result["enableGitHubTelemetryForwarding"] = from_union([from_bool, from_none], self.enable_git_hub_telemetry_forwarding) + 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 ConnectedRemoteSessionMetadata: @@ -15972,48 +16154,6 @@ def to_dict(self) -> dict: result["outputDirectory"] = from_union([from_str, from_none], self.output_directory) return result -# 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. - - 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. - """ - ask: list[str] | None = None - """Permission rules that require explicit human approval.""" - - deny: list[str] | None = None - """Permission rules that block matching operations. Deny has highest precedence.""" - - disable_bypass_permissions_mode: DisableBypassPermissionsMode | None = None - """When set to `disable`, prevents bypass/allow-all permission modes.""" - - @staticmethod - def from_dict(obj: Any) -> 'SessionManagedPermissions': - assert isinstance(obj, dict) - allow = from_union([lambda x: from_list(from_str, x), from_none], obj.get("allow")) - ask = from_union([lambda x: from_list(from_str, x), from_none], obj.get("ask")) - deny = from_union([lambda x: from_list(from_str, x), from_none], obj.get("deny")) - disable_bypass_permissions_mode = from_union([DisableBypassPermissionsMode, from_none], obj.get("disableBypassPermissionsMode")) - return SessionManagedPermissions(allow, ask, deny, disable_bypass_permissions_mode) - - def to_dict(self) -> dict: - result: dict = {} - if self.allow is not None: - result["allow"] = from_union([lambda x: from_list(from_str, x), from_none], self.allow) - if self.ask is not None: - result["ask"] = from_union([lambda x: from_list(from_str, x), from_none], self.ask) - if self.deny is not None: - result["deny"] = from_union([lambda x: from_list(from_str, x), from_none], self.deny) - if self.disable_bypass_permissions_mode is not None: - result["disableBypassPermissionsMode"] = from_union([lambda x: to_enum(DisableBypassPermissionsMode, x), from_none], self.disable_bypass_permissions_mode) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class DiscoveredExtension: @@ -16996,6 +17136,116 @@ def to_dict(self) -> dict: result["resumeFromRunId"] = from_union([from_str, from_none], self.resume_from_run_id) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class GitHubTokenAcquireRequest: + """Asks the SDK client to acquire a GitHub access token from an opaque callback registration.""" + + host: str + """Effective GitHub host for which the callback must return a token.""" + + reason: GitHubTokenAcquireReason + """Why the runtime is requesting a GitHub credential.""" + + registration_id: str + """Opaque identifier generated by the SDK for this callback registration.""" + + session_id: str | None = None + """Session receiving the token. Absent only before a cloud session has been assigned its id.""" + + @staticmethod + def from_dict(obj: Any) -> 'GitHubTokenAcquireRequest': + assert isinstance(obj, dict) + host = from_str(obj.get("host")) + reason = GitHubTokenAcquireReason(obj.get("reason")) + registration_id = from_str(obj.get("registrationId")) + session_id = from_union([from_str, from_none], obj.get("sessionId")) + return GitHubTokenAcquireRequest(host, reason, registration_id, session_id) + + def to_dict(self) -> dict: + result: dict = {} + result["host"] = from_str(self.host) + result["reason"] = to_enum(GitHubTokenAcquireReason, self.reason) + result["registrationId"] = from_str(self.registration_id) + if self.session_id is not None: + result["sessionId"] = from_union([from_str, from_none], self.session_id) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class GitHubTokenAcquireResult: + """SDK host response to a GitHub credential request.""" + + kind: GitHubTokenAcquireResultKind + """GitHub credential response variant discriminator.""" + + access_token: str | None = None + """GitHub access token acquired by the SDK host.""" + + expires_in: int | None = None + """Remaining token lifetime in seconds when callback execution completes. It must exceed the + one-hour preflight refresh threshold. + """ + token_type: str | None = None + """OAuth token type. Defaults to bearer when omitted.""" + + @staticmethod + def from_dict(obj: Any) -> 'GitHubTokenAcquireResult': + assert isinstance(obj, dict) + kind = GitHubTokenAcquireResultKind(obj.get("kind")) + access_token = from_union([from_str, from_none], obj.get("accessToken")) + expires_in = from_union([from_int, from_none], obj.get("expiresIn")) + token_type = from_union([from_str, from_none], obj.get("tokenType")) + return GitHubTokenAcquireResult(kind, access_token, expires_in, token_type) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(GitHubTokenAcquireResultKind, self.kind) + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) + if self.expires_in is not None: + result["expiresIn"] = from_union([from_int, from_none], self.expires_in) + if self.token_type is not None: + result["tokenType"] = from_union([from_str, from_none], self.token_type) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPOauthPendingRequestResponse: + """Host response to the pending OAuth request.""" + + kind: GitHubTokenAcquireResultKind + """OAuth response variant discriminator.""" + + access_token: str | None = None + """Access token acquired by the SDK host""" + + expires_in: int | None = None + """Token lifetime in seconds, if known.""" + + token_type: str | None = None + """OAuth token type. Defaults to bearer when omitted.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPOauthPendingRequestResponse': + assert isinstance(obj, dict) + kind = GitHubTokenAcquireResultKind(obj.get("kind")) + access_token = from_union([from_str, from_none], obj.get("accessToken")) + expires_in = from_union([from_int, from_none], obj.get("expiresIn")) + token_type = from_union([from_str, from_none], obj.get("tokenType")) + return MCPOauthPendingRequestResponse(kind, access_token, expires_in, token_type) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(GitHubTokenAcquireResultKind, self.kind) + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) + if self.expires_in is not None: + result["expiresIn"] = from_union([from_int, from_none], self.expires_in) + if self.token_type is not None: + result["tokenType"] = from_union([from_str, from_none], self.token_type) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class HistoryCompactResult: @@ -18450,43 +18700,6 @@ def to_dict(self) -> dict: result["reason"] = from_union([from_str, from_none], self.reason) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -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""" - - expires_in: int | None = None - """Token lifetime in seconds, if known.""" - - token_type: str | None = None - """OAuth token type. Defaults to Bearer when omitted.""" - - @staticmethod - def from_dict(obj: Any) -> 'MCPOauthPendingRequestResponse': - assert isinstance(obj, dict) - kind = MCPOauthPendingRequestResponseKind(obj.get("kind")) - access_token = from_union([from_str, from_none], obj.get("accessToken")) - expires_in = from_union([from_int, from_none], obj.get("expiresIn")) - token_type = from_union([from_str, from_none], obj.get("tokenType")) - return MCPOauthPendingRequestResponse(kind, access_token, expires_in, token_type) - - def to_dict(self) -> dict: - result: dict = {} - result["kind"] = to_enum(MCPOauthPendingRequestResponseKind, self.kind) - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) - if self.expires_in is not None: - result["expiresIn"] = from_union([from_int, from_none], self.expires_in) - if self.token_type is not None: - result["tokenType"] = from_union([from_str, from_none], self.token_type) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPPlanRequiredValueEnum: @@ -20918,6 +21131,14 @@ class InstalledPluginInfo: for direct repo / URL / local installs; absent for marketplace plugins. Same source yields the same id; distinct sources never collide. """ + installed_from: str | None = None + """Absolute path of the marketplace directory a live plugin was resolved from. Present only + on live, never-persisted records — a plugin belonging to a directory/local marketplace, + which is loaded from its real directory on every pass instead of a copy under the + installed-plugins cache. Its presence is what marks a listed plugin as live: such a + plugin is always present on disk, so `enabled` is its only meaningful state and it is + never "not installed". + """ version: str | None = None """Installed version (when reported by the plugin manifest)""" @@ -20928,8 +21149,9 @@ def from_dict(obj: Any) -> 'InstalledPluginInfo': marketplace = from_str(obj.get("marketplace")) name = from_str(obj.get("name")) direct_source_id = from_union([from_str, from_none], obj.get("directSourceId")) + installed_from = from_union([from_str, from_none], obj.get("installedFrom")) version = from_union([from_str, from_none], obj.get("version")) - return InstalledPluginInfo(enabled, marketplace, name, direct_source_id, version) + return InstalledPluginInfo(enabled, marketplace, name, direct_source_id, installed_from, version) def to_dict(self) -> dict: result: dict = {} @@ -20938,6 +21160,8 @@ def to_dict(self) -> dict: result["name"] = from_str(self.name) if self.direct_source_id is not None: result["directSourceId"] = from_union([from_str, from_none], self.direct_source_id) + if self.installed_from is not None: + result["installedFrom"] = from_union([from_str, from_none], self.installed_from) if self.version is not None: result["version"] = from_union([from_str, from_none], self.version) return result @@ -22697,6 +22921,30 @@ def to_dict(self) -> dict: result["tier"] = to_enum(SessionLimitPredictionTier, self.tier) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionManagedSettings: + """Managed settings an SDK host may inject at session startup. Only permissions are accepted + in this initial contract. + + Permissions-only enterprise policy injected by the SDK host at session create or resume. + 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': + assert isinstance(obj, dict) + permissions = from_union([SessionManagedPermissions.from_dict, from_none], obj.get("permissions")) + return SessionManagedSettings(permissions) + + def to_dict(self) -> dict: + result: dict = {} + if self.permissions is not None: + result["permissions"] = from_union([lambda x: to_class(SessionManagedPermissions, x), from_none], self.permissions) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionOpenOptionsAdditionalContentExclusionPolicyRule: @@ -25098,30 +25346,6 @@ def to_dict(self) -> dict: result["skippedEntries"] = from_union([lambda x: from_list(lambda x: to_class(DebugCollectLogsSkippedEntry, x), x), from_none], self.skipped_entries) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class SessionManagedSettings: - """Managed settings an SDK host may inject at session startup. Only permissions are accepted - in this initial contract. - - Permissions-only enterprise policy injected by the SDK host at session create or resume. - 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': - assert isinstance(obj, dict) - permissions = from_union([SessionManagedPermissions.from_dict, from_none], obj.get("permissions")) - return SessionManagedSettings(permissions) - - def to_dict(self) -> dict: - result: dict = {} - if self.permissions is not None: - result["permissions"] = from_union([lambda x: to_class(SessionManagedPermissions, x), from_none], self.permissions) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class DiscoveredExtensions: @@ -25767,6 +25991,30 @@ def to_dict(self) -> dict: result["options"] = from_union([lambda x: to_class(RunOptions, x), from_none], self.options) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MCPOauthHandlePendingRequest: + """Pending MCP OAuth request ID and host-provided token or cancellation response.""" + + request_id: str + """OAuth request identifier from the mcp.oauth_required event""" + + result: MCPOauthPendingRequestResponse + """Host response to the pending OAuth request.""" + + @staticmethod + def from_dict(obj: Any) -> 'MCPOauthHandlePendingRequest': + assert isinstance(obj, dict) + request_id = from_str(obj.get("requestId")) + result = MCPOauthPendingRequestResponse.from_dict(obj.get("result")) + return MCPOauthHandlePendingRequest(request_id, result) + + def to_dict(self) -> dict: + result: dict = {} + result["requestId"] = from_str(self.request_id) + result["result"] = to_class(MCPOauthPendingRequestResponse, self.result) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class HistoryRewindResult: @@ -25885,6 +26133,13 @@ class InstalledPlugin: cache_path: str | None = None """Path where the plugin is cached locally""" + installed_from: str | None = None + """Absolute path of the marketplace directory a live plugin was resolved from. Present only + on live, never-persisted records — those synthesized at session start for a + directory/local marketplace, whose cache_path points at the real plugin directory on disk + rather than a copy under the installed-plugins cache. Its presence is what marks a record + as live, and no record carrying it is ever written to the persisted installedPlugins key. + """ source: InstalledPluginSource | str | None = None """Source for direct repo installs (when marketplace is empty)""" @@ -25906,10 +26161,11 @@ def from_dict(obj: Any) -> 'InstalledPlugin': marketplace = from_str(obj.get("marketplace")) name = from_str(obj.get("name")) cache_path = from_union([from_str, from_none], obj.get("cache_path")) + installed_from = from_union([from_str, from_none], obj.get("installed_from")) source = from_union([InstalledPluginSource.from_dict, from_str, from_none], obj.get("source")) source_sha = from_union([from_str, from_none], obj.get("source_sha")) version = from_union([from_str, from_none], obj.get("version")) - return InstalledPlugin(enabled, installed_at, marketplace, name, cache_path, source, source_sha, version) + return InstalledPlugin(enabled, installed_at, marketplace, name, cache_path, installed_from, source, source_sha, version) def to_dict(self) -> dict: result: dict = {} @@ -25919,6 +26175,8 @@ def to_dict(self) -> dict: result["name"] = from_str(self.name) if self.cache_path is not None: result["cache_path"] = from_union([from_str, from_none], self.cache_path) + if self.installed_from is not None: + result["installed_from"] = from_union([from_str, from_none], self.installed_from) if self.source is not None: result["source"] = from_union([lambda x: to_class(InstalledPluginSource, x), from_str, from_none], self.source) if self.source_sha is not None: @@ -25948,6 +26206,13 @@ class SessionInstalledPlugin: cache_path: str | None = None """Path where the plugin is cached locally""" + installed_from: str | None = None + """Absolute path of the marketplace directory a live plugin was resolved from. Present only + on live, never-persisted records — those synthesized at session start for a + directory/local marketplace, whose cache_path points at the real plugin directory on disk + rather than a copy under the installed-plugins cache. Its presence is what marks a record + as live, and no record carrying it is ever written to the persisted installedPlugins key. + """ source: SessionInstalledPluginSource | str | None = None """Source descriptor for direct repo installs (when marketplace is empty)""" @@ -25969,10 +26234,11 @@ def from_dict(obj: Any) -> 'SessionInstalledPlugin': marketplace = from_str(obj.get("marketplace")) name = from_str(obj.get("name")) cache_path = from_union([from_str, from_none], obj.get("cache_path")) + installed_from = from_union([from_str, from_none], obj.get("installed_from")) source = from_union([SessionInstalledPluginSource.from_dict, from_str, from_none], obj.get("source")) source_sha = from_union([from_str, from_none], obj.get("source_sha")) version = from_union([from_str, from_none], obj.get("version")) - return SessionInstalledPlugin(enabled, installed_at, marketplace, name, cache_path, source, source_sha, version) + return SessionInstalledPlugin(enabled, installed_at, marketplace, name, cache_path, installed_from, source, source_sha, version) def to_dict(self) -> dict: result: dict = {} @@ -25982,6 +26248,8 @@ def to_dict(self) -> dict: result["name"] = from_str(self.name) if self.cache_path is not None: result["cache_path"] = from_union([from_str, from_none], self.cache_path) + if self.installed_from is not None: + result["installed_from"] = from_union([from_str, from_none], self.installed_from) if self.source is not None: result["source"] = from_union([lambda x: to_class(SessionInstalledPluginSource, x), from_str, from_none], self.source) if self.source_sha is not None: @@ -26268,9 +26536,11 @@ class PermissionPathsConfig: """ additional_directories: list[str] | None = None """Additional directories to allow tool access to (in addition to the session's working - directory). When `unrestricted` is true, these are still pre-populated on the - UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention - completion). + directory). Conventional `.github/skills/` and `.github/agents/` definitions under them + also join the session catalogs when their subsystem gates are enabled, so supplying a + directory is a trust decision for configuration stored there. When `unrestricted` is + true, these are still pre-populated on the UnrestrictedPathManager so they remain visible + via getDirectories() (e.g. for @-mention completion). """ include_temp_directory: bool | None = None """Whether to include the system temp directory in the allowed list (defaults to true). @@ -26524,30 +26794,6 @@ def to_dict(self) -> dict: result["result"] = to_class(MCPHeadersHandlePendingHeadersRefreshRequest, self.result) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class MCPOauthHandlePendingRequest: - """Pending MCP OAuth request ID and host-provided token or cancellation response.""" - - request_id: str - """OAuth request identifier from the mcp.oauth_required event""" - - result: MCPOauthPendingRequestResponse - """Host response to the pending OAuth request.""" - - @staticmethod - def from_dict(obj: Any) -> 'MCPOauthHandlePendingRequest': - assert isinstance(obj, dict) - request_id = from_str(obj.get("requestId")) - result = MCPOauthPendingRequestResponse.from_dict(obj.get("result")) - return MCPOauthHandlePendingRequest(request_id, result) - - def to_dict(self) -> dict: - result: dict = {} - result["requestId"] = from_str(self.request_id) - result["result"] = to_class(MCPOauthPendingRequestResponse, self.result) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class DebugCollectLogsEntry: @@ -27165,18 +27411,26 @@ class QueuePendingItemsResult: """Display text for messages currently in the immediate steering queue (interjections sent during a running turn). """ + in_flight_steering_count: int | None = None + """How many leading entries of `steeringMessages` have already been folded into the running + turn (and so have an emitted `user.message`), as opposed to still waiting for one. Absent + for hosts that do not distinguish the two. + """ @staticmethod def from_dict(obj: Any) -> 'QueuePendingItemsResult': assert isinstance(obj, dict) items = from_list(QueuePendingItems.from_dict, obj.get("items")) steering_messages = from_list(from_str, obj.get("steeringMessages")) - return QueuePendingItemsResult(items, steering_messages) + in_flight_steering_count = from_union([from_int, from_none], obj.get("inFlightSteeringCount")) + return QueuePendingItemsResult(items, steering_messages, in_flight_steering_count) def to_dict(self) -> dict: result: dict = {} result["items"] = from_list(lambda x: to_class(QueuePendingItems, x), self.items) result["steeringMessages"] = from_list(from_str, self.steering_messages) + if self.in_flight_steering_count is not None: + result["inFlightSteeringCount"] = from_union([from_int, from_none], self.in_flight_steering_count) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -29897,9 +30151,9 @@ class SandboxConfig: """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 + default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and + 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 — @@ -30339,11 +30593,15 @@ class SessionOpenOptions: additional_directories: list[str] | None = None """Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt - context and `@`-mention completion). Absolute paths are recommended; a relative path is - resolved against the session's working directory. Nonexistent or unresolvable entries are - skipped with a warning. This is applied on both session creation and resume, and is not - persisted: a resumed session that omits this option does not retain previously supplied - directories (re-supply them, exactly as the CLI re-passes `--add-dir`). + context and `@`-mention completion). Conventional `.github/skills/` and `.github/agents/` + definitions under each directory also join the session's project catalogs when their + existing subsystem gates are enabled: added-root skills require both + `enableConfigDiscovery` and effective `enableSkills`; added-root agents require + `enableConfigDiscovery`. Supplying a directory therefore activates configuration from it + and should be treated as a trust decision. Absolute paths are recommended; a relative + path is resolved against the session's working directory. Nonexistent or unresolvable + entries are skipped with a warning. This is applied during session creation and cold + resume and is not persisted, so a cold resume must re-supply the directories. """ agent_context: str | None = None """Runtime context discriminator for agent filtering.""" @@ -30472,6 +30730,11 @@ class SessionOpenOptions: are available, subject to runtime availability and exclusions. Custom agents with the same name remain available. """ + included_builtin_skills: list[str] | None = None + """Built-in skill names to include in this session. When specified, only these + runtime-bundled skills are available. Skills from other sources with the same name remain + available. + """ installed_plugins: list[InstalledPlugin] | None = None """Installed plugins visible to the session.""" @@ -30541,6 +30804,11 @@ class SessionOpenOptions: sandbox_config: SandboxConfig | None = None """Resolved sandbox configuration.""" + # Internal: this field is an internal SDK API and is not part of the public surface. + sandbox_config_source: _SandboxConfigSource | None = None + """Origin of the sandbox choice. The runtime uses this only for internal telemetry + provenance; managed policy is derived independently. + """ session_capabilities: list[SessionCapability] | None = None """Capabilities enabled for this session.""" @@ -30614,6 +30882,7 @@ def from_dict(obj: Any) -> 'SessionOpenOptions': exp_assignments = obj.get("expAssignments") feature_flags = from_union([lambda x: from_dict(from_bool, x), from_none], obj.get("featureFlags")) included_builtin_agents = from_union([lambda x: from_list(from_str, x), from_none], obj.get("includedBuiltinAgents")) + included_builtin_skills = from_union([lambda x: from_list(from_str, x), from_none], obj.get("includedBuiltinSkills")) installed_plugins = from_union([lambda x: from_list(InstalledPlugin.from_dict, x), from_none], obj.get("installedPlugins")) integration_id = from_union([from_str, from_none], obj.get("integrationId")) is_experimental_mode = from_union([from_bool, from_none], obj.get("isExperimentalMode")) @@ -30635,6 +30904,7 @@ def from_dict(obj: Any) -> 'SessionOpenOptions': remote_steerable = from_union([from_bool, from_none], obj.get("remoteSteerable")) running_in_interactive_mode = from_union([from_bool, from_none], obj.get("runningInInteractiveMode")) sandbox_config = from_union([SandboxConfig.from_dict, from_none], obj.get("sandboxConfig")) + sandbox_config_source = from_union([_SandboxConfigSource, from_none], obj.get("sandboxConfigSource")) session_capabilities = from_union([lambda x: from_list(SessionCapability, x), from_none], obj.get("sessionCapabilities")) session_id = from_union([from_str, from_none], obj.get("sessionId")) session_limits = from_union([SessionLimitsConfig.from_dict, from_none], obj.get("sessionLimits")) @@ -30647,7 +30917,7 @@ def from_dict(obj: Any) -> 'SessionOpenOptions': verbosity = from_union([Verbosity, from_none], obj.get("verbosity")) working_directory = from_union([from_str, from_none], obj.get("workingDirectory")) working_directory_context = from_union([SessionContext.from_dict, from_none], obj.get("workingDirectoryContext")) - return SessionOpenOptions(additional_content_exclusion_policies, additional_directories, agent_context, allow_all_mcp_server_instructions, ask_user_disabled, auth_info, available_tools, capi, client_kind, client_name, coauthor_enabled, config_dir, continue_on_auto_mode, copilot_url, custom_agents_local_only, detached_from_spawning_parent_engagement_id, detached_from_spawning_parent_session_id, disabled_instruction_sources, disabled_mcp_servers, disabled_skills, enable_citations, enable_file_change_tracking, enable_managed_settings, enable_on_demand_instruction_discovery, enable_script_safety, enable_streaming, env_value_mode, events_log_directory, events_log_includes_subagents, excluded_builtin_agents, excluded_tools, exp_assignments, feature_flags, included_builtin_agents, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, managed_settings, max_inline_binary_bytes, memory, model, model_capabilities_overrides, models, name, provider, providers, reasoning_effort, reasoning_summary, remote_defaulted_on, remote_exporting, remote_steerable, running_in_interactive_mode, sandbox_config, session_capabilities, session_id, session_limits, shell, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, trajectory_file, verbosity, working_directory, working_directory_context) + return SessionOpenOptions(additional_content_exclusion_policies, additional_directories, agent_context, allow_all_mcp_server_instructions, ask_user_disabled, auth_info, available_tools, capi, client_kind, client_name, coauthor_enabled, config_dir, continue_on_auto_mode, copilot_url, custom_agents_local_only, detached_from_spawning_parent_engagement_id, detached_from_spawning_parent_session_id, disabled_instruction_sources, disabled_mcp_servers, disabled_skills, enable_citations, enable_file_change_tracking, enable_managed_settings, enable_on_demand_instruction_discovery, enable_script_safety, enable_streaming, env_value_mode, events_log_directory, events_log_includes_subagents, excluded_builtin_agents, excluded_tools, exp_assignments, feature_flags, included_builtin_agents, included_builtin_skills, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, managed_settings, max_inline_binary_bytes, memory, model, model_capabilities_overrides, models, name, provider, providers, reasoning_effort, reasoning_summary, remote_defaulted_on, remote_exporting, remote_steerable, running_in_interactive_mode, sandbox_config, sandbox_config_source, session_capabilities, session_id, session_limits, shell, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, trajectory_file, verbosity, working_directory, working_directory_context) def to_dict(self) -> dict: result: dict = {} @@ -30719,6 +30989,8 @@ def to_dict(self) -> dict: result["featureFlags"] = from_union([lambda x: from_dict(from_bool, x), from_none], self.feature_flags) if self.included_builtin_agents is not None: result["includedBuiltinAgents"] = from_union([lambda x: from_list(from_str, x), from_none], self.included_builtin_agents) + if self.included_builtin_skills is not None: + result["includedBuiltinSkills"] = from_union([lambda x: from_list(from_str, x), from_none], self.included_builtin_skills) if self.installed_plugins is not None: result["installedPlugins"] = from_union([lambda x: from_list(lambda x: to_class(InstalledPlugin, x), x), from_none], self.installed_plugins) if self.integration_id is not None: @@ -30761,6 +31033,8 @@ def to_dict(self) -> dict: result["runningInInteractiveMode"] = from_union([from_bool, from_none], self.running_in_interactive_mode) if self.sandbox_config is not None: result["sandboxConfig"] = from_union([lambda x: to_class(SandboxConfig, x), from_none], self.sandbox_config) + if self.sandbox_config_source is not None: + result["sandboxConfigSource"] = from_union([lambda x: to_enum(_SandboxConfigSource, x), from_none], self.sandbox_config_source) if self.session_capabilities is not None: result["sessionCapabilities"] = from_union([lambda x: from_list(lambda x: to_enum(SessionCapability, x), x), from_none], self.session_capabilities) if self.session_id is not None: @@ -30893,6 +31167,11 @@ class SessionUpdateOptionsParams: are available, subject to runtime availability and exclusions. Custom agents with the same name remain available. Set to null to remove the allowlist restriction. """ + included_builtin_skills: list[str] | None = None + """Built-in skill names to include in this session. When specified, only these + runtime-bundled skills are available. Skills from other sources with the same name remain + available. Set to null to remove the allowlist restriction. + """ installed_plugins: list[SessionInstalledPlugin] | None = None """Full set of installed plugins for the session. Replaces the existing list; the runtime invalidates the skills cache only when the list materially changes. @@ -30946,6 +31225,11 @@ class SessionUpdateOptionsParams: sandbox_config: SandboxConfig | None = None """Resolved sandbox configuration.""" + # Internal: this field is an internal SDK API and is not part of the public surface. + sandbox_config_source: _SandboxConfigSource | None = None + """Origin of the sandbox choice. The runtime uses this only for internal telemetry + provenance; managed policy is derived independently. + """ session_capabilities: list[SessionCapability] | None = None """Replaces the session's capability set with the given list. Use to enable or disable capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the @@ -31022,6 +31306,7 @@ def from_dict(obj: Any) -> 'SessionUpdateOptionsParams': excluded_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("excludedTools")) feature_flags = from_union([lambda x: from_dict(from_bool, x), from_none], obj.get("featureFlags")) included_builtin_agents = from_union([lambda x: from_list(from_str, x), from_none], obj.get("includedBuiltinAgents")) + included_builtin_skills = from_union([lambda x: from_list(from_str, x), from_none], obj.get("includedBuiltinSkills")) installed_plugins = from_union([lambda x: from_list(SessionInstalledPlugin.from_dict, x), from_none], obj.get("installedPlugins")) integration_id = from_union([from_str, from_none], obj.get("integrationId")) is_experimental_mode = from_union([from_bool, from_none], obj.get("isExperimentalMode")) @@ -31037,6 +31322,7 @@ def from_dict(obj: Any) -> 'SessionUpdateOptionsParams': reasoning_summary = from_union([ReasoningSummary, from_none], obj.get("reasoningSummary")) running_in_interactive_mode = from_union([from_bool, from_none], obj.get("runningInInteractiveMode")) sandbox_config = from_union([SandboxConfig.from_dict, from_none], obj.get("sandboxConfig")) + sandbox_config_source = from_union([_SandboxConfigSource, from_none], obj.get("sandboxConfigSource")) session_capabilities = from_union([lambda x: from_list(SessionCapability, x), from_none], obj.get("sessionCapabilities")) session_limits = from_union([SessionLimitsConfig.from_dict, from_none], obj.get("sessionLimits")) shell = from_union([ShellOptions.from_dict, from_none], obj.get("shell")) @@ -31050,7 +31336,7 @@ def from_dict(obj: Any) -> 'SessionUpdateOptionsParams': trajectory_file = from_union([from_str, from_none], obj.get("trajectoryFile")) verbosity = from_union([Verbosity, from_none], obj.get("verbosity")) working_directory = from_union([from_str, from_none], obj.get("workingDirectory")) - return SessionUpdateOptionsParams(additional_content_exclusion_policies, agent_context, allow_all_mcp_server_instructions, ask_user_disabled, available_tools, capi, client_name, coauthor_enabled, context_tier, continue_on_auto_mode, copilot_url, custom_agents_local_only, disabled_instruction_sources, disabled_skills, enable_file_hooks, enable_host_git_operations, enable_on_demand_instruction_discovery, enable_reasoning_summaries, enable_script_safety, enable_session_store, enable_skills, enable_streaming, env_value_mode, events_log_directory, events_log_includes_subagents, excluded_builtin_agents, excluded_tools, feature_flags, included_builtin_agents, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, manage_schedule_enabled, max_inline_binary_bytes, model, model_capabilities_overrides, organization_custom_instructions, provider, reasoning_effort, reasoning_summary, running_in_interactive_mode, sandbox_config, session_capabilities, session_limits, shell, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, skip_embedding_retrieval, suppress_custom_agent_prompt, tool_filter_precedence, trajectory_file, verbosity, working_directory) + return SessionUpdateOptionsParams(additional_content_exclusion_policies, agent_context, allow_all_mcp_server_instructions, ask_user_disabled, available_tools, capi, client_name, coauthor_enabled, context_tier, continue_on_auto_mode, copilot_url, custom_agents_local_only, disabled_instruction_sources, disabled_skills, enable_file_hooks, enable_host_git_operations, enable_on_demand_instruction_discovery, enable_reasoning_summaries, enable_script_safety, enable_session_store, enable_skills, enable_streaming, env_value_mode, events_log_directory, events_log_includes_subagents, excluded_builtin_agents, excluded_tools, feature_flags, included_builtin_agents, included_builtin_skills, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, manage_schedule_enabled, max_inline_binary_bytes, model, model_capabilities_overrides, organization_custom_instructions, provider, reasoning_effort, reasoning_summary, running_in_interactive_mode, sandbox_config, sandbox_config_source, session_capabilities, session_limits, shell, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, skip_embedding_retrieval, suppress_custom_agent_prompt, tool_filter_precedence, trajectory_file, verbosity, working_directory) def to_dict(self) -> dict: result: dict = {} @@ -31112,6 +31398,8 @@ def to_dict(self) -> dict: result["featureFlags"] = from_union([lambda x: from_dict(from_bool, x), from_none], self.feature_flags) if self.included_builtin_agents is not None: result["includedBuiltinAgents"] = from_union([lambda x: from_list(from_str, x), from_none], self.included_builtin_agents) + if self.included_builtin_skills is not None: + result["includedBuiltinSkills"] = from_union([lambda x: from_list(from_str, x), from_none], self.included_builtin_skills) if self.installed_plugins is not None: result["installedPlugins"] = from_union([lambda x: from_list(lambda x: to_class(SessionInstalledPlugin, x), x), from_none], self.installed_plugins) if self.integration_id is not None: @@ -31142,6 +31430,8 @@ def to_dict(self) -> dict: result["runningInInteractiveMode"] = from_union([from_bool, from_none], self.running_in_interactive_mode) if self.sandbox_config is not None: result["sandboxConfig"] = from_union([lambda x: to_class(SandboxConfig, x), from_none], self.sandbox_config) + if self.sandbox_config_source is not None: + result["sandboxConfigSource"] = from_union([lambda x: to_enum(_SandboxConfigSource, x), from_none], self.sandbox_config_source) if self.session_capabilities is not None: result["sessionCapabilities"] = from_union([lambda x: from_list(lambda x: to_enum(SessionCapability, x), x), from_none], self.session_capabilities) if self.session_limits is not None: @@ -31361,6 +31651,8 @@ class CopilotUserResponse: GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. + Snapshot of the authenticated user's Copilot subscription info, if known. + Snapshot of the authenticated user's Copilot subscription info, if known """ access_type_sku: str | None = None @@ -31812,6 +32104,11 @@ class AuthIdentity: login: str | None = None """Authenticated login, when available""" + registration_id: str | None = None + """Opaque SDK GitHub credential registration backing this identity. Routing metadata only; + never a credential. + """ + @staticmethod def from_dict(obj: Any) -> 'AuthIdentity': assert isinstance(obj, dict) @@ -31820,7 +32117,8 @@ def from_dict(obj: Any) -> 'AuthIdentity': copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) env_var = from_union([from_str, from_none], obj.get("envVar")) login = from_union([from_str, from_none], obj.get("login")) - return AuthIdentity(host, type, copilot_user, env_var, login) + registration_id = from_union([from_str, from_none], obj.get("registrationId")) + return AuthIdentity(host, type, copilot_user, env_var, login, registration_id) def to_dict(self) -> dict: result: dict = {} @@ -31832,6 +32130,8 @@ def to_dict(self) -> dict: 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.registration_id is not None: + result["registrationId"] = from_union([from_str, from_none], self.registration_id) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -33354,6 +33654,11 @@ class Model: default_reasoning_effort: str | None = None """Default reasoning effort level (only present if model supports reasoning effort)""" + info_messages: list[ModelMessage] | None = None + """Informational notices the service published for this model, such as an upcoming change or + a recommended alternative. Present only when the service published at least one notice. + Hosts should surface these without implying anything is wrong with the model. + """ model_picker_category: ModelPickerCategory | None = None """Model capability category for grouping in the model picker""" @@ -33372,6 +33677,16 @@ class Model: supported_reasoning_efforts: list[str] | None = None """Supported reasoning effort levels (only present if model supports reasoning effort)""" + warning_messages: list[ModelMessage] | None = None + """Warnings the service published for this model, such as a deprecated client version. + Present only when the service published at least one warning. The model remains usable; + hosts should surface these as advisory rather than blocking. + """ + warning_text: ModelWarningText | None = None + """Warning text the service requires hosts to surface for this model. Present only when the + service published at least one warning. + """ + @staticmethod def from_dict(obj: Any) -> 'Model': assert isinstance(obj, dict) @@ -33380,12 +33695,15 @@ def from_dict(obj: Any) -> 'Model': 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")) + info_messages = from_union([lambda x: from_list(ModelMessage.from_dict, x), from_none], obj.get("infoMessages")) 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, default_reasoning_effort, model_picker_category, model_picker_price_category, policy, supported_context_tiers, supported_reasoning_efforts) + warning_messages = from_union([lambda x: from_list(ModelMessage.from_dict, x), from_none], obj.get("warningMessages")) + warning_text = from_union([ModelWarningText.from_dict, from_none], obj.get("warningText")) + return Model(capabilities, id, name, billing, default_reasoning_effort, info_messages, model_picker_category, model_picker_price_category, policy, supported_context_tiers, supported_reasoning_efforts, warning_messages, warning_text) def to_dict(self) -> dict: result: dict = {} @@ -33396,6 +33714,8 @@ def to_dict(self) -> dict: 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.info_messages is not None: + result["infoMessages"] = from_union([lambda x: from_list(lambda x: to_class(ModelMessage, x), x), from_none], self.info_messages) 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: @@ -33406,6 +33726,10 @@ def to_dict(self) -> dict: 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) + if self.warning_messages is not None: + result["warningMessages"] = from_union([lambda x: from_list(lambda x: to_class(ModelMessage, x), x), from_none], self.warning_messages) + if self.warning_text is not None: + result["warningText"] = from_union([lambda x: to_class(ModelWarningText, x), from_none], self.warning_text) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -34115,6 +34439,43 @@ def to_dict(self) -> dict: result["taskType"] = from_union([lambda x: to_enum(TaskType, x), from_none], self.task_type) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SettableTokenAuthInfo: + """Token authentication accepted by session.gitHubAuth.setCredentials.""" + + host: str + """Authentication host.""" + + token: str + """The token value itself. Treat as a secret.""" + + type: ClassVar[str] = "token" + """SDK-side token authentication; the host configured the token directly via the SDK.""" + + 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. + """ + + @staticmethod + def from_dict(obj: Any) -> 'SettableTokenAuthInfo': + assert isinstance(obj, dict) + host = from_str(obj.get("host")) + token = from_str(obj.get("token")) + copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) + return SettableTokenAuthInfo(host, token, copilot_user) + + def to_dict(self) -> dict: + result: dict = {} + result["host"] = from_str(self.host) + result["token"] = from_str(self.token) + result["type"] = self.type + if self.copilot_user is not None: + result["copilotUser"] = from_union([lambda x: to_class(CopilotUserResponse, x), from_none], self.copilot_user) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandModelPickerDialog: @@ -34327,6 +34688,8 @@ class TokenAuthInfo: GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. """ + registration_id: str | None = None + """Opaque native GitHub credential registration backing this token identity, when applicable.""" @staticmethod def from_dict(obj: Any) -> 'TokenAuthInfo': @@ -34334,13 +34697,51 @@ def from_dict(obj: Any) -> 'TokenAuthInfo': host = from_str(obj.get("host")) token = from_str(obj.get("token")) copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) - return TokenAuthInfo(host, token, copilot_user) + registration_id = from_union([from_str, from_none], obj.get("registrationId")) + return TokenAuthInfo(host, token, copilot_user, registration_id) def to_dict(self) -> dict: result: dict = {} result["host"] = from_str(self.host) result["token"] = from_str(self.token) result["type"] = 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.registration_id is not None: + result["registrationId"] = from_union([from_str, from_none], self.registration_id) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class TokenProviderAuthInfo: + """Authentication-info variant backed by an SDK GitHub token callback. It carries routing + metadata but never a plaintext token. + """ + host: str + """Authentication host.""" + + registration_id: str + """Opaque SDK callback registration identifier.""" + + type: ClassVar[str] = "token-provider" + """SDK callback-backed GitHub token authentication.""" + + copilot_user: CopilotUserResponse | None = None + """Snapshot of the authenticated user's Copilot subscription info, if known.""" + + @staticmethod + def from_dict(obj: Any) -> 'TokenProviderAuthInfo': + assert isinstance(obj, dict) + host = from_str(obj.get("host")) + registration_id = from_str(obj.get("registrationId")) + copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) + return TokenProviderAuthInfo(host, registration_id, copilot_user) + + def to_dict(self) -> dict: + result: dict = {} + result["host"] = from_str(self.host) + result["registrationId"] = from_str(self.registration_id) + result["type"] = self.type if self.copilot_user is not None: result["copilotUser"] = from_union([lambda x: to_class(CopilotUserResponse, x), from_none], self.copilot_user) return result @@ -34640,6 +35041,7 @@ class RPC: completions_request_request: CompletionsRequestRequest completions_request_result: CompletionsRequestResult configure_session_extensions_params: _ConfigureSessionExtensionsParams + connect_client_info: _ConnectClientInfo connected_remote_session_metadata: ConnectedRemoteSessionMetadata connected_remote_session_metadata_kind: ConnectedRemoteSessionMetadataKind connected_remote_session_metadata_repository: ConnectedRemoteSessionMetadataRepository @@ -34671,7 +35073,6 @@ class RPC: debug_collect_logs_result_kind: DebugCollectLogsResultKind debug_collect_logs_skipped_entry: DebugCollectLogsSkippedEntry debug_collect_logs_source: DebugCollectLogsSource - disable_bypass_permissions_mode: DisableBypassPermissionsMode discovered_canvas: DiscoveredCanvas discovered_extension: DiscoveredExtension discovered_extension_mode: DiscoveredExtensionMode @@ -34768,6 +35169,9 @@ class RPC: git_hub_telemetry_client_info: GitHubTelemetryClientInfo git_hub_telemetry_event: GitHubTelemetryEvent git_hub_telemetry_notification: GitHubTelemetryNotification + git_hub_token_acquire_reason: GitHubTokenAcquireReason + git_hub_token_acquire_request: GitHubTokenAcquireRequest + git_hub_token_acquire_result: GitHubTokenAcquireResult handle_pending_tool_call_request: HandlePendingToolCallRequest handle_pending_tool_call_result: HandlePendingToolCallResult history_abort_manual_compaction_result: HistoryAbortManualCompactionResult @@ -35024,6 +35428,7 @@ class RPC: model_capabilities_supports: ModelCapabilitiesSupports model_list: ModelList model_list_request: Any + model_message: ModelMessage model_picker_category: ModelPickerCategory model_picker_persistence_request: ModelPickerPersistenceRequest model_picker_price_category: ModelPickerPriceCategory @@ -35036,6 +35441,7 @@ class RPC: model_switch_confirmation: ModelSwitchConfirmation model_switch_to_request: ModelSwitchToRequest model_switch_to_result: ModelSwitchToResult + model_warning_text: ModelWarningText mode_set_request: ModeSetRequest mode_set_result: ModeSetResult move_mcp_loading_to_background_result: MoveMCPLoadingToBackgroundResult @@ -35286,6 +35692,7 @@ class RPC: run_options: RunOptions sandbox_config: SandboxConfig sandbox_config_auth: SandboxConfigAuth + sandbox_config_source: _SandboxConfigSource sandbox_config_user_policy: SandboxConfigUserPolicy sandbox_config_user_policy_experimental: SandboxConfigUserPolicyExperimental sandbox_config_user_policy_experimental_seatbelt: SandboxConfigUserPolicyExperimentalSeatbelt @@ -35483,6 +35890,8 @@ class RPC: session_visibility_status: SessionVisibilityStatus session_working_directory_context: SessionWorkingDirectoryContext session_working_directory_context_host_type: HostType + settable_auth_info: SettableAuthInfo + settable_token_auth_info: SettableTokenAuthInfo shell_cancel_user_requested_request: ShellCancelUserRequestedRequest shell_credentials: ShellCredentials shell_exec_request: ShellExecRequest @@ -35559,6 +35968,7 @@ class RPC: tasks_wait_for_pending_result: TasksWaitForPendingResult telemetry_set_feature_overrides_request: TelemetrySetFeatureOverridesRequest token_auth_info: TokenAuthInfo + token_provider_auth_info: TokenProviderAuthInfo tool: Tool tool_list: ToolList tool_result: ToolResultExpanded | str @@ -35810,6 +36220,7 @@ def from_dict(obj: Any) -> 'RPC': completions_request_request = CompletionsRequestRequest.from_dict(obj.get("CompletionsRequestRequest")) completions_request_result = CompletionsRequestResult.from_dict(obj.get("CompletionsRequestResult")) configure_session_extensions_params = _ConfigureSessionExtensionsParams.from_dict(obj.get("ConfigureSessionExtensionsParams")) + connect_client_info = _ConnectClientInfo.from_dict(obj.get("ConnectClientInfo")) connected_remote_session_metadata = ConnectedRemoteSessionMetadata.from_dict(obj.get("ConnectedRemoteSessionMetadata")) connected_remote_session_metadata_kind = ConnectedRemoteSessionMetadataKind(obj.get("ConnectedRemoteSessionMetadataKind")) connected_remote_session_metadata_repository = ConnectedRemoteSessionMetadataRepository.from_dict(obj.get("ConnectedRemoteSessionMetadataRepository")) @@ -35841,7 +36252,6 @@ def from_dict(obj: Any) -> 'RPC': debug_collect_logs_result_kind = DebugCollectLogsResultKind(obj.get("DebugCollectLogsResultKind")) debug_collect_logs_skipped_entry = DebugCollectLogsSkippedEntry.from_dict(obj.get("DebugCollectLogsSkippedEntry")) debug_collect_logs_source = DebugCollectLogsSource(obj.get("DebugCollectLogsSource")) - disable_bypass_permissions_mode = DisableBypassPermissionsMode(obj.get("DisableBypassPermissionsMode")) discovered_canvas = DiscoveredCanvas.from_dict(obj.get("DiscoveredCanvas")) discovered_extension = DiscoveredExtension.from_dict(obj.get("DiscoveredExtension")) discovered_extension_mode = DiscoveredExtensionMode(obj.get("DiscoveredExtensionMode")) @@ -35938,6 +36348,9 @@ def from_dict(obj: Any) -> 'RPC': git_hub_telemetry_client_info = GitHubTelemetryClientInfo.from_dict(obj.get("GitHubTelemetryClientInfo")) git_hub_telemetry_event = GitHubTelemetryEvent.from_dict(obj.get("GitHubTelemetryEvent")) git_hub_telemetry_notification = GitHubTelemetryNotification.from_dict(obj.get("GitHubTelemetryNotification")) + git_hub_token_acquire_reason = GitHubTokenAcquireReason(obj.get("GitHubTokenAcquireReason")) + git_hub_token_acquire_request = GitHubTokenAcquireRequest.from_dict(obj.get("GitHubTokenAcquireRequest")) + git_hub_token_acquire_result = GitHubTokenAcquireResult.from_dict(obj.get("GitHubTokenAcquireResult")) handle_pending_tool_call_request = HandlePendingToolCallRequest.from_dict(obj.get("HandlePendingToolCallRequest")) handle_pending_tool_call_result = HandlePendingToolCallResult.from_dict(obj.get("HandlePendingToolCallResult")) history_abort_manual_compaction_result = HistoryAbortManualCompactionResult.from_dict(obj.get("HistoryAbortManualCompactionResult")) @@ -36194,6 +36607,7 @@ def from_dict(obj: Any) -> 'RPC': model_capabilities_supports = ModelCapabilitiesSupports.from_dict(obj.get("ModelCapabilitiesSupports")) model_list = ModelList.from_dict(obj.get("ModelList")) model_list_request = obj.get("ModelListRequest") + model_message = ModelMessage.from_dict(obj.get("ModelMessage")) model_picker_category = ModelPickerCategory(obj.get("ModelPickerCategory")) model_picker_persistence_request = ModelPickerPersistenceRequest.from_dict(obj.get("ModelPickerPersistenceRequest")) model_picker_price_category = ModelPickerPriceCategory(obj.get("ModelPickerPriceCategory")) @@ -36206,6 +36620,7 @@ def from_dict(obj: Any) -> 'RPC': model_switch_confirmation = ModelSwitchConfirmation.from_dict(obj.get("ModelSwitchConfirmation")) model_switch_to_request = ModelSwitchToRequest.from_dict(obj.get("ModelSwitchToRequest")) model_switch_to_result = ModelSwitchToResult.from_dict(obj.get("ModelSwitchToResult")) + model_warning_text = ModelWarningText.from_dict(obj.get("ModelWarningText")) mode_set_request = ModeSetRequest.from_dict(obj.get("ModeSetRequest")) mode_set_result = ModeSetResult.from_dict(obj.get("ModeSetResult")) move_mcp_loading_to_background_result = MoveMCPLoadingToBackgroundResult.from_dict(obj.get("MoveMcpLoadingToBackgroundResult")) @@ -36456,6 +36871,7 @@ def from_dict(obj: Any) -> 'RPC': run_options = RunOptions.from_dict(obj.get("RunOptions")) sandbox_config = SandboxConfig.from_dict(obj.get("SandboxConfig")) sandbox_config_auth = SandboxConfigAuth.from_dict(obj.get("SandboxConfigAuth")) + sandbox_config_source = _SandboxConfigSource(obj.get("SandboxConfigSource")) sandbox_config_user_policy = SandboxConfigUserPolicy.from_dict(obj.get("SandboxConfigUserPolicy")) sandbox_config_user_policy_experimental = SandboxConfigUserPolicyExperimental.from_dict(obj.get("SandboxConfigUserPolicyExperimental")) sandbox_config_user_policy_experimental_seatbelt = SandboxConfigUserPolicyExperimentalSeatbelt.from_dict(obj.get("SandboxConfigUserPolicyExperimentalSeatbelt")) @@ -36653,6 +37069,8 @@ def from_dict(obj: Any) -> 'RPC': session_visibility_status = SessionVisibilityStatus(obj.get("SessionVisibilityStatus")) session_working_directory_context = SessionWorkingDirectoryContext.from_dict(obj.get("SessionWorkingDirectoryContext")) session_working_directory_context_host_type = HostType(obj.get("SessionWorkingDirectoryContextHostType")) + settable_auth_info = _load_SettableAuthInfo(obj.get("SettableAuthInfo")) + settable_token_auth_info = SettableTokenAuthInfo.from_dict(obj.get("SettableTokenAuthInfo")) shell_cancel_user_requested_request = ShellCancelUserRequestedRequest.from_dict(obj.get("ShellCancelUserRequestedRequest")) shell_credentials = ShellCredentials.from_dict(obj.get("ShellCredentials")) shell_exec_request = ShellExecRequest.from_dict(obj.get("ShellExecRequest")) @@ -36729,6 +37147,7 @@ def from_dict(obj: Any) -> 'RPC': tasks_wait_for_pending_result = TasksWaitForPendingResult.from_dict(obj.get("TasksWaitForPendingResult")) telemetry_set_feature_overrides_request = TelemetrySetFeatureOverridesRequest.from_dict(obj.get("TelemetrySetFeatureOverridesRequest")) token_auth_info = TokenAuthInfo.from_dict(obj.get("TokenAuthInfo")) + token_provider_auth_info = TokenProviderAuthInfo.from_dict(obj.get("TokenProviderAuthInfo")) tool = Tool.from_dict(obj.get("Tool")) tool_list = ToolList.from_dict(obj.get("ToolList")) tool_result = from_union([ToolResultExpanded.from_dict, from_str], obj.get("ToolResult")) @@ -36838,7 +37257,7 @@ def from_dict(obj: Any) -> 'RPC': 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, api_key_auth_info, auth_identity, auth_info, auth_info_type, auth_validation_error, auth_validation_errors, built_in_model_catalog, built_in_model_catalog_entry, builtin_tool_descriptor, builtin_tool_format, builtin_tool_format_type, builtin_tool_input_schema, builtin_tool_input_schema_type, builtin_tool_safe_for_telemetry, builtin_tool_safe_telemetry_fields, 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, card_digest, card_digest_algorithm, card_digest_value, catalog_ai_skill_candidate, catalog_ai_skill_candidate_provenance, catalog_authentication_required_error, catalog_authentication_required_reason, catalog_candidate, catalog_candidate_kind, catalog_candidate_source, catalog_candidate_source_embedded, catalog_candidate_source_url, catalog_capability, catalog_capability_id, catalog_client_contract, catalog_contract_violation_error, catalog_contract_violation_reason, catalog_handle_rejected_error, catalog_handle_rejection_reason, catalog_handle_type, catalog_invalid_request_error, catalog_invalid_request_field, catalog_malformed_card_error, catalog_malformed_card_reason, catalog_mcp_server_candidate, catalog_mcp_server_candidate_provenance, catalog_mcp_server_installability, catalog_media_type, catalog_negotiated_contract, catalog_negotiation_refused_error, catalog_negotiation_refused_reason, catalog_network_failure_error, catalog_network_failure_reason, catalog_not_installable_error, catalog_not_installable_reason, catalog_policy_rejected_error, catalog_search_request, catalog_search_result, catalog_search_succeeded, catalog_unavailable_error, catalog_unavailable_reason, catalog_unavailable_transport_error, catalog_unavailable_transport_reason, catalog_unsafe_retrieval_error, catalog_unsafe_retrieval_reason, catalog_unsupported_kind_error, command_list, commands_finalize_invocation_effect_request, commands_finalize_invocation_effect_result, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invocation_effect_outcome, commands_invocation_origin, 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_install_plan, 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_plan_configuration_change, mcp_plan_configuration_operation, mcp_plan_enum_value_type, mcp_plan_install_planned, mcp_plan_install_request, mcp_plan_install_result, mcp_plan_install_source, mcp_plan_install_source_candidate, mcp_plan_install_source_candidate_kind, mcp_plan_install_source_card, mcp_plan_install_source_card_kind, mcp_plan_package_install_method, mcp_plan_package_transport, mcp_plan_policy_decision, mcp_plan_policy_result, mcp_plan_policy_source, mcp_plan_provenance, mcp_plan_remote_install_method, mcp_plan_remote_transport, mcp_plan_required_value, mcp_plan_required_value_enum, mcp_plan_required_value_enum_kind, mcp_plan_required_value_scalar, mcp_plan_required_value_scalar_kind, mcp_plan_resource_identity, mcp_plan_scalar_value_type, mcp_plan_scope, mcp_plan_secret_placeholder, mcp_plan_secret_reference, mcp_plan_target, mcp_plan_transport_choice, mcp_plan_transport_choice_package, mcp_plan_transport_choice_remote, mcp_plan_value_category, 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_card_embedded, mcp_server_card_embedded_kind, mcp_server_card_media_type, mcp_server_card_reference, mcp_server_card_url, mcp_server_card_url_kind, 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_apply_startup_overlay_request, 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_persistence_request, model_picker_price_category, model_picker_settings_context, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_confirmation, model_switch_to_request, model_switch_to_result, mode_set_request, mode_set_result, move_mcp_loading_to_background_result, 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_mode_source, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_rules_set, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_folder_trust_add_trusted_result, permissions_get_mode_request, permissions_get_mode_result, 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_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_mode_request, permissions_set_mode_result, 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, protocol_external_tool_defer, protocol_external_tool_definition, 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_credentials, 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_config_set_skill_disabled_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_add_timeline_entry_result, 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_model_picker_dialog, slash_command_select_subcommand_option, slash_command_select_subcommand_result, slash_command_set_model_result, slash_command_set_plan_model_result, slash_command_show_dialog_result, slash_command_text_result, slash_command_timeline_entry, subagent_settings_entry, subagent_settings_entry_context_tier, task_agent_info, task_agent_progress, task_complete_data, task_completion_decision, 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, tool_result, tool_result_expanded, tool_result_new_message, tool_result_type, tools_execute_request, tools_get_builtin_descriptors_request, tools_get_builtin_descriptors_result, tools_get_current_metadata_result, tools_initialize_and_validate_result, tools_list_request, tools_set_request, tools_set_result, tools_shell_descriptor_config, tools_task_complete_event_data_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_agent_metric, 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) + 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, api_key_auth_info, auth_identity, auth_info, auth_info_type, auth_validation_error, auth_validation_errors, built_in_model_catalog, built_in_model_catalog_entry, builtin_tool_descriptor, builtin_tool_format, builtin_tool_format_type, builtin_tool_input_schema, builtin_tool_input_schema_type, builtin_tool_safe_for_telemetry, builtin_tool_safe_telemetry_fields, 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, card_digest, card_digest_algorithm, card_digest_value, catalog_ai_skill_candidate, catalog_ai_skill_candidate_provenance, catalog_authentication_required_error, catalog_authentication_required_reason, catalog_candidate, catalog_candidate_kind, catalog_candidate_source, catalog_candidate_source_embedded, catalog_candidate_source_url, catalog_capability, catalog_capability_id, catalog_client_contract, catalog_contract_violation_error, catalog_contract_violation_reason, catalog_handle_rejected_error, catalog_handle_rejection_reason, catalog_handle_type, catalog_invalid_request_error, catalog_invalid_request_field, catalog_malformed_card_error, catalog_malformed_card_reason, catalog_mcp_server_candidate, catalog_mcp_server_candidate_provenance, catalog_mcp_server_installability, catalog_media_type, catalog_negotiated_contract, catalog_negotiation_refused_error, catalog_negotiation_refused_reason, catalog_network_failure_error, catalog_network_failure_reason, catalog_not_installable_error, catalog_not_installable_reason, catalog_policy_rejected_error, catalog_search_request, catalog_search_result, catalog_search_succeeded, catalog_unavailable_error, catalog_unavailable_reason, catalog_unavailable_transport_error, catalog_unavailable_transport_reason, catalog_unsafe_retrieval_error, catalog_unsafe_retrieval_reason, catalog_unsupported_kind_error, command_list, commands_finalize_invocation_effect_request, commands_finalize_invocation_effect_result, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invocation_effect_outcome, commands_invocation_origin, 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, connect_client_info, 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, 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, git_hub_token_acquire_reason, git_hub_token_acquire_request, git_hub_token_acquire_result, 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_install_plan, 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_plan_configuration_change, mcp_plan_configuration_operation, mcp_plan_enum_value_type, mcp_plan_install_planned, mcp_plan_install_request, mcp_plan_install_result, mcp_plan_install_source, mcp_plan_install_source_candidate, mcp_plan_install_source_candidate_kind, mcp_plan_install_source_card, mcp_plan_install_source_card_kind, mcp_plan_package_install_method, mcp_plan_package_transport, mcp_plan_policy_decision, mcp_plan_policy_result, mcp_plan_policy_source, mcp_plan_provenance, mcp_plan_remote_install_method, mcp_plan_remote_transport, mcp_plan_required_value, mcp_plan_required_value_enum, mcp_plan_required_value_enum_kind, mcp_plan_required_value_scalar, mcp_plan_required_value_scalar_kind, mcp_plan_resource_identity, mcp_plan_scalar_value_type, mcp_plan_scope, mcp_plan_secret_placeholder, mcp_plan_secret_reference, mcp_plan_target, mcp_plan_transport_choice, mcp_plan_transport_choice_package, mcp_plan_transport_choice_remote, mcp_plan_value_category, 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_card_embedded, mcp_server_card_embedded_kind, mcp_server_card_media_type, mcp_server_card_reference, mcp_server_card_url, mcp_server_card_url_kind, 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_apply_startup_overlay_request, 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_message, model_picker_category, model_picker_persistence_request, model_picker_price_category, model_picker_settings_context, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_confirmation, model_switch_to_request, model_switch_to_result, model_warning_text, mode_set_request, mode_set_result, move_mcp_loading_to_background_result, 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_mode_source, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_rules_set, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_folder_trust_add_trusted_result, permissions_get_mode_request, permissions_get_mode_result, 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_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_mode_request, permissions_set_mode_result, 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, protocol_external_tool_defer, protocol_external_tool_definition, 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_source, 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, settable_auth_info, settable_token_auth_info, shell_cancel_user_requested_request, shell_credentials, 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_config_set_skill_disabled_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_add_timeline_entry_result, 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_model_picker_dialog, slash_command_select_subcommand_option, slash_command_select_subcommand_result, slash_command_set_model_result, slash_command_set_plan_model_result, slash_command_show_dialog_result, slash_command_text_result, slash_command_timeline_entry, subagent_settings_entry, subagent_settings_entry_context_tier, task_agent_info, task_agent_progress, task_complete_data, task_completion_decision, 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, token_provider_auth_info, tool, tool_list, tool_result, tool_result_expanded, tool_result_new_message, tool_result_type, tools_execute_request, tools_get_builtin_descriptors_request, tools_get_builtin_descriptors_result, tools_get_current_metadata_result, tools_initialize_and_validate_result, tools_list_request, tools_set_request, tools_set_result, tools_shell_descriptor_config, tools_task_complete_event_data_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_agent_metric, 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 = {} @@ -36980,6 +37399,7 @@ def to_dict(self) -> dict: result["CompletionsRequestRequest"] = to_class(CompletionsRequestRequest, self.completions_request_request) result["CompletionsRequestResult"] = to_class(CompletionsRequestResult, self.completions_request_result) result["ConfigureSessionExtensionsParams"] = to_class(_ConfigureSessionExtensionsParams, self.configure_session_extensions_params) + result["ConnectClientInfo"] = to_class(_ConnectClientInfo, self.connect_client_info) result["ConnectedRemoteSessionMetadata"] = to_class(ConnectedRemoteSessionMetadata, self.connected_remote_session_metadata) result["ConnectedRemoteSessionMetadataKind"] = to_enum(ConnectedRemoteSessionMetadataKind, self.connected_remote_session_metadata_kind) result["ConnectedRemoteSessionMetadataRepository"] = to_class(ConnectedRemoteSessionMetadataRepository, self.connected_remote_session_metadata_repository) @@ -37011,7 +37431,6 @@ def to_dict(self) -> dict: result["DebugCollectLogsResultKind"] = to_enum(DebugCollectLogsResultKind, self.debug_collect_logs_result_kind) result["DebugCollectLogsSkippedEntry"] = to_class(DebugCollectLogsSkippedEntry, self.debug_collect_logs_skipped_entry) result["DebugCollectLogsSource"] = to_enum(DebugCollectLogsSource, self.debug_collect_logs_source) - result["DisableBypassPermissionsMode"] = to_enum(DisableBypassPermissionsMode, self.disable_bypass_permissions_mode) result["DiscoveredCanvas"] = to_class(DiscoveredCanvas, self.discovered_canvas) result["DiscoveredExtension"] = to_class(DiscoveredExtension, self.discovered_extension) result["DiscoveredExtensionMode"] = to_enum(DiscoveredExtensionMode, self.discovered_extension_mode) @@ -37108,6 +37527,9 @@ def to_dict(self) -> dict: result["GitHubTelemetryClientInfo"] = to_class(GitHubTelemetryClientInfo, self.git_hub_telemetry_client_info) result["GitHubTelemetryEvent"] = to_class(GitHubTelemetryEvent, self.git_hub_telemetry_event) result["GitHubTelemetryNotification"] = to_class(GitHubTelemetryNotification, self.git_hub_telemetry_notification) + result["GitHubTokenAcquireReason"] = to_enum(GitHubTokenAcquireReason, self.git_hub_token_acquire_reason) + result["GitHubTokenAcquireRequest"] = to_class(GitHubTokenAcquireRequest, self.git_hub_token_acquire_request) + result["GitHubTokenAcquireResult"] = to_class(GitHubTokenAcquireResult, self.git_hub_token_acquire_result) result["HandlePendingToolCallRequest"] = to_class(HandlePendingToolCallRequest, self.handle_pending_tool_call_request) result["HandlePendingToolCallResult"] = to_class(HandlePendingToolCallResult, self.handle_pending_tool_call_result) result["HistoryAbortManualCompactionResult"] = to_class(HistoryAbortManualCompactionResult, self.history_abort_manual_compaction_result) @@ -37364,6 +37786,7 @@ def to_dict(self) -> dict: result["ModelCapabilitiesSupports"] = to_class(ModelCapabilitiesSupports, self.model_capabilities_supports) result["ModelList"] = to_class(ModelList, self.model_list) result["ModelListRequest"] = self.model_list_request + result["ModelMessage"] = to_class(ModelMessage, self.model_message) result["ModelPickerCategory"] = to_enum(ModelPickerCategory, self.model_picker_category) result["ModelPickerPersistenceRequest"] = to_class(ModelPickerPersistenceRequest, self.model_picker_persistence_request) result["ModelPickerPriceCategory"] = to_enum(ModelPickerPriceCategory, self.model_picker_price_category) @@ -37376,6 +37799,7 @@ def to_dict(self) -> dict: result["ModelSwitchConfirmation"] = to_class(ModelSwitchConfirmation, self.model_switch_confirmation) result["ModelSwitchToRequest"] = to_class(ModelSwitchToRequest, self.model_switch_to_request) result["ModelSwitchToResult"] = to_class(ModelSwitchToResult, self.model_switch_to_result) + result["ModelWarningText"] = to_class(ModelWarningText, self.model_warning_text) result["ModeSetRequest"] = to_class(ModeSetRequest, self.mode_set_request) result["ModeSetResult"] = to_class(ModeSetResult, self.mode_set_result) result["MoveMcpLoadingToBackgroundResult"] = to_class(MoveMCPLoadingToBackgroundResult, self.move_mcp_loading_to_background_result) @@ -37626,6 +38050,7 @@ def to_dict(self) -> dict: result["RunOptions"] = to_class(RunOptions, self.run_options) result["SandboxConfig"] = to_class(SandboxConfig, self.sandbox_config) result["SandboxConfigAuth"] = to_class(SandboxConfigAuth, self.sandbox_config_auth) + result["SandboxConfigSource"] = to_enum(_SandboxConfigSource, self.sandbox_config_source) result["SandboxConfigUserPolicy"] = to_class(SandboxConfigUserPolicy, self.sandbox_config_user_policy) result["SandboxConfigUserPolicyExperimental"] = to_class(SandboxConfigUserPolicyExperimental, self.sandbox_config_user_policy_experimental) result["SandboxConfigUserPolicyExperimentalSeatbelt"] = to_class(SandboxConfigUserPolicyExperimentalSeatbelt, self.sandbox_config_user_policy_experimental_seatbelt) @@ -37823,6 +38248,8 @@ def to_dict(self) -> dict: result["SessionVisibilityStatus"] = to_enum(SessionVisibilityStatus, self.session_visibility_status) result["SessionWorkingDirectoryContext"] = to_class(SessionWorkingDirectoryContext, self.session_working_directory_context) result["SessionWorkingDirectoryContextHostType"] = to_enum(HostType, self.session_working_directory_context_host_type) + result["SettableAuthInfo"] = (self.settable_auth_info).to_dict() + result["SettableTokenAuthInfo"] = to_class(SettableTokenAuthInfo, self.settable_token_auth_info) result["ShellCancelUserRequestedRequest"] = to_class(ShellCancelUserRequestedRequest, self.shell_cancel_user_requested_request) result["ShellCredentials"] = to_class(ShellCredentials, self.shell_credentials) result["ShellExecRequest"] = to_class(ShellExecRequest, self.shell_exec_request) @@ -37899,6 +38326,7 @@ def to_dict(self) -> dict: result["TasksWaitForPendingResult"] = to_class(TasksWaitForPendingResult, self.tasks_wait_for_pending_result) result["TelemetrySetFeatureOverridesRequest"] = to_class(TelemetrySetFeatureOverridesRequest, self.telemetry_set_feature_overrides_request) result["TokenAuthInfo"] = to_class(TokenAuthInfo, self.token_auth_info) + result["TokenProviderAuthInfo"] = to_class(TokenProviderAuthInfo, self.token_provider_auth_info) result["Tool"] = to_class(Tool, self.tool) result["ToolList"] = to_class(ToolList, self.tool_list) result["ToolResult"] = from_union([lambda x: to_class(ToolResultExpanded, x), from_str], self.tool_result) @@ -38030,7 +38458,7 @@ def _load_AgentRegistrySpawnResult(obj: Any) -> "AgentRegistrySpawnResult": case _: raise ValueError(f"Unknown AgentRegistrySpawnResult kind: {kind!r}") # Authentication credentials accepted only at native protocol ingress. Runtime outputs use credential-free `AuthIdentity` metadata. -AuthInfo = HMACAuthInfo | EnvAuthInfo | TokenAuthInfo | CopilotAPITokenAuthInfo | UserAuthInfo | GhCLIAuthInfo | APIKeyAuthInfo +AuthInfo = HMACAuthInfo | EnvAuthInfo | TokenAuthInfo | TokenProviderAuthInfo | CopilotAPITokenAuthInfo | UserAuthInfo | GhCLIAuthInfo | APIKeyAuthInfo def _load_AuthInfo(obj: Any) -> "AuthInfo": assert isinstance(obj, dict) @@ -38039,6 +38467,7 @@ def _load_AuthInfo(obj: Any) -> "AuthInfo": case "hmac": return HMACAuthInfo.from_dict(obj) case "env": return EnvAuthInfo.from_dict(obj) case "token": return TokenAuthInfo.from_dict(obj) + case "token-provider": return TokenProviderAuthInfo.from_dict(obj) case "copilot-api-token": return CopilotAPITokenAuthInfo.from_dict(obj) case "user": return UserAuthInfo.from_dict(obj) case "gh-cli": return GhCLIAuthInfo.from_dict(obj) @@ -38317,6 +38746,22 @@ def _load_SessionOpenParams(obj: Any) -> "SessionOpenParams": case "handoff": return SessionsOpenHandoff.from_dict(obj) case _: raise ValueError(f"Unknown SessionOpenParams kind: {kind!r}") +# Authentication credentials accepted by session.gitHubAuth.setCredentials. Session-owned token-provider identities cannot be installed through this method. +SettableAuthInfo = HMACAuthInfo | EnvAuthInfo | SettableTokenAuthInfo | CopilotAPITokenAuthInfo | UserAuthInfo | GhCLIAuthInfo | APIKeyAuthInfo + +def _load_SettableAuthInfo(obj: Any) -> "SettableAuthInfo": + assert isinstance(obj, dict) + kind = obj.get("type") + match kind: + case "hmac": return HMACAuthInfo.from_dict(obj) + case "env": return EnvAuthInfo.from_dict(obj) + case "token": return SettableTokenAuthInfo.from_dict(obj) + case "copilot-api-token": return CopilotAPITokenAuthInfo.from_dict(obj) + case "user": return UserAuthInfo.from_dict(obj) + case "gh-cli": return GhCLIAuthInfo.from_dict(obj) + case "api-key": return APIKeyAuthInfo.from_dict(obj) + case _: raise ValueError(f"Unknown SettableAuthInfo type: {kind!r}") + # Result of invoking the slash command (text output, prompt to send to the agent, completion, or subcommand selection). SlashCommandInvocationResult = SlashCommandTextResult | SlashCommandAgentPromptResult | SlashCommandCompletedResult | SlashCommandSelectSubcommandResult | SlashCommandAddTimelineEntryResult | SlashCommandShowDialogResult | SlashCommandSetModelResult | SlashCommandSetPlanModelResult @@ -40063,7 +40508,7 @@ async def list(self, *, timeout: float | None = None) -> PermissionPathsList: return PermissionPathsList.from_dict(await self._client.request("session.permissions.paths.list", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) async def add(self, params: PermissionPathsAddParams, *, timeout: float | None = None) -> PermissionsPathsAddResult: - "Adds a directory to the session's allow-list.\n\nArgs:\n params: Directory path to add to the session's allowed directories.\n\nReturns:\n Indicates whether the operation succeeded." + "Adds a directory to the session's allow-list and activates conventional skill and agent definitions under it.\n\nArgs:\n params: Directory path to add to the session's allowed directories.\n\nReturns:\n Indicates whether the operation succeeded." 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 PermissionsPathsAddResult.from_dict(await self._client.request("session.permissions.paths.add", params_dict, **_timeout_kwargs(timeout))) @@ -41123,12 +41568,19 @@ async def event(self, params: GitHubTelemetryNotification) -> None: "Forwards a single GitHub telemetry event to a host connection that opted into telemetry forwarding during the `server.connect` handshake. Opted-in connections receive every event the runtime emits after the handshake — across all sessions, plus sessionless events (for example, `server.sendTelemetry` calls with no session id).\n\nArgs:\n params: Payload for a `gitHubTelemetry.event` notification: a single GitHub telemetry event the runtime forwards to a host connection that opted into telemetry forwarding during the `server.connect` handshake." pass +# Experimental: this API group is experimental and may change or be removed. +class GitHubTokenHandler(Protocol): + async def get_token(self, params: GitHubTokenAcquireRequest) -> GitHubTokenAcquireResult: + "Asks the SDK client to mint a GitHub access token for a session whose configuration supplied a GitHub token provider. The runtime acquires the initial token during bootstrap and refreshes it during expiry preflight when one hour or less remains.\n\nArgs:\n params: Asks the SDK client to acquire a GitHub access token from an opaque callback registration.\n\nReturns:\n SDK host response to a GitHub credential request." + pass + @dataclass class ClientGlobalApiHandlers: hooks: HooksHandler | None = None extension_launch_provider: ExtensionLaunchProviderHandler | None = None llm_inference: LlmInferenceHandler | None = None git_hub_telemetry: GitHubTelemetryHandler | None = None + git_hub_token: GitHubTokenHandler | None = None def register_client_global_api_handlers( client: "JsonRpcClient", @@ -41175,6 +41627,13 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: await handler.event(request) return None client.set_notification_method_handler("gitHubTelemetry.event", handle_git_hub_telemetry_event) + async def handle_git_hub_token_get_token(params: dict) -> dict | None: + request = GitHubTokenAcquireRequest.from_dict(params) + handler = handlers.git_hub_token + if handler is None: raise RuntimeError("No git_hub_token client-global handler registered") + result = await handler.get_token(request) + return result.value if hasattr(result, 'value') else result + client.set_request_handler("gitHubToken.getToken", handle_git_hub_token_get_token) __all__ = [ "APIKeyAuthInfo", @@ -41386,7 +41845,6 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "DebugCollectLogsResultKind", "DebugCollectLogsSkippedEntry", "DebugCollectLogsSource", - "DisableBypassPermissionsMode", "DiscoveredCanvas", "DiscoveredExtension", "DiscoveredExtensionMode", @@ -41506,6 +41964,11 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "GitHubTelemetryEvent", "GitHubTelemetryHandler", "GitHubTelemetryNotification", + "GitHubTokenAcquireReason", + "GitHubTokenAcquireRequest", + "GitHubTokenAcquireResult", + "GitHubTokenAcquireResultKind", + "GitHubTokenHandler", "HMACAuthInfo", "HMACAuthInfoType", "HandlePendingToolCallRequest", @@ -41632,7 +42095,6 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "MCPOauthLoginRequest", "MCPOauthLoginResult", "MCPOauthPendingRequestResponse", - "MCPOauthPendingRequestResponseKind", "MCPOauthProbeNeedsAuthReason", "MCPOauthProbeRequest", "MCPOauthProbeResult", @@ -41804,6 +42266,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "ModelCapabilitiesSupports", "ModelList", "ModelListRequest", + "ModelMessage", "ModelPickerCategory", "ModelPickerPersistenceRequest", "ModelPickerPriceCategory", @@ -41815,6 +42278,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "ModelSwitchConfirmation", "ModelSwitchToRequest", "ModelSwitchToResult", + "ModelWarningText", "ModelsListRequest", "MoveMCPLoadingToBackgroundResult", "NameApi", @@ -42362,6 +42826,10 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "SessionsStartRemoteControlRequest", "SessionsStopRemoteControlRequest", "SessionsTransferRemoteControlRequest", + "SettableAuthInfo", + "SettableAuthInfoType", + "SettableTokenAuthInfo", + "SettableTokenAuthInfoType", "ShellApi", "ShellCancelUserRequestedRequest", "ShellCredentials", @@ -42461,7 +42929,8 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "TelemetrySetFeatureOverridesRequest", "Theme", "TokenAuthInfo", - "TokenAuthInfoType", + "TokenProviderAuthInfo", + "TokenProviderAuthInfoType", "Tool", "ToolList", "ToolResult", diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py index 68117bdc01..528e6657fc 100644 --- a/python/copilot/generated/session_events.py +++ b/python/copilot/generated/session_events.py @@ -173,6 +173,7 @@ class SessionEventType(Enum): ASSISTANT_USAGE = "assistant.usage" PROMPT_CACHE_BREAK = "prompt_cache_break" MODEL_CALL_FAILURE = "model.call_failure" + MODEL_CALL_FINISHED = "model.call_finished" MODEL_CALL_START = "model.call_start" ABORT = "abort" TOOL_USER_REQUESTED = "tool.user_requested" @@ -381,6 +382,31 @@ def to_dict(self) -> dict: return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class AssistantMessageReasoningBlocks: + "Neutral provider-tagged reasoning content blocks preserved verbatim for round-tripping" + provider: str + blocks: list[Any] | None = None + + @staticmethod + def from_dict(obj: Any) -> "AssistantMessageReasoningBlocks": + assert isinstance(obj, dict) + provider = from_str(obj.get("provider")) + blocks = from_union([from_none, lambda x: from_list(lambda x: x, x)], obj.get("blocks")) + return AssistantMessageReasoningBlocks( + provider=provider, + blocks=blocks, + ) + + def to_dict(self) -> dict: + result: dict = {} + result["provider"] = from_str(self.provider) + if self.blocks is not None: + result["blocks"] = from_union([from_none, lambda x: from_list(lambda x: x, x)], self.blocks) + return result + + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AssistantMessageServerTools: @@ -1297,6 +1323,7 @@ class SessionManagedSettingsResolvedData: source: ManagedSettingsResolvedSource client_managed: bool | None = None permissions_allow_intersected: bool | None = None + sandbox_enabled_by_undetermined_policy: bool | None = None settings: Any = None @staticmethod @@ -1310,6 +1337,7 @@ def from_dict(obj: Any) -> "SessionManagedSettingsResolvedData": source = parse_enum(ManagedSettingsResolvedSource, obj.get("source")) client_managed = from_union([from_none, from_bool], obj.get("clientManaged")) permissions_allow_intersected = from_union([from_none, from_bool], obj.get("permissionsAllowIntersected")) + sandbox_enabled_by_undetermined_policy = from_union([from_none, from_bool], obj.get("sandboxEnabledByUndeterminedPolicy")) settings = obj.get("settings") return SessionManagedSettingsResolvedData( bypass_permissions_disabled=bypass_permissions_disabled, @@ -1320,6 +1348,7 @@ def from_dict(obj: Any) -> "SessionManagedSettingsResolvedData": source=source, client_managed=client_managed, permissions_allow_intersected=permissions_allow_intersected, + sandbox_enabled_by_undetermined_policy=sandbox_enabled_by_undetermined_policy, settings=settings, ) @@ -1335,6 +1364,8 @@ def to_dict(self) -> dict: result["clientManaged"] = from_union([from_none, from_bool], self.client_managed) if self.permissions_allow_intersected is not None: result["permissionsAllowIntersected"] = from_union([from_none, from_bool], self.permissions_allow_intersected) + if self.sandbox_enabled_by_undetermined_policy is not None: + result["sandboxEnabledByUndeterminedPolicy"] = from_union([from_none, from_bool], self.sandbox_enabled_by_undetermined_policy) if self.settings is not None: result["settings"] = self.settings return result @@ -1564,6 +1595,7 @@ class AssistantMessageData: # Deprecated: this field is deprecated. parent_tool_call_id: str | None = None phase: str | None = None + reasoning_blocks: AssistantMessageReasoningBlocks | None = None reasoning_opaque: str | None = None reasoning_text: str | None = None reasoning_wire_field: str | None = None @@ -1590,6 +1622,7 @@ def from_dict(obj: Any) -> "AssistantMessageData": output_tokens = from_union([from_none, from_int], obj.get("outputTokens")) parent_tool_call_id = from_union([from_none, from_str], obj.get("parentToolCallId")) phase = from_union([from_none, from_str], obj.get("phase")) + reasoning_blocks = from_union([from_none, AssistantMessageReasoningBlocks.from_dict], obj.get("reasoningBlocks")) reasoning_opaque = from_union([from_none, from_str], obj.get("reasoningOpaque")) reasoning_text = from_union([from_none, from_str], obj.get("reasoningText")) reasoning_wire_field = from_union([from_none, from_str], obj.get("reasoningWireField")) @@ -1613,6 +1646,7 @@ def from_dict(obj: Any) -> "AssistantMessageData": output_tokens=output_tokens, parent_tool_call_id=parent_tool_call_id, phase=phase, + reasoning_blocks=reasoning_blocks, reasoning_opaque=reasoning_opaque, reasoning_text=reasoning_text, reasoning_wire_field=reasoning_wire_field, @@ -1650,6 +1684,8 @@ def to_dict(self) -> dict: result["parentToolCallId"] = from_union([from_none, from_str], self.parent_tool_call_id) if self.phase is not None: result["phase"] = from_union([from_none, from_str], self.phase) + if self.reasoning_blocks is not None: + result["reasoningBlocks"] = from_union([from_none, lambda x: to_class(AssistantMessageReasoningBlocks, x)], self.reasoning_blocks) if self.reasoning_opaque is not None: result["reasoningOpaque"] = from_union([from_none, from_str], self.reasoning_opaque) if self.reasoning_text is not None: @@ -2080,6 +2116,7 @@ class AssistantUsageData: # 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 + output_ttft: timedelta | None = None # Deprecated: this field is deprecated. parent_tool_call_id: str | None = None provider_call_id: str | None = None @@ -2127,6 +2164,7 @@ def from_dict(obj: Any) -> "AssistantUsageData": 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")) + output_ttft = from_union([from_none, from_timedelta], obj.get("outputTtftMs")) 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")) @@ -2167,6 +2205,7 @@ def from_dict(obj: Any) -> "AssistantUsageData": max_prompt_tokens=max_prompt_tokens, _num_tool_calls=_num_tool_calls, output_tokens=output_tokens, + output_ttft=output_ttft, parent_tool_call_id=parent_tool_call_id, provider_call_id=provider_call_id, _quota_snapshots=_quota_snapshots, @@ -2235,6 +2274,8 @@ def to_dict(self) -> dict: result["numToolCalls"] = from_union([from_none, to_int], self._num_tool_calls) if self.output_tokens is not None: result["outputTokens"] = from_union([from_none, to_int], self.output_tokens) + if self.output_ttft is not None: + result["outputTtftMs"] = from_union([from_none, to_timedelta], self.output_ttft) if self.parent_tool_call_id is not None: result["parentToolCallId"] = from_union([from_none, from_str], self.parent_tool_call_id) if self.provider_call_id is not None: @@ -4613,6 +4654,47 @@ def to_dict(self) -> dict: return result +@dataclass +class ModelCallFinishedData: + "Final lifecycle outcome for one logical model dispatch. A logical dispatch may include internal reconnect or fallback work, so event count is not provider HTTP-request count." + dispatch_duration: timedelta + edit_classifier_version: int + outcome: ModelCallFinishedOutcome + turn_id: str + contains_built_in_file_edit_request: bool | None = None + interaction_id: str | None = None + + @staticmethod + def from_dict(obj: Any) -> "ModelCallFinishedData": + assert isinstance(obj, dict) + dispatch_duration = from_timedelta(obj.get("dispatchDurationMs")) + edit_classifier_version = from_int(obj.get("editClassifierVersion")) + outcome = parse_enum(ModelCallFinishedOutcome, obj.get("outcome")) + turn_id = from_str(obj.get("turnId")) + contains_built_in_file_edit_request = from_union([from_none, from_bool], obj.get("containsBuiltInFileEditRequest")) + interaction_id = from_union([from_none, from_str], obj.get("interactionId")) + return ModelCallFinishedData( + dispatch_duration=dispatch_duration, + edit_classifier_version=edit_classifier_version, + outcome=outcome, + turn_id=turn_id, + contains_built_in_file_edit_request=contains_built_in_file_edit_request, + interaction_id=interaction_id, + ) + + def to_dict(self) -> dict: + result: dict = {} + result["dispatchDurationMs"] = to_timedelta(self.dispatch_duration) + result["editClassifierVersion"] = to_int(self.edit_classifier_version) + result["outcome"] = to_enum(ModelCallFinishedOutcome, self.outcome) + result["turnId"] = from_str(self.turn_id) + if self.contains_built_in_file_edit_request is not None: + result["containsBuiltInFileEditRequest"] = from_union([from_none, from_bool], self.contains_built_in_file_edit_request) + if self.interaction_id is not None: + result["interactionId"] = from_union([from_none, from_str], self.interaction_id) + return result + + @dataclass class ModelCallStartData: "Model API dispatch metadata for internal telemetry" @@ -5253,6 +5335,7 @@ class PermissionPromptRequestMcp: args: Any = None # Experimental: this field is part of an experimental API and may change or be removed. assisted_approval: PermissionAssistedApproval | None = None + can_offer_server_wide_approval: bool | 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 @@ -5265,6 +5348,7 @@ def from_dict(obj: Any) -> "PermissionPromptRequestMcp": tool_title = from_str(obj.get("toolTitle")) args = obj.get("args") assisted_approval = from_union([from_none, PermissionAssistedApproval.from_dict], obj.get("assistedApproval")) + can_offer_server_wide_approval = from_union([from_none, from_bool], obj.get("canOfferServerWideApproval")) 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( @@ -5273,6 +5357,7 @@ def from_dict(obj: Any) -> "PermissionPromptRequestMcp": tool_title=tool_title, args=args, assisted_approval=assisted_approval, + can_offer_server_wide_approval=can_offer_server_wide_approval, permission_recommendation=permission_recommendation, tool_call_id=tool_call_id, ) @@ -5287,6 +5372,8 @@ def to_dict(self) -> dict: result["args"] = self.args if self.assisted_approval is not None: result["assistedApproval"] = from_union([from_none, lambda x: to_class(PermissionAssistedApproval, x)], self.assisted_approval) + if self.can_offer_server_wide_approval is not None: + result["canOfferServerWideApproval"] = from_union([from_none, from_bool], self.can_offer_server_wide_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: @@ -8428,7 +8515,12 @@ class SubagentCompletedData: agent_name: str tool_call_id: str cancelled: bool | None = None + configured_model_matches_actual: bool | None = None + configured_model_preference: str | None = None duration: timedelta | None = None + explicit_model_matches_preference: bool | None = None + explicit_model_override: str | None = None + first_dispatched_model: str | None = None model: str | None = None total_tokens: int | None = None total_tool_calls: int | None = None @@ -8440,7 +8532,12 @@ def from_dict(obj: Any) -> "SubagentCompletedData": agent_name = from_str(obj.get("agentName")) tool_call_id = from_str(obj.get("toolCallId")) cancelled = from_union([from_none, from_bool], obj.get("cancelled")) + configured_model_matches_actual = from_union([from_none, from_bool], obj.get("configuredModelMatchesActual")) + configured_model_preference = from_union([from_none, from_str], obj.get("configuredModelPreference")) duration = from_union([from_none, from_timedelta], obj.get("durationMs")) + explicit_model_matches_preference = from_union([from_none, from_bool], obj.get("explicitModelMatchesPreference")) + explicit_model_override = from_union([from_none, from_str], obj.get("explicitModelOverride")) + first_dispatched_model = from_union([from_none, from_str], obj.get("firstDispatchedModel")) model = from_union([from_none, from_str], obj.get("model")) total_tokens = from_union([from_none, from_int], obj.get("totalTokens")) total_tool_calls = from_union([from_none, from_int], obj.get("totalToolCalls")) @@ -8449,7 +8546,12 @@ def from_dict(obj: Any) -> "SubagentCompletedData": agent_name=agent_name, tool_call_id=tool_call_id, cancelled=cancelled, + configured_model_matches_actual=configured_model_matches_actual, + configured_model_preference=configured_model_preference, duration=duration, + explicit_model_matches_preference=explicit_model_matches_preference, + explicit_model_override=explicit_model_override, + first_dispatched_model=first_dispatched_model, model=model, total_tokens=total_tokens, total_tool_calls=total_tool_calls, @@ -8462,8 +8564,18 @@ def to_dict(self) -> dict: result["toolCallId"] = from_str(self.tool_call_id) if self.cancelled is not None: result["cancelled"] = from_union([from_none, from_bool], self.cancelled) + if self.configured_model_matches_actual is not None: + result["configuredModelMatchesActual"] = from_union([from_none, from_bool], self.configured_model_matches_actual) + if self.configured_model_preference is not None: + result["configuredModelPreference"] = from_union([from_none, from_str], self.configured_model_preference) if self.duration is not None: result["durationMs"] = from_union([from_none, to_timedelta_int], self.duration) + if self.explicit_model_matches_preference is not None: + result["explicitModelMatchesPreference"] = from_union([from_none, from_bool], self.explicit_model_matches_preference) + if self.explicit_model_override is not None: + result["explicitModelOverride"] = from_union([from_none, from_str], self.explicit_model_override) + if self.first_dispatched_model is not None: + result["firstDispatchedModel"] = from_union([from_none, from_str], self.first_dispatched_model) if self.model is not None: result["model"] = from_union([from_none, from_str], self.model) if self.total_tokens is not None: @@ -8492,7 +8604,12 @@ class SubagentFailedData: agent_name: str error: str tool_call_id: str + configured_model_matches_actual: bool | None = None + configured_model_preference: str | None = None duration: timedelta | None = None + explicit_model_matches_preference: bool | None = None + explicit_model_override: str | None = None + first_dispatched_model: str | None = None model: str | None = None total_tokens: int | None = None total_tool_calls: int | None = None @@ -8504,7 +8621,12 @@ def from_dict(obj: Any) -> "SubagentFailedData": agent_name = from_str(obj.get("agentName")) error = from_str(obj.get("error")) tool_call_id = from_str(obj.get("toolCallId")) + configured_model_matches_actual = from_union([from_none, from_bool], obj.get("configuredModelMatchesActual")) + configured_model_preference = from_union([from_none, from_str], obj.get("configuredModelPreference")) duration = from_union([from_none, from_timedelta], obj.get("durationMs")) + explicit_model_matches_preference = from_union([from_none, from_bool], obj.get("explicitModelMatchesPreference")) + explicit_model_override = from_union([from_none, from_str], obj.get("explicitModelOverride")) + first_dispatched_model = from_union([from_none, from_str], obj.get("firstDispatchedModel")) model = from_union([from_none, from_str], obj.get("model")) total_tokens = from_union([from_none, from_int], obj.get("totalTokens")) total_tool_calls = from_union([from_none, from_int], obj.get("totalToolCalls")) @@ -8513,7 +8635,12 @@ def from_dict(obj: Any) -> "SubagentFailedData": agent_name=agent_name, error=error, tool_call_id=tool_call_id, + configured_model_matches_actual=configured_model_matches_actual, + configured_model_preference=configured_model_preference, duration=duration, + explicit_model_matches_preference=explicit_model_matches_preference, + explicit_model_override=explicit_model_override, + first_dispatched_model=first_dispatched_model, model=model, total_tokens=total_tokens, total_tool_calls=total_tool_calls, @@ -8525,8 +8652,18 @@ def to_dict(self) -> dict: result["agentName"] = from_str(self.agent_name) result["error"] = from_str(self.error) result["toolCallId"] = from_str(self.tool_call_id) + if self.configured_model_matches_actual is not None: + result["configuredModelMatchesActual"] = from_union([from_none, from_bool], self.configured_model_matches_actual) + if self.configured_model_preference is not None: + result["configuredModelPreference"] = from_union([from_none, from_str], self.configured_model_preference) if self.duration is not None: result["durationMs"] = from_union([from_none, to_timedelta_int], self.duration) + if self.explicit_model_matches_preference is not None: + result["explicitModelMatchesPreference"] = from_union([from_none, from_bool], self.explicit_model_matches_preference) + if self.explicit_model_override is not None: + result["explicitModelOverride"] = from_union([from_none, from_str], self.explicit_model_override) + if self.first_dispatched_model is not None: + result["firstDispatchedModel"] = from_union([from_none, from_str], self.first_dispatched_model) if self.model is not None: result["model"] = from_union([from_none, from_str], self.model) if self.total_tokens is not None: @@ -10847,6 +10984,8 @@ class ManagedSettingsEnforcedEscalation(Enum): UNRESTRICTED_PATHS = "unrestricted_paths" # Unrestricted URL fetch access. UNRESTRICTED_URLS = "unrestricted_urls" + # A server-wide MCP "Always Allow" (or `--allow-tool `) blanket that would auto-approve every tool from an MCP server. Capped to per-tool approval; each tool still prompts. + SERVER_WIDE_MCP_APPROVAL = "server_wide_mcp_approval" class ManagedSettingsResolvedSource(Enum): @@ -10979,6 +11118,18 @@ class ModelCallFailureTransport(Enum): WEBSOCKET = "websocket" +class ModelCallFinishedOutcome(Enum): + "Final outcome of one logical model dispatch after response acceptance processing" + # The provider response was accepted for continued agent processing. + SUCCESS = "success" + # The dispatch ended with a provider or transport error. + ERROR = "error" + # The dispatch was cancelled before an accepted response was produced. + CANCELLED = "cancelled" + # The provider response was rejected during post-response acceptance processing. + REJECTED = "rejected" + + class ModelChangeSource(Enum): "Origin of an effective session model change." # The user selected a model directly with `/model `. @@ -11259,7 +11410,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 | AgentInterruptedData | AssistantIntentData | AssistantServerToolProgressData | AssistantReasoningData | AssistantReasoningDeltaData | AssistantToolCallDeltaData | AssistantStreamingDeltaData | AssistantMessageData | AssistantMessageStartData | AssistantMessageDeltaData | AssistantTurnEndData | AssistantIdleData | AssistantUsageData | PromptCacheBreakData | 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 | UiEphemeralQueryData | ExternalToolRequestedData | ExternalToolCompletedData | CommandQueuedData | CommandExecuteData | CommandCompletedData | AutoModeSwitchRequestedData | AutoModeSwitchCompletedData | SessionLimitsExhaustedRequestedData | SessionLimitsExhaustedCompletedData | SessionAutoModeResolvedData | SessionManagedSettingsResolvedData | SessionManagedSettingsEnforcedData | CommandsChangedData | CapabilitiesChangedData | ExitPlanModeRequestedData | ExitPlanModeCompletedData | SessionToolsUpdatedData | SessionBackgroundTasksChangedData | FactoryRunUpdatedData | FactoryRunStartedData | FactoryRunSettledData | 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 | PromptCacheBreakData | ModelCallFailureData | ModelCallFinishedData | 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 | UiEphemeralQueryData | ExternalToolRequestedData | ExternalToolCompletedData | CommandQueuedData | CommandExecuteData | CommandCompletedData | AutoModeSwitchRequestedData | AutoModeSwitchCompletedData | SessionLimitsExhaustedRequestedData | SessionLimitsExhaustedCompletedData | SessionAutoModeResolvedData | SessionManagedSettingsResolvedData | SessionManagedSettingsEnforcedData | CommandsChangedData | CapabilitiesChangedData | ExitPlanModeRequestedData | ExitPlanModeCompletedData | SessionToolsUpdatedData | SessionBackgroundTasksChangedData | FactoryRunUpdatedData | FactoryRunStartedData | FactoryRunSettledData | SessionSkillsLoadedData | SessionCustomAgentsUpdatedData | SessionMcpServersLoadedData | SessionMcpServerStatusChangedData | McpToolsListChangedData | McpResourcesListChangedData | McpPromptsListChangedData | SessionExtensionsLoadedData | SessionCanvasOpenedData | SessionCanvasRegistryChangedData | SessionCanvasClosedData | SessionCanvasUnavailableData | SessionCanvasRecordedData | SessionCanvasRemovedData | SessionExtensionsAttachmentsPushedData | McpAppToolCallCompleteData | RawSessionEventData | Data @dataclass @@ -11334,6 +11485,7 @@ def from_dict(obj: Any) -> "SessionEvent": case SessionEventType.ASSISTANT_USAGE: data = AssistantUsageData.from_dict(data_obj) case SessionEventType.PROMPT_CACHE_BREAK: data = PromptCacheBreakData.from_dict(data_obj) case SessionEventType.MODEL_CALL_FAILURE: data = ModelCallFailureData.from_dict(data_obj) + case SessionEventType.MODEL_CALL_FINISHED: data = ModelCallFinishedData.from_dict(data_obj) case SessionEventType.MODEL_CALL_START: data = ModelCallStartData.from_dict(data_obj) case SessionEventType.ABORT: data = AbortData.from_dict(data_obj) case SessionEventType.TOOL_USER_REQUESTED: data = ToolUserRequestedData.from_dict(data_obj) @@ -11449,6 +11601,7 @@ def session_event_to_dict(x: SessionEvent) -> Any: "AssistantIntentData", "AssistantMessageData", "AssistantMessageDeltaData", + "AssistantMessageReasoningBlocks", "AssistantMessageServerTools", "AssistantMessageStartData", "AssistantMessageToolRequest", @@ -11586,6 +11739,8 @@ def session_event_to_dict(x: SessionEvent) -> Any: "ModelCallFailureRequestFingerprint", "ModelCallFailureSource", "ModelCallFailureTransport", + "ModelCallFinishedData", + "ModelCallFinishedOutcome", "ModelCallStartData", "ModelChangeSource", "OmittedBinaryOmittedReason", diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs index 0583c09229..ce30a5e0ee 100644 --- a/rust/src/generated/api_types.rs +++ b/rust/src/generated/api_types.rs @@ -1205,12 +1205,37 @@ pub struct TokenAuthInfo { pub copilot_user: Option, /// Authentication host. pub host: String, + /// Opaque native GitHub credential registration backing this token identity, when applicable. + #[serde(skip_serializing_if = "Option::is_none")] + pub registration_id: Option, /// The token value itself. Treat as a secret. pub token: String, /// SDK-side token authentication; the host configured the token directly via the SDK. pub r#type: TokenAuthInfoType, } +/// Authentication-info variant backed by an SDK GitHub token callback. It carries routing metadata but never a plaintext token. +/// +///
+/// +/// **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 TokenProviderAuthInfo { + /// Snapshot of the authenticated user's Copilot subscription info, if known. + #[serde(skip_serializing_if = "Option::is_none")] + pub copilot_user: Option, + /// Authentication host. + pub host: String, + /// Opaque SDK callback registration identifier. + pub registration_id: String, + /// SDK callback-backed GitHub token authentication. + pub r#type: TokenProviderAuthInfoType, +} + /// Authentication-info variant for direct Copilot API token auth sourced from environment variables, with public GitHub host. /// ///
@@ -2435,6 +2460,9 @@ pub struct AuthIdentity { /// Authenticated login, when available #[serde(skip_serializing_if = "Option::is_none")] pub login: Option, + /// Opaque SDK GitHub credential registration backing this identity. Routing metadata only; never a credential. + #[serde(skip_serializing_if = "Option::is_none")] + pub registration_id: Option, /// Authentication type pub r#type: AuthInfoType, } @@ -3822,6 +3850,31 @@ pub(crate) struct ConfigureSessionExtensionsParams { pub session_id: SessionId, } +/// Identity of the integrating host, declared once on the `server.connect` handshake so telemetry from this connection is attributed to a single, consistent surface. All fields are optional; omit them to keep the default attribution. +/// +///
+/// +/// **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 ConnectClientInfo { + /// Name of the host editor, e.g. `"vscode"`. + #[serde(skip_serializing_if = "Option::is_none")] + pub editor_name: Option, + /// Version of the host editor, e.g. `"1.124.2"`. Ignored unless it looks like a version string. + #[serde(skip_serializing_if = "Option::is_none")] + pub editor_version: Option, + /// Name of the Copilot extension within the host, e.g. `"copilot-chat"`. + #[serde(skip_serializing_if = "Option::is_none")] + pub extension_name: Option, + /// Version of the Copilot extension within the host, e.g. `"0.54.0"`. Ignored unless it looks like a version string. + #[serde(skip_serializing_if = "Option::is_none")] + pub extension_version: Option, +} + /// Repository associated with the connected remote session. /// ///
@@ -3908,6 +3961,10 @@ pub struct ConnectRemoteSessionParams { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub(crate) struct ConnectRequest { + /// Identity of the integrating host. Optional; omit it to keep the default attribution. + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) client_info: Option, /// Opt this connection in to GitHub telemetry forwarding for its lifetime. When set, the runtime forwards every internal telemetry event it emits — across all sessions, plus sessionless events — to this connection over the `gitHubTelemetry.event` notification. Regular events are also written to the runtime's normal GitHub/CTS path (dual-write); host-only compatibility events are forward-only and intentionally skip that path. Intended for first-party hosts that re-emit the events into their own telemetry stores. Both unrestricted and restricted events are forwarded, each tagged with a `restricted` discriminator; a backstop drops restricted events when restricted telemetry is disabled — using the process-global gate for ordinary events and an explicit session-scoped decision for host-only events. #[serde(skip_serializing_if = "Option::is_none")] pub enable_git_hub_telemetry_forwarding: Option, @@ -5861,6 +5918,49 @@ pub struct GitHubTelemetryNotification { pub session_id: Option, } +/// Asks the SDK client to acquire a GitHub access token from an opaque callback registration. +/// +///
+/// +/// **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 GitHubTokenAcquireRequest { + /// Effective GitHub host for which the callback must return a token. + pub host: String, + /// Why the runtime is requesting a GitHub credential. + pub reason: GitHubTokenAcquireReason, + /// Opaque identifier generated by the SDK for this callback registration. + pub registration_id: String, + /// Session receiving the token. Absent only before a cloud session has been assigned its id. + #[serde(skip_serializing_if = "Option::is_none")] + pub session_id: Option, +} + +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct GitHubTokenAcquireResultToken { + /// GitHub access token acquired by the SDK host. + pub access_token: String, + /// Remaining token lifetime in seconds when callback execution completes. It must exceed the one-hour preflight refresh threshold. + pub expires_in: i64, + /// GitHub credential response variant discriminator. + pub kind: GitHubTokenAcquireResultTokenKind, + /// OAuth token type. Defaults to bearer when omitted. + #[serde(skip_serializing_if = "Option::is_none")] + pub token_type: Option, +} + +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct GitHubTokenAcquireResultCancelled { + /// GitHub credential response variant discriminator. + pub kind: GitHubTokenAcquireResultCancelledKind, +} + /// Pending external tool call request ID, with the tool result or an error describing why it failed. /// ///
@@ -6288,6 +6388,9 @@ pub struct InstalledPlugin { /// Installation timestamp #[serde(rename = "installed_at")] pub installed_at: String, + /// Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key. + #[serde(rename = "installed_from", skip_serializing_if = "Option::is_none")] + pub installed_from: Option, /// Marketplace the plugin came from (empty string for direct repo installs) pub marketplace: String, /// Plugin name @@ -6319,6 +6422,9 @@ pub struct InstalledPluginInfo { pub direct_source_id: Option, /// Whether the plugin is currently enabled for new sessions pub enabled: bool, + /// Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — a plugin belonging to a directory/local marketplace, which is loaded from its real directory on every pass instead of a copy under the installed-plugins cache. Its presence is what marks a listed plugin as live: such a plugin is always present on disk, so `enabled` is its only meaningful state and it is never "not installed". + #[serde(skip_serializing_if = "Option::is_none")] + pub installed_from: Option, /// Marketplace the plugin came from. Empty string ("") for direct repo / URL / local installs. pub marketplace: String, /// Plugin name @@ -7992,7 +8098,7 @@ pub struct McpOauthPendingRequestResponseToken { pub expires_in: Option, /// OAuth response variant discriminator. pub kind: McpOauthPendingRequestResponseTokenKind, - /// OAuth token type. Defaults to Bearer when omitted. + /// OAuth token type. Defaults to bearer when omitted. #[serde(skip_serializing_if = "Option::is_none")] pub token_type: Option, } @@ -9888,6 +9994,23 @@ pub struct ModelCapabilities { pub supports: Option, } +/// A service-published message about a model, carrying a stable machine-readable code alongside human-readable text. +/// +///
+/// +/// **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 ModelMessage { + /// Stable machine-readable identifier for the message, such as `client_version_deprecated`. Hosts can key custom presentation off this; unrecognized codes should fall back to displaying `message`. + pub code: String, + /// Human-readable message text intended for display to the user. + pub message: String, +} + /// Policy state (if applicable) /// ///
@@ -9906,6 +10029,22 @@ pub struct ModelPolicy { pub terms: Option, } +/// Service-published warning text that hosts should display when presenting a model. +/// +///
+/// +/// **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 ModelWarningText { + /// Data-retention warning for the model. The text may contain Markdown links and should be rendered as Markdown when supported. + #[serde(skip_serializing_if = "Option::is_none")] + pub data_retention: Option, +} + /// Copilot model metadata, including identifier, display name, capabilities, policy, billing, reasoning efforts, and picker categories. /// ///
@@ -9927,6 +10066,9 @@ pub struct Model { pub default_reasoning_effort: Option, /// Model identifier (e.g., "claude-sonnet-4.5") pub id: String, + /// Informational notices the service published for this model, such as an upcoming change or a recommended alternative. Present only when the service published at least one notice. Hosts should surface these without implying anything is wrong with the model. + #[serde(skip_serializing_if = "Option::is_none")] + pub info_messages: Option>, /// Model capability category for grouping in the model picker #[serde(skip_serializing_if = "Option::is_none")] pub model_picker_category: Option, @@ -9944,6 +10086,12 @@ pub struct Model { /// Supported reasoning effort levels (only present if model supports reasoning effort) #[serde(skip_serializing_if = "Option::is_none")] pub supported_reasoning_efforts: Option>, + /// Warnings the service published for this model, such as a deprecated client version. Present only when the service published at least one warning. The model remains usable; hosts should surface these as advisory rather than blocking. + #[serde(skip_serializing_if = "Option::is_none")] + pub warning_messages: Option>, + /// Warning text the service requires hosts to surface for this model. Present only when the service published at least one warning. + #[serde(skip_serializing_if = "Option::is_none")] + pub warning_text: Option, } /// Managed, repository, and CLI model overrides to overlay onto the session at startup. @@ -11580,7 +11728,7 @@ pub struct PermissionLocationResolveResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionPathsAddParams { - /// Directory to add to the allow-list. The runtime resolves and validates the path before adding. + /// Directory to add to the allow-list. The runtime resolves and validates the path before adding, then loads conventional `.github/skills/` and `.github/agents/` definitions under it when their subsystem gates are enabled. Adding the directory is therefore also a trust decision for configuration stored there. pub path: String, } @@ -11625,7 +11773,7 @@ pub struct PermissionPathsAllowedCheckResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionPathsConfig { - /// Additional directories to allow tool access to (in addition to the session's working directory). When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion). + /// Additional directories to allow tool access to (in addition to the session's working directory). Conventional `.github/skills/` and `.github/agents/` definitions under them also join the session catalogs when their subsystem gates are enabled, so supplying a directory is a trust decision for configuration stored there. When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion). #[serde(skip_serializing_if = "Option::is_none")] pub additional_directories: Option>, /// Whether to include the system temp directory in the allowed list (defaults to true). Ignored when `unrestricted` is true. @@ -13726,6 +13874,9 @@ pub struct QueuePendingItems { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct QueuePendingItemsResult { + /// How many leading entries of `steeringMessages` have already been folded into the running turn (and so have an emitted `user.message`), as opposed to still waiting for one. Absent for hosts that do not distinguish the two. + #[serde(skip_serializing_if = "Option::is_none")] + pub in_flight_steering_count: Option, /// Pending queued items in submission order. Includes user messages, queued slash commands, and queued model changes; omits internal system items. pub items: Vec, /// Display text for messages currently in the immediate steering queue (interjections sent during a running turn). @@ -14500,7 +14651,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 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). + /// 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 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. @@ -15080,6 +15231,9 @@ pub struct SessionAuthInfoResult { /// Authenticated login, when available #[serde(skip_serializing_if = "Option::is_none")] pub login: Option, + /// Opaque SDK GitHub credential registration backing this identity. Routing metadata only; never a credential. + #[serde(skip_serializing_if = "Option::is_none")] + pub registration_id: Option, /// Authentication type pub r#type: AuthInfoType, } @@ -15842,6 +15996,9 @@ pub struct SessionInstalledPlugin { /// Installation timestamp (ISO-8601) #[serde(rename = "installed_at")] pub installed_at: String, + /// Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key. + #[serde(rename = "installed_from", skip_serializing_if = "Option::is_none")] + pub installed_from: Option, /// Marketplace the plugin came from (empty string for direct repo installs) pub marketplace: String, /// Plugin name @@ -16106,9 +16263,9 @@ pub struct SessionManagedPermissions { /// Permission rules that block matching operations. Deny has highest precedence. #[serde(skip_serializing_if = "Option::is_none")] pub deny: Option>, - /// When set to `disable`, prevents bypass/allow-all permission modes. + /// When set to `disable`, prevents bypass/allow-all permission modes. `allow-auto-only` blocks full allow-all but permits advisory auto-approval. Any other value is accepted rather than failing the session, but is enforced as `disable`: the key is only present to restrict something, so a mode this runtime cannot interpret fails closed to the most restrictive one it knows. Omit the key entirely to impose no restriction. #[serde(skip_serializing_if = "Option::is_none")] - pub disable_bypass_permissions_mode: Option, + pub disable_bypass_permissions_mode: Option, } /// Managed settings an SDK host may inject at session startup. Only permissions are accepted in this initial contract. @@ -16429,7 +16586,7 @@ pub struct SessionOpenOptions { #[serde(skip_serializing_if = "Option::is_none")] pub additional_content_exclusion_policies: Option>, - /// Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied on both session creation and resume, and is not persisted: a resumed session that omits this option does not retain previously supplied directories (re-supply them, exactly as the CLI re-passes `--add-dir`). + /// Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Conventional `.github/skills/` and `.github/agents/` definitions under each directory also join the session's project catalogs when their existing subsystem gates are enabled: added-root skills require both `enableConfigDiscovery` and effective `enableSkills`; added-root agents require `enableConfigDiscovery`. Supplying a directory therefore activates configuration from it and should be treated as a trust decision. Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied during session creation and cold resume and is not persisted, so a cold resume must re-supply the directories. #[serde(skip_serializing_if = "Option::is_none")] pub additional_directories: Option>, /// Runtime context discriminator for agent filtering. @@ -16536,6 +16693,9 @@ pub struct SessionOpenOptions { /// Built-in subagent names to include in this session. When specified, only these built-ins are available, subject to runtime availability and exclusions. Custom agents with the same name remain available. #[serde(skip_serializing_if = "Option::is_none")] pub included_builtin_agents: Option>, + /// Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available. + #[serde(skip_serializing_if = "Option::is_none")] + pub included_builtin_skills: Option>, /// Installed plugins visible to the session. #[serde(skip_serializing_if = "Option::is_none")] pub installed_plugins: Option>, @@ -16613,6 +16773,10 @@ pub struct SessionOpenOptions { /// Resolved sandbox configuration. #[serde(skip_serializing_if = "Option::is_none")] pub sandbox_config: Option, + /// Origin of the sandbox choice. The runtime uses this only for internal telemetry provenance; managed policy is derived independently. + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) sandbox_config_source: Option, /// Capabilities enabled for this session. #[serde(skip_serializing_if = "Option::is_none")] pub session_capabilities: Option>, @@ -17018,7 +17182,7 @@ pub struct SessionsEnrichMetadataRequest { pub struct SessionSetCredentialsParams { /// The new auth credentials to install on the session. When omitted or `undefined`, the call is a no-op and the session's existing credentials are preserved. The runtime installs the supplied value immediately for outbound model/API requests. When the credential carries a raw token (`token`, `env`, or `gh-cli`) but no `copilotUser`, the runtime additionally re-resolves `copilotUser` server-side (best-effort, asynchronously, after the synchronous install) so plan/quota/billing metadata regains fidelity; on resolution failure the verbatim credential remains installed. It does NOT otherwise validate the credential. Several variants carry secret material; treat this method's params as containing secrets at rest and in transit. #[serde(skip_serializing_if = "Option::is_none")] - pub credentials: Option, + pub credentials: Option, } /// Indicates whether the credential update succeeded. @@ -17952,6 +18116,9 @@ pub struct SessionUpdateOptionsParams { /// Built-in subagent names to include in this session. When specified, only these built-ins are available, subject to runtime availability and exclusions. Custom agents with the same name remain available. Set to null to remove the allowlist restriction. #[serde(skip_serializing_if = "Option::is_none")] pub included_builtin_agents: Option>, + /// Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available. Set to null to remove the allowlist restriction. + #[serde(skip_serializing_if = "Option::is_none")] + pub included_builtin_skills: Option>, /// Full set of installed plugins for the session. Replaces the existing list; the runtime invalidates the skills cache only when the list materially changes. #[serde(skip_serializing_if = "Option::is_none")] pub installed_plugins: Option>, @@ -17997,6 +18164,10 @@ pub struct SessionUpdateOptionsParams { /// Resolved sandbox configuration. #[serde(skip_serializing_if = "Option::is_none")] pub sandbox_config: Option, + /// Origin of the sandbox choice. The runtime uses this only for internal telemetry provenance; managed policy is derived independently. + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) sandbox_config_source: Option, /// Replaces the session's capability set with the given list. Use to enable or disable capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the field to leave the existing capability set unchanged. #[serde(skip_serializing_if = "Option::is_none")] pub session_capabilities: Option>, @@ -18058,6 +18229,28 @@ pub struct SessionUpdateOptionsResult { pub success: bool, } +/// Token authentication accepted by session.gitHubAuth.setCredentials. +/// +///
+/// +/// **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 SettableTokenAuthInfo { + /// 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. + #[serde(skip_serializing_if = "Option::is_none")] + pub copilot_user: Option, + /// Authentication host. + pub host: String, + /// The token value itself. Treat as a secret. + pub token: String, + /// SDK-side token authentication; the host configured the token directly via the SDK. + pub r#type: SettableTokenAuthInfoType, +} + /// User-requested shell execution cancellation handle. /// ///
@@ -25891,6 +26084,9 @@ pub struct SessionQueuePendingItemsParams { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionQueuePendingItemsResult { + /// How many leading entries of `steeringMessages` have already been folded into the running turn (and so have an emitted `user.message`), as opposed to still waiting for one. Absent for hosts that do not distinguish the two. + #[serde(skip_serializing_if = "Option::is_none")] + pub in_flight_steering_count: Option, /// Pending queued items in submission order. Includes user messages, queued slash commands, and queued model changes; omits internal system items. pub items: Vec, /// Display text for messages currently in the immediate steering queue (interjections sent during a running turn). @@ -26853,6 +27049,14 @@ pub enum TokenAuthInfoType { Token, } +/// SDK callback-backed GitHub token authentication. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum TokenProviderAuthInfoType { + #[serde(rename = "token-provider")] + #[default] + TokenProvider, +} + /// Authentication host (always the public GitHub host). #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum CopilotApiTokenAuthInfoHost { @@ -26907,6 +27111,7 @@ pub enum AuthInfo { Hmac(HMACAuthInfo), Env(EnvAuthInfo), Token(TokenAuthInfo), + TokenProvider(TokenProviderAuthInfo), CopilotApiToken(CopilotApiTokenAuthInfo), User(UserAuthInfo), GhCli(GhCliAuthInfo), @@ -27423,6 +27628,9 @@ pub enum AuthInfoType { /// Authentication from a GitHub token. #[serde(rename = "token")] Token, + /// Authentication from an SDK GitHub token callback. + #[serde(rename = "token-provider")] + TokenProvider, /// Authentication from a Copilot API token. #[serde(rename = "copilot-api-token")] CopilotApiToken, @@ -28461,23 +28669,6 @@ pub enum DebugCollectLogsResultKind { Unknown, } -/// -///
-/// -/// **Experimental.** This type is part of an experimental wire-protocol surface -/// and may change or be removed in future SDK or CLI releases. -/// -///
-#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum DisableBypassPermissionsMode { - #[serde(rename = "disable")] - Disable, - /// Unknown variant for forward compatibility. - #[default] - #[serde(other)] - Unknown, -} - /// Persisted extension discovery source /// ///
@@ -28941,6 +29132,52 @@ pub enum FactoryRunFailureKind { Unknown, } +/// Why the runtime is requesting a GitHub credential. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum GitHubTokenAcquireReason { + /// The runtime is acquiring the registration's first credential. + #[serde(rename = "initial")] + Initial, + /// The runtime is replacing a credential that is approaching expiry. + #[serde(rename = "refresh")] + Refresh, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// GitHub credential response variant discriminator. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum GitHubTokenAcquireResultTokenKind { + #[serde(rename = "token")] + #[default] + Token, +} + +/// GitHub credential response variant discriminator. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum GitHubTokenAcquireResultCancelledKind { + #[serde(rename = "cancelled")] + #[default] + Cancelled, +} + +/// SDK host response to a GitHub credential request. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GitHubTokenAcquireResult { + Token(GitHubTokenAcquireResultToken), + Cancelled(GitHubTokenAcquireResultCancelled), +} + /// What initiated this compaction request, recorded as the `trigger` on the persisted `session.compaction_start` / `session.compaction_complete` events. When absent, the compaction is persisted without trigger attribution (initiator unknown). #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum HistoryCompactRequestTrigger { @@ -31743,6 +31980,43 @@ pub enum RemoteSessionMetadataTaskType { Unknown, } +/// Origin of the sandbox choice supplied by an internal client. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SandboxConfigSource { + /// The client applied the default because no sandbox preference was configured. + #[serde(rename = "never_configured")] + NeverConfigured, + /// The user's persisted settings enabled the sandbox. + #[serde(rename = "user_enabled")] + UserEnabled, + /// The user's persisted settings disabled the sandbox. + #[serde(rename = "user_disabled")] + UserDisabled, + /// A command-line flag selected the sandbox state for this session. + #[serde(rename = "session_flag")] + SessionFlag, + /// The user disabled the sandbox for the current session. + #[serde(rename = "session_disabled")] + SessionDisabled, + /// The client disabled the sandbox because the host cannot enforce it. + #[serde(rename = "unsupported_host")] + UnsupportedHost, + /// A repository policy selected the sandbox state. + #[serde(rename = "repository_policy")] + RepositoryPolicy, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Session capability enabled for this session /// ///
@@ -32498,6 +32772,14 @@ pub enum SessionVisibilityStatus { Unknown, } +/// SDK-side token authentication; the host configured the token directly via the SDK. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SettableTokenAuthInfoType { + #[serde(rename = "token")] + #[default] + Token, +} + /// Signal to send (default: SIGTERM) /// ///
diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs index c955637e31..60bf9d804f 100644 --- a/rust/src/generated/rpc.rs +++ b/rust/src/generated/rpc.rs @@ -8205,7 +8205,7 @@ impl<'a> SessionRpcPermissionsPaths<'a> { Ok(serde_json::from_value(_value)?) } - /// Adds a directory to the session's allow-list. + /// Adds a directory to the session's allow-list and activates conventional skill and agent definitions under it. /// /// Wire method: `session.permissions.paths.add`. /// diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs index 1a7ca36cbd..f0508660b4 100644 --- a/rust/src/generated/session_events.rs +++ b/rust/src/generated/session_events.rs @@ -116,6 +116,8 @@ pub enum SessionEventType { PromptCacheBreak, #[serde(rename = "model.call_failure")] ModelCallFailure, + #[serde(rename = "model.call_finished")] + ModelCallFinished, #[serde(rename = "model.call_start")] ModelCallStart, #[serde(rename = "abort")] @@ -475,6 +477,8 @@ pub enum SessionEventData { PromptCacheBreak(PromptCacheBreakData), #[serde(rename = "model.call_failure")] ModelCallFailure(ModelCallFailureData), + #[serde(rename = "model.call_finished")] + ModelCallFinished(ModelCallFinishedData), #[serde(rename = "model.call_start")] ModelCallStart(ModelCallStartData), #[serde(rename = "abort")] @@ -1940,6 +1944,24 @@ pub struct Citations { pub spans: Vec, } +/// Neutral provider-tagged reasoning content blocks preserved verbatim for round-tripping +/// +///
+/// +/// **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 AssistantMessageReasoningBlocks { + /// Provider-native reasoning content blocks (e.g. Anthropic `thinking` / `redacted_thinking`) preserved verbatim, in order. A single response can carry several, each signed over the content preceding it, so dropping or reordering any of them invalidates the rest. + #[serde(skip_serializing_if = "Option::is_none")] + pub blocks: Option>, + /// Model provider that produced these reasoning blocks. + pub provider: String, +} + /// Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping /// ///
@@ -2045,6 +2067,9 @@ pub struct AssistantMessageData { /// Generation phase for phased-output models (e.g., thinking vs. response phases) #[serde(skip_serializing_if = "Option::is_none")] pub phase: Option, + /// Neutral provider-tagged reasoning content blocks preserved verbatim for round-tripping. `reasoningText` and `reasoningOpaque` are a lossy derived view of these blocks, retained for display. + #[serde(skip_serializing_if = "Option::is_none")] + pub reasoning_blocks: Option, /// Opaque/encrypted extended thinking data from Anthropic models. Session-bound and stripped on resume. #[serde(skip_serializing_if = "Option::is_none")] pub reasoning_opaque: Option, @@ -2282,6 +2307,9 @@ pub struct AssistantUsageData { /// Number of output tokens produced #[serde(skip_serializing_if = "Option::is_none")] pub output_tokens: Option, + /// Time to first observable model output in milliseconds. Includes text, reasoning, and tool-call output; only available for streaming requests that produce observable output. + #[serde(skip_serializing_if = "Option::is_none")] + pub output_ttft_ms: Option, /// Parent tool call ID when this usage originates from a sub-agent #[doc(hidden)] #[deprecated] @@ -2513,6 +2541,26 @@ pub struct ModelCallFailureData { pub transport: Option, } +/// Session event "model.call_finished". Final lifecycle outcome for one logical model dispatch. A logical dispatch may include internal reconnect or fallback work, so event count is not provider HTTP-request count. +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ModelCallFinishedData { + /// Whether an accepted successful response requested the exact name and command semantics of a built-in file edit tool, including an external tool explicitly replacing that built-in name. Absent when the logical dispatch did not produce an accepted response. + #[serde(skip_serializing_if = "Option::is_none")] + pub contains_built_in_file_edit_request: Option, + /// Monotonic elapsed time spent in the logical model dispatch, including any internal transport reconnect or fallback and excluding orchestrator retry backoff, tool execution, confirmations, and post-response processing + pub dispatch_duration_ms: f64, + /// Version of the built-in file-edit semantic classifier used for this event + pub edit_classifier_version: i64, + /// Identifier of the user interaction that owns the model dispatch, matching assistant.turn_start.interactionId when available + #[serde(skip_serializing_if = "Option::is_none")] + pub interaction_id: Option, + /// Final outcome after post-response acceptance processing + pub outcome: ModelCallFinishedOutcome, + /// Agent-loop iteration within the interaction that initiated the model dispatch + pub turn_id: String, +} + /// Session event "model.call_start". Model API dispatch metadata for internal telemetry #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -3249,9 +3297,24 @@ pub struct SubagentCompletedData { /// Whether the sub-agent was torn down by cancellation - its own abort, or an ancestor being killed - instead of finishing its work. Cancellation is not a failure, so the run still reports completion; this distinguishes a torn-down sub-agent from one that ran to the end. #[serde(skip_serializing_if = "Option::is_none")] pub cancelled: Option, + /// Whether the first model actually dispatched matched the user's configured preference + #[serde(skip_serializing_if = "Option::is_none")] + pub configured_model_matches_actual: Option, + /// Concrete model the user configured for this sub-agent via `/subagents`, when present + #[serde(skip_serializing_if = "Option::is_none")] + pub configured_model_preference: Option, /// Wall-clock duration of the sub-agent execution in milliseconds #[serde(skip_serializing_if = "Option::is_none")] pub duration_ms: Option, + /// Whether the explicit task-call model matched the user's configured preference + #[serde(skip_serializing_if = "Option::is_none")] + pub explicit_model_matches_preference: Option, + /// Explicit model supplied by the parent agent on the task call, when present + #[serde(skip_serializing_if = "Option::is_none")] + pub explicit_model_override: Option, + /// First model for which the sub-agent started an inference request, when one was dispatched + #[serde(skip_serializing_if = "Option::is_none")] + pub first_dispatched_model: Option, /// Model used by the sub-agent #[serde(skip_serializing_if = "Option::is_none")] pub model: Option, @@ -3273,11 +3336,26 @@ pub struct SubagentFailedData { pub agent_display_name: String, /// Internal name of the sub-agent pub agent_name: String, + /// Whether the first model actually dispatched matched the user's configured preference + #[serde(skip_serializing_if = "Option::is_none")] + pub configured_model_matches_actual: Option, + /// Concrete model the user configured for this sub-agent via `/subagents`, when present + #[serde(skip_serializing_if = "Option::is_none")] + pub configured_model_preference: Option, /// Wall-clock duration of the sub-agent execution in milliseconds #[serde(skip_serializing_if = "Option::is_none")] pub duration_ms: Option, /// Error message describing why the sub-agent failed pub error: String, + /// Whether the explicit task-call model matched the user's configured preference + #[serde(skip_serializing_if = "Option::is_none")] + pub explicit_model_matches_preference: Option, + /// Explicit model supplied by the parent agent on the task call, when present + #[serde(skip_serializing_if = "Option::is_none")] + pub explicit_model_override: Option, + /// First model for which the sub-agent started an inference request, when one was dispatched + #[serde(skip_serializing_if = "Option::is_none")] + pub first_dispatched_model: Option, /// Model selected for the sub-agent, when known #[serde(skip_serializing_if = "Option::is_none")] pub model: Option, @@ -3960,6 +4038,9 @@ pub struct PermissionPromptRequestMcp { ///
#[serde(skip_serializing_if = "Option::is_none")] pub assisted_approval: Option, + /// Whether the host may offer a server-wide "approve all tools from this server" blanket. Absent is treated as true; the runtime sends false when managed policy disables bypass-permissions mode, which forbids the server-wide escalation while still allowing per-tool approval. + #[serde(skip_serializing_if = "Option::is_none")] + pub can_offer_server_wide_approval: Option, /// Prompt kind discriminator pub kind: PermissionPromptRequestMcpKind, /// Advisory runtime permission recommendation. The host remains responsible for deciding the request and may reject it. @@ -5001,6 +5082,9 @@ pub struct SessionManagedSettingsResolvedData { /// Whether at least two managed sources supplied permission allowlists, so enforcement intersects them and the flattened settings payload omits `permissions.allow`. #[serde(skip_serializing_if = "Option::is_none")] pub permissions_allow_intersected: Option, + /// Whether the effective sandbox policy forces the sandbox on *only* because managed policy could not be determined, rather than because the policy requires it. Lets clients tell a user whose `--no-sandbox` was overridden that the sandbox stayed on as a fail-closed fallback, instead of attributing it to an administrator who set no such policy. + #[serde(skip_serializing_if = "Option::is_none")] + pub sandbox_enabled_by_undetermined_policy: Option, /// Whether the server (account/org) managed-settings layer was present pub server_managed: bool, /// The effective (resolved) managed settings values, so clients can render exactly what is enforced. Absent when no managed policy is in force. @@ -6126,6 +6210,27 @@ pub enum ModelCallFailureSource { Unknown, } +/// Final outcome of one logical model dispatch after response acceptance processing +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum ModelCallFinishedOutcome { + /// The provider response was accepted for continued agent processing. + #[serde(rename = "success")] + Success, + /// The dispatch ended with a provider or transport error. + #[serde(rename = "error")] + Error, + /// The dispatch was cancelled before an accepted response was produced. + #[serde(rename = "cancelled")] + Cancelled, + /// The provider response was rejected during post-response acceptance processing. + #[serde(rename = "rejected")] + Rejected, + /// 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 { @@ -7234,6 +7339,9 @@ pub enum ManagedSettingsEnforcedEscalation { /// Unrestricted URL fetch access. #[serde(rename = "unrestricted_urls")] UnrestrictedUrls, + /// A server-wide MCP "Always Allow" (or `--allow-tool `) blanket that would auto-approve every tool from an MCP server. Capped to per-tool approval; each tool still prompts. + #[serde(rename = "server_wide_mcp_approval")] + ServerWideMcpApproval, /// Unknown variant for forward compatibility. #[default] #[serde(other)] diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json index 2c0a117602..d2340d6c94 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.81-6", + "@github/copilot": "^1.0.81-10", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14", @@ -472,8 +472,8 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.81-6", - "integrity": "sha512-hT29nRkf0EJE3N6lqeLOPszbdEyALZ+fjYG9zKX5a3L5r+o+m4/KF+8l2gn2yORNqOzwUYNj2vnVzKqeYYNLGg==", + "version": "1.0.81-10", + "integrity": "sha512-Ac99EvN16s4hKRhJLSEn1HMNaZ6MD8BzIey1zzJNBQy1/yP4PQDZ2CWitEq+XQQEi+6SsqeJRqXOKiWk1EyK7g==", "dev": true, "license": "SEE LICENSE IN LICENSE.md", "dependencies": { @@ -483,19 +483,19 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.81-6", - "@github/copilot-darwin-x64": "1.0.81-6", - "@github/copilot-linux-arm64": "1.0.81-6", - "@github/copilot-linux-x64": "1.0.81-6", - "@github/copilot-linuxmusl-arm64": "1.0.81-6", - "@github/copilot-linuxmusl-x64": "1.0.81-6", - "@github/copilot-win32-arm64": "1.0.81-6", - "@github/copilot-win32-x64": "1.0.81-6" + "@github/copilot-darwin-arm64": "1.0.81-10", + "@github/copilot-darwin-x64": "1.0.81-10", + "@github/copilot-linux-arm64": "1.0.81-10", + "@github/copilot-linux-x64": "1.0.81-10", + "@github/copilot-linuxmusl-arm64": "1.0.81-10", + "@github/copilot-linuxmusl-x64": "1.0.81-10", + "@github/copilot-win32-arm64": "1.0.81-10", + "@github/copilot-win32-x64": "1.0.81-10" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.81-6", - "integrity": "sha512-nALa4e8Jc/g5ltIHrpHBHByJ5rlgzoZFylZIrkQY+B9vr3L57d5F6fOiTbf/OF9blFQX7artWRE1K0TmowGNCA==", + "version": "1.0.81-10", + "integrity": "sha512-s90Av0iwjTSU6Gky8T9wI1PJdlfbdUcPAVgKDtimaOiAwcdLG4fKTpGxrk96KJrnOHHK3x9SiXsw/pW0ThAH/A==", "cpu": [ "arm64" ], @@ -510,8 +510,8 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.81-6", - "integrity": "sha512-K+bp799DejrsmxMNyaFAmKo4xnLJXBb8hkv9N8OCQukmTSoRpfqhv2oTDfgVFadwllt+py/FIdxKTZQYvPGGGw==", + "version": "1.0.81-10", + "integrity": "sha512-8RnPI4J311oJQ0GPB6JxuLJq4JNY/KF9ZIIQm8KpxXBY6d+6fmmAsMDEk7OiF/Asl2I7+LTi+qU2ZVhP7FYhbg==", "cpu": [ "x64" ], @@ -526,8 +526,8 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.81-6", - "integrity": "sha512-aEpnfTTjOxpesFo9jqk/phZUivOhNHbdBRfBrS2NiCPrQZFBYUC4wRVo/Xo2PMMQ4J07b6fU7JJQPoUUkKy5Wg==", + "version": "1.0.81-10", + "integrity": "sha512-2UtK5CBrE6ZVSIzU2KHeIgO8N7056axjbF2lE6WuK+H+oJJ4v3w5eQkalqGzRHhkaPfCW4kT1lDMhZFW+XbLjA==", "cpu": [ "arm64" ], @@ -542,8 +542,8 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.81-6", - "integrity": "sha512-NFqonFfJCyA7d3bNoYeLWUQ69zelPr9TTnLpAHCi3scFZqbEvMBDFxW2XsKWwfYuuR9XzfU7/tgOUgq3gmL5aA==", + "version": "1.0.81-10", + "integrity": "sha512-61+KAfo1TBARrBfss3w4dfmRVSf0PiFg0c9JNuT9HjoNnytl7maJBPEgUvI4YBcxScNEAlCMXaUUG3Tuuh1g+w==", "cpu": [ "x64" ], @@ -558,8 +558,8 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.81-6", - "integrity": "sha512-EE99DFTAgTq6eOFDiiv+OUROD2pDQIrzyyJEfUS9K8JanwNc+Py8vTxrJ0yK0slpJ+Fue5uDRno6c9ys8OM59g==", + "version": "1.0.81-10", + "integrity": "sha512-CR6KRPCFoGkaD8I2an1FyrT5avF1U5aTbwW2sYCP7w1KExYFknxEL8ES6BkFuPEA7YcjmLa0SOq26Z+TgIVHSg==", "cpu": [ "arm64" ], @@ -574,8 +574,8 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.81-6", - "integrity": "sha512-90HRKx25EjhlQNOCCdbiC0Ck0fSKyp8XUxUoCvuNdoigdUP54ZGS07dkyJiJq9KZaKilxZBSpXiNt8t5ETA2Sg==", + "version": "1.0.81-10", + "integrity": "sha512-fvZfyEOfRkvUDPXY6UUjAqV8Mkf08PQV+jgtiAFUryuas5VP9cYaAmQSmNpzNMNi3kSX/ycUJe7oc3zXZ8ylog==", "cpu": [ "x64" ], @@ -590,8 +590,8 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.81-6", - "integrity": "sha512-1dRSHF/7PFzB+AGORg8BJh2n1+N7+sIJDLqozrC9INWFp1t6ercptIXgJTF/V7UZVGQLO4LBBK1HH/QhzUmrfA==", + "version": "1.0.81-10", + "integrity": "sha512-n30PPBgCT4Iq9MgH6is6L3eUEE+sF6xB2fb+dGsclj5j/hCkT7+ef0j8YcAGipsvGfzGAuywIsWlvF7fzYsOKQ==", "cpu": [ "arm64" ], @@ -606,8 +606,8 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.81-6", - "integrity": "sha512-lIbN1mk6Rm9bWrWU4/UfrC5OCga7XcBi2LBz5roDnNcuG8mKEevDcNOtbEYz/TaJg+WBMoTbGfXBVd1hGy2DTA==", + "version": "1.0.81-10", + "integrity": "sha512-lb8kvhrXwGCN3LeRDQfLHsUp+F43XvPYznaYK1sPtK1kFGa4/kL690tasoSEvzu8ZKoTY6kZ6YmDbUZgqOislw==", "cpu": [ "x64" ], @@ -1751,7 +1751,6 @@ }, "node_modules/hono": { "version": "4.13.1", - "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.1.tgz", "integrity": "sha512-kdJoFVv2xmayw6cY09H7AbMJMt8Jn5jdlEdXsP7AGBdF2DIptVlKlOLKXP41yPip4/a3yQPv9gVcJYI8YY04dw==", "dev": true, "license": "MIT", diff --git a/test/harness/package.json b/test/harness/package.json index 23b30b9aac..e968848315 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.81-6", + "@github/copilot": "^1.0.81-10", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14", From 2be9d4d62ce32c19bfc7aa6a74da135f6c493168 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Mon, 24 Aug 2026 11:33:45 -0700 Subject: [PATCH 02/11] Fix Rust connect handshake after CLI update Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- rust/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 5c06744698..2eb4c4116e 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -2157,6 +2157,7 @@ impl Client { /// started with `COPILOT_CONNECTION_TOKEN`. async fn connect_handshake(&self) -> Result> { let params = crate::generated::api_types::ConnectRequest { + client_info: None, token: self.inner.effective_connection_token.clone(), enable_git_hub_telemetry_forwarding: self .inner From e24ab6f0eb20bf641a7ac4093f21a910ad952463 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Mon, 24 Aug 2026 12:49:17 -0700 Subject: [PATCH 03/11] Adapt Go and Java managed settings types Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e2ffce58-35b6-4bb8-a5f3-0bb4e5b5ada4 --- go/client_test.go | 20 ++++++++++++++++ .../e2e/rpc_tasks_and_handlers_e2e_test.go | 1 + go/types.go | 9 ++++++-- .../rpc/DisableBypassPermissionsModes.java | 23 +++++++++++++++++++ .../rpc/ManagedSettingsPermissions.java | 7 +++--- .../github/copilot/ManagedSettingsTest.java | 12 ++++++++-- .../rpc/GeneratedRpcRecordsCoverageTest.java | 3 ++- 7 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 java/sdk/src/main/java/com/github/copilot/rpc/DisableBypassPermissionsModes.java diff --git a/go/client_test.go b/go/client_test.go index d0139eb11a..2332a77011 100644 --- a/go/client_test.go +++ b/go/client_test.go @@ -3834,6 +3834,26 @@ func TestSessionRequests_ManagedSettings(t *testing.T) { } }) + t.Run("accepts future bypass-permissions modes", func(t *testing.T) { + req := createSessionRequest{ManagedSettings: &ManagedSettings{ + Permissions: &ManagedSettingsPermissions{ + DisableBypassPermissionsMode: DisableBypassPermissionsMode("future-fail-closed-mode"), + }, + }} + data, err := json.Marshal(req) + if err != nil { + t.Fatalf("Failed to marshal: %v", err) + } + var m map[string]any + if err := json.Unmarshal(data, &m); err != nil { + t.Fatalf("Failed to unmarshal: %v", err) + } + perms := m["managedSettings"].(map[string]any)["permissions"].(map[string]any) + if perms["disableBypassPermissionsMode"] != "future-fail-closed-mode" { + t.Errorf("Expected future mode preserved, got %v", perms["disableBypassPermissionsMode"]) + } + }) + t.Run("omits managedSettings when nil", func(t *testing.T) { req := createSessionRequest{} data, _ := json.Marshal(req) diff --git a/go/internal/e2e/rpc_tasks_and_handlers_e2e_test.go b/go/internal/e2e/rpc_tasks_and_handlers_e2e_test.go index 0267f8d042..648855e5a3 100644 --- a/go/internal/e2e/rpc_tasks_and_handlers_e2e_test.go +++ b/go/internal/e2e/rpc_tasks_and_handlers_e2e_test.go @@ -127,6 +127,7 @@ func TestRPCTasksAndHandlersE2E(t *testing.T) { }) t.Run("should report implemented error for invalid task agent model", func(t *testing.T) { + ctx.ConfigureForTest(t) session, err := client.CreateSession(t.Context(), &copilot.SessionConfig{ OnPermissionRequest: copilot.PermissionHandler.ApproveAll, }) diff --git a/go/types.go b/go/types.go index 60781d1da8..c8cf72197b 100644 --- a/go/types.go +++ b/go/types.go @@ -1569,11 +1569,16 @@ type ManagedSettings struct { } // DisableBypassPermissionsMode is the managed bypass-permissions policy. -type DisableBypassPermissionsMode = rpc.DisableBypassPermissionsMode +// +// The runtime may introduce additional fail-closed modes. Values are serialized +// as strings so callers can use newer modes without waiting for an SDK release. +type DisableBypassPermissionsMode string const ( // DisableBypassPermissionsModeDisable turns off bypass-permissions mode. - DisableBypassPermissionsModeDisable = rpc.DisableBypassPermissionsModeDisable + DisableBypassPermissionsModeDisable DisableBypassPermissionsMode = "disable" + // DisableBypassPermissionsModeAllowAutoOnly permits only automatic bypass. + DisableBypassPermissionsModeAllowAutoOnly DisableBypassPermissionsMode = "allow-auto-only" ) // ManagedSettingsPermissions is the permissions-only managed policy injected diff --git a/java/sdk/src/main/java/com/github/copilot/rpc/DisableBypassPermissionsModes.java b/java/sdk/src/main/java/com/github/copilot/rpc/DisableBypassPermissionsModes.java new file mode 100644 index 0000000000..cf98f0526d --- /dev/null +++ b/java/sdk/src/main/java/com/github/copilot/rpc/DisableBypassPermissionsModes.java @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ +package com.github.copilot.rpc; + +/** + * Known values for the managed bypass-permissions policy. + * + *

+ * The wire contract is an open string so callers can pass newer fail-closed + * modes directly to + * {@link ManagedSettingsPermissions#setDisableBypassPermissionsMode(String)}. + */ +public final class DisableBypassPermissionsModes { + /** Turns off bypass-permissions mode. */ + public static final String DISABLE = "disable"; + + /** Permits bypass only for automatic operations. */ + public static final String ALLOW_AUTO_ONLY = "allow-auto-only"; + + private DisableBypassPermissionsModes() { + } +} diff --git a/java/sdk/src/main/java/com/github/copilot/rpc/ManagedSettingsPermissions.java b/java/sdk/src/main/java/com/github/copilot/rpc/ManagedSettingsPermissions.java index 0923cea54a..f857391dbc 100644 --- a/java/sdk/src/main/java/com/github/copilot/rpc/ManagedSettingsPermissions.java +++ b/java/sdk/src/main/java/com/github/copilot/rpc/ManagedSettingsPermissions.java @@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.github.copilot.generated.rpc.DisableBypassPermissionsMode; import java.util.ArrayList; import java.util.List; @@ -15,7 +14,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) public final class ManagedSettingsPermissions { @JsonProperty("disableBypassPermissionsMode") - private DisableBypassPermissionsMode disableBypassPermissionsMode; + private String disableBypassPermissionsMode; @JsonProperty("deny") private List deny; @@ -27,7 +26,7 @@ public final class ManagedSettingsPermissions { private List allow; /** @return the bypass-permissions policy, or {@code null} when unset */ - public DisableBypassPermissionsMode getDisableBypassPermissionsMode() { + public String getDisableBypassPermissionsMode() { return disableBypassPermissionsMode; } @@ -38,7 +37,7 @@ public DisableBypassPermissionsMode getDisableBypassPermissionsMode() { * bypass-permissions policy * @return this policy */ - public ManagedSettingsPermissions setDisableBypassPermissionsMode(DisableBypassPermissionsMode value) { + public ManagedSettingsPermissions setDisableBypassPermissionsMode(String value) { this.disableBypassPermissionsMode = value; return this; } diff --git a/java/sdk/src/test/java/com/github/copilot/ManagedSettingsTest.java b/java/sdk/src/test/java/com/github/copilot/ManagedSettingsTest.java index dbd19f3c97..d6341b26c5 100644 --- a/java/sdk/src/test/java/com/github/copilot/ManagedSettingsTest.java +++ b/java/sdk/src/test/java/com/github/copilot/ManagedSettingsTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import com.fasterxml.jackson.databind.ObjectMapper; -import com.github.copilot.generated.rpc.DisableBypassPermissionsMode; +import com.github.copilot.rpc.DisableBypassPermissionsModes; import com.github.copilot.rpc.ManagedSettings; import com.github.copilot.rpc.ManagedSettingsPermissions; import com.github.copilot.rpc.PermissionRequestResult; @@ -23,7 +23,7 @@ class ManagedSettingsTest { @Test void forwardsManagedSettingsOnCreateAndResume() throws Exception { var permissions = new ManagedSettingsPermissions() - .setDisableBypassPermissionsMode(DisableBypassPermissionsMode.DISABLE).setDeny(List.of("Shell(rm *)")) + .setDisableBypassPermissionsMode(DisableBypassPermissionsModes.DISABLE).setDeny(List.of("Shell(rm *)")) .setAsk(List.of("Domain(publish.example)")).setAllow(List.of("Read(**)")); var managedSettings = new ManagedSettings().setPermissions(permissions); @@ -41,6 +41,14 @@ void forwardsManagedSettingsOnCreateAndResume() throws Exception { assertTrue(json.contains("\"disableBypassPermissionsMode\":\"disable\"")); } + @Test + void acceptsFutureBypassPermissionsModes() throws Exception { + var permissions = new ManagedSettingsPermissions().setDisableBypassPermissionsMode("future-fail-closed-mode"); + var json = new ObjectMapper().writeValueAsString(permissions); + + assertTrue(json.contains("\"disableBypassPermissionsMode\":\"future-fail-closed-mode\"")); + } + @Test void preservesExplicitEmptyPermissionArrays() throws Exception { // Security-critical: a present empty allow list admits nothing, while an diff --git a/java/sdk/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java b/java/sdk/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java index cf5b0426c5..602089d012 100644 --- a/java/sdk/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java +++ b/java/sdk/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java @@ -818,7 +818,8 @@ void modelsListResult_nested() { var policy = new ModelPolicy(ModelPolicyState.ENABLED, null); var promo = new ModelBillingPromo("summer-2026", 25.0, "2026-08-01T00:00:00Z", "Summer discount"); var billing = new ModelBilling(1.0, null, null, promo); - var modelItem = new Model("gpt-5", "GPT-5", capabilities, policy, billing, null, null, null, null, null); + var modelItem = new Model("gpt-5", "GPT-5", capabilities, policy, billing, null, null, null, null, null, null, + null, null); var result = new ModelsListResult(List.of(modelItem)); assertEquals(1, result.models().size()); From e70cc82775ddbb59ba74beec670b3103a8cfa4f4 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Tue, 25 Aug 2026 14:54:51 -0700 Subject: [PATCH 04/11] Adapt Java to Copilot 1.0.81-10 schema Update handwritten constructor calls for the new sandbox, skill, and reasoning fields. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- java/sdk/src/main/java/com/github/copilot/CopilotClient.java | 2 ++ .../test/java/com/github/copilot/SessionEventHandlingTest.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/java/sdk/src/main/java/com/github/copilot/CopilotClient.java b/java/sdk/src/main/java/com/github/copilot/CopilotClient.java index cdd1b9ff3c..fe9a3c3b80 100644 --- a/java/sdk/src/main/java/com/github/copilot/CopilotClient.java +++ b/java/sdk/src/main/java/com/github/copilot/CopilotClient.java @@ -1277,10 +1277,12 @@ CompletableFuture updateSessionOptionsForMode(CopilotSession session, Bool null, // shellInitProfile null, // shellProcessFlags null, // sandboxConfig + null, // sandboxConfigSource null, // logInteractiveShells null, // envValueMode null, // allowAllMcpServerInstructions null, // skillDirectories + null, // includedBuiltinSkills null, // disabledSkills null, // enableOnDemandInstructionDiscovery null, // maxInlineBinaryBytes diff --git a/java/sdk/src/test/java/com/github/copilot/SessionEventHandlingTest.java b/java/sdk/src/test/java/com/github/copilot/SessionEventHandlingTest.java index bd38d4962e..47d537f134 100644 --- a/java/sdk/src/test/java/com/github/copilot/SessionEventHandlingTest.java +++ b/java/sdk/src/test/java/com/github/copilot/SessionEventHandlingTest.java @@ -865,7 +865,7 @@ private SessionStartEvent createSessionStartEvent(String sessionId) { private AssistantMessageEvent createAssistantMessageEvent(String content) { var event = new AssistantMessageEvent(); var data = new AssistantMessageEvent.AssistantMessageEventData(null, null, content, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); event.setData(data); return event; } From 709dc4b36f1f231128ce6ea91d2efc6236c51012 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Tue, 25 Aug 2026 15:20:31 -0700 Subject: [PATCH 05/11] Adapt SDK tests to Copilot 1.0.81-10 auth schema Use the regenerated MCP OAuth discriminator, settable auth inputs, and public Rust option construction pattern. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e98a14a6-7ad4-4cb6-b808-e56547701c19 --- dotnet/test/E2E/RpcSessionStateE2ETests.cs | 2 +- python/copilot/session.py | 8 +++--- python/e2e/test_mcp_oauth_e2e.py | 4 +-- rust/tests/e2e/rpc_session_state.rs | 31 ++++++++++++---------- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/dotnet/test/E2E/RpcSessionStateE2ETests.cs b/dotnet/test/E2E/RpcSessionStateE2ETests.cs index 6dce3c250f..803c1c602b 100644 --- a/dotnet/test/E2E/RpcSessionStateE2ETests.cs +++ b/dotnet/test/E2E/RpcSessionStateE2ETests.cs @@ -451,7 +451,7 @@ public async Task Should_Set_Auth_Credentials() }); var login = $"sdk-rpc-{Guid.NewGuid():N}"; - var setCredentials = await session.Rpc.GitHubAuth.SetCredentialsAsync(new AuthInfoUser + var setCredentials = await session.Rpc.GitHubAuth.SetCredentialsAsync(new SettableAuthInfoUser { CopilotUser = new CopilotUserResponse { diff --git a/python/copilot/session.py b/python/copilot/session.py index 30a555a389..21c74bcaf5 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -34,11 +34,11 @@ CanvasProviderOpenResult, ClientSessionApiHandlers, CommandsHandlePendingCommandRequest, + GitHubTokenAcquireResultKind, HandlePendingToolCallRequest, LogRequest, MCPOauthHandlePendingRequest, MCPOauthPendingRequestResponse, - MCPOauthPendingRequestResponseKind, ModelSwitchToRequest, PermissionDecision, PermissionDecisionApproveOnce, @@ -2279,14 +2279,14 @@ async def _execute_mcp_auth_and_respond( if result and result.get("kind", "token") == "token": rpc_result = MCPOauthPendingRequestResponse( - kind=MCPOauthPendingRequestResponseKind.TOKEN, + kind=GitHubTokenAcquireResultKind.TOKEN, access_token=result["accessToken"], expires_in=result.get("expiresIn"), token_type=result.get("tokenType"), ) else: rpc_result = MCPOauthPendingRequestResponse( - kind=MCPOauthPendingRequestResponseKind.CANCELLED + kind=GitHubTokenAcquireResultKind.CANCELLED ) await self.rpc.mcp.oauth.handle_pending_request( MCPOauthHandlePendingRequest( @@ -2300,7 +2300,7 @@ async def _execute_mcp_auth_and_respond( MCPOauthHandlePendingRequest( request_id=request_id, result=MCPOauthPendingRequestResponse( - kind=MCPOauthPendingRequestResponseKind.CANCELLED + kind=GitHubTokenAcquireResultKind.CANCELLED ), ) ) diff --git a/python/e2e/test_mcp_oauth_e2e.py b/python/e2e/test_mcp_oauth_e2e.py index 9d70597c3e..76f1cbf721 100644 --- a/python/e2e/test_mcp_oauth_e2e.py +++ b/python/e2e/test_mcp_oauth_e2e.py @@ -8,11 +8,11 @@ import pytest from copilot.generated.rpc import ( + GitHubTokenAcquireResultKind, MCPAppsCallToolRequest, MCPListToolsRequest, MCPOauthHandlePendingRequest, MCPOauthPendingRequestResponse, - MCPOauthPendingRequestResponseKind, ) from copilot.session import MCPServerConfig, PermissionHandler from copilot.session_events import McpServerStatus @@ -206,7 +206,7 @@ async def on_mcp_auth_request(request, _invocation): MCPOauthHandlePendingRequest( request_id=request["requestId"], result=MCPOauthPendingRequestResponse( - kind=MCPOauthPendingRequestResponseKind.TOKEN, + kind=GitHubTokenAcquireResultKind.TOKEN, access_token=EXPECTED_TOKEN, token_type="Bearer", expires_in=3600, diff --git a/rust/tests/e2e/rpc_session_state.rs b/rust/tests/e2e/rpc_session_state.rs index 15db6e3a9a..64b61a94ec 100644 --- a/rust/tests/e2e/rpc_session_state.rs +++ b/rust/tests/e2e/rpc_session_state.rs @@ -762,18 +762,18 @@ async fn should_update_options_and_initialize_session_services() { .await .expect("create session"); + let mut update_options = SessionUpdateOptionsParams::default(); + update_options.ask_user_disabled = Some(true); + update_options.available_tools = Some(vec!["view".to_string()]); + update_options.client_name = Some("rust-rpc-e2e".to_string()); + update_options.enable_streaming = Some(true); + update_options.model = Some(MODEL_ID.to_string()); + update_options.working_directory = Some(ctx.work_dir().display().to_string()); + let options = session .rpc() .options() - .update(SessionUpdateOptionsParams { - ask_user_disabled: Some(true), - available_tools: Some(vec!["view".to_string()]), - client_name: Some("rust-rpc-e2e".to_string()), - enable_streaming: Some(true), - model: Some(MODEL_ID.to_string()), - working_directory: Some(ctx.work_dir().display().to_string()), - ..SessionUpdateOptionsParams::default() - }) + .update(update_options) .await .expect("update options"); assert!(options.success); @@ -893,11 +893,14 @@ async fn should_set_auth_credentials() { .rpc() .git_hub_auth() .set_credentials(SessionSetCredentialsParams { - credentials: Some(AuthInfo::User(UserAuthInfo { - host: "github.com".to_string(), - login: "rpc-session-user".to_string(), - ..Default::default() - })), + credentials: Some( + serde_json::to_value(AuthInfo::User(UserAuthInfo { + host: "github.com".to_string(), + login: "rpc-session-user".to_string(), + ..Default::default() + })) + .expect("serialize auth credentials"), + ), }) .await .expect("set credentials"); From 52b63db624f0842426024074614e66666ce8fb44 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Tue, 25 Aug 2026 15:38:26 -0700 Subject: [PATCH 06/11] Make managed bypass modes forward compatible in .NET Use an open string property with well-known constants and cover unknown future modes on the wire. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e98a14a6-7ad4-4cb6-b808-e56547701c19 --- dotnet/src/Types.cs | 24 ++++++++-------- .../test/Unit/ClientSessionLifetimeTests.cs | 28 ++++++++++++++++++- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/dotnet/src/Types.cs b/dotnet/src/Types.cs index c0810b3870..3b5d3e56ca 100644 --- a/dotnet/src/Types.cs +++ b/dotnet/src/Types.cs @@ -3052,15 +3052,14 @@ public sealed class GitHubMcpToolConfig public bool? DisableFormDeferral { get; set; } } -///

-/// Controls whether bypass-permissions mode is available in a managed session. -/// -[JsonConverter(typeof(JsonStringEnumConverter))] -public enum DisableBypassPermissionsMode +/// Well-known managed bypass-permissions policies. +public static class DisableBypassPermissionsModes { - /// Turn off bypass-permissions mode. - [JsonStringEnumMemberName("disable")] - Disable + /// Turns off bypass-permissions mode entirely. + public const string Disable = "disable"; + + /// Permits automatic bypass but blocks full allow-all. + public const string AllowAutoOnly = "allow-auto-only"; } /// @@ -3077,12 +3076,13 @@ public enum DisableBypassPermissionsMode public sealed class ManagedSettingsPermissions { /// - /// When set to "disable", bypass-permissions mode is turned off for the - /// session regardless of other layers. Serialized as - /// disableBypassPermissionsMode. + /// Restricts bypass-permissions mode for the session regardless of other + /// layers. See for well-known + /// values. Unknown values are forwarded so newer runtime policies fail closed. + /// Serialized as disableBypassPermissionsMode. /// [JsonPropertyName("disableBypassPermissionsMode")] - public DisableBypassPermissionsMode? DisableBypassPermissionsMode { get; set; } + public string? DisableBypassPermissionsMode { get; set; } /// Tool-permission patterns that are always denied. [JsonPropertyName("deny")] diff --git a/dotnet/test/Unit/ClientSessionLifetimeTests.cs b/dotnet/test/Unit/ClientSessionLifetimeTests.cs index a561ee44b2..47ee14bb69 100644 --- a/dotnet/test/Unit/ClientSessionLifetimeTests.cs +++ b/dotnet/test/Unit/ClientSessionLifetimeTests.cs @@ -552,7 +552,7 @@ public async Task CreateSessionAsync_Serializes_ManagedSettings_Permissions() { Permissions = new ManagedSettingsPermissions { - DisableBypassPermissionsMode = DisableBypassPermissionsMode.Disable, + DisableBypassPermissionsMode = DisableBypassPermissionsModes.Disable, Deny = ["shell(rm*)"], Ask = ["write"], Allow = [] @@ -585,6 +585,32 @@ public async Task CreateSessionAsync_Serializes_ManagedSettings_Permissions() Assert.True(invocation.ManagedSettingsEnabled); } + [Fact] + public async Task CreateSessionAsync_Serializes_Future_ManagedSettings_Bypass_Mode() + { + await using var server = await FakeCopilotServer.StartAsync(); + await using var client = new CopilotClient(new CopilotClientOptions { Connection = RuntimeConnection.ForUri(server.Url) }); + await client.StartAsync(); + + await using var session = await client.CreateSessionAsync(new SessionConfig + { + ManagedSettings = new ManagedSettings + { + Permissions = new ManagedSettingsPermissions + { + DisableBypassPermissionsMode = "future-fail-closed-mode" + } + }, + OnPermissionRequest = PermissionHandler.ApproveAll + }); + + var request = Assert.Single(server.Requests, request => request.Method == "session.create"); + var permissions = request.Params.GetProperty("managedSettings").GetProperty("permissions"); + Assert.Equal( + "future-fail-closed-mode", + permissions.GetProperty("disableBypassPermissionsMode").GetString()); + } + [Fact] public async Task PermissionResponse_Forwards_DecisionContext_As_Sibling_Of_Result() { From 67ef658f21b087de962bc183dc12cb918a283385 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Tue, 25 Aug 2026 15:47:58 -0700 Subject: [PATCH 07/11] Make Python managed bypass modes forward compatible Expose well-known mode constants while accepting and forwarding future fail-closed runtime values. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e98a14a6-7ad4-6587-b885-95ed912cb84b --- python/copilot/__init__.py | 2 ++ python/copilot/client.py | 17 ++++++++++++++--- python/test_client.py | 15 +++++++++++---- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/python/copilot/__init__.py b/python/copilot/__init__.py index f7a71ebe91..8f30632e37 100644 --- a/python/copilot/__init__.py +++ b/python/copilot/__init__.py @@ -35,6 +35,7 @@ CloudSessionRepository, CopilotClient, CopilotExpAssignmentResponse, + DisableBypassPermissionsModes, ExpConfigEntry, ExpFlagValue, GetAuthStatusResponse, @@ -258,6 +259,7 @@ "ExitPlanModeResult", "ExtensionInfo", "CopilotWebSocketForwarder", + "DisableBypassPermissionsModes", "GetAuthStatusResponse", "BearerTokenProvider", "GetStatusResponse", diff --git a/python/copilot/client.py b/python/copilot/client.py index 2654c14477..ad4b0fe171 100644 --- a/python/copilot/client.py +++ b/python/copilot/client.py @@ -247,6 +247,16 @@ def _capi_session_options_to_wire(options: CapiSessionOptions) -> dict[str, Any] return wire +class DisableBypassPermissionsModes: + """Well-known managed bypass-permissions policies.""" + + DISABLE: ClassVar[str] = "disable" + """Turn off bypass-permissions mode entirely.""" + + ALLOW_AUTO_ONLY: ClassVar[str] = "allow-auto-only" + """Permit automatic bypass but block full allow-all.""" + + @dataclass class ManagedSettingsPermissions: """Permissions-only managed policy injected via :class:`ManagedSettings`. @@ -256,9 +266,10 @@ class ManagedSettingsPermissions: rules are rejected by the runtime at session creation. """ - disable_bypass_permissions_mode: Literal["disable"] | None = None - """When ``"disable"``, turns off bypass-permissions ("yolo") mode for the - session. Deny-wins: no other layer can re-enable it. Sent on the wire as + disable_bypass_permissions_mode: str | None = None + """Restricts bypass-permissions mode for the session. See + :class:`DisableBypassPermissionsModes` for well-known values. Unknown values + are forwarded so newer runtime policies fail closed. Sent on the wire as ``disableBypassPermissionsMode``.""" deny: list[str] | None = None """Operations that must always be denied. Unioned across managed layers.""" diff --git a/python/test_client.py b/python/test_client.py index cf4bdf192b..8ed633640c 100644 --- a/python/test_client.py +++ b/python/test_client.py @@ -17,6 +17,7 @@ CanvasProviderIdentity, CapiSessionOptions, CopilotClient, + DisableBypassPermissionsModes, ExtensionInfo, ModelBillingTokenPrices, ModelBillingTokenPricesLongContext, @@ -721,7 +722,7 @@ async def mock_request(method, params, **kwargs): enable_managed_settings=True, managed_settings=ManagedSettings( permissions=ManagedSettingsPermissions( - disable_bypass_permissions_mode="disable", + disable_bypass_permissions_mode=DisableBypassPermissionsModes.ALLOW_AUTO_ONLY, deny=["Shell(git push)"], ask=["Domain(publish.example)"], allow=["Read(**)"], @@ -732,7 +733,10 @@ async def mock_request(method, params, **kwargs): session.session_id, on_permission_request=PermissionHandler.approve_all, managed_settings=ManagedSettings( - permissions=ManagedSettingsPermissions(ask=["Domain(publish.example)"]) + permissions=ManagedSettingsPermissions( + disable_bypass_permissions_mode="future-fail-closed-mode", + ask=["Domain(publish.example)"], + ) ), ) @@ -741,14 +745,17 @@ async def mock_request(method, params, **kwargs): assert captured["session.create"]["enableManagedSettings"] is True assert captured["session.create"]["managedSettings"] == { "permissions": { - "disableBypassPermissionsMode": "disable", + "disableBypassPermissionsMode": "allow-auto-only", "deny": ["Shell(git push)"], "ask": ["Domain(publish.example)"], "allow": ["Read(**)"], } } assert captured["session.resume"]["managedSettings"] == { - "permissions": {"ask": ["Domain(publish.example)"]} + "permissions": { + "disableBypassPermissionsMode": "future-fail-closed-mode", + "ask": ["Domain(publish.example)"], + } } finally: await client.force_stop() From 2a386ac1cafdb4df1c345ab513e5e408ab809579 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Tue, 25 Aug 2026 16:15:11 -0700 Subject: [PATCH 08/11] Align managed bypass modes in Node and Rust Broaden the Node API to forward future fail-closed values and add Rust support for the allow-auto-only policy. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e98a14a6-7ad4-4cb6-b808-e56547701c19 --- nodejs/src/index.ts | 2 +- nodejs/src/types.ts | 20 ++++++++++++++------ nodejs/test/client.test.ts | 32 +++++++++++++++++++++++--------- rust/src/types.rs | 11 ++++++----- rust/tests/session_test.rs | 16 ++++++++++++++-- 5 files changed, 58 insertions(+), 23 deletions(-) diff --git a/nodejs/src/index.ts b/nodejs/src/index.ts index f91e351d30..ae474eefee 100644 --- a/nodejs/src/index.ts +++ b/nodejs/src/index.ts @@ -9,7 +9,7 @@ */ export { CopilotClient } from "./client.js"; -export { RuntimeConnection } from "./types.js"; +export { DisableBypassPermissionsModes, RuntimeConnection } from "./types.js"; export { BuiltInTools, ToolSet } from "./toolSet.js"; export { CopilotSession, type AssistantMessageEvent } from "./session.js"; export { defineFactory, FactoryResumeError, isFactoryRunTerminal } from "./factory.js"; diff --git a/nodejs/src/types.ts b/nodejs/src/types.ts index 678cd58633..24d23d0826 100644 --- a/nodejs/src/types.ts +++ b/nodejs/src/types.ts @@ -2167,6 +2167,14 @@ export interface GitHubMcpToolConfig { disableFormDeferral?: boolean; } +/** Well-known managed bypass-permissions policies. */ +export const DisableBypassPermissionsModes = { + /** Turn off bypass-permissions mode entirely. */ + Disable: "disable", + /** Permit automatic bypass but block full allow-all. */ + AllowAutoOnly: "allow-auto-only", +} as const; + /** * Permissions-only managed policy injected by the host via * {@link SessionConfigBase.managedSettings}. @@ -2177,11 +2185,11 @@ export interface GitHubMcpToolConfig { */ export interface ManagedSettingsPermissions { /** - * When set to `"disable"`, bypass-permissions ("yolo") mode is turned off - * for the session. This is deny-wins: it cannot be re-enabled by any other - * layer. + * Restricts bypass-permissions mode for the session. See + * {@link DisableBypassPermissionsModes} for well-known values. Unknown + * values are forwarded so newer runtime policies fail closed. */ - disableBypassPermissionsMode?: "disable"; + disableBypassPermissionsMode?: string; /** Operations that must always be denied. Unioned across managed layers. */ deny?: string[]; /** @@ -2721,8 +2729,8 @@ export interface SessionConfigBase { * with the same managed-permission parser it uses for fetched policy and * composes it restrictively with any self-fetched (server) and * device-managed (MDM) layers: `deny`/`ask` rules are unioned, every - * declared `allow` list must admit an operation, and - * `disableBypassPermissionsMode: "disable"` is deny-wins. + * declared `allow` list must admit an operation, and bypass-mode + * restrictions are composed fail-closed. * * This is startup-only. It is **not** persisted: it must be re-supplied on * {@link CopilotClient.resumeSession | resume}, where it replaces the prior diff --git a/nodejs/test/client.test.ts b/nodejs/test/client.test.ts index e2d630ba0e..34166163ec 100644 --- a/nodejs/test/client.test.ts +++ b/nodejs/test/client.test.ts @@ -10,8 +10,10 @@ import { createAttributedPermissionResult, CopilotClient, createCanvas, + DisableBypassPermissionsModes, RuntimeConnection, type GitHubTelemetryNotification, + type ManagedSettings, type ModelInfo, } from "../src/index.js"; import { CopilotSession } from "../src/session.js"; @@ -3905,19 +3907,20 @@ describe("managedSettings serialization", () => { } it("forwards the full permissions object on session.create", async () => { - const params = await captureCreateParams({ - managedSettings: { - permissions: { - disableBypassPermissionsMode: "disable", - deny: ["Shell(git push)"], - ask: ["Domain(publish.example)"], - allow: ["Read(**)"], - }, + const managedSettings = { + permissions: { + disableBypassPermissionsMode: DisableBypassPermissionsModes.AllowAutoOnly, + deny: ["Shell(git push)"], + ask: ["Domain(publish.example)"], + allow: ["Read(**)"], }, + } satisfies ManagedSettings; + const params = await captureCreateParams({ + managedSettings, }); expect(params.managedSettings).toEqual({ permissions: { - disableBypassPermissionsMode: "disable", + disableBypassPermissionsMode: "allow-auto-only", deny: ["Shell(git push)"], ask: ["Domain(publish.example)"], allow: ["Read(**)"], @@ -3925,6 +3928,17 @@ describe("managedSettings serialization", () => { }); }); + it("forwards unknown bypass-permissions modes", async () => { + const managedSettings = { + permissions: { + disableBypassPermissionsMode: "future-fail-closed-mode", + }, + } satisfies ManagedSettings; + const params = await captureCreateParams({ managedSettings }); + + expect(params.managedSettings).toEqual(managedSettings); + }); + it("marks directly injected sessions as managed", async () => { const client = new CopilotClient(); await client.start(); diff --git a/rust/src/types.rs b/rust/src/types.rs index afcb4d515b..9936127182 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -1767,6 +1767,9 @@ pub struct CopilotExpAssignmentResponse { pub enum DisableBypassPermissionsMode { /// Turn off bypass-permissions mode. Disable, + /// Permit automatic bypass but block full allow-all. + #[serde(rename = "allow-auto-only")] + AllowAutoOnly, } /// Permission rules injected as a managed-settings layer at session bootstrap. @@ -1775,15 +1778,13 @@ pub enum DisableBypassPermissionsMode { /// layer. This layer composes restrictively with any server- or device-level /// managed settings: [`deny`](Self::deny) and [`ask`](Self::ask) rules are /// unioned across layers, every present [`allow`](Self::allow) list must admit a -/// tool for it to be allowed, and -/// [`disable_bypass_permissions_mode`](Self::disable_bypass_permissions_mode) is -/// honored if any layer sets it (deny-wins). +/// tool for it to be allowed, and bypass-mode restrictions compose to the most +/// restrictive setting. #[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] #[non_exhaustive] pub struct ManagedSettingsPermissions { - /// When set to `"disable"`, bypass-permissions mode is turned off for the - /// session regardless of other layers. Serialized as + /// Restricts bypass-permissions mode for the session. Serialized as /// `disableBypassPermissionsMode`. #[serde(default, skip_serializing_if = "Option::is_none")] pub disable_bypass_permissions_mode: Option, diff --git a/rust/tests/session_test.rs b/rust/tests/session_test.rs index 69a65a558a..4631cd5c9b 100644 --- a/rust/tests/session_test.rs +++ b/rust/tests/session_test.rs @@ -788,6 +788,18 @@ async fn create_session_sends_canvas_wire_fields() { timeout(TIMEOUT, create_handle).await.unwrap().unwrap(); } +#[test] +fn managed_bypass_permissions_modes_use_wire_values() { + assert_eq!( + serde_json::to_value(DisableBypassPermissionsMode::Disable).unwrap(), + serde_json::json!("disable") + ); + assert_eq!( + serde_json::to_value(DisableBypassPermissionsMode::AllowAutoOnly).unwrap(), + serde_json::json!("allow-auto-only") + ); +} + #[tokio::test] async fn create_and_resume_send_managed_settings_permissions() { use github_copilot_sdk::types::ResumeSessionConfig; @@ -796,7 +808,7 @@ async fn create_and_resume_send_managed_settings_permissions() { let managed = ManagedSettings::default().with_permissions( ManagedSettingsPermissions::default() - .with_disable_bypass_permissions_mode(DisableBypassPermissionsMode::Disable) + .with_disable_bypass_permissions_mode(DisableBypassPermissionsMode::AllowAutoOnly) .with_deny(vec!["shell(rm*)".to_string()]) .with_ask(vec!["write".to_string()]) .with_allow(vec![]), @@ -821,7 +833,7 @@ async fn create_and_resume_send_managed_settings_permissions() { assert_eq!(request["method"], "session.create"); assert_eq!(request["params"]["enableManagedSettings"], true); let perms = &request["params"]["managedSettings"]["permissions"]; - assert_eq!(perms["disableBypassPermissionsMode"], "disable"); + assert_eq!(perms["disableBypassPermissionsMode"], "allow-auto-only"); assert_eq!(perms["deny"][0], "shell(rm*)"); assert_eq!(perms["ask"][0], "write"); assert_eq!(perms["allow"], serde_json::json!([])); From 737326409a393917064382325809d9285ab9f2ef Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Tue, 25 Aug 2026 18:01:52 -0700 Subject: [PATCH 09/11] Make Rust managed bypass modes forward compatible Replace the closed enum with an open string field and retain well-known policies as public constants. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e98a14a6-7ad4-4cb6-b808-e56547701c19 --- rust/src/types.rs | 30 +++++++++++++----------------- rust/tests/session_test.rs | 17 +++++++++++------ 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/rust/src/types.rs b/rust/src/types.rs index 9936127182..d7aa8a4c1b 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -1760,16 +1760,14 @@ pub struct CopilotExpAssignmentResponse { pub assignment_context: String, } -/// Controls whether bypass-permissions mode is available in a managed session. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "lowercase")] -#[non_exhaustive] -pub enum DisableBypassPermissionsMode { - /// Turn off bypass-permissions mode. - Disable, +/// Well-known managed bypass-permissions policies. +pub struct DisableBypassPermissionsModes; + +impl DisableBypassPermissionsModes { + /// Turn off bypass-permissions mode entirely. + pub const DISABLE: &'static str = "disable"; /// Permit automatic bypass but block full allow-all. - #[serde(rename = "allow-auto-only")] - AllowAutoOnly, + pub const ALLOW_AUTO_ONLY: &'static str = "allow-auto-only"; } /// Permission rules injected as a managed-settings layer at session bootstrap. @@ -1784,10 +1782,11 @@ pub enum DisableBypassPermissionsMode { #[serde(rename_all = "camelCase")] #[non_exhaustive] pub struct ManagedSettingsPermissions { - /// Restricts bypass-permissions mode for the session. Serialized as - /// `disableBypassPermissionsMode`. + /// Restricts bypass-permissions mode for the session. See + /// [`DisableBypassPermissionsModes`] for well-known values. Unknown values + /// are forwarded so newer runtime policies fail closed. #[serde(default, skip_serializing_if = "Option::is_none")] - pub disable_bypass_permissions_mode: Option, + pub disable_bypass_permissions_mode: Option, /// Tool-permission patterns that are always denied. #[serde(default, skip_serializing_if = "Option::is_none")] pub deny: Option>, @@ -1801,11 +1800,8 @@ pub struct ManagedSettingsPermissions { impl ManagedSettingsPermissions { /// Sets the bypass-permissions policy for this managed layer. - pub fn with_disable_bypass_permissions_mode( - mut self, - value: DisableBypassPermissionsMode, - ) -> Self { - self.disable_bypass_permissions_mode = Some(value); + pub fn with_disable_bypass_permissions_mode(mut self, value: impl Into) -> Self { + self.disable_bypass_permissions_mode = Some(value.into()); self } diff --git a/rust/tests/session_test.rs b/rust/tests/session_test.rs index 4631cd5c9b..bb9c330dff 100644 --- a/rust/tests/session_test.rs +++ b/rust/tests/session_test.rs @@ -22,7 +22,7 @@ use github_copilot_sdk::session_events::{ }; use github_copilot_sdk::types::{ CanvasProviderIdentity, CloudSessionOptions, CloudSessionRepository, CommandContext, - CommandDefinition, CommandHandler, DeliveryMode, DisableBypassPermissionsMode, + CommandDefinition, CommandHandler, DeliveryMode, DisableBypassPermissionsModes, ElicitationRequest, ElicitationResult, ExitPlanModeData, ExtensionInfo, ManagedSettings, ManagedSettingsPermissions, MessageOptions, PermissionDecisionContext, PermissionDecisionOutcome, PermissionDecisionSource, PermissionDecisionSurface, RequestId, @@ -790,13 +790,18 @@ async fn create_session_sends_canvas_wire_fields() { #[test] fn managed_bypass_permissions_modes_use_wire_values() { + let known = ManagedSettingsPermissions::default() + .with_disable_bypass_permissions_mode(DisableBypassPermissionsModes::ALLOW_AUTO_ONLY); assert_eq!( - serde_json::to_value(DisableBypassPermissionsMode::Disable).unwrap(), - serde_json::json!("disable") + serde_json::to_value(known).unwrap()["disableBypassPermissionsMode"], + "allow-auto-only" ); + + let future = ManagedSettingsPermissions::default() + .with_disable_bypass_permissions_mode("future-fail-closed-mode"); assert_eq!( - serde_json::to_value(DisableBypassPermissionsMode::AllowAutoOnly).unwrap(), - serde_json::json!("allow-auto-only") + serde_json::to_value(future).unwrap()["disableBypassPermissionsMode"], + "future-fail-closed-mode" ); } @@ -808,7 +813,7 @@ async fn create_and_resume_send_managed_settings_permissions() { let managed = ManagedSettings::default().with_permissions( ManagedSettingsPermissions::default() - .with_disable_bypass_permissions_mode(DisableBypassPermissionsMode::AllowAutoOnly) + .with_disable_bypass_permissions_mode(DisableBypassPermissionsModes::ALLOW_AUTO_ONLY) .with_deny(vec!["shell(rm*)".to_string()]) .with_ask(vec!["write".to_string()]) .with_allow(vec![]), From acf9241d6c51fd08ae0da3b6473297e745f22794 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Tue, 25 Aug 2026 18:19:48 -0700 Subject: [PATCH 10/11] Apply nightly Rust constant ordering Match the repository's reorder_impl_items formatting configuration used by Linux CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e98a14a6-7ad4-4cb6-b808-e56547701c19 --- rust/src/types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/src/types.rs b/rust/src/types.rs index d7aa8a4c1b..06c0fc4e79 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -1764,10 +1764,10 @@ pub struct CopilotExpAssignmentResponse { pub struct DisableBypassPermissionsModes; impl DisableBypassPermissionsModes { - /// Turn off bypass-permissions mode entirely. - pub const DISABLE: &'static str = "disable"; /// Permit automatic bypass but block full allow-all. pub const ALLOW_AUTO_ONLY: &'static str = "allow-auto-only"; + /// Turn off bypass-permissions mode entirely. + pub const DISABLE: &'static str = "disable"; } /// Permission rules injected as a managed-settings layer at session bootstrap. From 4f00a31ea6d3cfcb3a7dd0e86442e34f24726b02 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Tue, 25 Aug 2026 21:55:14 -0700 Subject: [PATCH 11/11] Clarify managed bypass policy documentation Document allow-auto-only, forward-compatible values, and most-restrictive policy composition across Go, Java, and .NET. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e98a14a6-7ad4-4cb6-b808-e56547701c19 --- dotnet/src/Types.cs | 4 ++-- go/types.go | 6 +++--- .../com/github/copilot/rpc/ManagedSettingsPermissions.java | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dotnet/src/Types.cs b/dotnet/src/Types.cs index 3b5d3e56ca..54595bfed7 100644 --- a/dotnet/src/Types.cs +++ b/dotnet/src/Types.cs @@ -3070,8 +3070,8 @@ public static class DisableBypassPermissionsModes /// This layer composes restrictively with any server- or device-level managed /// settings: and rules are unioned across /// layers, every present list must admit a tool for it to be -/// allowed, and is honored if any -/// layer sets it (deny-wins). +/// allowed, and policies compose to +/// the most restrictive setting. /// public sealed class ManagedSettingsPermissions { diff --git a/go/types.go b/go/types.go index c8cf72197b..ff77c9e0c7 100644 --- a/go/types.go +++ b/go/types.go @@ -1586,9 +1586,9 @@ const ( // accepts for fetched managed policy (e.g. "Read(**)", "Shell(git push *)"); // malformed rules are rejected by the runtime at session creation. type ManagedSettingsPermissions struct { - // DisableBypassPermissionsMode, when set to "disable", turns off - // bypass-permissions ("yolo") mode for the session. Deny-wins: no other - // layer can re-enable it. + // DisableBypassPermissionsMode restricts bypass-permissions mode for the + // session. See the DisableBypassPermissionsMode constants for known values. + // Newer values are forwarded unchanged so runtime policies remain fail-closed. DisableBypassPermissionsMode DisableBypassPermissionsMode `json:"disableBypassPermissionsMode,omitempty"` // Deny lists operations that must always be denied. Unioned across layers. Deny []string `json:"deny,omitzero"` diff --git a/java/sdk/src/main/java/com/github/copilot/rpc/ManagedSettingsPermissions.java b/java/sdk/src/main/java/com/github/copilot/rpc/ManagedSettingsPermissions.java index f857391dbc..6755d959b3 100644 --- a/java/sdk/src/main/java/com/github/copilot/rpc/ManagedSettingsPermissions.java +++ b/java/sdk/src/main/java/com/github/copilot/rpc/ManagedSettingsPermissions.java @@ -31,7 +31,9 @@ public String getDisableBypassPermissionsMode() { } /** - * Disables bypass/allow-all permission modes. + * Restricts bypass/allow-all permission modes. See + * {@link DisableBypassPermissionsModes} for known values. Newer values are + * forwarded unchanged so runtime policies remain fail-closed. * * @param value * bypass-permissions policy