diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs index f46986d4c..3217fbcdc 100644 --- a/dotnet/src/Generated/Rpc.cs +++ b/dotnet/src/Generated/Rpc.cs @@ -61,10 +61,14 @@ internal sealed class ConnectResult public string Version { get; set; } = string.Empty; } -/// Optional connection token presented by the SDK client during the handshake. +/// Parameters for the `server.connect` handshake: an optional connection token and optional connection-level opt-ins (e.g. GitHub telemetry forwarding). [Experimental(Diagnostics.Experimental)] internal sealed class 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, in addition to the runtime's normal GitHub/CTS emission (dual-write). 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. + [JsonPropertyName("enableGitHubTelemetryForwarding")] + public bool? EnableGitHubTelemetryForwarding { get; set; } + /// Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN. [JsonPropertyName("token")] public string? Token { get; set; } @@ -258,7 +262,7 @@ public sealed class ModelPolicy public string? Terms { get; set; } } -/// Schema for the `Model` type. +/// Copilot model metadata, including identifier, display name, capabilities, policy, billing, reasoning efforts, and picker categories. [Experimental(Diagnostics.Experimental)] public sealed class Model { @@ -317,7 +321,7 @@ internal sealed class ModelsListRequest public string? GitHubToken { get; set; } } -/// Schema for the `Tool` type. +/// Built-in tool metadata with identifier, optional namespaced name, description, input-parameter schema, and usage instructions. [Experimental(Diagnostics.Experimental)] public sealed class Tool { @@ -360,7 +364,7 @@ internal sealed class ToolsListRequest public string? Model { get; set; } } -/// Schema for the `AccountQuotaSnapshot` type. +/// Quota usage snapshot for a Copilot quota type, including entitlement, used requests, overage, reset date, and remaining percentage. [Experimental(Diagnostics.Experimental)] public sealed class AccountQuotaSnapshot { @@ -436,7 +440,7 @@ public partial class AuthInfo } -/// Schema for the `CopilotUserResponseEndpoints` type. +/// Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough. [Experimental(Diagnostics.Experimental)] public sealed class CopilotUserResponseEndpoints { @@ -469,178 +473,178 @@ public sealed class CopilotUserResponseOrganizationListItem public string? Name { get; set; } } -/// Schema for the `CopilotUserResponseQuotaSnapshotsChat` type. +/// Chat quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. [Experimental(Diagnostics.Experimental)] public sealed class CopilotUserResponseQuotaSnapshotsChat { - /// Gets or sets the entitlement value. + /// Number of requests/units included in the entitlement for this period; `-1` denotes an unlimited entitlement. [JsonPropertyName("entitlement")] public double? Entitlement { get; set; } - /// Gets or sets the has_quota value. + /// Whether the user currently has quota available; when `false` and not unlimited, further requests are blocked until the quota resets. [JsonPropertyName("has_quota")] public bool? HasQuota { get; set; } - /// Gets or sets the overage_count value. + /// Count of additional pay-per-request usage consumed this period beyond the entitlement. [JsonPropertyName("overage_count")] public double? OverageCount { get; set; } - /// Gets or sets the overage_permitted value. + /// Whether usage may continue at pay-per-request rates once the entitlement is exhausted. [JsonPropertyName("overage_permitted")] public bool? OveragePermitted { get; set; } - /// Gets or sets the percent_remaining value. + /// Percentage of the entitlement remaining at the snapshot timestamp. [JsonPropertyName("percent_remaining")] public double? PercentRemaining { get; set; } - /// Gets or sets the quota_id value. + /// Identifier of the quota bucket this snapshot describes. [JsonPropertyName("quota_id")] public string? QuotaId { get; set; } - /// Gets or sets the quota_remaining value. + /// Amount of quota remaining at the snapshot timestamp. [JsonPropertyName("quota_remaining")] public double? QuotaRemaining { get; set; } - /// Gets or sets the quota_reset_at value. + /// Unix epoch time, in seconds, when this quota next resets. [JsonPropertyName("quota_reset_at")] public double? QuotaResetAt { get; set; } - /// Gets or sets the remaining value. + /// Remaining entitlement/quota amount at the snapshot timestamp. [JsonPropertyName("remaining")] public double? Remaining { get; set; } - /// Gets or sets the timestamp_utc value. + /// UTC timestamp when this snapshot was captured. [JsonPropertyName("timestamp_utc")] public string? TimestampUtc { get; set; } - /// Gets or sets the token_based_billing value. + /// Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. [JsonPropertyName("token_based_billing")] public bool? TokenBasedBilling { get; set; } - /// Gets or sets the unlimited value. + /// Whether the entitlement for this category is unlimited. [JsonPropertyName("unlimited")] public bool? Unlimited { get; set; } } -/// Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` type. +/// Completions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. [Experimental(Diagnostics.Experimental)] public sealed class CopilotUserResponseQuotaSnapshotsCompletions { - /// Gets or sets the entitlement value. + /// Number of requests/units included in the entitlement for this period; `-1` denotes an unlimited entitlement. [JsonPropertyName("entitlement")] public double? Entitlement { get; set; } - /// Gets or sets the has_quota value. + /// Whether the user currently has quota available; when `false` and not unlimited, further requests are blocked until the quota resets. [JsonPropertyName("has_quota")] public bool? HasQuota { get; set; } - /// Gets or sets the overage_count value. + /// Count of additional pay-per-request usage consumed this period beyond the entitlement. [JsonPropertyName("overage_count")] public double? OverageCount { get; set; } - /// Gets or sets the overage_permitted value. + /// Whether usage may continue at pay-per-request rates once the entitlement is exhausted. [JsonPropertyName("overage_permitted")] public bool? OveragePermitted { get; set; } - /// Gets or sets the percent_remaining value. + /// Percentage of the entitlement remaining at the snapshot timestamp. [JsonPropertyName("percent_remaining")] public double? PercentRemaining { get; set; } - /// Gets or sets the quota_id value. + /// Identifier of the quota bucket this snapshot describes. [JsonPropertyName("quota_id")] public string? QuotaId { get; set; } - /// Gets or sets the quota_remaining value. + /// Amount of quota remaining at the snapshot timestamp. [JsonPropertyName("quota_remaining")] public double? QuotaRemaining { get; set; } - /// Gets or sets the quota_reset_at value. + /// Unix epoch time, in seconds, when this quota next resets. [JsonPropertyName("quota_reset_at")] public double? QuotaResetAt { get; set; } - /// Gets or sets the remaining value. + /// Remaining entitlement/quota amount at the snapshot timestamp. [JsonPropertyName("remaining")] public double? Remaining { get; set; } - /// Gets or sets the timestamp_utc value. + /// UTC timestamp when this snapshot was captured. [JsonPropertyName("timestamp_utc")] public string? TimestampUtc { get; set; } - /// Gets or sets the token_based_billing value. + /// Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. [JsonPropertyName("token_based_billing")] public bool? TokenBasedBilling { get; set; } - /// Gets or sets the unlimited value. + /// Whether the entitlement for this category is unlimited. [JsonPropertyName("unlimited")] public bool? Unlimited { get; set; } } -/// Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` type. +/// Premium-interactions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. [Experimental(Diagnostics.Experimental)] public sealed class CopilotUserResponseQuotaSnapshotsPremiumInteractions { - /// Gets or sets the entitlement value. + /// Number of requests/units included in the entitlement for this period; `-1` denotes an unlimited entitlement. [JsonPropertyName("entitlement")] public double? Entitlement { get; set; } - /// Gets or sets the has_quota value. + /// Whether the user currently has quota available; when `false` and not unlimited, further requests are blocked until the quota resets. [JsonPropertyName("has_quota")] public bool? HasQuota { get; set; } - /// Gets or sets the overage_count value. + /// Count of additional pay-per-request usage consumed this period beyond the entitlement. [JsonPropertyName("overage_count")] public double? OverageCount { get; set; } - /// Gets or sets the overage_permitted value. + /// Whether usage may continue at pay-per-request rates once the entitlement is exhausted. [JsonPropertyName("overage_permitted")] public bool? OveragePermitted { get; set; } - /// Gets or sets the percent_remaining value. + /// Percentage of the entitlement remaining at the snapshot timestamp. [JsonPropertyName("percent_remaining")] public double? PercentRemaining { get; set; } - /// Gets or sets the quota_id value. + /// Identifier of the quota bucket this snapshot describes. [JsonPropertyName("quota_id")] public string? QuotaId { get; set; } - /// Gets or sets the quota_remaining value. + /// Amount of quota remaining at the snapshot timestamp. [JsonPropertyName("quota_remaining")] public double? QuotaRemaining { get; set; } - /// Gets or sets the quota_reset_at value. + /// Unix epoch time, in seconds, when this quota next resets. [JsonPropertyName("quota_reset_at")] public double? QuotaResetAt { get; set; } - /// Gets or sets the remaining value. + /// Remaining entitlement/quota amount at the snapshot timestamp. [JsonPropertyName("remaining")] public double? Remaining { get; set; } - /// Gets or sets the timestamp_utc value. + /// UTC timestamp when this snapshot was captured. [JsonPropertyName("timestamp_utc")] public string? TimestampUtc { get; set; } - /// Gets or sets the token_based_billing value. + /// Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. [JsonPropertyName("token_based_billing")] public bool? TokenBasedBilling { get; set; } - /// Gets or sets the unlimited value. + /// Whether the entitlement for this category is unlimited. [JsonPropertyName("unlimited")] public bool? Unlimited { get; set; } } -/// Schema for the `CopilotUserResponseQuotaSnapshots` type. +/// Quota snapshot map from the raw Copilot user-response passthrough, with chat, completions, premium-interactions, and other entries. [Experimental(Diagnostics.Experimental)] public sealed class CopilotUserResponseQuotaSnapshots { - /// Schema for the `CopilotUserResponseQuotaSnapshotsChat` type. + /// Chat quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. [JsonPropertyName("chat")] public CopilotUserResponseQuotaSnapshotsChat? Chat { get; set; } - /// Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` type. + /// Completions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. [JsonPropertyName("completions")] public CopilotUserResponseQuotaSnapshotsCompletions? Completions { get; set; } - /// Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` type. + /// Premium-interactions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. [JsonPropertyName("premium_interactions")] public CopilotUserResponseQuotaSnapshotsPremiumInteractions? PremiumInteractions { get; set; } } @@ -649,112 +653,112 @@ public sealed class CopilotUserResponseQuotaSnapshots [Experimental(Diagnostics.Experimental)] public sealed class CopilotUserResponse { - /// Gets or sets the access_type_sku value. + /// Copilot access SKU identifier (e.g. `free_limited_copilot`, `copilot_for_business_seat_quota`) used to gate model and feature access. [JsonPropertyName("access_type_sku")] public string? AccessTypeSku { get; set; } - /// Gets or sets the analytics_tracking_id value. + /// Opaque analytics tracking identifier for the user, forwarded from the Copilot API. [JsonPropertyName("analytics_tracking_id")] public string? AnalyticsTrackingId { get; set; } - /// Gets or sets the assigned_date value. + /// Date the Copilot seat was assigned to the user, if applicable. [JsonPropertyName("assigned_date")] public string? AssignedDate { get; set; } - /// Gets or sets the can_signup_for_limited value. + /// Whether the user is eligible to sign up for the free/limited Copilot tier. [JsonPropertyName("can_signup_for_limited")] public bool? CanSignupForLimited { get; set; } - /// Gets or sets the can_upgrade_plan value. + /// Whether the user is able to upgrade their Copilot plan. [JsonPropertyName("can_upgrade_plan")] public bool? CanUpgradePlan { get; set; } - /// Gets or sets the chat_enabled value. + /// Whether Copilot chat is enabled for the user. [JsonPropertyName("chat_enabled")] public bool? ChatEnabled { get; set; } - /// Gets or sets the cli_remote_control_enabled value. + /// Whether CLI remote control is enabled for the user. [JsonPropertyName("cli_remote_control_enabled")] public bool? CliRemoteControlEnabled { get; set; } - /// Gets or sets the cloud_session_storage_enabled value. + /// Whether cloud session storage is enabled for the user. [JsonPropertyName("cloud_session_storage_enabled")] public bool? CloudSessionStorageEnabled { get; set; } - /// Gets or sets the codex_agent_enabled value. + /// Whether the Codex agent is enabled for the user. [JsonPropertyName("codex_agent_enabled")] public bool? CodexAgentEnabled { get; set; } - /// Gets or sets the copilot_plan value. + /// Copilot plan name for the user (e.g. `individual`, `business`, `enterprise`). [JsonPropertyName("copilot_plan")] public string? CopilotPlan { get; set; } - /// Gets or sets the copilotignore_enabled value. + /// Whether `.copilotignore` content-exclusion support is enabled for the user. [JsonPropertyName("copilotignore_enabled")] public bool? CopilotignoreEnabled { get; set; } - /// Schema for the `CopilotUserResponseEndpoints` type. + /// Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough. [JsonPropertyName("endpoints")] public CopilotUserResponseEndpoints? Endpoints { get; set; } - /// Gets or sets the is_mcp_enabled value. + /// Whether MCP (Model Context Protocol) support is enabled for the user. [JsonPropertyName("is_mcp_enabled")] public bool? IsMcpEnabled { get; set; } - /// Gets or sets the is_staff value. + /// Whether the user is a GitHub/Microsoft staff member. [JsonPropertyName("is_staff")] public bool? IsStaff { get; set; } - /// Gets or sets the limited_user_quotas value. + /// Per-category quota allotments for free/limited-tier users, keyed by quota category. [JsonPropertyName("limited_user_quotas")] public IDictionary? LimitedUserQuotas { get; set; } - /// Gets or sets the limited_user_reset_date value. + /// Date the free/limited-tier user's quotas next reset, as a raw string from the Copilot API. [JsonPropertyName("limited_user_reset_date")] public string? LimitedUserResetDate { get; set; } - /// Gets or sets the login value. + /// GitHub login of the authenticated user. [JsonPropertyName("login")] public string? Login { get; set; } - /// Gets or sets the monthly_quotas value. + /// Per-category monthly quota allotments, keyed by quota category. [JsonPropertyName("monthly_quotas")] public IDictionary? MonthlyQuotas { get; set; } - /// Gets or sets the organization_list value. + /// Organizations the user belongs to, each with an optional login and display name. [JsonPropertyName("organization_list")] public IList? OrganizationList { get; set; } - /// Gets or sets the organization_login_list value. + /// Logins of the organizations the user belongs to. [JsonPropertyName("organization_login_list")] public IList? OrganizationLoginList { get; set; } - /// Gets or sets the quota_reset_date value. + /// Date the user's usage quota next resets, as a raw string from the Copilot API; see `quota_reset_date_utc` for the UTC-normalized value. [JsonPropertyName("quota_reset_date")] public string? QuotaResetDate { get; set; } - /// Gets or sets the quota_reset_date_utc value. + /// UTC-normalized form of `quota_reset_date` (the date the user's usage quota next resets). [JsonPropertyName("quota_reset_date_utc")] public string? QuotaResetDateUtc { get; set; } - /// Schema for the `CopilotUserResponseQuotaSnapshots` type. + /// Quota snapshot map from the raw Copilot user-response passthrough, with chat, completions, premium-interactions, and other entries. [JsonPropertyName("quota_snapshots")] public CopilotUserResponseQuotaSnapshots? QuotaSnapshots { get; set; } - /// Gets or sets the restricted_telemetry value. + /// Whether the user's telemetry is subject to restricted-data handling. [JsonPropertyName("restricted_telemetry")] public bool? RestrictedTelemetry { get; set; } - /// Gets or sets the te value. + /// Raw passthrough of the Copilot API `te` flag for the user (an opaque server-side eligibility signal surfaced in telemetry); not otherwise interpreted by the runtime. [JsonPropertyName("te")] public bool? Te { get; set; } - /// Gets or sets the token_based_billing value. + /// Whether the account is on usage-based (token/AI-credit) billing rather than a fixed premium-request quota. [JsonPropertyName("token_based_billing")] public bool? TokenBasedBilling { get; set; } } -/// Schema for the `HMACAuthInfo` type. +/// Authentication-info variant for GitHub-internal HMAC auth, carrying the public GitHub host and HMAC secret. /// The hmac variant of . [Experimental(Diagnostics.Experimental)] public partial class AuthInfoHmac : AuthInfo @@ -777,7 +781,7 @@ public partial class AuthInfoHmac : AuthInfo public required string Host { get; set; } } -/// Schema for the `EnvAuthInfo` type. +/// Authentication-info 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 AuthInfoEnv : AuthInfo @@ -809,7 +813,7 @@ public partial class AuthInfoEnv : AuthInfo public required string Token { get; set; } } -/// Schema for the `TokenAuthInfo` type. +/// Authentication-info variant for SDK-configured token authentication, carrying host and the secret token value. /// The token variant of . [Experimental(Diagnostics.Experimental)] public partial class AuthInfoToken : AuthInfo @@ -832,7 +836,7 @@ public partial class AuthInfoToken : AuthInfo public required string Token { get; set; } } -/// Schema for the `CopilotApiTokenAuthInfo` type. +/// 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 AuthInfoCopilotApiToken : AuthInfo @@ -851,7 +855,7 @@ public partial class AuthInfoCopilotApiToken : AuthInfo public required string Host { get; set; } } -/// Schema for the `UserAuthInfo` type. +/// 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 AuthInfoUser : AuthInfo @@ -874,7 +878,7 @@ public partial class AuthInfoUser : AuthInfo public required string Login { get; set; } } -/// Schema for the `GhCliAuthInfo` type. +/// Authentication-info 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 AuthInfoGhCli : AuthInfo @@ -901,7 +905,7 @@ public partial class AuthInfoGhCli : AuthInfo public required string Token { get; set; } } -/// Schema for the `ApiKeyAuthInfo` type. +/// Authentication-info 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 AuthInfoApiKey : AuthInfo @@ -937,7 +941,7 @@ public sealed class AccountGetCurrentAuthResult public AuthInfo? AuthInfo { get; set; } } -/// Schema for the `AccountAllUsers` type. +/// Authenticated account entry returned by `account.getAllUsers`, with auth info and an optional associated token. [Experimental(Diagnostics.Experimental)] public sealed class AccountAllUsers { @@ -1012,7 +1016,7 @@ internal sealed class SecretsAddFilterValuesRequest public IList Values { get => field ??= []; set; } } -/// Schema for the `DiscoveredMcpServer` type. +/// MCP server discovered by `mcp.discover`, with config source, optional plugin source, transport type, and enabled state. [Experimental(Diagnostics.Experimental)] public sealed class DiscoveredMcpServer { @@ -1240,7 +1244,7 @@ internal sealed class PluginsUpdateRequest public string Name { get; set; } = string.Empty; } -/// Schema for the `PluginUpdateAllEntry` type. +/// Per-plugin result from updating all plugins, with versions, skills installed, success flag, and optional error. [Experimental(Diagnostics.Experimental)] public sealed class PluginUpdateAllEntry { @@ -1401,7 +1405,7 @@ internal sealed class PluginsMarketplacesBrowseRequest public string Name { get; set; } = string.Empty; } -/// Schema for the `MarketplaceRefreshEntry` type. +/// Per-marketplace refresh result, including marketplace name, success flag, and optional failure error. [Experimental(Diagnostics.Experimental)] public sealed class MarketplaceRefreshEntry { @@ -1436,7 +1440,7 @@ internal sealed class PluginsMarketplacesRefreshRequest public string? Name { get; set; } } -/// Schema for the `ServerSkill` type. +/// Server-side skill metadata, including name, description, source, enabled/invocable state, path, project path, and argument hint. [Experimental(Diagnostics.Experimental)] public sealed class ServerSkill { @@ -1499,7 +1503,7 @@ internal sealed class SkillsDiscoverRequest public IList? SkillDirectories { get; set; } } -/// Schema for the `SkillDiscoveryPath` type. +/// Canonical directory where skills can be discovered or created, with scope, preference, and optional project path. [Experimental(Diagnostics.Experimental)] public sealed class SkillDiscoveryPath { @@ -1551,7 +1555,7 @@ internal sealed class SkillsConfigSetDisabledSkillsRequest public IList DisabledSkills { get => field ??= []; set; } } -/// Schema for the `AgentInfo` type. +/// Custom agent metadata, including identifiers, display details, source, tools, model, MCP servers, skills, and file path. [Experimental(Diagnostics.Experimental)] public sealed class AgentInfo { @@ -1623,7 +1627,7 @@ internal sealed class AgentsDiscoverRequest public IList? ProjectPaths { get; set; } } -/// Schema for the `AgentDiscoveryPath` type. +/// Canonical directory where custom agents can be discovered or created, with scope, preference, and optional project path. [Experimental(Diagnostics.Experimental)] public sealed class AgentDiscoveryPath { @@ -1666,7 +1670,7 @@ internal sealed class AgentsGetDiscoveryPathsRequest public IList? ProjectPaths { get; set; } } -/// Schema for the `InstructionSource` type. +/// Loaded instruction source for a session, including path, content, category, location, applicability, and optional description. [Experimental(Diagnostics.Experimental)] public sealed class InstructionSource { @@ -1733,7 +1737,7 @@ internal sealed class InstructionsDiscoverRequest public IList? ProjectPaths { get; set; } } -/// Schema for the `InstructionDiscoveryPath` type. +/// Canonical file or directory where custom instructions can be discovered or created, with location, kind, preference, and project path. [Experimental(Diagnostics.Experimental)] public sealed class InstructionDiscoveryPath { @@ -2052,7 +2056,7 @@ public sealed class RemoteSessionMetadataValue public RemoteSessionMetadataTaskType? TaskType { get; set; } } -/// Schema for the `SessionsOpenProgress` type. +/// `sessions.open` handoff progress update with step, status, and optional message. [Experimental(Diagnostics.Experimental)] public sealed class SessionsOpenProgress { @@ -2589,7 +2593,7 @@ internal sealed class SessionsReleaseLockRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `LocalSessionMetadataValue` type. +/// Persisted local session metadata, including identifiers, timestamps, summary/name, client, context, detached state, and task ID. [Experimental(Diagnostics.Experimental)] public sealed class LocalSessionMetadataValue { @@ -2699,7 +2703,7 @@ public sealed class SessionsSetAdditionalPluginsResult { } -/// Schema for the `InstalledPlugin` type. +/// Installed plugin record from global state, with marketplace, version, install time, enabled state, cache path, and source. [Experimental(Diagnostics.Experimental)] public sealed class InstalledPlugin { @@ -3496,6 +3500,187 @@ internal sealed class SessionSetCredentialsParams public string SessionId { get; set; } = string.Empty; } +/// A file included in the redacted debug bundle. +[Experimental(Diagnostics.Experimental)] +public sealed class DebugCollectLogsCollectedEntry +{ + /// Relative path of the file in the staged bundle/archive. + [JsonPropertyName("bundlePath")] + public string BundlePath { get; set; } = string.Empty; + + /// Redacted output size in bytes. + [JsonPropertyName("sizeBytes")] + public long SizeBytes { get; set; } + + /// Source category for this entry. + [JsonPropertyName("source")] + public DebugCollectLogsSource Source { get; set; } +} + +/// An optional debug bundle entry that could not be included. +[Experimental(Diagnostics.Experimental)] +public sealed class DebugCollectLogsSkippedEntry +{ + /// Relative path requested for this bundle entry. + [JsonPropertyName("bundlePath")] + public string BundlePath { get; set; } = string.Empty; + + /// Server-local source path that could not be read. + [JsonPropertyName("path")] + public string? Path { get; set; } + + /// Reason the entry was skipped. + [JsonPropertyName("reason")] + public string Reason { get; set; } = string.Empty; +} + +/// Result of collecting a redacted debug bundle. +[Experimental(Diagnostics.Experimental)] +public sealed class DebugCollectLogsResult +{ + /// Files included in the redacted bundle. + [JsonPropertyName("entries")] + public IList Entries { get => field ??= []; set; } + + /// Destination kind that was written. + [JsonPropertyName("kind")] + public DebugCollectLogsResultKind Kind { get; set; } + + /// Actual archive path or staging directory path written. This may differ from the requested path when no-overwrite suffixing or fallback-to-temp-directory was needed. + [JsonPropertyName("path")] + public string Path { get; set; } = string.Empty; + + /// Optional files or directories that could not be included. + [JsonPropertyName("skippedEntries")] + public IList? SkippedEntries { get; set; } +} + +/// A caller-provided server-local file or directory to include in the debug bundle. +[Experimental(Diagnostics.Experimental)] +public sealed class DebugCollectLogsEntry +{ + /// Relative path to use inside the staged bundle/archive. + [JsonPropertyName("bundlePath")] + public string BundlePath { get; set; } = string.Empty; + + /// Kind of source path to include. + [JsonPropertyName("kind")] + public DebugCollectLogsEntryKind Kind { get; set; } + + /// Server-local source path to read. + [JsonPropertyName("path")] + public string Path { get; set; } = string.Empty; + + /// How text content from this entry should be redacted. Defaults to plain-text. + [JsonPropertyName("redaction")] + public DebugCollectLogsRedaction? Redaction { get; set; } + + /// When true, collection fails if this entry cannot be read. Defaults to false, which records the entry in `skippedEntries`. + [JsonPropertyName("required")] + public bool? Required { get; set; } +} + +/// Destination for the redacted debug bundle. +/// Polymorphic base type discriminated by kind. +[Experimental(Diagnostics.Experimental)] +[JsonPolymorphic( + TypeDiscriminatorPropertyName = "kind", + UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] +[JsonDerivedType(typeof(DebugCollectLogsDestinationArchive), "archive")] +[JsonDerivedType(typeof(DebugCollectLogsDestinationDirectory), "directory")] +public partial class DebugCollectLogsDestination +{ + /// The type discriminator. + [JsonPropertyName("kind")] + public virtual string Kind { get; set; } = string.Empty; +} + + +/// The archive variant of . +[Experimental(Diagnostics.Experimental)] +public partial class DebugCollectLogsDestinationArchive : DebugCollectLogsDestination +{ + /// + [JsonIgnore] + public override string Kind => "archive"; + + /// When true, create the archive atomically without overwriting an existing file by appending ` (N)` before the extension as needed. Defaults to false. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("noOverwrite")] + public bool? NoOverwrite { get; set; } + + /// Absolute or server-relative path for the .tgz archive to create. + [JsonPropertyName("outputPath")] + public required string OutputPath { get; set; } +} + +/// The directory variant of . +[Experimental(Diagnostics.Experimental)] +public partial class DebugCollectLogsDestinationDirectory : DebugCollectLogsDestination +{ + /// + [JsonIgnore] + public override string Kind => "directory"; + + /// Directory where redacted files should be staged. The directory is created if needed. + [JsonPropertyName("outputDirectory")] + public required string OutputDirectory { get; set; } +} + +/// Built-in session diagnostics to include in the bundle. Omitted fields default to true. +[Experimental(Diagnostics.Experimental)] +public sealed class DebugCollectLogsInclude +{ + /// Server-local path to the current process log. When set, it is included as `process.log` and its directory is searched for prior logs from the same session. + [JsonPropertyName("currentProcessLogPath")] + public string? CurrentProcessLogPath { get; set; } + + /// Include the session event log (`events.jsonl`). Defaults to true. + [JsonPropertyName("events")] + public bool? Events { get; set; } + + /// Server-local path to the session's events.jsonl file. Internal callers normally omit this and let the runtime derive it from the session. + [JsonPropertyName("eventsPath")] + public string? EventsPath { get; set; } + + /// Maximum number of previous process logs to include. Defaults to 5. + [JsonPropertyName("previousProcessLogLimit")] + public long? PreviousProcessLogLimit { get; set; } + + /// Server-local process log directory to search when `currentProcessLogPath` is unavailable, useful for collecting logs for inactive sessions. + [JsonPropertyName("processLogDirectory")] + public string? ProcessLogDirectory { get; set; } + + /// Include process logs for the session. Defaults to true. + [JsonPropertyName("processLogs")] + public bool? ProcessLogs { get; set; } + + /// Include interactive shell logs written under the session's `shell-logs` directory. Defaults to true. + [JsonPropertyName("shellLogs")] + public bool? ShellLogs { get; set; } +} + +/// Options for collecting a redacted session debug bundle. +[Experimental(Diagnostics.Experimental)] +internal sealed class DebugCollectLogsRequest +{ + /// Caller-provided server-local files or directories to include in addition to the runtime's built-in session diagnostics. This lets host applications add their own diagnostics without changing the API shape. + [JsonPropertyName("additionalEntries")] + public IList? AdditionalEntries { get; set; } + + /// Where the redacted bundle should be written. Use `archive` to produce a .tgz, or `directory` to stage redacted files for caller-managed upload/post-processing. + [JsonPropertyName("destination")] + public DebugCollectLogsDestination Destination { get => field ??= new(); set; } + + /// Which built-in session diagnostics to include. Omitted fields default to true. + [JsonPropertyName("include")] + public DebugCollectLogsInclude? Include { get; set; } + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// Canvas action that the agent or host can invoke. To discover the input schema for a particular action, call the list_canvas_capabilities tool. [Experimental(Diagnostics.Experimental)] public sealed class CanvasAction @@ -4231,7 +4416,7 @@ internal sealed class WorkspacesCreateFileRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `WorkspacesCheckpoints` type. +/// Workspace checkpoint metadata with assigned number, human-readable title, and checkpoint filename. [Experimental(Diagnostics.Experimental)] public sealed class WorkspacesCheckpoints { @@ -4625,7 +4810,7 @@ internal sealed class TasksStartAgentRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `TaskInfo` type. +/// Tracked task union returned by task APIs, containing either an agent task or a shell task. /// Polymorphic base type discriminated by type. [Experimental(Diagnostics.Experimental)] [JsonPolymorphic( @@ -4641,7 +4826,7 @@ public partial class TaskInfo } -/// Schema for the `TaskAgentInfo` type. +/// Tracked background agent task metadata, including IDs, status, timing, agent type, prompt, model, result, and latest response. /// The agent variant of . [Experimental(Diagnostics.Experimental)] public partial class TaskInfoAgent : TaskInfo @@ -4735,7 +4920,7 @@ public partial class TaskInfoAgent : TaskInfo public required string ToolCallId { get; set; } } -/// Schema for the `TaskShellInfo` type. +/// Tracked shell task metadata, including ID, command, status, timing, attachment/execution mode, log path, and PID. /// The shell variant of . [Experimental(Diagnostics.Experimental)] public partial class TaskInfoShell : TaskInfo @@ -4856,7 +5041,7 @@ public partial class TasksGetProgressResultProgress } -/// Schema for the `TaskProgressLine` type. +/// Timestamped display line for task progress output or recent agent activity. [Experimental(Diagnostics.Experimental)] public sealed class TaskProgressLine { @@ -4869,7 +5054,7 @@ public sealed class TaskProgressLine public DateTimeOffset Timestamp { get; set; } } -/// Schema for the `TaskAgentProgress` type. +/// Progress snapshot for an agent task, with recent activity lines and optional latest intent. /// The agent variant of . public partial class TasksGetProgressResultProgressAgent : TasksGetProgressResultProgress { @@ -4887,7 +5072,7 @@ public partial class TasksGetProgressResultProgressAgent : TasksGetProgressResul public required IList RecentActivity { get; set; } } -/// Schema for the `TaskShellProgress` type. +/// Progress snapshot for a shell task, with recent stdout/stderr output and optional process ID. /// The shell variant of . public partial class TasksGetProgressResultProgressShell : TasksGetProgressResultProgress { @@ -5063,7 +5248,7 @@ internal sealed class TasksSendMessageRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `Skill` type. +/// Skill metadata available to a session, with name, description, source, enabled/invocable state, path, plugin, and argument hint. [Experimental(Diagnostics.Experimental)] public sealed class Skill { @@ -5118,7 +5303,7 @@ internal sealed class SessionSkillsListRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `SkillsInvokedSkill` type. +/// Skill invocation record with name, path, content, allowed tools, and turn number. [Experimental(Diagnostics.Experimental)] public sealed class SkillsInvokedSkill { @@ -5273,7 +5458,7 @@ public sealed class McpHostState public IList PendingConnections { get => field ??= []; set; } } -/// Schema for the `McpServer` type. +/// MCP server status entry, including config source/plugin source and any connection error. [Experimental(Diagnostics.Experimental)] public sealed class McpServer { @@ -5327,7 +5512,7 @@ internal sealed class SessionMcpListRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `McpTools` type. +/// MCP tool metadata with tool name and optional description. [Experimental(Diagnostics.Experimental)] public sealed class McpTools { @@ -5406,7 +5591,7 @@ internal sealed class SessionMcpReloadRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `McpAllowedServer` type. +/// MCP server allowed by policy, with server name and optional PII-free explanatory note. [Experimental(Diagnostics.Experimental)] public sealed class McpAllowedServer { @@ -5419,7 +5604,7 @@ public sealed class McpAllowedServer public string? RedactedNote { get; set; } } -/// Schema for the `McpFilteredServer` type. +/// MCP server filtered by policy, with name, reason, optional redacted reason, and enterprise login. [Experimental(Diagnostics.Experimental)] public sealed class McpFilteredServer { @@ -5935,7 +6120,7 @@ internal sealed class McpHeadersHandlePendingHeadersRefreshRequestRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `McpAppsResourceContent` type. +/// MCP Apps resource content with URI, optional MIME type, text or base64 blob, and resource metadata. [Experimental(Diagnostics.Experimental)] public sealed class McpAppsResourceContent { @@ -6216,7 +6401,7 @@ internal sealed class McpAppsDiagnoseRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `Plugin` type. +/// Session plugin metadata, with name, marketplace, optional version, and enabled state. [Experimental(Diagnostics.Experimental)] public sealed class Plugin { @@ -6509,7 +6694,7 @@ public sealed class SessionUpdateOptionsResult public bool Success { get; set; } } -/// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. +/// Source descriptor for a `session.options.update` content-exclusion rule, with source name and type. [Experimental(Diagnostics.Experimental)] public sealed class OptionsUpdateAdditionalContentExclusionPolicyRuleSource { @@ -6522,7 +6707,7 @@ public sealed class OptionsUpdateAdditionalContentExclusionPolicyRuleSource public string Type { get; set; } = string.Empty; } -/// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRule` type. +/// Single content-exclusion rule supplied to `session.options.update`, with paths, match conditions, and source. [Experimental(Diagnostics.Experimental)] public sealed class OptionsUpdateAdditionalContentExclusionPolicyRule { @@ -6538,12 +6723,12 @@ public sealed class OptionsUpdateAdditionalContentExclusionPolicyRule [JsonPropertyName("paths")] public IList Paths { get => field ??= []; set; } - /// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. + /// Source descriptor for a `session.options.update` content-exclusion rule, with source name and type. [JsonPropertyName("source")] public OptionsUpdateAdditionalContentExclusionPolicyRuleSource Source { get => field ??= new(); set; } } -/// Schema for the `OptionsUpdateAdditionalContentExclusionPolicy` type. +/// Content-exclusion policy supplied to `session.options.update`, with rules, last-updated data, and scope. [Experimental(Diagnostics.Experimental)] public sealed class OptionsUpdateAdditionalContentExclusionPolicy { @@ -6569,7 +6754,7 @@ public sealed class CapiSessionOptions public bool? EnableWebSocketResponses { get; set; } } -/// Schema for the `SessionInstalledPlugin` type. +/// Installed plugin record for a session, with marketplace, version, install time, enabled state, cache path, and source. [Experimental(Diagnostics.Experimental)] public sealed class SessionInstalledPlugin { @@ -6706,10 +6891,6 @@ public sealed class SandboxConfigUserPolicyFilesystem [Experimental(Diagnostics.Experimental)] public sealed class SandboxConfigUserPolicyNetwork { - /// Hosts allowed in addition to the base policy. - [JsonPropertyName("allowedHosts")] - public IList? AllowedHosts { get; set; } - /// Whether traffic to local/loopback addresses is allowed. [JsonPropertyName("allowLocalNetwork")] public bool? AllowLocalNetwork { get; set; } @@ -6717,10 +6898,6 @@ public sealed class SandboxConfigUserPolicyNetwork /// Whether outbound network traffic is allowed at all. [JsonPropertyName("allowOutbound")] public bool? AllowOutbound { get; set; } - - /// Hosts explicitly blocked. - [JsonPropertyName("blockedHosts")] - public IList? BlockedHosts { get; set; } } /// macOS seatbelt-specific options. @@ -7013,7 +7190,7 @@ internal sealed class LspInitializeRequest public string? WorkingDirectory { get; set; } } -/// Schema for the `Extension` type. +/// Discovered extension metadata, including source-qualified ID, name, discovery source, status, and optional process ID. [Experimental(Diagnostics.Experimental)] public sealed class Extension { @@ -7091,7 +7268,7 @@ internal sealed class SessionExtensionsReloadRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `PushAttachment` type. +/// Attachment union accepted by push input, covering files, directories, GitHub objects, blobs, snippets, and extension context. /// Polymorphic base type discriminated by type. [Experimental(Diagnostics.Experimental)] [JsonPolymorphic( @@ -7798,7 +7975,7 @@ public sealed class SlashCommandInput public bool? Required { get; set; } } -/// Schema for the `SlashCommandInfo` type. +/// Slash-command metadata with name, aliases, description, kind, input hint, execution allowance, and schedulability. [Experimental(Diagnostics.Experimental)] public sealed class SlashCommandInfo { @@ -7900,7 +8077,7 @@ public partial class SlashCommandInvocationResult } -/// Schema for the `SlashCommandTextResult` type. +/// Slash-command invocation result containing text output plus Markdown/ANSI rendering flags. /// The text variant of . [Experimental(Diagnostics.Experimental)] public partial class SlashCommandInvocationResultText : SlashCommandInvocationResult @@ -7929,7 +8106,7 @@ public partial class SlashCommandInvocationResultText : SlashCommandInvocationRe public required string Text { get; set; } } -/// Schema for the `SlashCommandAgentPromptResult` type. +/// Slash-command invocation result that submits an agent prompt, with display prompt, optional mode, and settings-change flag. /// The agent-prompt variant of . [Experimental(Diagnostics.Experimental)] public partial class SlashCommandInvocationResultAgentPrompt : SlashCommandInvocationResult @@ -7957,7 +8134,7 @@ public partial class SlashCommandInvocationResultAgentPrompt : SlashCommandInvoc public bool? RuntimeSettingsChanged { get; set; } } -/// Schema for the `SlashCommandCompletedResult` type. +/// Slash-command invocation result indicating completion, with optional message and settings-change flag. /// The completed variant of . [Experimental(Diagnostics.Experimental)] public partial class SlashCommandInvocationResultCompleted : SlashCommandInvocationResult @@ -7977,7 +8154,7 @@ public partial class SlashCommandInvocationResultCompleted : SlashCommandInvocat public bool? RuntimeSettingsChanged { get; set; } } -/// Schema for the `SlashCommandSelectSubcommandOption` type. +/// Selectable slash-command subcommand option with name, description, and optional group label. [Experimental(Diagnostics.Experimental)] public sealed class SlashCommandSelectSubcommandOption { @@ -7994,7 +8171,7 @@ public sealed class SlashCommandSelectSubcommandOption public string Name { get; set; } = string.Empty; } -/// Schema for the `SlashCommandSelectSubcommandResult` type. +/// Slash-command invocation result asking the client to present subcommand options for a parent command. /// The select-subcommand variant of . [Experimental(Diagnostics.Experimental)] public partial class SlashCommandInvocationResultSelectSubcommand : SlashCommandInvocationResult @@ -8298,7 +8475,7 @@ public sealed class UIHandlePendingResult public bool Success { get; set; } } -/// Schema for the `UIUserInputResponse` type. +/// User response for a pending user-input request, with answer text and whether it was typed freeform. [Experimental(Diagnostics.Experimental)] public sealed class UIUserInputResponse { @@ -8319,7 +8496,7 @@ internal sealed class UIHandlePendingUserInputRequest [JsonPropertyName("requestId")] public string RequestId { get; set; } = string.Empty; - /// Schema for the `UIUserInputResponse` type. + /// User response for a pending user-input request, with answer text and whether it was typed freeform. [JsonPropertyName("response")] public UIUserInputResponse Response { get => field ??= new(); set; } @@ -8402,7 +8579,7 @@ internal sealed class UIHandlePendingSessionLimitsExhaustedRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `UIExitPlanModeResponse` type. +/// User response for a pending exit-plan-mode request, with approval state, selected action, auto-approve flag, and feedback. [Experimental(Diagnostics.Experimental)] public sealed class UIExitPlanModeResponse { @@ -8431,7 +8608,7 @@ internal sealed class UIHandlePendingExitPlanModeRequest [JsonPropertyName("requestId")] public string RequestId { get; set; } = string.Empty; - /// Schema for the `UIExitPlanModeResponse` type. + /// User response for a pending exit-plan-mode request, with approval state, selected action, auto-approve flag, and feedback. [JsonPropertyName("response")] public UIExitPlanModeResponse Response { get => field ??= new(); set; } @@ -8489,7 +8666,7 @@ public sealed class PermissionsConfigureResult public bool Success { get; set; } } -/// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type. +/// Source descriptor for a `session.permissions.configure` content-exclusion rule, with source name and type. [Experimental(Diagnostics.Experimental)] public sealed class PermissionsConfigureAdditionalContentExclusionPolicyRuleSource { @@ -8502,7 +8679,7 @@ public sealed class PermissionsConfigureAdditionalContentExclusionPolicyRuleSour public string Type { get; set; } = string.Empty; } -/// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRule` type. +/// Single content-exclusion rule supplied to `session.permissions.configure`, with paths, match conditions, and source. [Experimental(Diagnostics.Experimental)] public sealed class PermissionsConfigureAdditionalContentExclusionPolicyRule { @@ -8518,12 +8695,12 @@ public sealed class PermissionsConfigureAdditionalContentExclusionPolicyRule [JsonPropertyName("paths")] public IList Paths { get => field ??= []; set; } - /// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type. + /// Source descriptor for a `session.permissions.configure` content-exclusion rule, with source name and type. [JsonPropertyName("source")] public PermissionsConfigureAdditionalContentExclusionPolicyRuleSource Source { get => field ??= new(); set; } } -/// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicy` type. +/// Content-exclusion policy supplied to `session.permissions.configure`, with rules, last-updated data, and scope. [Experimental(Diagnostics.Experimental)] public sealed class PermissionsConfigureAdditionalContentExclusionPolicy { @@ -8658,7 +8835,7 @@ public partial class PermissionDecision } -/// Schema for the `PermissionDecisionApproveOnce` type. +/// Permission-decision request variant to approve only the current permission request. /// The approve-once variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveOnce : PermissionDecision @@ -8691,7 +8868,7 @@ public partial class PermissionDecisionApproveForSessionApproval } -/// Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type. +/// Session-scoped approval details for specific command identifiers. /// The commands variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalCommands : PermissionDecisionApproveForSessionApproval @@ -8705,7 +8882,7 @@ public partial class PermissionDecisionApproveForSessionApprovalCommands : Permi public required IList CommandIdentifiers { get; set; } } -/// Schema for the `PermissionDecisionApproveForSessionApprovalRead` type. +/// Session-scoped approval details for read-only filesystem operations. /// The read variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalRead : PermissionDecisionApproveForSessionApproval @@ -8715,7 +8892,7 @@ public partial class PermissionDecisionApproveForSessionApprovalRead : Permissio public override string Kind => "read"; } -/// Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type. +/// Session-scoped approval details for filesystem write operations. /// The write variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalWrite : PermissionDecisionApproveForSessionApproval @@ -8725,7 +8902,7 @@ public partial class PermissionDecisionApproveForSessionApprovalWrite : Permissi public override string Kind => "write"; } -/// Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type. +/// Session-scoped approval details for an MCP server tool, or all tools on the server when `toolName` is null. /// The mcp variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalMcp : PermissionDecisionApproveForSessionApproval @@ -8743,7 +8920,7 @@ public partial class PermissionDecisionApproveForSessionApprovalMcp : Permission public string? ToolName { get; set; } } -/// Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type. +/// Session-scoped approval details for MCP sampling requests from a server. /// The mcp-sampling variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalMcpSampling : PermissionDecisionApproveForSessionApproval @@ -8757,7 +8934,7 @@ public partial class PermissionDecisionApproveForSessionApprovalMcpSampling : Pe public required string ServerName { get; set; } } -/// Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type. +/// Session-scoped approval details for writes to long-term memory. /// The memory variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalMemory : PermissionDecisionApproveForSessionApproval @@ -8767,7 +8944,7 @@ public partial class PermissionDecisionApproveForSessionApprovalMemory : Permiss public override string Kind => "memory"; } -/// Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type. +/// Session-scoped approval details for a custom tool, keyed by tool name. /// The custom-tool variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalCustomTool : PermissionDecisionApproveForSessionApproval @@ -8781,7 +8958,7 @@ public partial class PermissionDecisionApproveForSessionApprovalCustomTool : Per public required string ToolName { get; set; } } -/// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type. +/// Session-scoped approval details for extension-management operations, optionally narrowed by operation. /// The extension-management variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalExtensionManagement : PermissionDecisionApproveForSessionApproval @@ -8796,7 +8973,7 @@ public partial class PermissionDecisionApproveForSessionApprovalExtensionManagem public string? Operation { get; set; } } -/// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` type. +/// Session-scoped approval details for an extension's permission-gated capability access, keyed by extension name. /// The extension-permission-access variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess : PermissionDecisionApproveForSessionApproval @@ -8810,7 +8987,7 @@ public partial class PermissionDecisionApproveForSessionApprovalExtensionPermiss public required string ExtensionName { get; set; } } -/// Schema for the `PermissionDecisionApproveForSession` type. +/// Permission-decision request variant to approve for the rest of the session, with optional tool approval or URL domain. /// The approve-for-session variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSession : PermissionDecision @@ -8853,7 +9030,7 @@ public partial class PermissionDecisionApproveForLocationApproval } -/// Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type. +/// Location-scoped approval details for specific command identifiers. /// The commands variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalCommands : PermissionDecisionApproveForLocationApproval @@ -8867,7 +9044,7 @@ public partial class PermissionDecisionApproveForLocationApprovalCommands : Perm public required IList CommandIdentifiers { get; set; } } -/// Schema for the `PermissionDecisionApproveForLocationApprovalRead` type. +/// Location-scoped approval details for read-only filesystem operations. /// The read variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalRead : PermissionDecisionApproveForLocationApproval @@ -8877,7 +9054,7 @@ public partial class PermissionDecisionApproveForLocationApprovalRead : Permissi public override string Kind => "read"; } -/// Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type. +/// Location-scoped approval details for filesystem write operations. /// The write variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalWrite : PermissionDecisionApproveForLocationApproval @@ -8887,7 +9064,7 @@ public partial class PermissionDecisionApproveForLocationApprovalWrite : Permiss public override string Kind => "write"; } -/// Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type. +/// Location-scoped approval details for an MCP server tool, or all tools on the server when `toolName` is null. /// The mcp variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalMcp : PermissionDecisionApproveForLocationApproval @@ -8905,7 +9082,7 @@ public partial class PermissionDecisionApproveForLocationApprovalMcp : Permissio public string? ToolName { get; set; } } -/// Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type. +/// Location-scoped approval details for MCP sampling requests from a server. /// The mcp-sampling variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalMcpSampling : PermissionDecisionApproveForLocationApproval @@ -8919,7 +9096,7 @@ public partial class PermissionDecisionApproveForLocationApprovalMcpSampling : P public required string ServerName { get; set; } } -/// Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type. +/// Location-scoped approval details for writes to long-term memory. /// The memory variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalMemory : PermissionDecisionApproveForLocationApproval @@ -8929,7 +9106,7 @@ public partial class PermissionDecisionApproveForLocationApprovalMemory : Permis public override string Kind => "memory"; } -/// Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type. +/// Location-scoped approval details for a custom tool, keyed by tool name. /// The custom-tool variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalCustomTool : PermissionDecisionApproveForLocationApproval @@ -8943,7 +9120,7 @@ public partial class PermissionDecisionApproveForLocationApprovalCustomTool : Pe public required string ToolName { get; set; } } -/// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type. +/// Location-scoped approval details for extension-management operations, optionally narrowed by operation. /// The extension-management variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalExtensionManagement : PermissionDecisionApproveForLocationApproval @@ -8958,7 +9135,7 @@ public partial class PermissionDecisionApproveForLocationApprovalExtensionManage public string? Operation { get; set; } } -/// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` type. +/// Location-scoped approval details for an extension's permission-gated capability access, keyed by extension name. /// The extension-permission-access variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess : PermissionDecisionApproveForLocationApproval @@ -8972,7 +9149,7 @@ public partial class PermissionDecisionApproveForLocationApprovalExtensionPermis public required string ExtensionName { get; set; } } -/// Schema for the `PermissionDecisionApproveForLocation` type. +/// Permission-decision request variant to approve and persist a permission for a project location, with approval details and location key. /// The approve-for-location variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocation : PermissionDecision @@ -8990,7 +9167,7 @@ public partial class PermissionDecisionApproveForLocation : PermissionDecision public required string LocationKey { get; set; } } -/// Schema for the `PermissionDecisionApprovePermanently` type. +/// Permission-decision request variant to permanently approve a URL domain across sessions. /// The approve-permanently variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApprovePermanently : PermissionDecision @@ -9004,7 +9181,7 @@ public partial class PermissionDecisionApprovePermanently : PermissionDecision public required string Domain { get; set; } } -/// Schema for the `PermissionDecisionReject` type. +/// Permission-decision request variant to reject a pending permission request, with optional feedback. /// The reject variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionReject : PermissionDecision @@ -9019,7 +9196,7 @@ public partial class PermissionDecisionReject : PermissionDecision public string? Feedback { get; set; } } -/// Schema for the `PermissionDecisionUserNotAvailable` type. +/// Permission-decision variant indicating no user was available to confirm the request. /// The user-not-available variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionUserNotAvailable : PermissionDecision @@ -9029,7 +9206,7 @@ public partial class PermissionDecisionUserNotAvailable : PermissionDecision public override string Kind => "user-not-available"; } -/// Schema for the `PermissionDecisionApproved` type. +/// Permission-decision variant indicating the request was approved. /// The approved variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproved : PermissionDecision @@ -9039,7 +9216,7 @@ public partial class PermissionDecisionApproved : PermissionDecision public override string Kind => "approved"; } -/// Schema for the `PermissionDecisionApprovedForSession` type. +/// Permission-decision variant indicating approval was remembered for the session, with approval details. /// The approved-for-session variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApprovedForSession : PermissionDecision @@ -9053,7 +9230,7 @@ public partial class PermissionDecisionApprovedForSession : PermissionDecision public required UserToolSessionApproval Approval { get; set; } } -/// Schema for the `PermissionDecisionApprovedForLocation` type. +/// Permission-decision variant indicating approval was persisted for a project location, with approval details and location key. /// The approved-for-location variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApprovedForLocation : PermissionDecision @@ -9071,7 +9248,7 @@ public partial class PermissionDecisionApprovedForLocation : PermissionDecision public required string LocationKey { get; set; } } -/// Schema for the `PermissionDecisionCancelled` type. +/// Permission-decision variant indicating the request was cancelled before use, with an optional reason. /// The cancelled variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionCancelled : PermissionDecision @@ -9086,7 +9263,7 @@ public partial class PermissionDecisionCancelled : PermissionDecision public string? Reason { get; set; } } -/// Schema for the `PermissionDecisionDeniedByRules` type. +/// Permission-decision variant indicating explicit denial by permission rules, with the matching rules. /// The denied-by-rules variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionDeniedByRules : PermissionDecision @@ -9100,7 +9277,7 @@ public partial class PermissionDecisionDeniedByRules : PermissionDecision public required IList Rules { get; set; } } -/// Schema for the `PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type. +/// Permission-decision variant indicating no approval rule matched and user confirmation was unavailable. /// The denied-no-approval-rule-and-could-not-request-from-user variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser : PermissionDecision @@ -9110,7 +9287,7 @@ public partial class PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFro public override string Kind => "denied-no-approval-rule-and-could-not-request-from-user"; } -/// Schema for the `PermissionDecisionDeniedInteractivelyByUser` type. +/// Permission-decision variant indicating the user denied an interactive prompt, with optional feedback and force-reject flag. /// The denied-interactively-by-user variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionDeniedInteractivelyByUser : PermissionDecision @@ -9130,7 +9307,7 @@ public partial class PermissionDecisionDeniedInteractivelyByUser : PermissionDec public bool? ForceReject { get; set; } } -/// Schema for the `PermissionDecisionDeniedByContentExclusionPolicy` type. +/// Permission-decision variant indicating denial by content-exclusion policy, with path and message. /// The denied-by-content-exclusion-policy variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionDeniedByContentExclusionPolicy : PermissionDecision @@ -9148,7 +9325,7 @@ public partial class PermissionDecisionDeniedByContentExclusionPolicy : Permissi public required string Path { get; set; } } -/// Schema for the `PermissionDecisionDeniedByPermissionRequestHook` type. +/// Permission-decision variant indicating denial by a permission request hook, with optional message and interrupt flag. /// The denied-by-permission-request-hook variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionDeniedByPermissionRequestHook : PermissionDecision @@ -9185,7 +9362,7 @@ internal sealed class PermissionDecisionRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `PendingPermissionRequest` type. +/// Pending permission prompt reconstructed from event history, with request ID and user-facing prompt details. [Experimental(Diagnostics.Experimental)] public sealed class PendingPermissionRequest { @@ -9246,22 +9423,34 @@ internal sealed class PermissionsSetApproveAllRequest [Experimental(Diagnostics.Experimental)] public sealed class AllowAllPermissionSetResult { - /// Authoritative allow-all state after the mutation. + /// Authoritative full allow-all state after the mutation. [JsonPropertyName("enabled")] public bool Enabled { get; set; } + /// Authoritative allow-all mode after the mutation. + [JsonPropertyName("mode")] + public PermissionsAllowAllMode? Mode { get; set; } + /// Whether the operation succeeded. [JsonPropertyName("success")] public bool Success { get; set; } } -/// Whether to enable full allow-all permissions for the session. +/// Allow-all mode to apply for the session. [Experimental(Diagnostics.Experimental)] internal sealed class PermissionsSetAllowAllRequest { - /// Whether to enable full allow-all permissions. + /// Legacy full allow-all toggle. Prefer `mode`; when `mode` is omitted, `enabled: true` is treated as `mode: "on"` and any other value is treated as `mode: "off"`. [JsonPropertyName("enabled")] - public bool Enabled { get; set; } + public bool? Enabled { get; set; } + + /// Allow-all mode to apply. `on` enables full allow-all; `auto` enables advisory LLM auto-approval; `off` disables both. + [JsonPropertyName("mode")] + public PermissionsAllowAllMode? Mode { get; set; } + + /// Optional model id for the `auto` mode auto-approval LLM judging. Only meaningful when `mode` is `auto`; ignored otherwise. When omitted, the session's active model is used. + [JsonPropertyName("model")] + public string? Model { get; set; } /// Target session identifier. [JsonPropertyName("sessionId")] @@ -9272,13 +9461,17 @@ internal sealed class PermissionsSetAllowAllRequest public PermissionsSetAllowAllSource? Source { get; set; } } -/// Current full allow-all permission state. +/// Current allow-all permission mode. [Experimental(Diagnostics.Experimental)] public sealed class AllowAllPermissionState { /// Whether full allow-all permissions are currently active. [JsonPropertyName("enabled")] public bool Enabled { get; set; } + + /// Current allow-all mode. + [JsonPropertyName("mode")] + public PermissionsAllowAllMode? Mode { get; set; } } /// No parameters. @@ -9596,7 +9789,7 @@ public partial class PermissionsLocationsAddToolApprovalDetails } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsCommands` type. +/// Location-persisted tool approval details for specific command identifiers. /// The commands variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionsLocationsAddToolApprovalDetailsCommands : PermissionsLocationsAddToolApprovalDetails @@ -9610,7 +9803,7 @@ public partial class PermissionsLocationsAddToolApprovalDetailsCommands : Permis public required IList CommandIdentifiers { get; set; } } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsRead` type. +/// Location-persisted tool approval details for read-only filesystem operations. /// The read variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionsLocationsAddToolApprovalDetailsRead : PermissionsLocationsAddToolApprovalDetails @@ -9620,7 +9813,7 @@ public partial class PermissionsLocationsAddToolApprovalDetailsRead : Permission public override string Kind => "read"; } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsWrite` type. +/// Location-persisted tool approval details for filesystem write operations. /// The write variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionsLocationsAddToolApprovalDetailsWrite : PermissionsLocationsAddToolApprovalDetails @@ -9630,7 +9823,7 @@ public partial class PermissionsLocationsAddToolApprovalDetailsWrite : Permissio public override string Kind => "write"; } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsMcp` type. +/// Location-persisted tool approval details for an MCP server tool, or all tools when `toolName` is null. /// The mcp variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionsLocationsAddToolApprovalDetailsMcp : PermissionsLocationsAddToolApprovalDetails @@ -9648,7 +9841,7 @@ public partial class PermissionsLocationsAddToolApprovalDetailsMcp : Permissions public string? ToolName { get; set; } } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsMcpSampling` type. +/// Location-persisted tool approval details for MCP sampling requests from a server. /// The mcp-sampling variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionsLocationsAddToolApprovalDetailsMcpSampling : PermissionsLocationsAddToolApprovalDetails @@ -9662,7 +9855,7 @@ public partial class PermissionsLocationsAddToolApprovalDetailsMcpSampling : Per public required string ServerName { get; set; } } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsMemory` type. +/// Location-persisted tool approval details for writes to long-term memory. /// The memory variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionsLocationsAddToolApprovalDetailsMemory : PermissionsLocationsAddToolApprovalDetails @@ -9672,7 +9865,7 @@ public partial class PermissionsLocationsAddToolApprovalDetailsMemory : Permissi public override string Kind => "memory"; } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsCustomTool` type. +/// Location-persisted tool approval details for a custom tool, keyed by tool name. /// The custom-tool variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionsLocationsAddToolApprovalDetailsCustomTool : PermissionsLocationsAddToolApprovalDetails @@ -9686,7 +9879,7 @@ public partial class PermissionsLocationsAddToolApprovalDetailsCustomTool : Perm public required string ToolName { get; set; } } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionManagement` type. +/// Location-persisted tool approval details for extension-management operations, optionally narrowed by operation. /// The extension-management variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionsLocationsAddToolApprovalDetailsExtensionManagement : PermissionsLocationsAddToolApprovalDetails @@ -9701,7 +9894,7 @@ public partial class PermissionsLocationsAddToolApprovalDetailsExtensionManageme public string? Operation { get; set; } } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess` type. +/// Location-persisted tool approval details for an extension's permission-gated capability access, keyed by extension name. /// The extension-permission-access variant of . [Experimental(Diagnostics.Experimental)] public partial class PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess : PermissionsLocationsAddToolApprovalDetails @@ -10295,6 +10488,240 @@ internal sealed class MetadataRecomputeContextTokensRequest public string SessionId { get; set; } = string.Empty; } +/// Availability of built-in job tools surfaced to boundary consumers. +[Experimental(Diagnostics.Experimental)] +public sealed class SessionSettingsBuiltInToolAvailabilitySnapshot +{ + /// Gets or sets the createPullRequest value. + [JsonPropertyName("createPullRequest")] + public bool? CreatePullRequest { get; set; } + + /// Gets or sets the reportProgress value. + [JsonPropertyName("reportProgress")] + public bool? ReportProgress { get; set; } +} + +/// Redacted job settings for a session. The job nonce is excluded. +[Experimental(Diagnostics.Experimental)] +public sealed class SessionSettingsJobSnapshot +{ + /// Gets or sets the builtInToolAvailability value. + [JsonPropertyName("builtInToolAvailability")] + public SessionSettingsBuiltInToolAvailabilitySnapshot? BuiltInToolAvailability { get; set; } + + /// Gets or sets the eventType value. + [JsonPropertyName("eventType")] + public string? EventType { get; set; } + + /// Gets or sets the isTriggerJob value. + [JsonPropertyName("isTriggerJob")] + public bool? IsTriggerJob { get; set; } +} + +/// Redacted model routing settings for a session. +[Experimental(Diagnostics.Experimental)] +public sealed class SessionSettingsModelSnapshot +{ + /// Gets or sets the callbackUrl value. + [JsonPropertyName("callbackUrl")] + public string? CallbackUrl { get; set; } + + /// Gets or sets the defaultReasoningEffort value. + [JsonPropertyName("defaultReasoningEffort")] + public string? DefaultReasoningEffort { get; set; } + + /// Gets or sets the instanceId value. + [JsonPropertyName("instanceId")] + public string? InstanceId { get; set; } + + /// Gets or sets the model value. + [JsonPropertyName("model")] + public string? Model { get; set; } +} + +/// Online-evaluation settings safe to expose across the SDK boundary. +[Experimental(Diagnostics.Experimental)] +public sealed class SessionSettingsOnlineEvaluationSnapshot +{ + /// Gets or sets the disableOnlineEvaluation value. + [JsonPropertyName("disableOnlineEvaluation")] + public bool? DisableOnlineEvaluation { get; set; } + + /// Gets or sets the enableOnlineEvaluationOutputFile value. + [JsonPropertyName("enableOnlineEvaluationOutputFile")] + public bool? EnableOnlineEvaluationOutputFile { get; set; } +} + +/// Redacted repository and GitHub host settings for a session. +[Experimental(Diagnostics.Experimental)] +public sealed class SessionSettingsRepoSnapshot +{ + /// Gets or sets the branch value. + [JsonPropertyName("branch")] + public string? Branch { get; set; } + + /// Gets or sets the commit value. + [JsonPropertyName("commit")] + public string? Commit { get; set; } + + /// Gets or sets the host value. + [JsonPropertyName("host")] + public string? Host { get; set; } + + /// Gets or sets the hostProtocol value. + [JsonPropertyName("hostProtocol")] + public string? HostProtocol { get; set; } + + /// Gets or sets the id value. + [JsonPropertyName("id")] + public double? Id { get; set; } + + /// Gets or sets the name value. + [JsonPropertyName("name")] + public string? Name { get; set; } + + /// Gets or sets the ownerId value. + [JsonPropertyName("ownerId")] + public double? OwnerId { get; set; } + + /// Gets or sets the ownerName value. + [JsonPropertyName("ownerName")] + public string? OwnerName { get; set; } + + /// Gets or sets the prCommitCount value. + [JsonPropertyName("prCommitCount")] + public double? PrCommitCount { get; set; } + + /// Gets or sets the readWrite value. + [JsonPropertyName("readWrite")] + public bool? ReadWrite { get; set; } + + /// Gets or sets the secretScanningUrl value. + [JsonPropertyName("secretScanningUrl")] + public string? SecretScanningUrl { get; set; } + + /// Gets or sets the serverUrl value. + [JsonPropertyName("serverUrl")] + public string? ServerUrl { get; set; } +} + +/// Redacted validation and memory-tool settings for a session. +[Experimental(Diagnostics.Experimental)] +public sealed class SessionSettingsValidationSnapshot +{ + /// Gets or sets the advisoryEnabled value. + [JsonPropertyName("advisoryEnabled")] + public bool? AdvisoryEnabled { get; set; } + + /// Gets or sets the codeqlEnabled value. + [JsonPropertyName("codeqlEnabled")] + public bool? CodeqlEnabled { get; set; } + + /// Gets or sets the codeReviewEnabled value. + [JsonPropertyName("codeReviewEnabled")] + public bool? CodeReviewEnabled { get; set; } + + /// Gets or sets the codeReviewModel value. + [JsonPropertyName("codeReviewModel")] + public string? CodeReviewModel { get; set; } + + /// Gets or sets the dependabotTimeout value. + [JsonPropertyName("dependabotTimeout")] + public double? DependabotTimeout { get; set; } + + /// Gets or sets the memoryStoreEnabled value. + [JsonPropertyName("memoryStoreEnabled")] + public bool? MemoryStoreEnabled { get; set; } + + /// Gets or sets the memoryVoteEnabled value. + [JsonPropertyName("memoryVoteEnabled")] + public bool? MemoryVoteEnabled { get; set; } + + /// Gets or sets the secretScanningEnabled value. + [JsonPropertyName("secretScanningEnabled")] + public bool? SecretScanningEnabled { get; set; } + + /// Gets or sets the timeout value. + [JsonPropertyName("timeout")] + public double? Timeout { get; set; } +} + +/// Redacted, serializable view of session runtime settings for SDK boundary consumers. Secrets and raw feature flags are intentionally excluded. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionSettingsSnapshot +{ + /// Gets or sets the clientName value. + [JsonPropertyName("clientName")] + public string? ClientName { get; set; } + + /// Gets or sets the job value. + [JsonPropertyName("job")] + public SessionSettingsJobSnapshot Job { get => field ??= new(); set; } + + /// Gets or sets the model value. + [JsonPropertyName("model")] + public SessionSettingsModelSnapshot Model { get => field ??= new(); set; } + + /// Gets or sets the onlineEvaluation value. + [JsonPropertyName("onlineEvaluation")] + public SessionSettingsOnlineEvaluationSnapshot OnlineEvaluation { get => field ??= new(); set; } + + /// Gets or sets the repo value. + [JsonPropertyName("repo")] + public SessionSettingsRepoSnapshot Repo { get => field ??= new(); set; } + + /// Gets or sets the startTimeMs value. + [JsonPropertyName("startTimeMs")] + public double? StartTimeMs { get; set; } + + /// Gets or sets the timeoutMs value. + [JsonPropertyName("timeoutMs")] + public double? TimeoutMs { get; set; } + + /// Gets or sets the validation value. + [JsonPropertyName("validation")] + public SessionSettingsValidationSnapshot Validation { get => field ??= new(); set; } + + /// Gets or sets the version value. + [JsonPropertyName("version")] + public string? Version { get; set; } +} + +/// Identifies the target session. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionSettingsSnapshotRequest +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Result of evaluating a Rust-owned settings predicate. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionSettingsEvaluatePredicateResult +{ + /// Gets or sets the enabled value. + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } +} + +/// Named Rust-owned settings predicate to evaluate for this session. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionSettingsEvaluatePredicateRequest +{ + /// Predicate name. The runtime owns the raw feature-flag names and composition logic. + [JsonPropertyName("name")] + public SessionSettingsPredicateName Name { get; set; } + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; + + /// Tool name for tool-scoped predicates such as trivial-change handling. + [JsonPropertyName("toolName")] + public string? ToolName { get; set; } +} + /// Identifier of the spawned process, used to correlate streamed output and exit notifications. [Experimental(Diagnostics.Experimental)] public sealed class ShellExecResult @@ -10572,7 +10999,7 @@ internal sealed class SessionHistorySummarizeForHandoffRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `QueuePendingItems` type. +/// User-facing pending queue entry, with kind and display text for a queued message, slash command, or model change. [Experimental(Diagnostics.Experimental)] public sealed class QueuePendingItems { @@ -10781,7 +11208,7 @@ public sealed class UsageMetricsModelMetricRequests public long Count { get; set; } } -/// Schema for the `UsageMetricsModelMetricTokenDetail` type. +/// Per-model token-detail entry containing the accumulated token count for one token type. [Experimental(Diagnostics.Experimental)] public sealed class UsageMetricsModelMetricTokenDetail { @@ -10815,7 +11242,7 @@ public sealed class UsageMetricsModelMetricUsage public long? ReasoningTokens { get; set; } } -/// Schema for the `UsageMetricsModelMetric` type. +/// Per-model usage metrics, including request counts/costs, token usage, nano-AI units, and per-token-type details. [Experimental(Diagnostics.Experimental)] public sealed class UsageMetricsModelMetric { @@ -10836,7 +11263,7 @@ public sealed class UsageMetricsModelMetric public UsageMetricsModelMetricUsage Usage { get => field ??= new(); set; } } -/// Schema for the `UsageMetricsTokenDetail` type. +/// Session-wide token-detail entry containing the accumulated token count for one token type. [Experimental(Diagnostics.Experimental)] public sealed class UsageMetricsTokenDetail { @@ -11020,7 +11447,7 @@ internal sealed class VisibilitySetRequest public SessionVisibilityStatus Status { get; set; } } -/// Schema for the `ScheduleEntry` type. +/// Scheduled prompt entry with ID, timing (`intervalMs`, `cron`, or `at`), prompt text, recurrence, and next run time. [Experimental(Diagnostics.Experimental)] public sealed class ScheduleEntry { @@ -11320,7 +11747,7 @@ public sealed class SessionFsReaddirRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `SessionFsReaddirWithTypesEntry` type. +/// Directory entry returned by session filesystem `readdirWithTypes`, with name and entry type. [Experimental(Diagnostics.Experimental)] public sealed class SessionFsReaddirWithTypesEntry { @@ -11613,14 +12040,26 @@ public sealed class LlmInferenceHttpRequestStartResult [Experimental(Diagnostics.Experimental)] public sealed class LlmInferenceHttpRequestStartRequest { + /// Stable per-agent-instance id attributing this request to a specific agent trajectory. Present when the request originates from an agent turn; absent for requests issued outside any agent context (e.g. some SDK callers). A request with an `agentId` but no `parentAgentId` is a root-agent request; one carrying both is a subagent request. Sourced from the runtime's per-request agent context and surfaced on the envelope independently of transport, so it is available for both first-party (CAPI) and BYOK/custom-provider requests; on the CAPI transport the runtime derives the upstream `X-Agent-Task-Id` header from this same context. Consumers routing each provider call to a training trajectory should key on this rather than on lifecycle events, since it is available on the request path before sampling. + [JsonPropertyName("agentId")] + public string? AgentId { get; set; } + /// Gets or sets the headers value. [JsonPropertyName("headers")] public IDictionary> Headers { get => field ??= new Dictionary>(); set; } + /// Coarse classification of the interaction that produced this request. Open string for forward-compatibility; known values include `conversation-agent`, `conversation-subagent`, `conversation-sampling`, `conversation-background`, `conversation-compaction`, and `conversation-user`. Absent when the runtime did not classify the request. Comes from the runtime's per-request agent context independently of transport; on the CAPI transport the runtime derives the upstream `X-Interaction-Type` header from this same context. + [JsonPropertyName("interactionType")] + public string? InteractionType { get; set; } + /// HTTP method, e.g. GET, POST. [JsonPropertyName("method")] public string Method { get; set; } = string.Empty; + /// Id of the parent agent that spawned the agent issuing this request. Present only for subagent requests; absent for root-agent requests and non-agent requests. Combined with `agentId`, this lets consumers attribute a call to a child trajectory versus the root. Like `agentId`, it comes from the runtime's per-request agent context independently of transport; on the CAPI transport the runtime derives the upstream `X-Parent-Agent-Id` header from this same context. + [JsonPropertyName("parentAgentId")] + public string? ParentAgentId { get; set; } + /// Opaque runtime-minted id, unique per in-flight request. The SDK uses this to correlate httpRequestChunk frames and to address its httpResponseStart / httpResponseChunk replies back to the runtime. [JsonPropertyName("requestId")] public string RequestId { get; set; } = string.Empty; @@ -11763,7 +12202,7 @@ public sealed class GitHubTelemetryEvent public string? SessionId { get; set; } } -/// Payload for a `gitHubTelemetry.event` notification: a single GitHub telemetry event the runtime forwards to a host connection that opted into telemetry forwarding for the session. +/// 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. [Experimental(Diagnostics.Experimental)] public sealed class GitHubTelemetryNotification { @@ -11775,9 +12214,9 @@ public sealed class GitHubTelemetryNotification [JsonPropertyName("restricted")] public bool Restricted { get; set; } - /// Session the telemetry event belongs to. + /// Session the telemetry event belongs to, when it is session-scoped. Omitted for sessionless events (for example, `server.sendTelemetry` calls with no session id), which are still forwarded to opted-in connections. [JsonPropertyName("sessionId")] - public string SessionId { get; set; } = string.Empty; + public string? SessionId { get; set; } } /// Resolved Anthropic adaptive-thinking capability for a model. @@ -13949,43 +14388,49 @@ public override void Write(Utf8JsonWriter writer, AuthInfoType value, JsonSerial } -/// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. +/// Source category for a collected debug bundle entry. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct WorkspacesWorkspaceDetailsHostType : IEquatable +public readonly struct DebugCollectLogsSource : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public WorkspacesWorkspaceDetailsHostType(string value) + public DebugCollectLogsSource(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Workspace repository is hosted on GitHub. - public static WorkspacesWorkspaceDetailsHostType GitHub { get; } = new("github"); + /// Session event log. + public static DebugCollectLogsSource Events { get; } = new("events"); - /// Workspace repository is hosted on Azure DevOps. - public static WorkspacesWorkspaceDetailsHostType Ado { get; } = new("ado"); + /// Process log for the session. + public static DebugCollectLogsSource ProcessLog { get; } = new("process-log"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(WorkspacesWorkspaceDetailsHostType left, WorkspacesWorkspaceDetailsHostType right) => left.Equals(right); + /// Interactive shell log for the session. + public static DebugCollectLogsSource ShellLog { get; } = new("shell-log"); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(WorkspacesWorkspaceDetailsHostType left, WorkspacesWorkspaceDetailsHostType right) => !(left == right); + /// Caller-provided diagnostic entry. + public static DebugCollectLogsSource Additional { get; } = new("additional"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(DebugCollectLogsSource left, DebugCollectLogsSource right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(DebugCollectLogsSource left, DebugCollectLogsSource right) => !(left == right); /// - public override bool Equals(object? obj) => obj is WorkspacesWorkspaceDetailsHostType other && Equals(other); + public override bool Equals(object? obj) => obj is DebugCollectLogsSource other && Equals(other); /// - public bool Equals(WorkspacesWorkspaceDetailsHostType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(DebugCollectLogsSource other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -13993,47 +14438,299 @@ public WorkspacesWorkspaceDetailsHostType(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override WorkspacesWorkspaceDetailsHostType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override DebugCollectLogsSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, WorkspacesWorkspaceDetailsHostType value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, DebugCollectLogsSource value, JsonSerializerOptions options) { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkspacesWorkspaceDetailsHostType)); + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DebugCollectLogsSource)); } } } -/// Type of change represented by this file diff. +/// Destination kind that was written. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct WorkspaceDiffFileChangeType : IEquatable +public readonly struct DebugCollectLogsResultKind : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public WorkspaceDiffFileChangeType(string value) + public DebugCollectLogsResultKind(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// The file was added. - public static WorkspaceDiffFileChangeType Added { get; } = new("added"); + /// A .tgz archive was written. + public static DebugCollectLogsResultKind Archive { get; } = new("archive"); + + /// A directory containing redacted files was written. + public static DebugCollectLogsResultKind Directory { get; } = new("directory"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(DebugCollectLogsResultKind left, DebugCollectLogsResultKind right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(DebugCollectLogsResultKind left, DebugCollectLogsResultKind right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is DebugCollectLogsResultKind other && Equals(other); + + /// + public bool Equals(DebugCollectLogsResultKind 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 DebugCollectLogsResultKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, DebugCollectLogsResultKind value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DebugCollectLogsResultKind)); + } + } +} + + +/// Kind of caller-provided debug log entry. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct DebugCollectLogsEntryKind : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public DebugCollectLogsEntryKind(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Include a single server-local file. + public static DebugCollectLogsEntryKind File { get; } = new("file"); + + /// Include files from a server-local directory recursively. + public static DebugCollectLogsEntryKind Directory { get; } = new("directory"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(DebugCollectLogsEntryKind left, DebugCollectLogsEntryKind right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(DebugCollectLogsEntryKind left, DebugCollectLogsEntryKind right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is DebugCollectLogsEntryKind other && Equals(other); + + /// + public bool Equals(DebugCollectLogsEntryKind 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 DebugCollectLogsEntryKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, DebugCollectLogsEntryKind value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DebugCollectLogsEntryKind)); + } + } +} + + +/// How a collected debug entry should be redacted before being staged. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct DebugCollectLogsRedaction : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public DebugCollectLogsRedaction(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Redact the file as plain UTF-8 log text. + public static DebugCollectLogsRedaction PlainText { get; } = new("plain-text"); + + /// Redact each non-empty line as a session event JSON object, falling back to plain-text redaction for malformed lines. + public static DebugCollectLogsRedaction EventsJsonl { get; } = new("events-jsonl"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(DebugCollectLogsRedaction left, DebugCollectLogsRedaction right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(DebugCollectLogsRedaction left, DebugCollectLogsRedaction right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is DebugCollectLogsRedaction other && Equals(other); + + /// + public bool Equals(DebugCollectLogsRedaction 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 DebugCollectLogsRedaction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, DebugCollectLogsRedaction value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DebugCollectLogsRedaction)); + } + } +} + + +/// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct WorkspacesWorkspaceDetailsHostType : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public WorkspacesWorkspaceDetailsHostType(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Workspace repository is hosted on GitHub. + public static WorkspacesWorkspaceDetailsHostType GitHub { get; } = new("github"); + + /// Workspace repository is hosted on Azure DevOps. + public static WorkspacesWorkspaceDetailsHostType Ado { get; } = new("ado"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(WorkspacesWorkspaceDetailsHostType left, WorkspacesWorkspaceDetailsHostType right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(WorkspacesWorkspaceDetailsHostType left, WorkspacesWorkspaceDetailsHostType right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is WorkspacesWorkspaceDetailsHostType other && Equals(other); + + /// + public bool Equals(WorkspacesWorkspaceDetailsHostType 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 WorkspacesWorkspaceDetailsHostType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, WorkspacesWorkspaceDetailsHostType value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkspacesWorkspaceDetailsHostType)); + } + } +} + + +/// Type of change represented by this file diff. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct WorkspaceDiffFileChangeType : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public WorkspaceDiffFileChangeType(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The file was added. + public static WorkspaceDiffFileChangeType Added { get; } = new("added"); /// The file was modified. public static WorkspaceDiffFileChangeType Modified { get; } = new("modified"); @@ -16649,6 +17346,72 @@ public override void Write(Utf8JsonWriter writer, PermissionsSetApproveAllSource } +/// Current or requested allow-all mode. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct PermissionsAllowAllMode : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public PermissionsAllowAllMode(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Permission requests follow the normal approval flow. + public static PermissionsAllowAllMode Off { get; } = new("off"); + + /// Tool, path, and URL permission requests are automatically approved. + public static PermissionsAllowAllMode On { get; } = new("on"); + + /// Permission requests follow the normal approval flow with an LLM advisory recommendation attached; clients may choose to auto-approve requests the judge evaluated as acceptable. + public static PermissionsAllowAllMode Auto { get; } = new("auto"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(PermissionsAllowAllMode left, PermissionsAllowAllMode right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(PermissionsAllowAllMode left, PermissionsAllowAllMode right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is PermissionsAllowAllMode other && Equals(other); + + /// + public bool Equals(PermissionsAllowAllMode 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 PermissionsAllowAllMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, PermissionsAllowAllMode value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionsAllowAllMode)); + } + } +} + + /// Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] @@ -17099,6 +17862,120 @@ public override void Write(Utf8JsonWriter writer, SessionWorkingDirectoryContext } +/// Rust-owned settings predicates exposed across the SDK boundary. Raw feature-flag names are intentionally not part of the contract. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct SessionSettingsPredicateName : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public SessionSettingsPredicateName(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Whether the security-tools feature flag enables security tool wiring. + public static SessionSettingsPredicateName SecurityToolsEnabled { get; } = new("securityToolsEnabled"); + + /// Whether third-party security tools should receive the security prompt. + public static SessionSettingsPredicateName ThirdPartySecurityPromptEnabled { get; } = new("thirdPartySecurityPromptEnabled"); + + /// Whether validation may run in parallel. + public static SessionSettingsPredicateName ParallelValidationEnabled { get; } = new("parallelValidationEnabled"); + + /// Whether runtime timing telemetry is enabled. + public static SessionSettingsPredicateName RuntimeTimingTelemetryEnabled { get; } = new("runtimeTimingTelemetryEnabled"); + + /// Whether the co-author hook is enabled. + public static SessionSettingsPredicateName CoAuthorHookEnabled { get; } = new("coAuthorHookEnabled"); + + /// Whether Chronicle integration is enabled. + public static SessionSettingsPredicateName ChronicleEnabled { get; } = new("chronicleEnabled"); + + /// Whether content-exclusion policy may self-fetch data. + public static SessionSettingsPredicateName ContentExclusionSelfFetchEnabled { get; } = new("contentExclusionSelfFetchEnabled"); + + /// Whether Claude Opus token-limit caps should be applied. + public static SessionSettingsPredicateName CapClaudeOpusTokenLimitsEnabled { get; } = new("capClaudeOpusTokenLimitsEnabled"); + + /// Whether code-review behavior is enabled. + public static SessionSettingsPredicateName CodeReviewFeatureEnabled { get; } = new("codeReviewFeatureEnabled"); + + /// Whether CCA should use the TypeScript autofind behavior. + public static SessionSettingsPredicateName CcaUseTsAutofindEnabled { get; } = new("ccaUseTsAutofindEnabled"); + + /// Whether the dependency checker is enabled. + public static SessionSettingsPredicateName DependencyCheckerEnabled { get; } = new("dependencyCheckerEnabled"); + + /// Whether the Dependabot checker is enabled. + public static SessionSettingsPredicateName DependabotCheckerEnabled { get; } = new("dependabotCheckerEnabled"); + + /// Whether the CodeQL checker is enabled. + public static SessionSettingsPredicateName CodeqlCheckerEnabled { get; } = new("codeqlCheckerEnabled"); + + /// Whether trivial-change handling is enabled. + public static SessionSettingsPredicateName TrivialChangeEnabled { get; } = new("trivialChangeEnabled"); + + /// Whether trivial-change skip behavior is enabled. + public static SessionSettingsPredicateName TrivialChangeSkipEnabled { get; } = new("trivialChangeSkipEnabled"); + + /// Whether trivial-change handling is enabled for code review. + public static SessionSettingsPredicateName TrivialChangeEnabledForCodeReview { get; } = new("trivialChangeEnabledForCodeReview"); + + /// Whether trivial-change skip behavior is enabled for code review. + public static SessionSettingsPredicateName TrivialChangeSkipEnabledForCodeReview { get; } = new("trivialChangeSkipEnabledForCodeReview"); + + /// Whether trivial-change handling is enabled for a specific tool. + public static SessionSettingsPredicateName TrivialChangeEnabledForTool { get; } = new("trivialChangeEnabledForTool"); + + /// Whether trivial-change skip behavior is enabled for a specific tool. + public static SessionSettingsPredicateName TrivialChangeSkipEnabledForTool { get; } = new("trivialChangeSkipEnabledForTool"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SessionSettingsPredicateName left, SessionSettingsPredicateName right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SessionSettingsPredicateName left, SessionSettingsPredicateName right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is SessionSettingsPredicateName other && Equals(other); + + /// + public bool Equals(SessionSettingsPredicateName 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 SessionSettingsPredicateName Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, SessionSettingsPredicateName value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionSettingsPredicateName)); + } + } +} + + /// Signal to send (default: SIGTERM). [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] @@ -17761,12 +18638,13 @@ 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. /// Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN. + /// 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, in addition to the runtime's normal GitHub/CTS emission (dual-write). 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. /// 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(string? token = null, CancellationToken cancellationToken = default) + internal async Task ConnectAsync(string? token = null, bool? enableGitHubTelemetryForwarding = null, CancellationToken cancellationToken = default) { - var request = new ConnectRequest { Token = token }; + var request = new ConnectRequest { Token = token, EnableGitHubTelemetryForwarding = enableGitHubTelemetryForwarding }; return await CopilotClient.InvokeRpcAsync(_rpc, "connect", [request], cancellationToken); } @@ -18948,6 +19826,12 @@ internal SessionRpc(CopilotSession session) Interlocked.CompareExchange(ref field, new(_session), null) ?? field; + /// Debug APIs. + public DebugApi Debug => + field ?? + Interlocked.CompareExchange(ref field, new(_session), null) ?? + field; + /// Canvas APIs. public CanvasApi Canvas => field ?? @@ -19092,6 +19976,12 @@ internal SessionRpc(CopilotSession session) Interlocked.CompareExchange(ref field, new(_session), null) ?? field; + /// Settings APIs. + public SettingsApi Settings => + field ?? + Interlocked.CompareExchange(ref field, new(_session), null) ?? + field; + /// Shell APIs. public ShellApi Shell => field ?? @@ -19258,6 +20148,33 @@ public async Task SetCredentialsAsync(AuthInfo? cre } } +/// Provides session-scoped Debug APIs. +[Experimental(Diagnostics.Experimental)] +public sealed class DebugApi +{ + private readonly CopilotSession _session; + + internal DebugApi(CopilotSession session) + { + _session = session; + } + + /// Collects a redacted session debug log bundle into a local archive or staging directory. The runtime includes session-owned logs by default and accepts caller-provided diagnostic entries so host applications can add their own files without changing this API shape. + /// Where the redacted bundle should be written. Use `archive` to produce a .tgz, or `directory` to stage redacted files for caller-managed upload/post-processing. + /// Which built-in session diagnostics to include. Omitted fields default to true. + /// Caller-provided server-local files or directories to include in addition to the runtime's built-in session diagnostics. This lets host applications add their own diagnostics without changing the API shape. + /// The to monitor for cancellation requests. The default is . + /// Result of collecting a redacted debug bundle. + public async Task CollectLogsAsync(DebugCollectLogsDestination destination, DebugCollectLogsInclude? include = null, IList? additionalEntries = null, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(destination); + _session.ThrowIfDisposed(); + + var request = new DebugCollectLogsRequest { SessionId = _session.SessionId, Destination = destination, Include = include, AdditionalEntries = additionalEntries }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.debug.collectLogs", [request], cancellationToken); + } +} + /// Provides session-scoped Canvas APIs. [Experimental(Diagnostics.Experimental)] public sealed class CanvasApi @@ -20991,7 +21908,7 @@ public async Task HandlePendingElicitationAsync(string requ /// Resolves a pending `user_input.requested` event with the user's response. /// The unique request ID from the user_input.requested event. - /// Schema for the `UIUserInputResponse` type. + /// User response for a pending user-input request, with answer text and whether it was typed freeform. /// The to monitor for cancellation requests. The default is . /// Indicates whether the pending UI request was resolved by this call. public async Task HandlePendingUserInputAsync(string requestId, UIUserInputResponse response, CancellationToken cancellationToken = default) @@ -21049,7 +21966,7 @@ public async Task HandlePendingSessionLimitsExhaustedAsyn /// Resolves a pending `exit_plan_mode.requested` event with the user's response. /// The unique request ID from the exit_plan_mode.requested event. - /// Schema for the `UIExitPlanModeResponse` type. + /// User response for a pending exit-plan-mode request, with approval state, selected action, auto-approve flag, and feedback. /// The to monitor for cancellation requests. The default is . /// Indicates whether the pending UI request was resolved by this call. public async Task HandlePendingExitPlanModeAsync(string requestId, UIExitPlanModeResponse response, CancellationToken cancellationToken = default) @@ -21154,22 +22071,24 @@ public async Task SetApproveAllAsync(bool enable return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.permissions.setApproveAll", [request], cancellationToken); } - /// Enables or disables full allow-all permissions (tools, paths, and URLs) for the session. Used by attach-mode clients (e.g. LocalRpcSession's `/allow-all` forwarder) to flip the target session's permission state. Unlike `setApproveAll`, this swaps in the unrestricted path and URL managers and emits `session.permissions_changed` on transition. The result returns the authoritative post-mutation state so callers can update their local mirrors without racing the `session.permissions_changed` notification on the same wire. - /// Whether to enable full allow-all permissions. + /// Sets the allow-all permission mode for the session. Used by attach-mode clients (e.g. LocalRpcSession's `/allow-all` forwarder) to flip the target session's permission state. The `on` mode swaps in unrestricted path and URL managers and emits `session.permissions_changed` on transition; the `auto` mode keeps normal prompt paths active while attaching LLM safety recommendations. The result returns the authoritative post-mutation state so callers can update their local mirrors without racing the `session.permissions_changed` notification on the same wire. + /// Allow-all mode to apply. `on` enables full allow-all; `auto` enables advisory LLM auto-approval; `off` disables both. + /// Legacy full allow-all toggle. Prefer `mode`; when `mode` is omitted, `enabled: true` is treated as `mode: "on"` and any other value is treated as `mode: "off"`. + /// Optional model id for the `auto` mode auto-approval LLM judging. Only meaningful when `mode` is `auto`; ignored otherwise. When omitted, the session's active model is used. /// Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers. /// The to monitor for cancellation requests. The default is . /// Indicates whether the operation succeeded and reports the post-mutation state. - public async Task SetAllowAllAsync(bool enabled, PermissionsSetAllowAllSource? source = null, CancellationToken cancellationToken = default) + public async Task SetAllowAllAsync(PermissionsAllowAllMode? mode = null, bool? enabled = null, string? model = null, PermissionsSetAllowAllSource? source = null, CancellationToken cancellationToken = default) { _session.ThrowIfDisposed(); - var request = new PermissionsSetAllowAllRequest { SessionId = _session.SessionId, Enabled = enabled, Source = source }; + var request = new PermissionsSetAllowAllRequest { SessionId = _session.SessionId, Mode = mode, Enabled = enabled, Model = model, Source = source }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.permissions.setAllowAll", [request], cancellationToken); } - /// Returns whether full allow-all permissions are currently active for the session. + /// Returns the current allow-all permission mode for the session. /// The to monitor for cancellation requests. The default is . - /// Current full allow-all permission state. + /// Current allow-all permission mode. public async Task GetAllowAllAsync(CancellationToken cancellationToken = default) { _session.ThrowIfDisposed(); @@ -21565,6 +22484,42 @@ public async Task RecomputeContextTokensAs } } +/// Provides session-scoped Settings APIs. +[Experimental(Diagnostics.Experimental)] +public sealed class SettingsApi +{ + private readonly CopilotSession _session; + + internal SettingsApi(CopilotSession session) + { + _session = session; + } + + /// Returns a redacted snapshot of session runtime settings, with secrets and raw feature flags excluded. Internal: the runtime settings shape is a runtime-internal surface and is deliberately kept out of the public SDK, because consumers should not depend on the runtime's internal settings layout. It remains callable in-process and is expected to be reworked as the runtime internals are consolidated. + /// The to monitor for cancellation requests. The default is . + /// Redacted, serializable view of session runtime settings for SDK boundary consumers. Secrets and raw feature flags are intentionally excluded. + internal async Task SnapshotAsync(CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var request = new SessionSettingsSnapshotRequest { SessionId = _session.SessionId }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.settings.snapshot", [request], cancellationToken); + } + + /// Evaluates a named Rust-owned settings predicate without exposing raw feature flags. Internal: the raw feature-flag names and composition are runtime-internal, so this predicate-evaluation helper is kept out of the public SDK surface and is callable in-process only. + /// Predicate name. The runtime owns the raw feature-flag names and composition logic. + /// Tool name for tool-scoped predicates such as trivial-change handling. + /// The to monitor for cancellation requests. The default is . + /// Result of evaluating a Rust-owned settings predicate. + internal async Task EvaluatePredicateAsync(SessionSettingsPredicateName name, string? toolName = null, CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var request = new SessionSettingsEvaluatePredicateRequest { SessionId = _session.SessionId, Name = name, ToolName = toolName }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.settings.evaluatePredicate", [request], cancellationToken); + } +} + /// Provides session-scoped Shell APIs. [Experimental(Diagnostics.Experimental)] public sealed class ShellApi @@ -22191,8 +23146,8 @@ public interface ILlmInferenceHandler [Experimental(Diagnostics.Experimental)] public interface IGitHubTelemetryHandler { - /// Forwards a single GitHub telemetry event to a host connection that opted into telemetry forwarding for the session. - /// Payload for a `gitHubTelemetry.event` notification: a single GitHub telemetry event the runtime forwards to a host connection that opted into telemetry forwarding for the session. + /// 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). + /// 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. /// The to monitor for cancellation requests. The default is . Task EventAsync(GitHubTelemetryNotification request, CancellationToken cancellationToken = default); } @@ -22299,6 +23254,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.AttachmentSelectionDetails), TypeInfoPropertyName = "SessionEventsAttachmentSelectionDetails")] [JsonSerializable(typeof(GitHub.Copilot.AttachmentSelectionDetailsEnd), TypeInfoPropertyName = "SessionEventsAttachmentSelectionDetailsEnd")] [JsonSerializable(typeof(GitHub.Copilot.AttachmentSelectionDetailsStart), TypeInfoPropertyName = "SessionEventsAttachmentSelectionDetailsStart")] +[JsonSerializable(typeof(GitHub.Copilot.AutoApprovalRecommendation), TypeInfoPropertyName = "SessionEventsAutoApprovalRecommendation")] [JsonSerializable(typeof(GitHub.Copilot.AutoModeSwitchCompletedData), TypeInfoPropertyName = "SessionEventsAutoModeSwitchCompletedData")] [JsonSerializable(typeof(GitHub.Copilot.AutoModeSwitchCompletedEvent), TypeInfoPropertyName = "SessionEventsAutoModeSwitchCompletedEvent")] [JsonSerializable(typeof(GitHub.Copilot.AutoModeSwitchRequestedData), TypeInfoPropertyName = "SessionEventsAutoModeSwitchRequestedData")] @@ -22401,6 +23357,8 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.OmittedBinaryType), TypeInfoPropertyName = "SessionEventsOmittedBinaryType")] [JsonSerializable(typeof(GitHub.Copilot.PendingMessagesModifiedData), TypeInfoPropertyName = "SessionEventsPendingMessagesModifiedData")] [JsonSerializable(typeof(GitHub.Copilot.PendingMessagesModifiedEvent), TypeInfoPropertyName = "SessionEventsPendingMessagesModifiedEvent")] +[JsonSerializable(typeof(GitHub.Copilot.PermissionAllowAllMode), TypeInfoPropertyName = "SessionEventsPermissionAllowAllMode")] +[JsonSerializable(typeof(GitHub.Copilot.PermissionAutoApproval), TypeInfoPropertyName = "SessionEventsPermissionAutoApproval")] [JsonSerializable(typeof(GitHub.Copilot.PermissionCompletedData), TypeInfoPropertyName = "SessionEventsPermissionCompletedData")] [JsonSerializable(typeof(GitHub.Copilot.PermissionCompletedEvent), TypeInfoPropertyName = "SessionEventsPermissionCompletedEvent")] [JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequest), TypeInfoPropertyName = "SessionEventsPermissionPromptRequest")] @@ -22620,6 +23578,13 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(CopilotUserResponseQuotaSnapshotsPremiumInteractions))] [JsonSerializable(typeof(CurrentModel))] [JsonSerializable(typeof(CurrentToolMetadata))] +[JsonSerializable(typeof(DebugCollectLogsCollectedEntry))] +[JsonSerializable(typeof(DebugCollectLogsDestination))] +[JsonSerializable(typeof(DebugCollectLogsEntry))] +[JsonSerializable(typeof(DebugCollectLogsInclude))] +[JsonSerializable(typeof(DebugCollectLogsRequest))] +[JsonSerializable(typeof(DebugCollectLogsResult))] +[JsonSerializable(typeof(DebugCollectLogsSkippedEntry))] [JsonSerializable(typeof(DiscoveredCanvas))] [JsonSerializable(typeof(DiscoveredMcpServer))] [JsonSerializable(typeof(EnqueueCommandParams))] @@ -23009,6 +23974,16 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(SessionScheduleListRequest))] [JsonSerializable(typeof(SessionSetCredentialsParams))] [JsonSerializable(typeof(SessionSetCredentialsResult))] +[JsonSerializable(typeof(SessionSettingsBuiltInToolAvailabilitySnapshot))] +[JsonSerializable(typeof(SessionSettingsEvaluatePredicateRequest))] +[JsonSerializable(typeof(SessionSettingsEvaluatePredicateResult))] +[JsonSerializable(typeof(SessionSettingsJobSnapshot))] +[JsonSerializable(typeof(SessionSettingsModelSnapshot))] +[JsonSerializable(typeof(SessionSettingsOnlineEvaluationSnapshot))] +[JsonSerializable(typeof(SessionSettingsRepoSnapshot))] +[JsonSerializable(typeof(SessionSettingsSnapshot))] +[JsonSerializable(typeof(SessionSettingsSnapshotRequest))] +[JsonSerializable(typeof(SessionSettingsValidationSnapshot))] [JsonSerializable(typeof(SessionSizes))] [JsonSerializable(typeof(SessionSkillsEnsureLoadedRequest))] [JsonSerializable(typeof(SessionSkillsGetInvokedRequest))] diff --git a/dotnet/src/Generated/SessionEvents.cs b/dotnet/src/Generated/SessionEvents.cs index 1d9dfdcec..26d63cfd6 100644 --- a/dotnet/src/Generated/SessionEvents.cs +++ b/dotnet/src/Generated/SessionEvents.cs @@ -363,7 +363,7 @@ public sealed partial class SessionSessionLimitsChangedEvent : SessionEvent public required SessionSessionLimitsChangedData Data { get; set; } } -/// Permissions change details carrying the aggregate allow-all boolean transition. +/// Permissions change details carrying the aggregate allow-all transition. /// Represents the session.permissions_changed event. public sealed partial class SessionPermissionsChangedEvent : SessionEvent { @@ -545,7 +545,7 @@ public sealed partial class SessionTaskCompleteEvent : SessionEvent public required SessionTaskCompleteData Data { get; set; } } -/// Schema for the `UserMessageData` type. +/// Payload of `user.message` with displayed and model-transformed content, attachments, source/delivery metadata, mode, and telemetry IDs. /// Represents the user.message event. public sealed partial class UserMessageEvent : SessionEvent { @@ -1300,7 +1300,7 @@ public sealed partial class ExitPlanModeCompletedEvent : SessionEvent public required ExitPlanModeCompletedData Data { get; set; } } -/// Schema for the `ToolsUpdatedData` type. +/// Payload of `session.tools_updated` identifying the model whose resolved tools were updated. /// Represents the session.tools_updated event. public sealed partial class SessionToolsUpdatedEvent : SessionEvent { @@ -1313,7 +1313,7 @@ public sealed partial class SessionToolsUpdatedEvent : SessionEvent public required SessionToolsUpdatedData Data { get; set; } } -/// Schema for the `BackgroundTasksChangedData` type. +/// Empty payload for `session.background_tasks_changed`, indicating background task state changed. /// Represents the session.background_tasks_changed event. public sealed partial class SessionBackgroundTasksChangedEvent : SessionEvent { @@ -1326,7 +1326,7 @@ public sealed partial class SessionBackgroundTasksChangedEvent : SessionEvent public required SessionBackgroundTasksChangedData Data { get; set; } } -/// Schema for the `SkillsLoadedData` type. +/// Payload of `session.skills_loaded` listing resolved skill metadata. /// Represents the session.skills_loaded event. public sealed partial class SessionSkillsLoadedEvent : SessionEvent { @@ -1339,7 +1339,7 @@ public sealed partial class SessionSkillsLoadedEvent : SessionEvent public required SessionSkillsLoadedData Data { get; set; } } -/// Schema for the `CustomAgentsUpdatedData` type. +/// Payload of `session.custom_agents_updated` with loaded custom agents plus non-fatal warnings and fatal errors. /// Represents the session.custom_agents_updated event. public sealed partial class SessionCustomAgentsUpdatedEvent : SessionEvent { @@ -1352,7 +1352,7 @@ public sealed partial class SessionCustomAgentsUpdatedEvent : SessionEvent public required SessionCustomAgentsUpdatedData Data { get; set; } } -/// Schema for the `McpServersLoadedData` type. +/// Payload of `session.mcp_servers_loaded` listing MCP server status summaries. /// Represents the session.mcp_servers_loaded event. public sealed partial class SessionMcpServersLoadedEvent : SessionEvent { @@ -1365,7 +1365,7 @@ public sealed partial class SessionMcpServersLoadedEvent : SessionEvent public required SessionMcpServersLoadedData Data { get; set; } } -/// Schema for the `McpServerStatusChangedData` type. +/// Payload of `session.mcp_server_status_changed` for one MCP server's status and optional failure error. /// Represents the session.mcp_server_status_changed event. public sealed partial class SessionMcpServerStatusChangedEvent : SessionEvent { @@ -1378,7 +1378,7 @@ public sealed partial class SessionMcpServerStatusChangedEvent : SessionEvent public required SessionMcpServerStatusChangedData Data { get; set; } } -/// Schema for the `ExtensionsLoadedData` type. +/// Payload of `session.extensions_loaded` listing discovered extensions and their statuses. /// Represents the session.extensions_loaded event. public sealed partial class SessionExtensionsLoadedEvent : SessionEvent { @@ -1391,7 +1391,7 @@ public sealed partial class SessionExtensionsLoadedEvent : SessionEvent public required SessionExtensionsLoadedData Data { get; set; } } -/// Schema for the `CanvasOpenedData` type. +/// Payload of `session.canvas.opened` with canvas instance and provider IDs plus optional title, status, URL, and input. /// Represents the session.canvas.opened event. [Experimental(Diagnostics.Experimental)] public sealed partial class SessionCanvasOpenedEvent : SessionEvent @@ -1405,7 +1405,7 @@ public sealed partial class SessionCanvasOpenedEvent : SessionEvent public required SessionCanvasOpenedData Data { get; set; } } -/// Schema for the `CanvasRegistryChangedData` type. +/// Payload of `session.canvas.registry_changed` listing the canvas declarations currently available. /// Represents the session.canvas.registry_changed event. [Experimental(Diagnostics.Experimental)] public sealed partial class SessionCanvasRegistryChangedEvent : SessionEvent @@ -1419,7 +1419,7 @@ public sealed partial class SessionCanvasRegistryChangedEvent : SessionEvent public required SessionCanvasRegistryChangedData Data { get; set; } } -/// Schema for the `CanvasClosedData` type. +/// Payload of `session.canvas.closed` with the closed canvas instance ID, provider ID, and canvas ID. /// Represents the session.canvas.closed event. [Experimental(Diagnostics.Experimental)] public sealed partial class SessionCanvasClosedEvent : SessionEvent @@ -1475,7 +1475,7 @@ public sealed partial class SessionCanvasRemovedEvent : SessionEvent public required SessionCanvasRemovedData Data { get; set; } } -/// Schema for the `ExtensionsAttachmentsPushedData` type. +/// Payload of `session.extensions.attachments_pushed` with extension-contributed attachments for the next send. /// Represents the session.extensions.attachments_pushed event. public sealed partial class SessionExtensionsAttachmentsPushedEvent : SessionEvent { @@ -1897,13 +1897,25 @@ public sealed partial class SessionSessionLimitsChangedData public SessionLimitsConfig? SessionLimits { get; set; } } -/// Permissions change details carrying the aggregate allow-all boolean transition. +/// Permissions change details carrying the aggregate allow-all transition. public sealed partial class SessionPermissionsChangedData { + /// Allow-all mode after the change. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("allowAllPermissionMode")] + public PermissionAllowAllMode? AllowAllPermissionMode { get; set; } + /// Aggregate allow-all flag after the change. [JsonPropertyName("allowAllPermissions")] public required bool AllowAllPermissions { get; set; } + /// Allow-all mode before the change. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("previousAllowAllPermissionMode")] + public PermissionAllowAllMode? PreviousAllowAllPermissionMode { get; set; } + /// Aggregate allow-all flag before the change. [JsonPropertyName("previousAllowAllPermissions")] public required bool PreviousAllowAllPermissions { get; set; } @@ -2197,6 +2209,11 @@ public sealed partial class SessionCompactionStartData [JsonPropertyName("conversationTokens")] public long? ConversationTokens { get; set; } + /// Model identifier used for compaction, when known. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("model")] + public string? Model { get; set; } + /// Token count from system message(s) at compaction start. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("systemTokens")] @@ -2315,7 +2332,7 @@ public sealed partial class SessionTaskCompleteData public string? Summary { get; set; } } -/// Schema for the `UserMessageData` type. +/// Payload of `user.message` with displayed and model-transformed content, attachments, source/delivery metadata, mode, and telemetry IDs. public sealed partial class UserMessageData { /// The agent mode that was active when this message was sent. @@ -2386,6 +2403,11 @@ public sealed partial class AssistantTurnStartData [JsonPropertyName("interactionId")] public string? InteractionId { get; set; } + /// Model identifier used for this turn, when known. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("model")] + public string? Model { get; set; } + /// Identifier for this turn within the agentic loop, typically a stringified turn number. [JsonPropertyName("turnId")] public required string TurnId { get; set; } @@ -2565,6 +2587,11 @@ public sealed partial class AssistantMessageDeltaData /// Turn completion metadata including the turn identifier. public sealed partial class AssistantTurnEndData { + /// Model identifier used for this turn, when known. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("model")] + public string? Model { get; set; } + /// Identifier of the turn that has ended, matching the corresponding assistant.turn_start event. [JsonPropertyName("turnId")] public required string TurnId { get; set; } @@ -2964,6 +2991,11 @@ public sealed partial class SkillInvokedData [JsonPropertyName("description")] public string? Description { get; set; } + /// Model identifier active when the skill was invoked, when known. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("model")] + public string? Model { get; set; } + /// Name of the invoked skill. [JsonPropertyName("name")] public required string Name { get; set; } @@ -3729,7 +3761,7 @@ public sealed partial class ExitPlanModeCompletedData public ExitPlanModeAction? SelectedAction { get; set; } } -/// Schema for the `ToolsUpdatedData` type. +/// Payload of `session.tools_updated` identifying the model whose resolved tools were updated. public sealed partial class SessionToolsUpdatedData { /// Identifier of the model the resolved tools apply to. @@ -3737,12 +3769,12 @@ public sealed partial class SessionToolsUpdatedData public required string Model { get; set; } } -/// Schema for the `BackgroundTasksChangedData` type. +/// Empty payload for `session.background_tasks_changed`, indicating background task state changed. public sealed partial class SessionBackgroundTasksChangedData { } -/// Schema for the `SkillsLoadedData` type. +/// Payload of `session.skills_loaded` listing resolved skill metadata. public sealed partial class SessionSkillsLoadedData { /// Array of resolved skill metadata. @@ -3750,7 +3782,7 @@ public sealed partial class SessionSkillsLoadedData public required SkillsLoadedSkill[] Skills { get; set; } } -/// Schema for the `CustomAgentsUpdatedData` type. +/// Payload of `session.custom_agents_updated` with loaded custom agents plus non-fatal warnings and fatal errors. public sealed partial class SessionCustomAgentsUpdatedData { /// Array of loaded custom agent metadata. @@ -3766,7 +3798,7 @@ public sealed partial class SessionCustomAgentsUpdatedData public required string[] Warnings { get; set; } } -/// Schema for the `McpServersLoadedData` type. +/// Payload of `session.mcp_servers_loaded` listing MCP server status summaries. public sealed partial class SessionMcpServersLoadedData { /// Array of MCP server status summaries. @@ -3774,7 +3806,7 @@ public sealed partial class SessionMcpServersLoadedData public required McpServersLoadedServer[] Servers { get; set; } } -/// Schema for the `McpServerStatusChangedData` type. +/// Payload of `session.mcp_server_status_changed` for one MCP server's status and optional failure error. public sealed partial class SessionMcpServerStatusChangedData { /// Error message if the server entered a failed state. @@ -3791,7 +3823,7 @@ public sealed partial class SessionMcpServerStatusChangedData public required McpServerStatus Status { get; set; } } -/// Schema for the `ExtensionsLoadedData` type. +/// Payload of `session.extensions_loaded` listing discovered extensions and their statuses. public sealed partial class SessionExtensionsLoadedData { /// Array of discovered extensions and their status. @@ -3799,7 +3831,7 @@ public sealed partial class SessionExtensionsLoadedData public required ExtensionsLoadedExtension[] Extensions { get; set; } } -/// Schema for the `CanvasOpenedData` type. +/// Payload of `session.canvas.opened` with canvas instance and provider IDs plus optional title, status, URL, and input. [Experimental(Diagnostics.Experimental)] public sealed partial class SessionCanvasOpenedData { @@ -3841,7 +3873,7 @@ public sealed partial class SessionCanvasOpenedData public string? Url { get; set; } } -/// Schema for the `CanvasRegistryChangedData` type. +/// Payload of `session.canvas.registry_changed` listing the canvas declarations currently available. [Experimental(Diagnostics.Experimental)] public sealed partial class SessionCanvasRegistryChangedData { @@ -3850,7 +3882,7 @@ public sealed partial class SessionCanvasRegistryChangedData public required CanvasRegistryChangedCanvas[] Canvases { get; set; } } -/// Schema for the `CanvasClosedData` type. +/// Payload of `session.canvas.closed` with the closed canvas instance ID, provider ID, and canvas ID. [Experimental(Diagnostics.Experimental)] public sealed partial class SessionCanvasClosedData { @@ -3936,7 +3968,7 @@ public sealed partial class SessionCanvasRemovedData public required string InstanceId { get; set; } } -/// Schema for the `ExtensionsAttachmentsPushedData` type. +/// Payload of `session.extensions.attachments_pushed` with extension-contributed attachments for the next send. public sealed partial class SessionExtensionsAttachmentsPushedData { /// Attachments contributed by an extension; the host should surface these as composer pills and forward them via the next session.send call. @@ -4090,7 +4122,7 @@ public sealed partial class ShutdownModelMetricRequests public long? Count { get; set; } } -/// Schema for the `ShutdownModelMetricTokenDetail` type. +/// A token-type entry in a shutdown model metric, storing the accumulated token count. /// Nested data type for ShutdownModelMetricTokenDetail. public sealed partial class ShutdownModelMetricTokenDetail { @@ -4125,7 +4157,7 @@ public sealed partial class ShutdownModelMetricUsage public long? ReasoningTokens { get; set; } } -/// Schema for the `ShutdownModelMetric` type. +/// Per-model shutdown metrics with request counts, token usage, nano-AI units, and token details. /// Nested data type for ShutdownModelMetric. public sealed partial class ShutdownModelMetric { @@ -4149,7 +4181,7 @@ public sealed partial class ShutdownModelMetric public required ShutdownModelMetricUsage Usage { get; set; } } -/// Schema for the `ShutdownTokenDetail` type. +/// A session-wide shutdown token-type entry storing the accumulated token count. /// Nested data type for ShutdownTokenDetail. public sealed partial class ShutdownTokenDetail { @@ -5052,7 +5084,7 @@ public sealed partial class AssistantUsageCopilotUsage public required double TotalNanoAiu { get; set; } } -/// Schema for the `AssistantUsageQuotaSnapshot` type. +/// Internal per-quota snapshot for assistant usage, including entitlement, consumed requests, overage, reset date, and remaining quota. /// Nested data type for AssistantUsageQuotaSnapshot. internal sealed partial class AssistantUsageQuotaSnapshot { @@ -5163,7 +5195,7 @@ public sealed partial class ToolExecutionStartShellToolInfo public required string[] PossiblePaths { get; set; } } -/// Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. +/// MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_start`. /// Nested data type for ToolExecutionStartToolDescriptionMetaUI. public sealed partial class ToolExecutionStartToolDescriptionMetaUI { @@ -5182,7 +5214,7 @@ public sealed partial class ToolExecutionStartToolDescriptionMetaUI /// Nested data type for ToolExecutionStartToolDescriptionMeta. public sealed partial class ToolExecutionStartToolDescriptionMeta { - /// Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. + /// MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_start`. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("ui")] public ToolExecutionStartToolDescriptionMetaUI? Ui { get; set; } @@ -5617,7 +5649,7 @@ public sealed partial class ToolExecutionCompleteContentResourceLink : ToolExecu public required string Uri { get; set; } } -/// Schema for the `EmbeddedTextResourceContents` type. +/// Embedded text resource contents identified by a URI, with an optional MIME type and a text payload. /// Nested data type for EmbeddedTextResourceContents. public sealed partial class EmbeddedTextResourceContents { @@ -5635,7 +5667,7 @@ public sealed partial class EmbeddedTextResourceContents public required string Uri { get; set; } } -/// Schema for the `EmbeddedBlobResourceContents` type. +/// Embedded binary resource contents identified by a URI, with an optional MIME type and a base64-encoded blob. /// Nested data type for EmbeddedBlobResourceContents. public sealed partial class EmbeddedBlobResourceContents { @@ -5765,7 +5797,7 @@ public partial class ToolExecutionCompleteContent } -/// Schema for the `ToolExecutionCompleteUIResourceMetaUICsp` type. +/// CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. /// Nested data type for ToolExecutionCompleteUIResourceMetaUICsp. public sealed partial class ToolExecutionCompleteUIResourceMetaUICsp { @@ -5790,60 +5822,60 @@ public sealed partial class ToolExecutionCompleteUIResourceMetaUICsp public string[]? ResourceDomains { get; set; } } -/// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsCamera` type. +/// Marker object for camera permission on an MCP Apps UI resource. /// Nested data type for ToolExecutionCompleteUIResourceMetaUIPermissionsCamera. public sealed partial class ToolExecutionCompleteUIResourceMetaUIPermissionsCamera { } -/// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite` type. +/// Marker object for clipboard-write permission on an MCP Apps UI resource. /// Nested data type for ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite. public sealed partial class ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite { } -/// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation` type. +/// Marker object for geolocation permission on an MCP Apps UI resource. /// Nested data type for ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation. public sealed partial class ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation { } -/// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone` type. +/// Marker object for microphone permission on an MCP Apps UI resource. /// Nested data type for ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone. public sealed partial class ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone { } -/// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissions` type. +/// Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. /// Nested data type for ToolExecutionCompleteUIResourceMetaUIPermissions. public sealed partial class ToolExecutionCompleteUIResourceMetaUIPermissions { - /// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsCamera` type. + /// Marker object for camera permission on an MCP Apps UI resource. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("camera")] public ToolExecutionCompleteUIResourceMetaUIPermissionsCamera? Camera { get; set; } - /// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite` type. + /// Marker object for clipboard-write permission on an MCP Apps UI resource. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("clipboardWrite")] public ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite? ClipboardWrite { get; set; } - /// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation` type. + /// Marker object for geolocation permission on an MCP Apps UI resource. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("geolocation")] public ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation? Geolocation { get; set; } - /// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone` type. + /// Marker object for microphone permission on an MCP Apps UI resource. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("microphone")] public ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone? Microphone { get; set; } } -/// Schema for the `ToolExecutionCompleteUIResourceMetaUI` type. +/// MCP Apps UI resource metadata for a completed tool result, including CSP, permissions, domain, and border preference. /// Nested data type for ToolExecutionCompleteUIResourceMetaUI. public sealed partial class ToolExecutionCompleteUIResourceMetaUI { - /// Schema for the `ToolExecutionCompleteUIResourceMetaUICsp` type. + /// CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("csp")] public ToolExecutionCompleteUIResourceMetaUICsp? Csp { get; set; } @@ -5853,7 +5885,7 @@ public sealed partial class ToolExecutionCompleteUIResourceMetaUI [JsonPropertyName("domain")] public string? Domain { get; set; } - /// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissions` type. + /// Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("permissions")] public ToolExecutionCompleteUIResourceMetaUIPermissions? Permissions { get; set; } @@ -5868,7 +5900,7 @@ public sealed partial class ToolExecutionCompleteUIResourceMetaUI /// Nested data type for ToolExecutionCompleteUIResourceMeta. public sealed partial class ToolExecutionCompleteUIResourceMeta { - /// Schema for the `ToolExecutionCompleteUIResourceMetaUI` type. + /// MCP Apps UI resource metadata for a completed tool result, including CSP, permissions, domain, and border preference. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("ui")] public ToolExecutionCompleteUIResourceMetaUI? Ui { get; set; } @@ -5943,7 +5975,7 @@ public sealed partial class ToolExecutionCompleteResult public ToolExecutionCompleteUIResource? UiResource { get; set; } } -/// Schema for the `ToolExecutionCompleteToolDescriptionMetaUI` type. +/// MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_complete`. /// Nested data type for ToolExecutionCompleteToolDescriptionMetaUI. public sealed partial class ToolExecutionCompleteToolDescriptionMetaUI { @@ -5962,7 +5994,7 @@ public sealed partial class ToolExecutionCompleteToolDescriptionMetaUI /// Nested data type for ToolExecutionCompleteToolDescriptionMeta. public sealed partial class ToolExecutionCompleteToolDescriptionMeta { - /// Schema for the `ToolExecutionCompleteToolDescriptionMetaUI` type. + /// MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_complete`. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("ui")] public ToolExecutionCompleteToolDescriptionMetaUI? Ui { get; set; } @@ -6021,7 +6053,7 @@ public sealed partial class SystemMessageMetadata public IDictionary? Variables { get; set; } } -/// Schema for the `SystemNotificationAgentCompleted` type. +/// System notification metadata for a background agent that completed or failed, including agent ID, type, status, description, and prompt. /// The agent_completed variant of . public sealed partial class SystemNotificationAgentCompleted : SystemNotification { @@ -6052,7 +6084,7 @@ public sealed partial class SystemNotificationAgentCompleted : SystemNotificatio public required SystemNotificationAgentCompletedStatus Status { get; set; } } -/// Schema for the `SystemNotificationAgentIdle` type. +/// System notification metadata for a background agent that became idle, including agent ID, type, and description. /// The agent_idle variant of . public sealed partial class SystemNotificationAgentIdle : SystemNotification { @@ -6074,7 +6106,7 @@ public sealed partial class SystemNotificationAgentIdle : SystemNotification public string? Description { get; set; } } -/// Schema for the `SystemNotificationNewInboxMessage` type. +/// System notification metadata for a new inbox message, including entry ID, sender details, and summary. /// The new_inbox_message variant of . public sealed partial class SystemNotificationNewInboxMessage : SystemNotification { @@ -6099,7 +6131,7 @@ public sealed partial class SystemNotificationNewInboxMessage : SystemNotificati public required string Summary { get; set; } } -/// Schema for the `SystemNotificationShellCompleted` type. +/// System notification metadata for a shell session that completed, including shell ID, optional exit code, and description. /// The shell_completed variant of . public sealed partial class SystemNotificationShellCompleted : SystemNotification { @@ -6122,7 +6154,7 @@ public sealed partial class SystemNotificationShellCompleted : SystemNotificatio public required string ShellId { get; set; } } -/// Schema for the `SystemNotificationShellDetachedCompleted` type. +/// System notification metadata for a detached shell session that completed, including shell ID and description. /// The shell_detached_completed variant of . public sealed partial class SystemNotificationShellDetachedCompleted : SystemNotification { @@ -6140,7 +6172,7 @@ public sealed partial class SystemNotificationShellDetachedCompleted : SystemNot public required string ShellId { get; set; } } -/// Schema for the `SystemNotificationInstructionDiscovered` type. +/// System notification metadata for an instruction file discovered during tool access, including source, trigger file, and tool. /// The instruction_discovered variant of . public sealed partial class SystemNotificationInstructionDiscovered : SystemNotification { @@ -6185,7 +6217,7 @@ public partial class SystemNotification } -/// Schema for the `PermissionRequestShellCommand` type. +/// A parsed command identifier in a shell permission request, including whether it is read-only. /// Nested data type for PermissionRequestShellCommand. public sealed partial class PermissionRequestShellCommand { @@ -6198,7 +6230,7 @@ public sealed partial class PermissionRequestShellCommand public required bool ReadOnly { get; set; } } -/// Schema for the `PermissionRequestShellPossibleUrl` type. +/// A URL that may be accessed by a command in a shell permission request. /// Nested data type for PermissionRequestShellPossibleUrl. public sealed partial class PermissionRequestShellPossibleUrl { @@ -6554,6 +6586,21 @@ public partial class PermissionRequest } +/// Auto-approval judge information attached to a permission request. Present (non-null) only when the session's allow-all mode is "auto"; its absence means auto mode was off and the judge did not evaluate the request. The `recommendation` conveys the judge's disposition for this request. +/// Nested data type for PermissionAutoApproval. +[Experimental(Diagnostics.Experimental)] +public sealed partial class PermissionAutoApproval +{ + /// Human-readable reason for the judge's recommendation, when available. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("reason")] + public string? Reason { get; set; } + + /// The auto-approval safety judge's outcome for this request. + [JsonPropertyName("recommendation")] + public required AutoApprovalRecommendation Recommendation { get; set; } +} + /// Shell command permission prompt. /// The commands variant of . public sealed partial class PermissionPromptRequestCommands : PermissionPromptRequest @@ -6562,6 +6609,12 @@ public sealed partial class PermissionPromptRequestCommands : PermissionPromptRe [JsonIgnore] public override string Kind => "commands"; + /// Auto-approval judge information for this request; present only when auto mode is enabled. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("autoApproval")] + public PermissionAutoApproval? AutoApproval { get; set; } + /// Whether the UI can offer session-wide approval for this command pattern. [JsonPropertyName("canOfferSessionApproval")] public required bool CanOfferSessionApproval { get; set; } @@ -6597,6 +6650,12 @@ public sealed partial class PermissionPromptRequestWrite : PermissionPromptReque [JsonIgnore] public override string Kind => "write"; + /// Auto-approval judge information for this request; present only when auto mode is enabled. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("autoApproval")] + public PermissionAutoApproval? AutoApproval { get; set; } + /// Whether the UI can offer session-wide approval for file write operations. [JsonPropertyName("canOfferSessionApproval")] public required bool CanOfferSessionApproval { get; set; } @@ -6632,6 +6691,12 @@ public sealed partial class PermissionPromptRequestRead : PermissionPromptReques [JsonIgnore] public override string Kind => "read"; + /// Auto-approval judge information for this request; present only when auto mode is enabled. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("autoApproval")] + public PermissionAutoApproval? AutoApproval { get; set; } + /// Human-readable description of why the file is being read. [JsonPropertyName("intention")] public required string Intention { get; set; } @@ -6659,6 +6724,12 @@ public sealed partial class PermissionPromptRequestMcp : PermissionPromptRequest [JsonPropertyName("args")] public JsonElement? Args { get; set; } + /// Auto-approval judge information for this request; present only when auto mode is enabled. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("autoApproval")] + public PermissionAutoApproval? AutoApproval { get; set; } + /// Name of the MCP server providing the tool. [JsonPropertyName("serverName")] public required string ServerName { get; set; } @@ -6685,6 +6756,12 @@ public sealed partial class PermissionPromptRequestUrl : PermissionPromptRequest [JsonIgnore] public override string Kind => "url"; + /// Auto-approval judge information for this request; present only when auto mode is enabled. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("autoApproval")] + public PermissionAutoApproval? AutoApproval { get; set; } + /// Human-readable description of why the URL is being accessed. [JsonPropertyName("intention")] public required string Intention { get; set; } @@ -6712,6 +6789,12 @@ public sealed partial class PermissionPromptRequestMemory : PermissionPromptRequ [JsonPropertyName("action")] public PermissionRequestMemoryAction? Action { get; set; } + /// Auto-approval judge information for this request; present only when auto mode is enabled. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("autoApproval")] + public PermissionAutoApproval? AutoApproval { get; set; } + /// Source references for the stored fact (store only). [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("citations")] @@ -6755,6 +6838,12 @@ public sealed partial class PermissionPromptRequestCustomTool : PermissionPrompt [JsonPropertyName("args")] public JsonElement? Args { get; set; } + /// Auto-approval judge information for this request; present only when auto mode is enabled. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("autoApproval")] + public PermissionAutoApproval? AutoApproval { get; set; } + /// Tool call ID that triggered this permission request. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("toolCallId")] @@ -6781,6 +6870,12 @@ public sealed partial class PermissionPromptRequestPath : PermissionPromptReques [JsonPropertyName("accessKind")] public required PermissionPromptRequestPathAccessKind AccessKind { get; set; } + /// Auto-approval judge information for this request; present only when auto mode is enabled. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("autoApproval")] + public PermissionAutoApproval? AutoApproval { get; set; } + /// File paths that require explicit approval. [JsonPropertyName("paths")] public required string[] Paths { get; set; } @@ -6799,6 +6894,12 @@ public sealed partial class PermissionPromptRequestHook : PermissionPromptReques [JsonIgnore] public override string Kind => "hook"; + /// Auto-approval judge information for this request; present only when auto mode is enabled. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("autoApproval")] + public PermissionAutoApproval? AutoApproval { get; set; } + /// Optional message from the hook explaining why confirmation is needed. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("hookMessage")] @@ -6827,6 +6928,12 @@ public sealed partial class PermissionPromptRequestExtensionManagement : Permiss [JsonIgnore] public override string Kind => "extension-management"; + /// Auto-approval judge information for this request; present only when auto mode is enabled. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("autoApproval")] + public PermissionAutoApproval? AutoApproval { get; set; } + /// Name of the extension being managed. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("extensionName")] @@ -6850,6 +6957,12 @@ public sealed partial class PermissionPromptRequestExtensionPermissionAccess : P [JsonIgnore] public override string Kind => "extension-permission-access"; + /// Auto-approval judge information for this request; present only when auto mode is enabled. + [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("autoApproval")] + public PermissionAutoApproval? AutoApproval { get; set; } + /// Capabilities the extension is requesting. [JsonPropertyName("capabilities")] public required string[] Capabilities { get; set; } @@ -6888,7 +7001,7 @@ public partial class PermissionPromptRequest } -/// Schema for the `PermissionApproved` type. +/// Permission response variant indicating the request was approved without persisting an approval rule. /// The approved variant of . public sealed partial class PermissionResultApproved : PermissionResult { @@ -6897,7 +7010,7 @@ public sealed partial class PermissionResultApproved : PermissionResult public override string Kind => "approved"; } -/// Schema for the `UserToolSessionApprovalCommands` type. +/// Session-scoped tool-approval rule for specific shell command identifiers. /// The commands variant of . public sealed partial class UserToolSessionApprovalCommands : UserToolSessionApproval { @@ -6910,7 +7023,7 @@ public sealed partial class UserToolSessionApprovalCommands : UserToolSessionApp public required string[] CommandIdentifiers { get; set; } } -/// Schema for the `UserToolSessionApprovalRead` type. +/// Session-scoped tool-approval rule for read-only filesystem operations. /// The read variant of . public sealed partial class UserToolSessionApprovalRead : UserToolSessionApproval { @@ -6919,7 +7032,7 @@ public sealed partial class UserToolSessionApprovalRead : UserToolSessionApprova public override string Kind => "read"; } -/// Schema for the `UserToolSessionApprovalWrite` type. +/// Session-scoped tool-approval rule for filesystem write operations. /// The write variant of . public sealed partial class UserToolSessionApprovalWrite : UserToolSessionApproval { @@ -6928,7 +7041,7 @@ public sealed partial class UserToolSessionApprovalWrite : UserToolSessionApprov public override string Kind => "write"; } -/// Schema for the `UserToolSessionApprovalMcp` type. +/// Session-scoped tool-approval rule for an MCP server tool, or all tools on the server when `toolName` is null. /// The mcp variant of . public sealed partial class UserToolSessionApprovalMcp : UserToolSessionApproval { @@ -6945,7 +7058,7 @@ public sealed partial class UserToolSessionApprovalMcp : UserToolSessionApproval public string? ToolName { get; set; } } -/// Schema for the `UserToolSessionApprovalMemory` type. +/// Session-scoped tool-approval rule for writes to long-term memory. /// The memory variant of . public sealed partial class UserToolSessionApprovalMemory : UserToolSessionApproval { @@ -6954,7 +7067,7 @@ public sealed partial class UserToolSessionApprovalMemory : UserToolSessionAppro public override string Kind => "memory"; } -/// Schema for the `UserToolSessionApprovalCustomTool` type. +/// Session-scoped tool-approval rule for a custom tool, keyed by tool name. /// The custom-tool variant of . public sealed partial class UserToolSessionApprovalCustomTool : UserToolSessionApproval { @@ -6967,7 +7080,7 @@ public sealed partial class UserToolSessionApprovalCustomTool : UserToolSessionA public required string ToolName { get; set; } } -/// Schema for the `UserToolSessionApprovalExtensionManagement` type. +/// Session-scoped tool-approval rule for extension-management operations, optionally narrowed by operation. /// The extension-management variant of . public sealed partial class UserToolSessionApprovalExtensionManagement : UserToolSessionApproval { @@ -6981,7 +7094,7 @@ public sealed partial class UserToolSessionApprovalExtensionManagement : UserToo public string? Operation { get; set; } } -/// Schema for the `UserToolSessionApprovalExtensionPermissionAccess` type. +/// Session-scoped tool-approval rule for an extension's permission-gated capability access, keyed by extension name. /// The extension-permission-access variant of . public sealed partial class UserToolSessionApprovalExtensionPermissionAccess : UserToolSessionApproval { @@ -7015,7 +7128,7 @@ public partial class UserToolSessionApproval } -/// Schema for the `PermissionApprovedForSession` type. +/// Permission response variant that approves a request and remembers the provided approval for the rest of the session. /// The approved-for-session variant of . public sealed partial class PermissionResultApprovedForSession : PermissionResult { @@ -7028,7 +7141,7 @@ public sealed partial class PermissionResultApprovedForSession : PermissionResul public required UserToolSessionApproval Approval { get; set; } } -/// Schema for the `PermissionApprovedForLocation` type. +/// Permission response variant that approves a request and persists the provided approval to a project location key. /// The approved-for-location variant of . public sealed partial class PermissionResultApprovedForLocation : PermissionResult { @@ -7045,7 +7158,7 @@ public sealed partial class PermissionResultApprovedForLocation : PermissionResu public required string LocationKey { get; set; } } -/// Schema for the `PermissionCancelled` type. +/// Permission response variant indicating the request was cancelled before use, with an optional reason. /// The cancelled variant of . public sealed partial class PermissionResultCancelled : PermissionResult { @@ -7059,7 +7172,7 @@ public sealed partial class PermissionResultCancelled : PermissionResult public string? Reason { get; set; } } -/// Schema for the `PermissionRule` type. +/// A permission approval or denial rule matched against a tool request, identified by a rule kind with an optional argument value. /// Nested data type for PermissionRule. public sealed partial class PermissionRule { @@ -7072,7 +7185,7 @@ public sealed partial class PermissionRule public required string Kind { get; set; } } -/// Schema for the `PermissionDeniedByRules` type. +/// Permission response variant denied because matching approval rules explicitly blocked the request. /// The denied-by-rules variant of . public sealed partial class PermissionResultDeniedByRules : PermissionResult { @@ -7085,7 +7198,7 @@ public sealed partial class PermissionResultDeniedByRules : PermissionResult public required PermissionRule[] Rules { get; set; } } -/// Schema for the `PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type. +/// Permission response variant denied because no approval rule matched and user confirmation was unavailable. /// The denied-no-approval-rule-and-could-not-request-from-user variant of . public sealed partial class PermissionResultDeniedNoApprovalRuleAndCouldNotRequestFromUser : PermissionResult { @@ -7094,7 +7207,7 @@ public sealed partial class PermissionResultDeniedNoApprovalRuleAndCouldNotReque public override string Kind => "denied-no-approval-rule-and-could-not-request-from-user"; } -/// Schema for the `PermissionDeniedInteractivelyByUser` type. +/// Permission response variant denied in an interactive user prompt, with optional feedback and force-reject flag. /// The denied-interactively-by-user variant of . public sealed partial class PermissionResultDeniedInteractivelyByUser : PermissionResult { @@ -7113,7 +7226,7 @@ public sealed partial class PermissionResultDeniedInteractivelyByUser : Permissi public bool? ForceReject { get; set; } } -/// Schema for the `PermissionDeniedByContentExclusionPolicy` type. +/// Permission response variant denying a path under content exclusion policy, with the path and message. /// The denied-by-content-exclusion-policy variant of . public sealed partial class PermissionResultDeniedByContentExclusionPolicy : PermissionResult { @@ -7130,7 +7243,7 @@ public sealed partial class PermissionResultDeniedByContentExclusionPolicy : Per public required string Path { get; set; } } -/// Schema for the `PermissionDeniedByPermissionRequestHook` type. +/// Permission response variant denied by a permission-request hook, with optional message and interrupt flag. /// The denied-by-permission-request-hook variant of . public sealed partial class PermissionResultDeniedByPermissionRequestHook : PermissionResult { @@ -7252,7 +7365,7 @@ public sealed partial class SessionLimitsExhaustedResponse public double? MaxAiCredits { get; set; } } -/// Schema for the `CommandsChangedCommand` type. +/// A single slash command available in the session, as listed by the `commands.changed` event. /// Nested data type for CommandsChangedCommand. public sealed partial class CommandsChangedCommand { @@ -7286,7 +7399,7 @@ public sealed partial class CapabilitiesChangedUI public bool? McpApps { get; set; } } -/// Schema for the `SkillsLoadedSkill` type. +/// A single resolved skill in `session.skills_loaded`, including source, invocability, enabled state, path, and argument hint. /// Nested data type for SkillsLoadedSkill. public sealed partial class SkillsLoadedSkill { @@ -7321,7 +7434,7 @@ public sealed partial class SkillsLoadedSkill public required bool UserInvocable { get; set; } } -/// Schema for the `CustomAgentsUpdatedAgent` type. +/// A single loaded custom agent in `session.custom_agents_updated`, with identity, source, tools, invocability, and model override. /// Nested data type for CustomAgentsUpdatedAgent. public sealed partial class CustomAgentsUpdatedAgent { @@ -7359,7 +7472,7 @@ public sealed partial class CustomAgentsUpdatedAgent public required bool UserInvocable { get; set; } } -/// Schema for the `McpServersLoadedServer` type. +/// A single MCP server status summary in `session.mcp_servers_loaded`, including name, status, source, transport, and plugin metadata. /// Nested data type for McpServersLoadedServer. public sealed partial class McpServersLoadedServer { @@ -7397,7 +7510,7 @@ public sealed partial class McpServersLoadedServer public McpServerTransport? Transport { get; set; } } -/// Schema for the `ExtensionsLoadedExtension` type. +/// A single extension discovered by `session.extensions_loaded`, including qualified ID, source, and current status. /// Nested data type for ExtensionsLoadedExtension. public sealed partial class ExtensionsLoadedExtension { @@ -7418,7 +7531,7 @@ public sealed partial class ExtensionsLoadedExtension public required ExtensionsLoadedExtensionStatus Status { get; set; } } -/// Schema for the `CanvasRegistryChangedCanvasAction` type. +/// A single action within a canvas declaration, with its name, optional description, and optional input schema. /// Nested data type for CanvasRegistryChangedCanvasAction. [Experimental(Diagnostics.Experimental)] public sealed partial class CanvasRegistryChangedCanvasAction @@ -7438,7 +7551,7 @@ public sealed partial class CanvasRegistryChangedCanvasAction public required string Name { get; set; } } -/// Schema for the `CanvasRegistryChangedCanvas` type. +/// A single canvas declaration in `session.canvas.registry_changed`, including provider IDs, display metadata, input schema, and actions. /// Nested data type for CanvasRegistryChangedCanvas. [Experimental(Diagnostics.Experimental)] public sealed partial class CanvasRegistryChangedCanvas @@ -7486,7 +7599,7 @@ public sealed partial class McpAppToolCallCompleteError public required string Message { get; set; } } -/// Schema for the `McpAppToolCallCompleteToolMetaUI` type. +/// MCP App tool `_meta.ui` resource URI and SEP-1865 visibility captured with an `mcp_app.tool_call_complete` result. /// Nested data type for McpAppToolCallCompleteToolMetaUI. public sealed partial class McpAppToolCallCompleteToolMetaUI { @@ -7505,7 +7618,7 @@ public sealed partial class McpAppToolCallCompleteToolMetaUI /// Nested data type for McpAppToolCallCompleteToolMeta. public sealed partial class McpAppToolCallCompleteToolMeta { - /// Schema for the `McpAppToolCallCompleteToolMetaUI` type. + /// MCP App tool `_meta.ui` resource URI and SEP-1865 visibility captured with an `mcp_app.tool_call_complete` result. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("ui")] public McpAppToolCallCompleteToolMetaUI? Ui { get; set; } @@ -7892,6 +8005,71 @@ public override void Write(Utf8JsonWriter writer, SessionMode value, JsonSeriali } } +/// Allow-all mode for the session. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct PermissionAllowAllMode : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public PermissionAllowAllMode(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Permission requests follow the normal approval flow. + public static PermissionAllowAllMode Off { get; } = new("off"); + + /// Tool, path, and URL permission requests are automatically approved. + public static PermissionAllowAllMode On { get; } = new("on"); + + /// Permission requests follow the normal approval flow with an LLM advisory recommendation attached; clients may choose to auto-approve requests the judge evaluated as acceptable. + public static PermissionAllowAllMode Auto { get; } = new("auto"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(PermissionAllowAllMode left, PermissionAllowAllMode right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(PermissionAllowAllMode left, PermissionAllowAllMode right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is PermissionAllowAllMode other && Equals(other); + + /// + public bool Equals(PermissionAllowAllMode 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 PermissionAllowAllMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, PermissionAllowAllMode value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionAllowAllMode)); + } + } +} + /// The type of operation performed on the plan file. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -9512,6 +9690,74 @@ public override void Write(Utf8JsonWriter writer, PermissionRequestMemoryDirecti } } +/// Outcome of the auto-approval safety judge for a permission request. Present only when auto mode is enabled; its absence means the judge did not evaluate the request (auto mode was off). +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct AutoApprovalRecommendation : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public AutoApprovalRecommendation(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The judge evaluated the request and recommends automatically approving it. + public static AutoApprovalRecommendation Approve { get; } = new("approve"); + + /// The judge evaluated the request and does not recommend auto-approving it; explicit approval is required. Whether that means prompting, denying, or something else is the consumer's decision. + public static AutoApprovalRecommendation RequireApproval { get; } = new("requireApproval"); + + /// Auto mode is enabled, but this request category is never auto-approvable (for example, sandbox-bypass requests), so the judge was not consulted. + public static AutoApprovalRecommendation Excluded { get; } = new("excluded"); + + /// The judge was consulted but did not return a usable recommendation, so the request requires explicit approval. + public static AutoApprovalRecommendation Error { get; } = new("error"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(AutoApprovalRecommendation left, AutoApprovalRecommendation right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(AutoApprovalRecommendation left, AutoApprovalRecommendation right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is AutoApprovalRecommendation other && Equals(other); + + /// + public bool Equals(AutoApprovalRecommendation 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 AutoApprovalRecommendation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, AutoApprovalRecommendation value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AutoApprovalRecommendation)); + } + } +} + /// Underlying permission kind that needs path approval. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -10707,6 +10953,7 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu [JsonSerializable(typeof(OmittedBinaryResult))] [JsonSerializable(typeof(PendingMessagesModifiedData))] [JsonSerializable(typeof(PendingMessagesModifiedEvent))] +[JsonSerializable(typeof(PermissionAutoApproval))] [JsonSerializable(typeof(PermissionCompletedData))] [JsonSerializable(typeof(PermissionCompletedEvent))] [JsonSerializable(typeof(PermissionPromptRequest))] diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go index f6b0d31ac..24599e5f3 100644 --- a/go/rpc/zrpc.go +++ b/go/rpc/zrpc.go @@ -28,7 +28,8 @@ type AbortResult struct { Success bool `json:"success"` } -// Schema for the `AccountAllUsers` type. +// Authenticated account entry returned by `account.getAllUsers`, with auth info and an +// optional associated token. // Experimental: AccountAllUsers is part of an experimental API and may change or be removed. type AccountAllUsers struct { // Authentication information for this user @@ -106,7 +107,8 @@ type AccountLogoutResult struct { HasMoreUsers bool `json:"hasMoreUsers"` } -// Schema for the `AccountQuotaSnapshot` type. +// Quota usage snapshot for a Copilot quota type, including entitlement, used requests, +// overage, reset date, and remaining percentage. // Experimental: AccountQuotaSnapshot is part of an experimental API and may change or be // removed. type AccountQuotaSnapshot struct { @@ -128,7 +130,8 @@ type AccountQuotaSnapshot struct { UsedRequests int64 `json:"usedRequests"` } -// Schema for the `AgentDiscoveryPath` type. +// Canonical directory where custom agents can be discovered or created, with scope, +// preference, and optional project path. // Experimental: AgentDiscoveryPath is part of an experimental API and may change or be // removed. type AgentDiscoveryPath struct { @@ -159,7 +162,8 @@ type AgentGetCurrentResult struct { Agent *AgentInfo `json:"agent,omitempty"` } -// Schema for the `AgentInfo` type. +// Custom agent metadata, including identifiers, display details, source, tools, model, MCP +// servers, skills, and file path. // Experimental: AgentInfo is part of an experimental API and may change or be removed. type AgentInfo struct { // Description of the agent's purpose @@ -429,18 +433,22 @@ type AgentsGetDiscoveryPathsRequest struct { // Experimental: AllowAllPermissionSetResult is part of an experimental API and may change // or be removed. type AllowAllPermissionSetResult struct { - // Authoritative allow-all state after the mutation + // Authoritative full allow-all state after the mutation Enabled bool `json:"enabled"` + // Authoritative allow-all mode after the mutation + Mode *PermissionsAllowAllMode `json:"mode,omitempty"` // Whether the operation succeeded Success bool `json:"success"` } -// Current full allow-all permission state. +// Current allow-all permission mode. // Experimental: AllowAllPermissionState is part of an experimental API and may change or be // removed. type AllowAllPermissionState struct { // Whether full allow-all permissions are currently active Enabled bool `json:"enabled"` + // Current allow-all mode + Mode *PermissionsAllowAllMode `json:"mode,omitempty"` } // A user message attachment — a file, directory, code selection, blob, GitHub-anchored @@ -852,7 +860,8 @@ func (r RawAuthInfoData) Type() AuthInfoType { return r.Discriminator } -// Schema for the `ApiKeyAuthInfo` type. +// Authentication-info variant for API-key authentication to a non-GitHub LLM provider, +// carrying the secret `apiKey` and host. // Experimental: APIKeyAuthInfo is part of an experimental API and may change or be removed. type APIKeyAuthInfo struct { // The API key. Treat as a secret. @@ -870,7 +879,8 @@ func (APIKeyAuthInfo) Type() AuthInfoType { return AuthInfoTypeAPIKey } -// Schema for the `CopilotApiTokenAuthInfo` type. +// Authentication-info variant for direct Copilot API token auth sourced from environment +// variables, with public GitHub host. // Experimental: CopilotAPITokenAuthInfo is part of an experimental API and may change or be // removed. type CopilotAPITokenAuthInfo struct { @@ -887,7 +897,8 @@ func (CopilotAPITokenAuthInfo) Type() AuthInfoType { return AuthInfoTypeCopilotAPIToken } -// Schema for the `EnvAuthInfo` type. +// Authentication-info variant for a token sourced from an environment variable, with host, +// optional login, token, and env var name. // Experimental: EnvAuthInfo is part of an experimental API and may change or be removed. type EnvAuthInfo struct { // Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the @@ -910,7 +921,8 @@ func (EnvAuthInfo) Type() AuthInfoType { return AuthInfoTypeEnv } -// Schema for the `GhCliAuthInfo` type. +// Authentication-info variant for GitHub CLI credentials, carrying host, login, and the `gh +// auth token` value. // Experimental: GhCLIAuthInfo is part of an experimental API and may change or be removed. type GhCLIAuthInfo struct { // Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the @@ -930,7 +942,8 @@ func (GhCLIAuthInfo) Type() AuthInfoType { return AuthInfoTypeGhCLI } -// Schema for the `HMACAuthInfo` type. +// Authentication-info variant for GitHub-internal HMAC auth, carrying the public GitHub +// host and HMAC secret. // Experimental: HMACAuthInfo is part of an experimental API and may change or be removed. type HMACAuthInfo struct { // Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the @@ -948,7 +961,8 @@ func (HMACAuthInfo) Type() AuthInfoType { return AuthInfoTypeHMAC } -// Schema for the `TokenAuthInfo` type. +// Authentication-info variant for SDK-configured token authentication, carrying host and +// the secret token value. // Experimental: TokenAuthInfo is part of an experimental API and may change or be removed. type TokenAuthInfo struct { // Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the @@ -966,7 +980,8 @@ func (TokenAuthInfo) Type() AuthInfoType { return AuthInfoTypeToken } -// Schema for the `UserAuthInfo` type. +// 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. type UserAuthInfo struct { // Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the @@ -1341,10 +1356,19 @@ type ConnectRemoteSessionParams struct { SessionID string `json:"sessionId"` } -// Optional connection token presented by the SDK client during the handshake. +// Parameters for the `server.connect` handshake: an optional connection token and optional +// connection-level opt-ins (e.g. GitHub telemetry forwarding). // 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 { + // 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, in + // addition to the runtime's normal GitHub/CTS emission (dual-write). 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. + EnableGitHubTelemetryForwarding *bool `json:"enableGitHubTelemetryForwarding,omitempty"` // Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN Token *string `json:"token,omitempty"` } @@ -1381,37 +1405,66 @@ type ContextHeaviestMessage struct { // Experimental: CopilotUserResponse is part of an experimental API and may change or be // removed. type CopilotUserResponse struct { - AccessTypeSku *string `json:"access_type_sku,omitempty"` - AnalyticsTrackingID *string `json:"analytics_tracking_id,omitempty"` - AssignedDate *string `json:"assigned_date,omitempty"` - CanSignupForLimited *bool `json:"can_signup_for_limited,omitempty"` - CanUpgradePlan *bool `json:"can_upgrade_plan,omitempty"` - ChatEnabled *bool `json:"chat_enabled,omitempty"` - CLIRemoteControlEnabled *bool `json:"cli_remote_control_enabled,omitempty"` - CloudSessionStorageEnabled *bool `json:"cloud_session_storage_enabled,omitempty"` - CodexAgentEnabled *bool `json:"codex_agent_enabled,omitempty"` - CopilotignoreEnabled *bool `json:"copilotignore_enabled,omitempty"` - CopilotPlan *string `json:"copilot_plan,omitempty"` - // Schema for the `CopilotUserResponseEndpoints` type. - Endpoints *CopilotUserResponseEndpoints `json:"endpoints,omitempty"` - IsMCPEnabled *bool `json:"is_mcp_enabled,omitempty"` - IsStaff *bool `json:"is_staff,omitempty"` - LimitedUserQuotas map[string]float64 `json:"limited_user_quotas,omitzero"` - LimitedUserResetDate *string `json:"limited_user_reset_date,omitempty"` - Login *string `json:"login,omitempty"` - MonthlyQuotas map[string]float64 `json:"monthly_quotas,omitzero"` - OrganizationList []CopilotUserResponseOrganizationListItem `json:"organization_list,omitzero"` - OrganizationLoginList []string `json:"organization_login_list,omitzero"` - QuotaResetDate *string `json:"quota_reset_date,omitempty"` - QuotaResetDateUTC *string `json:"quota_reset_date_utc,omitempty"` - // Schema for the `CopilotUserResponseQuotaSnapshots` type. - QuotaSnapshots *CopilotUserResponseQuotaSnapshots `json:"quota_snapshots,omitempty"` - RestrictedTelemetry *bool `json:"restricted_telemetry,omitempty"` - Te *bool `json:"te,omitempty"` - TokenBasedBilling *bool `json:"token_based_billing,omitempty"` -} - -// Schema for the `CopilotUserResponseEndpoints` type. + // Copilot access SKU identifier (e.g. `free_limited_copilot`, + // `copilot_for_business_seat_quota`) used to gate model and feature access. + AccessTypeSku *string `json:"access_type_sku,omitempty"` + // Opaque analytics tracking identifier for the user, forwarded from the Copilot API. + AnalyticsTrackingID *string `json:"analytics_tracking_id,omitempty"` + // Date the Copilot seat was assigned to the user, if applicable. + AssignedDate *string `json:"assigned_date,omitempty"` + // Whether the user is eligible to sign up for the free/limited Copilot tier. + CanSignupForLimited *bool `json:"can_signup_for_limited,omitempty"` + // Whether the user is able to upgrade their Copilot plan. + CanUpgradePlan *bool `json:"can_upgrade_plan,omitempty"` + // Whether Copilot chat is enabled for the user. + ChatEnabled *bool `json:"chat_enabled,omitempty"` + // Whether CLI remote control is enabled for the user. + CLIRemoteControlEnabled *bool `json:"cli_remote_control_enabled,omitempty"` + // Whether cloud session storage is enabled for the user. + CloudSessionStorageEnabled *bool `json:"cloud_session_storage_enabled,omitempty"` + // Whether the Codex agent is enabled for the user. + CodexAgentEnabled *bool `json:"codex_agent_enabled,omitempty"` + // Whether `.copilotignore` content-exclusion support is enabled for the user. + CopilotignoreEnabled *bool `json:"copilotignore_enabled,omitempty"` + // Copilot plan name for the user (e.g. `individual`, `business`, `enterprise`). + CopilotPlan *string `json:"copilot_plan,omitempty"` + // Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough. + Endpoints *CopilotUserResponseEndpoints `json:"endpoints,omitempty"` + // Whether MCP (Model Context Protocol) support is enabled for the user. + IsMCPEnabled *bool `json:"is_mcp_enabled,omitempty"` + // Whether the user is a GitHub/Microsoft staff member. + IsStaff *bool `json:"is_staff,omitempty"` + // Per-category quota allotments for free/limited-tier users, keyed by quota category. + LimitedUserQuotas map[string]float64 `json:"limited_user_quotas,omitzero"` + // Date the free/limited-tier user's quotas next reset, as a raw string from the Copilot API. + LimitedUserResetDate *string `json:"limited_user_reset_date,omitempty"` + // GitHub login of the authenticated user. + Login *string `json:"login,omitempty"` + // Per-category monthly quota allotments, keyed by quota category. + MonthlyQuotas map[string]float64 `json:"monthly_quotas,omitzero"` + // Organizations the user belongs to, each with an optional login and display name. + OrganizationList []CopilotUserResponseOrganizationListItem `json:"organization_list,omitzero"` + // Logins of the organizations the user belongs to. + OrganizationLoginList []string `json:"organization_login_list,omitzero"` + // Date the user's usage quota next resets, as a raw string from the Copilot API; see + // `quota_reset_date_utc` for the UTC-normalized value. + QuotaResetDate *string `json:"quota_reset_date,omitempty"` + // UTC-normalized form of `quota_reset_date` (the date the user's usage quota next resets). + QuotaResetDateUTC *string `json:"quota_reset_date_utc,omitempty"` + // Quota snapshot map from the raw Copilot user-response passthrough, with chat, + // completions, premium-interactions, and other entries. + QuotaSnapshots *CopilotUserResponseQuotaSnapshots `json:"quota_snapshots,omitempty"` + // Whether the user's telemetry is subject to restricted-data handling. + RestrictedTelemetry *bool `json:"restricted_telemetry,omitempty"` + // Raw passthrough of the Copilot API `te` flag for the user (an opaque server-side + // eligibility signal surfaced in telemetry); not otherwise interpreted by the runtime. + Te *bool `json:"te,omitempty"` + // Whether the account is on usage-based (token/AI-credit) billing rather than a fixed + // premium-request quota. + TokenBasedBilling *bool `json:"token_based_billing,omitempty"` +} + +// Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough. // Experimental: CopilotUserResponseEndpoints is part of an experimental API and may change // or be removed. type CopilotUserResponseEndpoints struct { @@ -1426,70 +1479,122 @@ type CopilotUserResponseOrganizationListItem struct { Name *string `json:"name,omitempty"` } -// Schema for the `CopilotUserResponseQuotaSnapshots` type. +// Quota snapshot map from the raw Copilot user-response passthrough, with chat, +// completions, premium-interactions, and other entries. // Experimental: CopilotUserResponseQuotaSnapshots is part of an experimental API and may // change or be removed. type CopilotUserResponseQuotaSnapshots struct { - // Schema for the `CopilotUserResponseQuotaSnapshotsChat` type. + // Chat quota snapshot from the raw Copilot user-response passthrough, with entitlement, + // overage, remaining quota, reset, and billing fields. Chat *CopilotUserResponseQuotaSnapshotsChat `json:"chat,omitempty"` - // Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` type. + // Completions quota snapshot from the raw Copilot user-response passthrough, with + // entitlement, overage, remaining quota, reset, and billing fields. Completions *CopilotUserResponseQuotaSnapshotsCompletions `json:"completions,omitempty"` - // Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` type. + // Premium-interactions quota snapshot from the raw Copilot user-response passthrough, with + // entitlement, overage, remaining quota, reset, and billing fields. PremiumInteractions *CopilotUserResponseQuotaSnapshotsPremiumInteractions `json:"premium_interactions,omitempty"` } -// Schema for the `CopilotUserResponseQuotaSnapshotsChat` type. +// Chat quota snapshot from the raw Copilot user-response passthrough, with entitlement, +// overage, remaining quota, reset, and billing fields. // Experimental: CopilotUserResponseQuotaSnapshotsChat is part of an experimental API and // may change or be removed. type CopilotUserResponseQuotaSnapshotsChat struct { - Entitlement *float64 `json:"entitlement,omitempty"` - HasQuota *bool `json:"has_quota,omitempty"` - OverageCount *float64 `json:"overage_count,omitempty"` - OveragePermitted *bool `json:"overage_permitted,omitempty"` - PercentRemaining *float64 `json:"percent_remaining,omitempty"` - QuotaID *string `json:"quota_id,omitempty"` - QuotaRemaining *float64 `json:"quota_remaining,omitempty"` - QuotaResetAt *float64 `json:"quota_reset_at,omitempty"` - Remaining *float64 `json:"remaining,omitempty"` - TimestampUTC *string `json:"timestamp_utc,omitempty"` - TokenBasedBilling *bool `json:"token_based_billing,omitempty"` - Unlimited *bool `json:"unlimited,omitempty"` -} - -// Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` type. + // Number of requests/units included in the entitlement for this period; `-1` denotes an + // unlimited entitlement. + Entitlement *float64 `json:"entitlement,omitempty"` + // Whether the user currently has quota available; when `false` and not unlimited, further + // requests are blocked until the quota resets. + HasQuota *bool `json:"has_quota,omitempty"` + // Count of additional pay-per-request usage consumed this period beyond the entitlement. + OverageCount *float64 `json:"overage_count,omitempty"` + // Whether usage may continue at pay-per-request rates once the entitlement is exhausted. + OveragePermitted *bool `json:"overage_permitted,omitempty"` + // Percentage of the entitlement remaining at the snapshot timestamp. + PercentRemaining *float64 `json:"percent_remaining,omitempty"` + // Identifier of the quota bucket this snapshot describes. + QuotaID *string `json:"quota_id,omitempty"` + // Amount of quota remaining at the snapshot timestamp. + QuotaRemaining *float64 `json:"quota_remaining,omitempty"` + // Unix epoch time, in seconds, when this quota next resets. + QuotaResetAt *float64 `json:"quota_reset_at,omitempty"` + // Remaining entitlement/quota amount at the snapshot timestamp. + Remaining *float64 `json:"remaining,omitempty"` + // UTC timestamp when this snapshot was captured. + TimestampUTC *string `json:"timestamp_utc,omitempty"` + // Whether this category uses usage-based (token/AI-credit) billing rather than a fixed + // premium-request count. + TokenBasedBilling *bool `json:"token_based_billing,omitempty"` + // Whether the entitlement for this category is unlimited. + Unlimited *bool `json:"unlimited,omitempty"` +} + +// Completions quota snapshot from the raw Copilot user-response passthrough, with +// entitlement, overage, remaining quota, reset, and billing fields. // Experimental: CopilotUserResponseQuotaSnapshotsCompletions is part of an experimental API // and may change or be removed. type CopilotUserResponseQuotaSnapshotsCompletions struct { - Entitlement *float64 `json:"entitlement,omitempty"` - HasQuota *bool `json:"has_quota,omitempty"` - OverageCount *float64 `json:"overage_count,omitempty"` - OveragePermitted *bool `json:"overage_permitted,omitempty"` - PercentRemaining *float64 `json:"percent_remaining,omitempty"` - QuotaID *string `json:"quota_id,omitempty"` - QuotaRemaining *float64 `json:"quota_remaining,omitempty"` - QuotaResetAt *float64 `json:"quota_reset_at,omitempty"` - Remaining *float64 `json:"remaining,omitempty"` - TimestampUTC *string `json:"timestamp_utc,omitempty"` - TokenBasedBilling *bool `json:"token_based_billing,omitempty"` - Unlimited *bool `json:"unlimited,omitempty"` -} - -// Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` type. + // Number of requests/units included in the entitlement for this period; `-1` denotes an + // unlimited entitlement. + Entitlement *float64 `json:"entitlement,omitempty"` + // Whether the user currently has quota available; when `false` and not unlimited, further + // requests are blocked until the quota resets. + HasQuota *bool `json:"has_quota,omitempty"` + // Count of additional pay-per-request usage consumed this period beyond the entitlement. + OverageCount *float64 `json:"overage_count,omitempty"` + // Whether usage may continue at pay-per-request rates once the entitlement is exhausted. + OveragePermitted *bool `json:"overage_permitted,omitempty"` + // Percentage of the entitlement remaining at the snapshot timestamp. + PercentRemaining *float64 `json:"percent_remaining,omitempty"` + // Identifier of the quota bucket this snapshot describes. + QuotaID *string `json:"quota_id,omitempty"` + // Amount of quota remaining at the snapshot timestamp. + QuotaRemaining *float64 `json:"quota_remaining,omitempty"` + // Unix epoch time, in seconds, when this quota next resets. + QuotaResetAt *float64 `json:"quota_reset_at,omitempty"` + // Remaining entitlement/quota amount at the snapshot timestamp. + Remaining *float64 `json:"remaining,omitempty"` + // UTC timestamp when this snapshot was captured. + TimestampUTC *string `json:"timestamp_utc,omitempty"` + // Whether this category uses usage-based (token/AI-credit) billing rather than a fixed + // premium-request count. + TokenBasedBilling *bool `json:"token_based_billing,omitempty"` + // Whether the entitlement for this category is unlimited. + Unlimited *bool `json:"unlimited,omitempty"` +} + +// Premium-interactions quota snapshot from the raw Copilot user-response passthrough, with +// entitlement, overage, remaining quota, reset, and billing fields. // Experimental: CopilotUserResponseQuotaSnapshotsPremiumInteractions is part of an // experimental API and may change or be removed. type CopilotUserResponseQuotaSnapshotsPremiumInteractions struct { - Entitlement *float64 `json:"entitlement,omitempty"` - HasQuota *bool `json:"has_quota,omitempty"` - OverageCount *float64 `json:"overage_count,omitempty"` - OveragePermitted *bool `json:"overage_permitted,omitempty"` - PercentRemaining *float64 `json:"percent_remaining,omitempty"` - QuotaID *string `json:"quota_id,omitempty"` - QuotaRemaining *float64 `json:"quota_remaining,omitempty"` - QuotaResetAt *float64 `json:"quota_reset_at,omitempty"` - Remaining *float64 `json:"remaining,omitempty"` - TimestampUTC *string `json:"timestamp_utc,omitempty"` - TokenBasedBilling *bool `json:"token_based_billing,omitempty"` - Unlimited *bool `json:"unlimited,omitempty"` + // Number of requests/units included in the entitlement for this period; `-1` denotes an + // unlimited entitlement. + Entitlement *float64 `json:"entitlement,omitempty"` + // Whether the user currently has quota available; when `false` and not unlimited, further + // requests are blocked until the quota resets. + HasQuota *bool `json:"has_quota,omitempty"` + // Count of additional pay-per-request usage consumed this period beyond the entitlement. + OverageCount *float64 `json:"overage_count,omitempty"` + // Whether usage may continue at pay-per-request rates once the entitlement is exhausted. + OveragePermitted *bool `json:"overage_permitted,omitempty"` + // Percentage of the entitlement remaining at the snapshot timestamp. + PercentRemaining *float64 `json:"percent_remaining,omitempty"` + // Identifier of the quota bucket this snapshot describes. + QuotaID *string `json:"quota_id,omitempty"` + // Amount of quota remaining at the snapshot timestamp. + QuotaRemaining *float64 `json:"quota_remaining,omitempty"` + // Unix epoch time, in seconds, when this quota next resets. + QuotaResetAt *float64 `json:"quota_reset_at,omitempty"` + // Remaining entitlement/quota amount at the snapshot timestamp. + Remaining *float64 `json:"remaining,omitempty"` + // UTC timestamp when this snapshot was captured. + TimestampUTC *string `json:"timestamp_utc,omitempty"` + // Whether this category uses usage-based (token/AI-credit) billing rather than a fixed + // premium-request count. + TokenBasedBilling *bool `json:"token_based_billing,omitempty"` + // Whether the entitlement for this category is unlimited. + Unlimited *bool `json:"unlimited,omitempty"` } // The currently selected model, reasoning effort, and context tier for the session. The @@ -1527,6 +1632,142 @@ type CurrentToolMetadata struct { NamespacedName *string `json:"namespacedName,omitempty"` } +// A file included in the redacted debug bundle. +// Experimental: DebugCollectLogsCollectedEntry is part of an experimental API and may +// change or be removed. +type DebugCollectLogsCollectedEntry struct { + // Relative path of the file in the staged bundle/archive. + BundlePath string `json:"bundlePath"` + // Redacted output size in bytes. + SizeBytes int64 `json:"sizeBytes"` + // Source category for this entry. + Source DebugCollectLogsSource `json:"source"` +} + +// Destination for the redacted debug bundle. +// Experimental: DebugCollectLogsDestination is part of an experimental API and may change +// or be removed. +type DebugCollectLogsDestination interface { + debugCollectLogsDestination() + Kind() DebugCollectLogsDestinationKind +} + +type RawDebugCollectLogsDestinationData struct { + Discriminator DebugCollectLogsDestinationKind + Raw json.RawMessage +} + +func (RawDebugCollectLogsDestinationData) debugCollectLogsDestination() {} +func (r RawDebugCollectLogsDestinationData) Kind() DebugCollectLogsDestinationKind { + return r.Discriminator +} + +type DebugCollectLogsDestinationArchive struct { + // When true, create the archive atomically without overwriting an existing file by + // appending ` (N)` before the extension as needed. Defaults to false. + NoOverwrite *bool `json:"noOverwrite,omitempty"` + // Absolute or server-relative path for the .tgz archive to create. + OutputPath string `json:"outputPath"` +} + +func (DebugCollectLogsDestinationArchive) debugCollectLogsDestination() {} +func (DebugCollectLogsDestinationArchive) Kind() DebugCollectLogsDestinationKind { + return DebugCollectLogsDestinationKindArchive +} + +type DebugCollectLogsDestinationDirectory struct { + // Directory where redacted files should be staged. The directory is created if needed. + OutputDirectory string `json:"outputDirectory"` +} + +func (DebugCollectLogsDestinationDirectory) debugCollectLogsDestination() {} +func (DebugCollectLogsDestinationDirectory) Kind() DebugCollectLogsDestinationKind { + return DebugCollectLogsDestinationKindDirectory +} + +// A caller-provided server-local file or directory to include in the debug bundle. +// Experimental: DebugCollectLogsEntry is part of an experimental API and may change or be +// removed. +type DebugCollectLogsEntry struct { + // Relative path to use inside the staged bundle/archive. + BundlePath string `json:"bundlePath"` + // Kind of source path to include. + Kind DebugCollectLogsEntryKind `json:"kind"` + // Server-local source path to read. + Path string `json:"path"` + // How text content from this entry should be redacted. Defaults to plain-text. + Redaction *DebugCollectLogsRedaction `json:"redaction,omitempty"` + // When true, collection fails if this entry cannot be read. Defaults to false, which + // records the entry in `skippedEntries`. + Required *bool `json:"required,omitempty"` +} + +// Built-in session diagnostics to include in the bundle. Omitted fields default to true. +// Experimental: DebugCollectLogsInclude is part of an experimental API and may change or be +// removed. +type DebugCollectLogsInclude struct { + // Server-local path to the current process log. When set, it is included as `process.log` + // and its directory is searched for prior logs from the same session. + CurrentProcessLogPath *string `json:"currentProcessLogPath,omitempty"` + // Include the session event log (`events.jsonl`). Defaults to true. + Events *bool `json:"events,omitempty"` + // Server-local path to the session's events.jsonl file. Internal callers normally omit this + // and let the runtime derive it from the session. + EventsPath *string `json:"eventsPath,omitempty"` + // Maximum number of previous process logs to include. Defaults to 5. + PreviousProcessLogLimit *int64 `json:"previousProcessLogLimit,omitempty"` + // Server-local process log directory to search when `currentProcessLogPath` is unavailable, + // useful for collecting logs for inactive sessions. + ProcessLogDirectory *string `json:"processLogDirectory,omitempty"` + // Include process logs for the session. Defaults to true. + ProcessLogs *bool `json:"processLogs,omitempty"` + // Include interactive shell logs written under the session's `shell-logs` directory. + // Defaults to true. + ShellLogs *bool `json:"shellLogs,omitempty"` +} + +// Options for collecting a redacted session debug bundle. +// Experimental: DebugCollectLogsRequest is part of an experimental API and may change or be +// removed. +type DebugCollectLogsRequest struct { + // Caller-provided server-local files or directories to include in addition to the runtime's + // built-in session diagnostics. This lets host applications add their own diagnostics + // without changing the API shape. + AdditionalEntries []DebugCollectLogsEntry `json:"additionalEntries,omitzero"` + // Where the redacted bundle should be written. Use `archive` to produce a .tgz, or + // `directory` to stage redacted files for caller-managed upload/post-processing. + Destination DebugCollectLogsDestination `json:"destination"` + // Which built-in session diagnostics to include. Omitted fields default to true. + Include *DebugCollectLogsInclude `json:"include,omitempty"` +} + +// Result of collecting a redacted debug bundle. +// Experimental: DebugCollectLogsResult is part of an experimental API and may change or be +// removed. +type DebugCollectLogsResult struct { + // Files included in the redacted bundle. + Entries []DebugCollectLogsCollectedEntry `json:"entries"` + // Destination kind that was written. + Kind DebugCollectLogsResultKind `json:"kind"` + // Actual archive path or staging directory path written. This may differ from the requested + // path when no-overwrite suffixing or fallback-to-temp-directory was needed. + Path string `json:"path"` + // Optional files or directories that could not be included. + SkippedEntries []DebugCollectLogsSkippedEntry `json:"skippedEntries,omitzero"` +} + +// An optional debug bundle entry that could not be included. +// Experimental: DebugCollectLogsSkippedEntry is part of an experimental API and may change +// or be removed. +type DebugCollectLogsSkippedEntry struct { + // Relative path requested for this bundle entry. + BundlePath string `json:"bundlePath"` + // Server-local source path that could not be read. + Path *string `json:"path,omitempty"` + // Reason the entry was skipped. + Reason string `json:"reason"` +} + // Canvas available in the current session. // Experimental: DiscoveredCanvas is part of an experimental API and may change or be // removed. @@ -1547,7 +1788,8 @@ type DiscoveredCanvas struct { InputSchema any `json:"inputSchema,omitempty"` } -// Schema for the `DiscoveredMcpServer` type. +// MCP server discovered by `mcp.discover`, with config source, optional plugin source, +// transport type, and enabled state. // Experimental: DiscoveredMCPServer is part of an experimental API and may change or be // removed. type DiscoveredMCPServer struct { @@ -1677,7 +1919,8 @@ type ExecuteCommandResult struct { Error *string `json:"error,omitempty"` } -// Schema for the `Extension` type. +// Discovered extension metadata, including source-qualified ID, name, discovery source, +// status, and optional process ID. // Experimental: Extension is part of an experimental API and may change or be removed. type Extension struct { // Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper', @@ -1925,7 +2168,8 @@ type RawExternalToolTextResultForLlmContentResourceDetailsData struct { func (RawExternalToolTextResultForLlmContentResourceDetailsData) externalToolTextResultForLlmContentResourceDetails() { } -// Schema for the `EmbeddedBlobResourceContents` type. +// Embedded binary resource contents identified by a URI, with an optional MIME type and a +// base64-encoded blob. // Experimental: EmbeddedBlobResourceContents is part of an experimental API and may change // or be removed. type EmbeddedBlobResourceContents struct { @@ -1939,7 +2183,8 @@ type EmbeddedBlobResourceContents struct { func (EmbeddedBlobResourceContents) externalToolTextResultForLlmContentResourceDetails() {} -// Schema for the `EmbeddedTextResourceContents` type. +// Embedded text resource contents identified by a URI, with an optional MIME type and a +// text payload. // Experimental: EmbeddedTextResourceContents is part of an experimental API and may change // or be removed. type EmbeddedTextResourceContents struct { @@ -2092,8 +2337,8 @@ type GitHubTelemetryEventResult struct { } // Payload for a `gitHubTelemetry.event` notification: a single GitHub telemetry event the -// runtime forwards to a host connection that opted into telemetry forwarding for the -// session. +// runtime forwards to a host connection that opted into telemetry forwarding during the +// `server.connect` handshake. // Experimental: GitHubTelemetryNotification is part of an experimental API and may change // or be removed. type GitHubTelemetryNotification struct { @@ -2102,8 +2347,10 @@ type GitHubTelemetryNotification struct { // Whether this is a restricted telemetry event (cli.restricted_telemetry). Hosts must route // restricted events to first-party Microsoft stores only. Restricted bool `json:"restricted"` - // Session the telemetry event belongs to. - SessionID string `json:"sessionId"` + // Session the telemetry event belongs to, when it is session-scoped. Omitted for + // sessionless events (for example, `server.sendTelemetry` calls with no session id), which + // are still forwarded to opted-in connections. + SessionID *string `json:"sessionId,omitempty"` } // Pending external tool call request ID, with the tool result or an error describing why it @@ -2214,7 +2461,8 @@ type HistoryTruncateResult struct { EventsRemoved int64 `json:"eventsRemoved"` } -// Schema for the `InstalledPlugin` type. +// Installed plugin record from global state, with marketplace, version, install time, +// enabled state, cache path, and source. // Experimental: InstalledPlugin is part of an experimental API and may change or be removed. type InstalledPlugin struct { // Path where the plugin is cached locally @@ -2262,7 +2510,8 @@ type InstalledPluginSource struct { String *string } -// Schema for the `InstalledPluginSourceGitHub` type. +// Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref, +// and optional subpath. // Experimental: InstalledPluginSourceGitHub is part of an experimental API and may change // or be removed. type InstalledPluginSourceGitHub struct { @@ -2273,7 +2522,7 @@ type InstalledPluginSourceGitHub struct { Source InstalledPluginSourceGitHubSource `json:"source"` } -// Schema for the `InstalledPluginSourceLocal` type. +// Source descriptor for a direct local plugin install, with a local filesystem path. // Experimental: InstalledPluginSourceLocal is part of an experimental API and may change or // be removed. type InstalledPluginSourceLocal struct { @@ -2282,7 +2531,8 @@ type InstalledPluginSourceLocal struct { Source InstalledPluginSourceLocalSource `json:"source"` } -// Schema for the `InstalledPluginSourceUrl` type. +// Source descriptor for a direct URL plugin install, with URL, optional ref, and optional +// subpath. // Experimental: InstalledPluginSourceURL is part of an experimental API and may change or // be removed. type InstalledPluginSourceURL struct { @@ -2293,7 +2543,8 @@ type InstalledPluginSourceURL struct { URL string `json:"url"` } -// Schema for the `InstructionDiscoveryPath` type. +// Canonical file or directory where custom instructions can be discovered or created, with +// location, kind, preference, and project path. // Experimental: InstructionDiscoveryPath is part of an experimental API and may change or // be removed. type InstructionDiscoveryPath struct { @@ -2352,7 +2603,8 @@ type InstructionsGetSourcesResult struct { Sources []InstructionSource `json:"sources"` } -// Schema for the `InstructionSource` type. +// Loaded instruction source for a session, including path, content, category, location, +// applicability, and optional description. // Experimental: InstructionSource is part of an experimental API and may change or be // removed. type InstructionSource struct { @@ -2420,9 +2672,35 @@ type LlmInferenceHTTPRequestChunkResult struct { // Experimental: LlmInferenceHTTPRequestStartRequest is part of an experimental API and may // change or be removed. type LlmInferenceHTTPRequestStartRequest struct { + // Stable per-agent-instance id attributing this request to a specific agent trajectory. + // Present when the request originates from an agent turn; absent for requests issued + // outside any agent context (e.g. some SDK callers). A request with an `agentId` but no + // `parentAgentId` is a root-agent request; one carrying both is a subagent request. Sourced + // from the runtime's per-request agent context and surfaced on the envelope independently + // of transport, so it is available for both first-party (CAPI) and BYOK/custom-provider + // requests; on the CAPI transport the runtime derives the upstream `X-Agent-Task-Id` header + // from this same context. Consumers routing each provider call to a training trajectory + // should key on this rather than on lifecycle events, since it is available on the request + // path before sampling. + AgentID *string `json:"agentId,omitempty"` Headers map[string][]string `json:"headers"` + // Coarse classification of the interaction that produced this request. Open string for + // forward-compatibility; known values include `conversation-agent`, + // `conversation-subagent`, `conversation-sampling`, `conversation-background`, + // `conversation-compaction`, and `conversation-user`. Absent when the runtime did not + // classify the request. Comes from the runtime's per-request agent context independently of + // transport; on the CAPI transport the runtime derives the upstream `X-Interaction-Type` + // header from this same context. + InteractionType *string `json:"interactionType,omitempty"` // HTTP method, e.g. GET, POST. Method string `json:"method"` + // Id of the parent agent that spawned the agent issuing this request. Present only for + // subagent requests; absent for root-agent requests and non-agent requests. Combined with + // `agentId`, this lets consumers attribute a call to a child trajectory versus the root. + // Like `agentId`, it comes from the runtime's per-request agent context independently of + // transport; on the CAPI transport the runtime derives the upstream `X-Parent-Agent-Id` + // header from this same context. + ParentAgentID *string `json:"parentAgentId,omitempty"` // Opaque runtime-minted id, unique per in-flight request. The SDK uses this to correlate // httpRequestChunk frames and to address its httpResponseStart / httpResponseChunk replies // back to the runtime. @@ -2518,7 +2796,8 @@ type LlmInferenceSetProviderResult struct { Success bool `json:"success"` } -// Schema for the `LocalSessionMetadataValue` type. +// Persisted local session metadata, including identifiers, timestamps, summary/name, +// client, context, detached state, and task ID. // Experimental: LocalSessionMetadataValue is part of an experimental API and may change or // be removed. type LocalSessionMetadataValue struct { @@ -2634,7 +2913,8 @@ type MarketplacePluginInfo struct { Name string `json:"name"` } -// Schema for the `MarketplaceRefreshEntry` type. +// Per-marketplace refresh result, including marketplace name, success flag, and optional +// failure error. // Experimental: MarketplaceRefreshEntry is part of an experimental API and may change or be // removed. type MarketplaceRefreshEntry struct { @@ -2665,7 +2945,7 @@ type MarketplaceRemoveResult struct { Removed bool `json:"removed"` } -// Schema for the `McpAllowedServer` type. +// MCP server allowed by policy, with server name and optional PII-free explanatory note. // Experimental: MCPAllowedServer is part of an experimental API and may change or be // removed. type MCPAllowedServer struct { @@ -2801,7 +3081,8 @@ type MCPAppsReadResourceResult struct { Contents []MCPAppsResourceContent `json:"contents"` } -// Schema for the `McpAppsResourceContent` type. +// MCP Apps resource content with URI, optional MIME type, text or base64 blob, and resource +// metadata. // Experimental: MCPAppsResourceContent is part of an experimental API and may change or be // removed. type MCPAppsResourceContent struct { @@ -3035,7 +3316,8 @@ type MCPExecuteSamplingRequest struct { type MCPExecuteSamplingResult struct { } -// Schema for the `McpFilteredServer` type. +// MCP server filtered by policy, with name, reason, optional redacted reason, and +// enterprise login. // Experimental: MCPFilteredServer is part of an experimental API and may change or be // removed. type MCPFilteredServer struct { @@ -3361,7 +3643,7 @@ type MCPSamplingExecutionResult struct { Result *MCPExecuteSamplingResult `json:"result,omitempty"` } -// Schema for the `McpServer` type. +// MCP server status entry, including config source/plugin source and any connection error. // Experimental: MCPServer is part of an experimental API and may change or be removed. type MCPServer struct { // Error message if the server failed to connect @@ -3559,7 +3841,7 @@ type MCPStopServerRequest struct { ServerName string `json:"serverName"` } -// Schema for the `McpTools` type. +// MCP tool metadata with tool name and optional description. // Experimental: MCPTools is part of an experimental API and may change or be removed. type MCPTools struct { // Tool description, when provided. @@ -3739,7 +4021,8 @@ type MetadataSnapshotRemoteMetadataRepository struct { Owner string `json:"owner"` } -// Schema for the `Model` type. +// Copilot model metadata, including identifier, display name, capabilities, policy, +// billing, reasoning efforts, and picker categories. // Experimental: Model is part of an experimental API and may change or be removed. type Model struct { // Billing information @@ -4103,7 +4386,8 @@ type OpenCanvasInstance struct { URL *string `json:"url,omitempty"` } -// Schema for the `OptionsUpdateAdditionalContentExclusionPolicy` type. +// Content-exclusion policy supplied to `session.options.update`, with rules, last-updated +// data, and scope. // Experimental: OptionsUpdateAdditionalContentExclusionPolicy is part of an experimental // API and may change or be removed. type OptionsUpdateAdditionalContentExclusionPolicy struct { @@ -4113,18 +4397,21 @@ type OptionsUpdateAdditionalContentExclusionPolicy struct { Scope OptionsUpdateAdditionalContentExclusionPolicyScope `json:"scope"` } -// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRule` type. +// Single content-exclusion rule supplied to `session.options.update`, with paths, match +// conditions, and source. // Experimental: OptionsUpdateAdditionalContentExclusionPolicyRule is part of an // experimental API and may change or be removed. type OptionsUpdateAdditionalContentExclusionPolicyRule struct { IfAnyMatch []string `json:"ifAnyMatch,omitzero"` IfNoneMatch []string `json:"ifNoneMatch,omitzero"` Paths []string `json:"paths"` - // Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. + // Source descriptor for a `session.options.update` content-exclusion rule, with source name + // and type. Source OptionsUpdateAdditionalContentExclusionPolicyRuleSource `json:"source"` } -// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. +// Source descriptor for a `session.options.update` content-exclusion rule, with source name +// and type. // Experimental: OptionsUpdateAdditionalContentExclusionPolicyRuleSource is part of an // experimental API and may change or be removed. type OptionsUpdateAdditionalContentExclusionPolicyRuleSource struct { @@ -4132,7 +4419,8 @@ type OptionsUpdateAdditionalContentExclusionPolicyRuleSource struct { Type string `json:"type"` } -// Schema for the `PendingPermissionRequest` type. +// Pending permission prompt reconstructed from event history, with request ID and +// user-facing prompt details. // Experimental: PendingPermissionRequest is part of an experimental API and may change or // be removed. type PendingPermissionRequest struct { @@ -4172,7 +4460,7 @@ func (r RawPermissionDecisionData) Kind() PermissionDecisionKind { return r.Discriminator } -// Schema for the `PermissionDecisionApproved` type. +// Permission-decision variant indicating the request was approved. // Experimental: PermissionDecisionApproved is part of an experimental API and may change or // be removed. type PermissionDecisionApproved struct { @@ -4183,7 +4471,8 @@ func (PermissionDecisionApproved) Kind() PermissionDecisionKind { return PermissionDecisionKindApproved } -// Schema for the `PermissionDecisionApprovedForLocation` type. +// Permission-decision variant indicating approval was persisted for a project location, +// with approval details and location key. // Experimental: PermissionDecisionApprovedForLocation is part of an experimental API and // may change or be removed. type PermissionDecisionApprovedForLocation struct { @@ -4198,7 +4487,8 @@ func (PermissionDecisionApprovedForLocation) Kind() PermissionDecisionKind { return PermissionDecisionKindApprovedForLocation } -// Schema for the `PermissionDecisionApprovedForSession` type. +// Permission-decision variant indicating approval was remembered for the session, with +// approval details. // Experimental: PermissionDecisionApprovedForSession is part of an experimental API and may // change or be removed. type PermissionDecisionApprovedForSession struct { @@ -4211,7 +4501,8 @@ func (PermissionDecisionApprovedForSession) Kind() PermissionDecisionKind { return PermissionDecisionKindApprovedForSession } -// Schema for the `PermissionDecisionApproveForLocation` type. +// Permission-decision request variant to approve and persist a permission for a project +// location, with approval details and location key. // Experimental: PermissionDecisionApproveForLocation is part of an experimental API and may // change or be removed. type PermissionDecisionApproveForLocation struct { @@ -4226,7 +4517,8 @@ func (PermissionDecisionApproveForLocation) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveForLocation } -// Schema for the `PermissionDecisionApproveForSession` type. +// Permission-decision request variant to approve for the rest of the session, with optional +// tool approval or URL domain. // Experimental: PermissionDecisionApproveForSession is part of an experimental API and may // change or be removed. type PermissionDecisionApproveForSession struct { @@ -4241,7 +4533,7 @@ func (PermissionDecisionApproveForSession) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveForSession } -// Schema for the `PermissionDecisionApproveOnce` type. +// Permission-decision request variant to approve only the current permission request. // Experimental: PermissionDecisionApproveOnce is part of an experimental API and may change // or be removed. type PermissionDecisionApproveOnce struct { @@ -4252,7 +4544,7 @@ func (PermissionDecisionApproveOnce) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveOnce } -// Schema for the `PermissionDecisionApprovePermanently` type. +// Permission-decision request variant to permanently approve a URL domain across sessions. // Experimental: PermissionDecisionApprovePermanently is part of an experimental API and may // change or be removed. type PermissionDecisionApprovePermanently struct { @@ -4265,7 +4557,8 @@ func (PermissionDecisionApprovePermanently) Kind() PermissionDecisionKind { return PermissionDecisionKindApprovePermanently } -// Schema for the `PermissionDecisionCancelled` type. +// Permission-decision variant indicating the request was cancelled before use, with an +// optional reason. // Experimental: PermissionDecisionCancelled is part of an experimental API and may change // or be removed. type PermissionDecisionCancelled struct { @@ -4278,7 +4571,8 @@ func (PermissionDecisionCancelled) Kind() PermissionDecisionKind { return PermissionDecisionKindCancelled } -// Schema for the `PermissionDecisionDeniedByContentExclusionPolicy` type. +// Permission-decision variant indicating denial by content-exclusion policy, with path and +// message. // Experimental: PermissionDecisionDeniedByContentExclusionPolicy is part of an experimental // API and may change or be removed. type PermissionDecisionDeniedByContentExclusionPolicy struct { @@ -4293,7 +4587,8 @@ func (PermissionDecisionDeniedByContentExclusionPolicy) Kind() PermissionDecisio return PermissionDecisionKindDeniedByContentExclusionPolicy } -// Schema for the `PermissionDecisionDeniedByPermissionRequestHook` type. +// Permission-decision variant indicating denial by a permission request hook, with optional +// message and interrupt flag. // Experimental: PermissionDecisionDeniedByPermissionRequestHook is part of an experimental // API and may change or be removed. type PermissionDecisionDeniedByPermissionRequestHook struct { @@ -4308,7 +4603,8 @@ func (PermissionDecisionDeniedByPermissionRequestHook) Kind() PermissionDecision return PermissionDecisionKindDeniedByPermissionRequestHook } -// Schema for the `PermissionDecisionDeniedByRules` type. +// Permission-decision variant indicating explicit denial by permission rules, with the +// matching rules. // Experimental: PermissionDecisionDeniedByRules is part of an experimental API and may // change or be removed. type PermissionDecisionDeniedByRules struct { @@ -4321,7 +4617,8 @@ func (PermissionDecisionDeniedByRules) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedByRules } -// Schema for the `PermissionDecisionDeniedInteractivelyByUser` type. +// Permission-decision variant indicating the user denied an interactive prompt, with +// optional feedback and force-reject flag. // Experimental: PermissionDecisionDeniedInteractivelyByUser is part of an experimental API // and may change or be removed. type PermissionDecisionDeniedInteractivelyByUser struct { @@ -4336,7 +4633,8 @@ func (PermissionDecisionDeniedInteractivelyByUser) Kind() PermissionDecisionKind return PermissionDecisionKindDeniedInteractivelyByUser } -// Schema for the `PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type. +// Permission-decision variant indicating no approval rule matched and user confirmation was +// unavailable. // Experimental: PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser is part of // an experimental API and may change or be removed. type PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser struct { @@ -4347,7 +4645,8 @@ func (PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) Kind() P return PermissionDecisionKindDeniedNoApprovalRuleAndCouldNotRequestFromUser } -// Schema for the `PermissionDecisionReject` type. +// Permission-decision request variant to reject a pending permission request, with optional +// feedback. // Experimental: PermissionDecisionReject is part of an experimental API and may change or // be removed. type PermissionDecisionReject struct { @@ -4360,7 +4659,7 @@ func (PermissionDecisionReject) Kind() PermissionDecisionKind { return PermissionDecisionKindReject } -// Schema for the `PermissionDecisionUserNotAvailable` type. +// Permission-decision variant indicating no user was available to confirm the request. // Experimental: PermissionDecisionUserNotAvailable is part of an experimental API and may // change or be removed. type PermissionDecisionUserNotAvailable struct { @@ -4390,7 +4689,7 @@ func (r RawPermissionDecisionApproveForLocationApprovalData) Kind() PermissionDe return r.Discriminator } -// Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type. +// Location-scoped approval details for specific command identifiers. // Experimental: PermissionDecisionApproveForLocationApprovalCommands is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForLocationApprovalCommands struct { @@ -4404,7 +4703,7 @@ func (PermissionDecisionApproveForLocationApprovalCommands) Kind() PermissionDec return PermissionDecisionApproveForLocationApprovalKindCommands } -// Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type. +// Location-scoped approval details for a custom tool, keyed by tool name. // Experimental: PermissionDecisionApproveForLocationApprovalCustomTool is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForLocationApprovalCustomTool struct { @@ -4418,7 +4717,8 @@ func (PermissionDecisionApproveForLocationApprovalCustomTool) Kind() PermissionD return PermissionDecisionApproveForLocationApprovalKindCustomTool } -// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type. +// Location-scoped approval details for extension-management operations, optionally narrowed +// by operation. // Experimental: PermissionDecisionApproveForLocationApprovalExtensionManagement is part of // an experimental API and may change or be removed. type PermissionDecisionApproveForLocationApprovalExtensionManagement struct { @@ -4433,8 +4733,8 @@ func (PermissionDecisionApproveForLocationApprovalExtensionManagement) Kind() Pe return PermissionDecisionApproveForLocationApprovalKindExtensionManagement } -// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` -// type. +// Location-scoped approval details for an extension's permission-gated capability access, +// keyed by extension name. // Experimental: PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess is // part of an experimental API and may change or be removed. type PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess struct { @@ -4448,7 +4748,8 @@ func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) Kin return PermissionDecisionApproveForLocationApprovalKindExtensionPermissionAccess } -// Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type. +// Location-scoped approval details for an MCP server tool, or all tools on the server when +// `toolName` is null. // Experimental: PermissionDecisionApproveForLocationApprovalMCP is part of an experimental // API and may change or be removed. type PermissionDecisionApproveForLocationApprovalMCP struct { @@ -4464,7 +4765,7 @@ func (PermissionDecisionApproveForLocationApprovalMCP) Kind() PermissionDecision return PermissionDecisionApproveForLocationApprovalKindMCP } -// Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type. +// Location-scoped approval details for MCP sampling requests from a server. // Experimental: PermissionDecisionApproveForLocationApprovalMCPSampling is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForLocationApprovalMCPSampling struct { @@ -4478,7 +4779,7 @@ func (PermissionDecisionApproveForLocationApprovalMCPSampling) Kind() Permission return PermissionDecisionApproveForLocationApprovalKindMCPSampling } -// Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type. +// Location-scoped approval details for writes to long-term memory. // Experimental: PermissionDecisionApproveForLocationApprovalMemory is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForLocationApprovalMemory struct { @@ -4490,7 +4791,7 @@ func (PermissionDecisionApproveForLocationApprovalMemory) Kind() PermissionDecis return PermissionDecisionApproveForLocationApprovalKindMemory } -// Schema for the `PermissionDecisionApproveForLocationApprovalRead` type. +// Location-scoped approval details for read-only filesystem operations. // Experimental: PermissionDecisionApproveForLocationApprovalRead is part of an experimental // API and may change or be removed. type PermissionDecisionApproveForLocationApprovalRead struct { @@ -4502,7 +4803,7 @@ func (PermissionDecisionApproveForLocationApprovalRead) Kind() PermissionDecisio return PermissionDecisionApproveForLocationApprovalKindRead } -// Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type. +// Location-scoped approval details for filesystem write operations. // Experimental: PermissionDecisionApproveForLocationApprovalWrite is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForLocationApprovalWrite struct { @@ -4533,7 +4834,7 @@ func (r RawPermissionDecisionApproveForSessionApprovalData) Kind() PermissionDec return r.Discriminator } -// Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type. +// Session-scoped approval details for specific command identifiers. // Experimental: PermissionDecisionApproveForSessionApprovalCommands is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForSessionApprovalCommands struct { @@ -4547,7 +4848,7 @@ func (PermissionDecisionApproveForSessionApprovalCommands) Kind() PermissionDeci return PermissionDecisionApproveForSessionApprovalKindCommands } -// Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type. +// Session-scoped approval details for a custom tool, keyed by tool name. // Experimental: PermissionDecisionApproveForSessionApprovalCustomTool is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForSessionApprovalCustomTool struct { @@ -4561,7 +4862,8 @@ func (PermissionDecisionApproveForSessionApprovalCustomTool) Kind() PermissionDe return PermissionDecisionApproveForSessionApprovalKindCustomTool } -// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type. +// Session-scoped approval details for extension-management operations, optionally narrowed +// by operation. // Experimental: PermissionDecisionApproveForSessionApprovalExtensionManagement is part of // an experimental API and may change or be removed. type PermissionDecisionApproveForSessionApprovalExtensionManagement struct { @@ -4576,8 +4878,8 @@ func (PermissionDecisionApproveForSessionApprovalExtensionManagement) Kind() Per return PermissionDecisionApproveForSessionApprovalKindExtensionManagement } -// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` -// type. +// Session-scoped approval details for an extension's permission-gated capability access, +// keyed by extension name. // Experimental: PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess is // part of an experimental API and may change or be removed. type PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess struct { @@ -4591,7 +4893,8 @@ func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) Kind return PermissionDecisionApproveForSessionApprovalKindExtensionPermissionAccess } -// Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type. +// Session-scoped approval details for an MCP server tool, or all tools on the server when +// `toolName` is null. // Experimental: PermissionDecisionApproveForSessionApprovalMCP is part of an experimental // API and may change or be removed. type PermissionDecisionApproveForSessionApprovalMCP struct { @@ -4606,7 +4909,7 @@ func (PermissionDecisionApproveForSessionApprovalMCP) Kind() PermissionDecisionA return PermissionDecisionApproveForSessionApprovalKindMCP } -// Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type. +// Session-scoped approval details for MCP sampling requests from a server. // Experimental: PermissionDecisionApproveForSessionApprovalMCPSampling is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForSessionApprovalMCPSampling struct { @@ -4620,7 +4923,7 @@ func (PermissionDecisionApproveForSessionApprovalMCPSampling) Kind() PermissionD return PermissionDecisionApproveForSessionApprovalKindMCPSampling } -// Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type. +// Session-scoped approval details for writes to long-term memory. // Experimental: PermissionDecisionApproveForSessionApprovalMemory is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForSessionApprovalMemory struct { @@ -4632,7 +4935,7 @@ func (PermissionDecisionApproveForSessionApprovalMemory) Kind() PermissionDecisi return PermissionDecisionApproveForSessionApprovalKindMemory } -// Schema for the `PermissionDecisionApproveForSessionApprovalRead` type. +// Session-scoped approval details for read-only filesystem operations. // Experimental: PermissionDecisionApproveForSessionApprovalRead is part of an experimental // API and may change or be removed. type PermissionDecisionApproveForSessionApprovalRead struct { @@ -4644,7 +4947,7 @@ func (PermissionDecisionApproveForSessionApprovalRead) Kind() PermissionDecision return PermissionDecisionApproveForSessionApprovalKindRead } -// Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type. +// Session-scoped approval details for filesystem write operations. // Experimental: PermissionDecisionApproveForSessionApprovalWrite is part of an experimental // API and may change or be removed. type PermissionDecisionApproveForSessionApprovalWrite struct { @@ -4820,7 +5123,8 @@ type PermissionRequestResult struct { Success bool `json:"success"` } -// Schema for the `PermissionRule` type. +// A permission approval or denial rule matched against a tool request, identified by a rule +// kind with an optional argument value. // Experimental: PermissionRule is part of an experimental API and may change or be removed. type PermissionRule struct { // Argument value matched against the request, or null when the rule kind has no argument @@ -4841,7 +5145,8 @@ type PermissionRulesSet struct { Denied []PermissionRule `json:"denied"` } -// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicy` type. +// Content-exclusion policy supplied to `session.permissions.configure`, with rules, +// last-updated data, and scope. // Experimental: PermissionsConfigureAdditionalContentExclusionPolicy is part of an // experimental API and may change or be removed. type PermissionsConfigureAdditionalContentExclusionPolicy struct { @@ -4852,18 +5157,21 @@ type PermissionsConfigureAdditionalContentExclusionPolicy struct { Scope PermissionsConfigureAdditionalContentExclusionPolicyScope `json:"scope"` } -// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRule` type. +// Single content-exclusion rule supplied to `session.permissions.configure`, with paths, +// match conditions, and source. // Experimental: PermissionsConfigureAdditionalContentExclusionPolicyRule is part of an // experimental API and may change or be removed. type PermissionsConfigureAdditionalContentExclusionPolicyRule struct { IfAnyMatch []string `json:"ifAnyMatch,omitzero"` IfNoneMatch []string `json:"ifNoneMatch,omitzero"` Paths []string `json:"paths"` - // Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type. + // Source descriptor for a `session.permissions.configure` content-exclusion rule, with + // source name and type. Source PermissionsConfigureAdditionalContentExclusionPolicyRuleSource `json:"source"` } -// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type. +// Source descriptor for a `session.permissions.configure` content-exclusion rule, with +// source name and type. // Experimental: PermissionsConfigureAdditionalContentExclusionPolicyRuleSource is part of // an experimental API and may change or be removed. type PermissionsConfigureAdditionalContentExclusionPolicyRuleSource struct { @@ -4939,7 +5247,7 @@ func (r RawPermissionsLocationsAddToolApprovalDetailsData) Kind() PermissionsLoc return r.Discriminator } -// Schema for the `PermissionsLocationsAddToolApprovalDetailsCommands` type. +// Location-persisted tool approval details for specific command identifiers. // Experimental: PermissionsLocationsAddToolApprovalDetailsCommands is part of an // experimental API and may change or be removed. type PermissionsLocationsAddToolApprovalDetailsCommands struct { @@ -4953,7 +5261,7 @@ func (PermissionsLocationsAddToolApprovalDetailsCommands) Kind() PermissionsLoca return PermissionsLocationsAddToolApprovalDetailsKindCommands } -// Schema for the `PermissionsLocationsAddToolApprovalDetailsCustomTool` type. +// Location-persisted tool approval details for a custom tool, keyed by tool name. // Experimental: PermissionsLocationsAddToolApprovalDetailsCustomTool is part of an // experimental API and may change or be removed. type PermissionsLocationsAddToolApprovalDetailsCustomTool struct { @@ -4967,7 +5275,8 @@ func (PermissionsLocationsAddToolApprovalDetailsCustomTool) Kind() PermissionsLo return PermissionsLocationsAddToolApprovalDetailsKindCustomTool } -// Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionManagement` type. +// Location-persisted tool approval details for extension-management operations, optionally +// narrowed by operation. // Experimental: PermissionsLocationsAddToolApprovalDetailsExtensionManagement is part of an // experimental API and may change or be removed. type PermissionsLocationsAddToolApprovalDetailsExtensionManagement struct { @@ -4982,7 +5291,8 @@ func (PermissionsLocationsAddToolApprovalDetailsExtensionManagement) Kind() Perm return PermissionsLocationsAddToolApprovalDetailsKindExtensionManagement } -// Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess` type. +// Location-persisted tool approval details for an extension's permission-gated capability +// access, keyed by extension name. // Experimental: PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess is part // of an experimental API and may change or be removed. type PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess struct { @@ -4996,7 +5306,8 @@ func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) Kind( return PermissionsLocationsAddToolApprovalDetailsKindExtensionPermissionAccess } -// Schema for the `PermissionsLocationsAddToolApprovalDetailsMcp` type. +// Location-persisted tool approval details for an MCP server tool, or all tools when +// `toolName` is null. // Experimental: PermissionsLocationsAddToolApprovalDetailsMCP is part of an experimental // API and may change or be removed. type PermissionsLocationsAddToolApprovalDetailsMCP struct { @@ -5011,7 +5322,7 @@ func (PermissionsLocationsAddToolApprovalDetailsMCP) Kind() PermissionsLocations return PermissionsLocationsAddToolApprovalDetailsKindMCP } -// Schema for the `PermissionsLocationsAddToolApprovalDetailsMcpSampling` type. +// Location-persisted tool approval details for MCP sampling requests from a server. // Experimental: PermissionsLocationsAddToolApprovalDetailsMCPSampling is part of an // experimental API and may change or be removed. type PermissionsLocationsAddToolApprovalDetailsMCPSampling struct { @@ -5025,7 +5336,7 @@ func (PermissionsLocationsAddToolApprovalDetailsMCPSampling) Kind() PermissionsL return PermissionsLocationsAddToolApprovalDetailsKindMCPSampling } -// Schema for the `PermissionsLocationsAddToolApprovalDetailsMemory` type. +// Location-persisted tool approval details for writes to long-term memory. // Experimental: PermissionsLocationsAddToolApprovalDetailsMemory is part of an experimental // API and may change or be removed. type PermissionsLocationsAddToolApprovalDetailsMemory struct { @@ -5037,7 +5348,7 @@ func (PermissionsLocationsAddToolApprovalDetailsMemory) Kind() PermissionsLocati return PermissionsLocationsAddToolApprovalDetailsKindMemory } -// Schema for the `PermissionsLocationsAddToolApprovalDetailsRead` type. +// Location-persisted tool approval details for read-only filesystem operations. // Experimental: PermissionsLocationsAddToolApprovalDetailsRead is part of an experimental // API and may change or be removed. type PermissionsLocationsAddToolApprovalDetailsRead struct { @@ -5048,7 +5359,7 @@ func (PermissionsLocationsAddToolApprovalDetailsRead) Kind() PermissionsLocation return PermissionsLocationsAddToolApprovalDetailsKindRead } -// Schema for the `PermissionsLocationsAddToolApprovalDetailsWrite` type. +// Location-persisted tool approval details for filesystem write operations. // Experimental: PermissionsLocationsAddToolApprovalDetailsWrite is part of an experimental // API and may change or be removed. type PermissionsLocationsAddToolApprovalDetailsWrite struct { @@ -5142,12 +5453,19 @@ type PermissionsResetSessionApprovalsResult struct { Success bool `json:"success"` } -// Whether to enable full allow-all permissions for the session. +// Allow-all mode to apply for the session. // Experimental: PermissionsSetAllowAllRequest is part of an experimental API and may change // or be removed. type PermissionsSetAllowAllRequest struct { - // Whether to enable full allow-all permissions - Enabled bool `json:"enabled"` + // Legacy full allow-all toggle. Prefer `mode`; when `mode` is omitted, `enabled: true` is + // treated as `mode: "on"` and any other value is treated as `mode: "off"`. + Enabled *bool `json:"enabled,omitempty"` + // Allow-all mode to apply. `on` enables full allow-all; `auto` enables advisory LLM + // auto-approval; `off` disables both. + Mode *PermissionsAllowAllMode `json:"mode,omitempty"` + // Optional model id for the `auto` mode auto-approval LLM judging. Only meaningful when + // `mode` is `auto`; ignored otherwise. When omitted, the session's active model is used. + Model *string `json:"model,omitempty"` // Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers. Source *PermissionsSetAllowAllSource `json:"source,omitempty"` } @@ -5303,7 +5621,7 @@ type PlanUpdateRequest struct { Content string `json:"content"` } -// Schema for the `Plugin` type. +// Session plugin metadata, with name, marketplace, optional version, and enabled state. // Experimental: Plugin is part of an experimental API and may change or be removed. type Plugin struct { // Whether the plugin is currently enabled @@ -5469,7 +5787,8 @@ type PluginsUpdateRequest struct { Name string `json:"name"` } -// Schema for the `PluginUpdateAllEntry` type. +// Per-plugin result from updating all plugins, with versions, skills installed, success +// flag, and optional error. // Experimental: PluginUpdateAllEntry is part of an experimental API and may change or be // removed. type PluginUpdateAllEntry struct { @@ -5683,7 +6002,8 @@ type ProviderTokenAcquireResult struct { Token string `json:"token"` } -// Schema for the `PushAttachment` type. +// Attachment union accepted by push input, covering files, directories, GitHub objects, +// blobs, snippets, and extension context. // Experimental: PushAttachment is part of an experimental API and may change or be removed. type PushAttachment interface { pushAttachment() @@ -6055,7 +6375,8 @@ type QueuedCommandResult interface { Handled() bool } -// Schema for the `QueuedCommandHandled` type. +// Queued-command response indicating the host executed the command, with an optional flag +// to stop queue processing. // Experimental: QueuedCommandHandled is part of an experimental API and may change or be // removed. type QueuedCommandHandled struct { @@ -6069,7 +6390,8 @@ func (QueuedCommandHandled) Handled() bool { return true } -// Schema for the `QueuedCommandNotHandled` type. +// Queued-command response indicating the host did not execute the command and the queue may +// continue. // Experimental: QueuedCommandNotHandled is part of an experimental API and may change or be // removed. type QueuedCommandNotHandled struct { @@ -6080,7 +6402,8 @@ func (QueuedCommandNotHandled) Handled() bool { return false } -// Schema for the `QueuePendingItems` type. +// User-facing pending queue entry, with kind and display text for a queued message, slash +// command, or model change. // Experimental: QueuePendingItems is part of an experimental API and may change or be // removed. type QueuePendingItems struct { @@ -6459,14 +6782,10 @@ type SandboxConfigUserPolicyFilesystem struct { // Experimental: SandboxConfigUserPolicyNetwork is part of an experimental API and may // change or be removed. type SandboxConfigUserPolicyNetwork struct { - // Hosts allowed in addition to the base policy. - AllowedHosts []string `json:"allowedHosts,omitzero"` // Whether traffic to local/loopback addresses is allowed. AllowLocalNetwork *bool `json:"allowLocalNetwork,omitempty"` // Whether outbound network traffic is allowed at all. AllowOutbound *bool `json:"allowOutbound,omitempty"` - // Hosts explicitly blocked. - BlockedHosts []string `json:"blockedHosts,omitzero"` } // macOS seatbelt-specific options. @@ -6477,7 +6796,8 @@ type SandboxConfigUserPolicySeatbelt struct { KeychainAccess *bool `json:"keychainAccess,omitempty"` } -// Schema for the `ScheduleEntry` type. +// Scheduled prompt entry with ID, timing (`intervalMs`, `cron`, or `at`), prompt text, +// recurrence, and next run time. // Experimental: ScheduleEntry is part of an experimental API and may change or be removed. type ScheduleEntry struct { // Absolute fire time (epoch milliseconds) for a one-shot calendar schedule. @@ -6625,7 +6945,8 @@ type ServerInstructionSourceList struct { Sources []InstructionSource `json:"sources"` } -// Schema for the `ServerSkill` type. +// Server-side skill metadata, including name, description, source, enabled/invocable state, +// path, project path, and argument hint. // Experimental: ServerSkill is part of an experimental API and may change or be removed. type ServerSkill struct { // Optional freeform hint describing the skill's expected arguments, from the @@ -6916,7 +7237,8 @@ type SessionFSReaddirResult struct { Error *SessionFSError `json:"error,omitempty"` } -// Schema for the `SessionFsReaddirWithTypesEntry` type. +// Directory entry returned by session filesystem `readdirWithTypes`, with name and entry +// type. // Experimental: SessionFSReaddirWithTypesEntry is part of an experimental API and may // change or be removed. type SessionFSReaddirWithTypesEntry struct { @@ -7118,7 +7440,8 @@ type SessionFSWriteFileRequest struct { SessionID string `json:"sessionId"` } -// Schema for the `SessionInstalledPlugin` type. +// Installed plugin record for a session, with marketplace, version, install time, enabled +// state, cache path, and source. // Experimental: SessionInstalledPlugin is part of an experimental API and may change or be // removed. type SessionInstalledPlugin struct { @@ -7148,7 +7471,8 @@ type SessionInstalledPluginSource struct { String *string } -// Schema for the `SessionInstalledPluginSourceGitHub` type. +// Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref, +// and optional subpath. // Experimental: SessionInstalledPluginSourceGitHub is part of an experimental API and may // change or be removed. type SessionInstalledPluginSourceGitHub struct { @@ -7159,7 +7483,7 @@ type SessionInstalledPluginSourceGitHub struct { Source SessionInstalledPluginSourceGitHubSource `json:"source"` } -// Schema for the `SessionInstalledPluginSourceLocal` type. +// Source descriptor for a direct local plugin install, with a local filesystem path. // Experimental: SessionInstalledPluginSourceLocal is part of an experimental API and may // change or be removed. type SessionInstalledPluginSourceLocal struct { @@ -7168,7 +7492,8 @@ type SessionInstalledPluginSourceLocal struct { Source SessionInstalledPluginSourceLocalSource `json:"source"` } -// Schema for the `SessionInstalledPluginSourceUrl` type. +// Source descriptor for a direct URL plugin install, with URL, optional ref, and optional +// subpath. // Experimental: SessionInstalledPluginSourceURL is part of an experimental API and may // change or be removed. type SessionInstalledPluginSourceURL struct { @@ -7515,6 +7840,8 @@ type SessionOpenOptions struct { RunningInInteractiveMode *bool `json:"runningInInteractiveMode,omitempty"` // Resolved sandbox configuration. SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` + // Opt-in: self-fetch enterprise managed settings at session bootstrap. + SelfFetchManagedSettings *bool `json:"selfFetchManagedSettings,omitempty"` // Capabilities enabled for this session. SessionCapabilities []SessionCapability `json:"sessionCapabilities,omitzero"` // Optional stable session identifier to use for a new session. @@ -7537,7 +7864,8 @@ type SessionOpenOptions struct { WorkingDirectoryContext *SessionContext `json:"workingDirectoryContext,omitempty"` } -// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicy` type. +// Content-exclusion policy supplied to `sessions.open` options, with rules, last-updated +// data, and scope. // Experimental: SessionOpenOptionsAdditionalContentExclusionPolicy is part of an // experimental API and may change or be removed. type SessionOpenOptionsAdditionalContentExclusionPolicy struct { @@ -7548,18 +7876,19 @@ type SessionOpenOptionsAdditionalContentExclusionPolicy struct { Scope SessionOpenOptionsAdditionalContentExclusionPolicyScope `json:"scope"` } -// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRule` type. +// Single content-exclusion rule supplied to `sessions.open` options, with paths, match +// conditions, and source. // Experimental: SessionOpenOptionsAdditionalContentExclusionPolicyRule is part of an // experimental API and may change or be removed. type SessionOpenOptionsAdditionalContentExclusionPolicyRule struct { IfAnyMatch []string `json:"ifAnyMatch,omitzero"` IfNoneMatch []string `json:"ifNoneMatch,omitzero"` Paths []string `json:"paths"` - // Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type. + // Source descriptor for a `sessions.open` content-exclusion rule, with source name and type. Source SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource `json:"source"` } -// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type. +// Source descriptor for a `sessions.open` content-exclusion rule, with source name and type. // Experimental: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource is part of an // experimental API and may change or be removed. type SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource struct { @@ -7875,6 +8204,107 @@ type SessionSetCredentialsResult struct { Success bool `json:"success"` } +// Availability of built-in job tools surfaced to boundary consumers. +// Experimental: SessionSettingsBuiltInToolAvailabilitySnapshot is part of an experimental +// API and may change or be removed. +type SessionSettingsBuiltInToolAvailabilitySnapshot struct { + CreatePullRequest *bool `json:"createPullRequest,omitempty"` + ReportProgress *bool `json:"reportProgress,omitempty"` +} + +// Named Rust-owned settings predicate to evaluate for this session. +// Experimental: SessionSettingsEvaluatePredicateRequest is part of an experimental API and +// may change or be removed. +type SessionSettingsEvaluatePredicateRequest struct { + // Predicate name. The runtime owns the raw feature-flag names and composition logic. + Name SessionSettingsPredicateName `json:"name"` + // Tool name for tool-scoped predicates such as trivial-change handling. + ToolName *string `json:"toolName,omitempty"` +} + +// Result of evaluating a Rust-owned settings predicate. +// Experimental: SessionSettingsEvaluatePredicateResult is part of an experimental API and +// may change or be removed. +type SessionSettingsEvaluatePredicateResult struct { + Enabled bool `json:"enabled"` +} + +// Redacted job settings for a session. The job nonce is excluded. +// Experimental: SessionSettingsJobSnapshot is part of an experimental API and may change or +// be removed. +type SessionSettingsJobSnapshot struct { + BuiltInToolAvailability *SessionSettingsBuiltInToolAvailabilitySnapshot `json:"builtInToolAvailability,omitempty"` + EventType *string `json:"eventType,omitempty"` + IsTriggerJob *bool `json:"isTriggerJob,omitempty"` +} + +// Redacted model routing settings for a session. +// Experimental: SessionSettingsModelSnapshot is part of an experimental API and may change +// or be removed. +type SessionSettingsModelSnapshot struct { + CallbackURL *string `json:"callbackUrl,omitempty"` + DefaultReasoningEffort *string `json:"defaultReasoningEffort,omitempty"` + InstanceID *string `json:"instanceId,omitempty"` + Model *string `json:"model,omitempty"` +} + +// Online-evaluation settings safe to expose across the SDK boundary. +// Experimental: SessionSettingsOnlineEvaluationSnapshot is part of an experimental API and +// may change or be removed. +type SessionSettingsOnlineEvaluationSnapshot struct { + DisableOnlineEvaluation *bool `json:"disableOnlineEvaluation,omitempty"` + EnableOnlineEvaluationOutputFile *bool `json:"enableOnlineEvaluationOutputFile,omitempty"` +} + +// Redacted repository and GitHub host settings for a session. +// Experimental: SessionSettingsRepoSnapshot is part of an experimental API and may change +// or be removed. +type SessionSettingsRepoSnapshot struct { + Branch *string `json:"branch,omitempty"` + Commit *string `json:"commit,omitempty"` + Host *string `json:"host,omitempty"` + HostProtocol *string `json:"hostProtocol,omitempty"` + ID *float64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + OwnerID *float64 `json:"ownerId,omitempty"` + OwnerName *string `json:"ownerName,omitempty"` + PrCommitCount *float64 `json:"prCommitCount,omitempty"` + ReadWrite *bool `json:"readWrite,omitempty"` + SecretScanningURL *string `json:"secretScanningUrl,omitempty"` + ServerURL *string `json:"serverUrl,omitempty"` +} + +// Redacted, serializable view of session runtime settings for SDK boundary consumers. +// Secrets and raw feature flags are intentionally excluded. +// Experimental: SessionSettingsSnapshot is part of an experimental API and may change or be +// removed. +type SessionSettingsSnapshot struct { + ClientName *string `json:"clientName,omitempty"` + Job SessionSettingsJobSnapshot `json:"job"` + Model SessionSettingsModelSnapshot `json:"model"` + OnlineEvaluation SessionSettingsOnlineEvaluationSnapshot `json:"onlineEvaluation"` + Repo SessionSettingsRepoSnapshot `json:"repo"` + StartTimeMs *float64 `json:"startTimeMs,omitempty"` + TimeoutMs *float64 `json:"timeoutMs,omitempty"` + Validation SessionSettingsValidationSnapshot `json:"validation"` + Version *string `json:"version,omitempty"` +} + +// Redacted validation and memory-tool settings for a session. +// Experimental: SessionSettingsValidationSnapshot is part of an experimental API and may +// change or be removed. +type SessionSettingsValidationSnapshot struct { + AdvisoryEnabled *bool `json:"advisoryEnabled,omitempty"` + CodeqlEnabled *bool `json:"codeqlEnabled,omitempty"` + CodeReviewEnabled *bool `json:"codeReviewEnabled,omitempty"` + CodeReviewModel *string `json:"codeReviewModel,omitempty"` + DependabotTimeout *float64 `json:"dependabotTimeout,omitempty"` + MemoryStoreEnabled *bool `json:"memoryStoreEnabled,omitempty"` + MemoryVoteEnabled *bool `json:"memoryVoteEnabled,omitempty"` + SecretScanningEnabled *bool `json:"secretScanningEnabled,omitempty"` + Timeout *float64 `json:"timeout,omitempty"` +} + // UUID prefix to resolve to a unique session ID. // Experimental: SessionsFindByPrefixRequest is part of an experimental API and may change // or be removed. @@ -8056,7 +8486,7 @@ type SessionsLoadDeferredRepoHooksRequest struct { SessionID string `json:"sessionId"` } -// Schema for the `SessionsOpenProgress` type. +// `sessions.open` handoff progress update with step, status, and optional message. // Experimental: SessionsOpenProgress is part of an experimental API and may change or be // removed. type SessionsOpenProgress struct { @@ -8459,7 +8889,8 @@ type ShutdownRequest struct { Type *ShutdownType `json:"type,omitempty"` } -// Schema for the `Skill` type. +// Skill metadata available to a session, with name, description, source, enabled/invocable +// state, path, plugin, and argument hint. // Experimental: Skill is part of an experimental API and may change or be removed. type Skill struct { // Optional freeform hint describing the skill's expected arguments, from the @@ -8481,7 +8912,8 @@ type Skill struct { UserInvocable bool `json:"userInvocable"` } -// Schema for the `SkillDiscoveryPath` type. +// Canonical directory where skills can be discovered or created, with scope, preference, +// and optional project path. // Experimental: SkillDiscoveryPath is part of an experimental API and may change or be // removed. type SkillDiscoveryPath struct { @@ -8574,7 +9006,7 @@ type SkillsGetInvokedResult struct { Skills []SkillsInvokedSkill `json:"skills"` } -// Schema for the `SkillsInvokedSkill` type. +// Skill invocation record with name, path, content, allowed tools, and turn number. // Experimental: SkillsInvokedSkill is part of an experimental API and may change or be // removed. type SkillsInvokedSkill struct { @@ -8600,7 +9032,8 @@ type SkillsLoadDiagnostics struct { Warnings []string `json:"warnings"` } -// Schema for the `SlashCommandInfo` type. +// Slash-command metadata with name, aliases, description, kind, input hint, execution +// allowance, and schedulability. // Experimental: SlashCommandInfo is part of an experimental API and may change or be // removed. type SlashCommandInfo struct { @@ -8673,7 +9106,8 @@ func (r RawSlashCommandInvocationResultData) Kind() SlashCommandInvocationResult return r.Discriminator } -// Schema for the `SlashCommandAgentPromptResult` type. +// Slash-command invocation result that submits an agent prompt, with display prompt, +// optional mode, and settings-change flag. // Experimental: SlashCommandAgentPromptResult is part of an experimental API and may change // or be removed. type SlashCommandAgentPromptResult struct { @@ -8693,7 +9127,8 @@ func (SlashCommandAgentPromptResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindAgentPrompt } -// Schema for the `SlashCommandCompletedResult` type. +// Slash-command invocation result indicating completion, with optional message and +// settings-change flag. // Experimental: SlashCommandCompletedResult is part of an experimental API and may change // or be removed. type SlashCommandCompletedResult struct { @@ -8709,7 +9144,8 @@ func (SlashCommandCompletedResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindCompleted } -// Schema for the `SlashCommandSelectSubcommandResult` type. +// Slash-command invocation result asking the client to present subcommand options for a +// parent command. // Experimental: SlashCommandSelectSubcommandResult is part of an experimental API and may // change or be removed. type SlashCommandSelectSubcommandResult struct { @@ -8729,7 +9165,7 @@ func (SlashCommandSelectSubcommandResult) Kind() SlashCommandInvocationResultKin return SlashCommandInvocationResultKindSelectSubcommand } -// Schema for the `SlashCommandTextResult` type. +// Slash-command invocation result containing text output plus Markdown/ANSI rendering flags. // Experimental: SlashCommandTextResult is part of an experimental API and may change or be // removed. type SlashCommandTextResult struct { @@ -8749,7 +9185,8 @@ func (SlashCommandTextResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindText } -// Schema for the `SlashCommandSelectSubcommandOption` type. +// Selectable slash-command subcommand option with name, description, and optional group +// label. // Experimental: SlashCommandSelectSubcommandOption is part of an experimental API and may // change or be removed. type SlashCommandSelectSubcommandOption struct { @@ -8788,7 +9225,7 @@ type SubagentSettingsEntry struct { Model *string `json:"model,omitempty"` } -// Schema for the `TaskInfo` type. +// Tracked task union returned by task APIs, containing either an agent task or a shell task. // Experimental: TaskInfo is part of an experimental API and may change or be removed. type TaskInfo interface { taskInfo() @@ -8805,7 +9242,8 @@ func (r RawTaskInfoData) Type() TaskInfoType { return r.Discriminator } -// Schema for the `TaskAgentInfo` type. +// Tracked background agent task metadata, including IDs, status, timing, agent type, +// prompt, model, result, and latest response. // Experimental: TaskAgentInfo is part of an experimental API and may change or be removed. type TaskAgentInfo struct { // ISO 8601 timestamp when the current active period began @@ -8854,7 +9292,8 @@ func (TaskAgentInfo) Type() TaskInfoType { return TaskInfoTypeAgent } -// Schema for the `TaskShellInfo` type. +// Tracked shell task metadata, including ID, command, status, timing, attachment/execution +// mode, log path, and PID. // Experimental: TaskShellInfo is part of an experimental API and may change or be removed. type TaskShellInfo struct { // Whether the shell runs inside a managed PTY session or as an independent background @@ -8910,7 +9349,8 @@ func (r RawTaskProgressData) Type() TaskProgressType { return r.Discriminator } -// Schema for the `TaskAgentProgress` type. +// Progress snapshot for an agent task, with recent activity lines and optional latest +// intent. // Experimental: TaskAgentProgress is part of an experimental API and may change or be // removed. type TaskAgentProgress struct { @@ -8925,7 +9365,8 @@ func (TaskAgentProgress) Type() TaskProgressType { return TaskProgressTypeAgent } -// Schema for the `TaskShellProgress` type. +// Progress snapshot for a shell task, with recent stdout/stderr output and optional process +// ID. // Experimental: TaskShellProgress is part of an experimental API and may change or be // removed. type TaskShellProgress struct { @@ -8940,7 +9381,7 @@ func (TaskShellProgress) Type() TaskProgressType { return TaskProgressTypeShell } -// Schema for the `TaskProgressLine` type. +// Timestamped display line for task progress output or recent agent activity. // Experimental: TaskProgressLine is part of an experimental API and may change or be // removed. type TaskProgressLine struct { @@ -9110,7 +9551,8 @@ type TelemetrySetFeatureOverridesRequest struct { Features map[string]string `json:"features"` } -// Schema for the `Tool` type. +// Built-in tool metadata with identifier, optional namespaced name, description, +// input-parameter schema, and usage instructions. // Experimental: Tool is part of an experimental API and may change or be removed. type Tool struct { // Description of what the tool does @@ -9172,7 +9614,8 @@ type UIElicitationArrayAnyOfFieldItems struct { AnyOf []UIElicitationArrayAnyOfFieldItemsAnyOf `json:"anyOf"` } -// Schema for the `UIElicitationArrayAnyOfFieldItemsAnyOf` type. +// Selectable option for a UI elicitation multi-select array item, with submitted value and +// display label. // Experimental: UIElicitationArrayAnyOfFieldItemsAnyOf is part of an experimental API and // may change or be removed. type UIElicitationArrayAnyOfFieldItemsAnyOf struct { @@ -9192,7 +9635,7 @@ type UIElicitationArrayEnumFieldItems struct { Type UIElicitationArrayEnumFieldItemsType `json:"type"` } -// Schema for the `UIElicitationFieldValue` type. +// Submitted UI elicitation field value: string, number, boolean, or an array of strings. // Experimental: UIElicitationFieldValue is part of an experimental API and may change or be // removed. type UIElicitationFieldValue interface { @@ -9431,7 +9874,8 @@ func (UIElicitationStringOneOfField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeString } -// Schema for the `UIElicitationStringOneOfFieldOneOf` type. +// Selectable option for a UI elicitation single-select string field, with submitted value +// and display label. // Experimental: UIElicitationStringOneOfFieldOneOf is part of an experimental API and may // change or be removed. type UIElicitationStringOneOfFieldOneOf struct { @@ -9469,7 +9913,8 @@ type UIEphemeralQueryResult struct { Answer string `json:"answer"` } -// Schema for the `UIExitPlanModeResponse` type. +// User response for a pending exit-plan-mode request, with approval state, selected action, +// auto-approve flag, and feedback. // Experimental: UIExitPlanModeResponse is part of an experimental API and may change or be // removed. type UIExitPlanModeResponse struct { @@ -9512,7 +9957,8 @@ type UIHandlePendingElicitationRequest struct { type UIHandlePendingExitPlanModeRequest struct { // The unique request ID from the exit_plan_mode.requested event RequestID string `json:"requestId"` - // Schema for the `UIExitPlanModeResponse` type. + // User response for a pending exit-plan-mode request, with approval state, selected action, + // auto-approve flag, and feedback. Response UIExitPlanModeResponse `json:"response"` } @@ -9562,7 +10008,8 @@ type UIHandlePendingSessionLimitsExhaustedRequest struct { type UIHandlePendingUserInputRequest struct { // The unique request ID from the user_input.requested event RequestID string `json:"requestId"` - // Schema for the `UIUserInputResponse` type. + // User response for a pending user-input request, with answer text and whether it was typed + // freeform. Response UIUserInputResponse `json:"response"` } @@ -9609,7 +10056,8 @@ type UIUnregisterDirectAutoModeSwitchHandlerResult struct { Unregistered bool `json:"unregistered"` } -// Schema for the `UIUserInputResponse` type. +// User response for a pending user-input request, with answer text and whether it was typed +// freeform. // Experimental: UIUserInputResponse is part of an experimental API and may change or be // removed. type UIUserInputResponse struct { @@ -9672,7 +10120,8 @@ type UsageMetricsCodeChanges struct { LinesRemoved int64 `json:"linesRemoved"` } -// Schema for the `UsageMetricsModelMetric` type. +// Per-model usage metrics, including request counts/costs, token usage, nano-AI units, and +// per-token-type details. // Experimental: UsageMetricsModelMetric is part of an experimental API and may change or be // removed. type UsageMetricsModelMetric struct { @@ -9696,7 +10145,7 @@ type UsageMetricsModelMetricRequests struct { Count int64 `json:"count"` } -// Schema for the `UsageMetricsModelMetricTokenDetail` type. +// Per-model token-detail entry containing the accumulated token count for one token type. // Experimental: UsageMetricsModelMetricTokenDetail is part of an experimental API and may // change or be removed. type UsageMetricsModelMetricTokenDetail struct { @@ -9720,7 +10169,7 @@ type UsageMetricsModelMetricUsage struct { ReasoningTokens *int64 `json:"reasoningTokens,omitempty"` } -// Schema for the `UsageMetricsTokenDetail` type. +// Session-wide token-detail entry containing the accumulated token count for one token type. // Experimental: UsageMetricsTokenDetail is part of an experimental API and may change or be // removed. type UsageMetricsTokenDetail struct { @@ -9813,7 +10262,7 @@ func (r RawUserToolSessionApprovalData) Kind() UserToolSessionApprovalKind { return r.Discriminator } -// Schema for the `UserToolSessionApprovalCommands` type. +// Session-scoped tool-approval rule for specific shell command identifiers. // Experimental: UserToolSessionApprovalCommands is part of an experimental API and may // change or be removed. type UserToolSessionApprovalCommands struct { @@ -9826,7 +10275,7 @@ func (UserToolSessionApprovalCommands) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindCommands } -// Schema for the `UserToolSessionApprovalCustomTool` type. +// Session-scoped tool-approval rule for a custom tool, keyed by tool name. // Experimental: UserToolSessionApprovalCustomTool is part of an experimental API and may // change or be removed. type UserToolSessionApprovalCustomTool struct { @@ -9839,7 +10288,8 @@ func (UserToolSessionApprovalCustomTool) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindCustomTool } -// Schema for the `UserToolSessionApprovalExtensionManagement` type. +// Session-scoped tool-approval rule for extension-management operations, optionally +// narrowed by operation. // Experimental: UserToolSessionApprovalExtensionManagement is part of an experimental API // and may change or be removed. type UserToolSessionApprovalExtensionManagement struct { @@ -9852,7 +10302,8 @@ func (UserToolSessionApprovalExtensionManagement) Kind() UserToolSessionApproval return UserToolSessionApprovalKindExtensionManagement } -// Schema for the `UserToolSessionApprovalExtensionPermissionAccess` type. +// Session-scoped tool-approval rule for an extension's permission-gated capability access, +// keyed by extension name. // Experimental: UserToolSessionApprovalExtensionPermissionAccess is part of an experimental // API and may change or be removed. type UserToolSessionApprovalExtensionPermissionAccess struct { @@ -9865,7 +10316,8 @@ func (UserToolSessionApprovalExtensionPermissionAccess) Kind() UserToolSessionAp return UserToolSessionApprovalKindExtensionPermissionAccess } -// Schema for the `UserToolSessionApprovalMcp` type. +// Session-scoped tool-approval rule for an MCP server tool, or all tools on the server when +// `toolName` is null. // Experimental: UserToolSessionApprovalMCP is part of an experimental API and may change or // be removed. type UserToolSessionApprovalMCP struct { @@ -9880,7 +10332,7 @@ func (UserToolSessionApprovalMCP) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindMCP } -// Schema for the `UserToolSessionApprovalMemory` type. +// Session-scoped tool-approval rule for writes to long-term memory. // Experimental: UserToolSessionApprovalMemory is part of an experimental API and may change // or be removed. type UserToolSessionApprovalMemory struct { @@ -9891,7 +10343,7 @@ func (UserToolSessionApprovalMemory) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindMemory } -// Schema for the `UserToolSessionApprovalRead` type. +// Session-scoped tool-approval rule for read-only filesystem operations. // Experimental: UserToolSessionApprovalRead is part of an experimental API and may change // or be removed. type UserToolSessionApprovalRead struct { @@ -9902,7 +10354,7 @@ func (UserToolSessionApprovalRead) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindRead } -// Schema for the `UserToolSessionApprovalWrite` type. +// Session-scoped tool-approval rule for filesystem write operations. // Experimental: UserToolSessionApprovalWrite is part of an experimental API and may change // or be removed. type UserToolSessionApprovalWrite struct { @@ -9985,7 +10437,8 @@ type WorkspaceDiffResult struct { RequestedMode WorkspaceDiffMode `json:"requestedMode"` } -// Schema for the `WorkspacesCheckpoints` type. +// Workspace checkpoint metadata with assigned number, human-readable title, and checkpoint +// filename. // Experimental: WorkspacesCheckpoints is part of an experimental API and may change or be // removed. type WorkspacesCheckpoints struct { @@ -10441,6 +10894,67 @@ const ( CopilotAPITokenAuthInfoHostHTTPSGitHubCom CopilotAPITokenAuthInfoHost = "https://github.com" ) +// Kind discriminator for DebugCollectLogsDestination. +type DebugCollectLogsDestinationKind string + +const ( + DebugCollectLogsDestinationKindArchive DebugCollectLogsDestinationKind = "archive" + DebugCollectLogsDestinationKindDirectory DebugCollectLogsDestinationKind = "directory" +) + +// Kind of caller-provided debug log entry. +// Experimental: DebugCollectLogsEntryKind is part of an experimental API and may change or +// be removed. +type DebugCollectLogsEntryKind string + +const ( + // Include files from a server-local directory recursively. + DebugCollectLogsEntryKindDirectory DebugCollectLogsEntryKind = "directory" + // Include a single server-local file. + DebugCollectLogsEntryKindFile DebugCollectLogsEntryKind = "file" +) + +// How a collected debug entry should be redacted before being staged. +// Experimental: DebugCollectLogsRedaction is part of an experimental API and may change or +// be removed. +type DebugCollectLogsRedaction string + +const ( + // Redact each non-empty line as a session event JSON object, falling back to plain-text + // redaction for malformed lines. + DebugCollectLogsRedactionEventsJsonl DebugCollectLogsRedaction = "events-jsonl" + // Redact the file as plain UTF-8 log text. + DebugCollectLogsRedactionPlainText DebugCollectLogsRedaction = "plain-text" +) + +// Destination kind that was written. +// Experimental: DebugCollectLogsResultKind is part of an experimental API and may change or +// be removed. +type DebugCollectLogsResultKind string + +const ( + // A .tgz archive was written. + DebugCollectLogsResultKindArchive DebugCollectLogsResultKind = "archive" + // A directory containing redacted files was written. + DebugCollectLogsResultKindDirectory DebugCollectLogsResultKind = "directory" +) + +// Source category for a collected debug bundle entry. +// Experimental: DebugCollectLogsSource is part of an experimental API and may change or be +// removed. +type DebugCollectLogsSource string + +const ( + // Caller-provided diagnostic entry. + DebugCollectLogsSourceAdditional DebugCollectLogsSource = "additional" + // Session event log. + DebugCollectLogsSourceEvents DebugCollectLogsSource = "events" + // Process log for the session. + DebugCollectLogsSourceProcessLog DebugCollectLogsSource = "process-log" + // Interactive shell log for the session. + DebugCollectLogsSourceShellLog DebugCollectLogsSource = "shell-log" +) + // Server transport type: stdio, http, sse (deprecated), or memory // Experimental: DiscoveredMCPServerType is part of an experimental API and may change or be // removed. @@ -11133,6 +11647,21 @@ const ( PermissionLocationTypeRepo PermissionLocationType = "repo" ) +// Current or requested allow-all mode. +// Experimental: PermissionsAllowAllMode is part of an experimental API and may change or be +// removed. +type PermissionsAllowAllMode string + +const ( + // Permission requests follow the normal approval flow with an LLM advisory recommendation + // attached; clients may choose to auto-approve requests the judge evaluated as acceptable. + PermissionsAllowAllModeAuto PermissionsAllowAllMode = "auto" + // Permission requests follow the normal approval flow. + PermissionsAllowAllModeOff PermissionsAllowAllMode = "off" + // Tool, path, and URL permission requests are automatically approved. + PermissionsAllowAllModeOn PermissionsAllowAllMode = "on" +) + // Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` // enumeration. // Experimental: PermissionsConfigureAdditionalContentExclusionPolicyScope is part of an @@ -11601,6 +12130,53 @@ const ( SessionOpenParamsKindResumeLast SessionOpenParamsKind = "resumeLast" ) +// Rust-owned settings predicates exposed across the SDK boundary. Raw feature-flag names +// are intentionally not part of the contract. +// Experimental: SessionSettingsPredicateName is part of an experimental API and may change +// or be removed. +type SessionSettingsPredicateName string + +const ( + // Whether Claude Opus token-limit caps should be applied. + SessionSettingsPredicateNameCapClaudeOpusTokenLimitsEnabled SessionSettingsPredicateName = "capClaudeOpusTokenLimitsEnabled" + // Whether CCA should use the TypeScript autofind behavior. + SessionSettingsPredicateNameCcaUseTsAutofindEnabled SessionSettingsPredicateName = "ccaUseTsAutofindEnabled" + // Whether Chronicle integration is enabled. + SessionSettingsPredicateNameChronicleEnabled SessionSettingsPredicateName = "chronicleEnabled" + // Whether the co-author hook is enabled. + SessionSettingsPredicateNameCoAuthorHookEnabled SessionSettingsPredicateName = "coAuthorHookEnabled" + // Whether the CodeQL checker is enabled. + SessionSettingsPredicateNameCodeqlCheckerEnabled SessionSettingsPredicateName = "codeqlCheckerEnabled" + // Whether code-review behavior is enabled. + SessionSettingsPredicateNameCodeReviewFeatureEnabled SessionSettingsPredicateName = "codeReviewFeatureEnabled" + // Whether content-exclusion policy may self-fetch data. + SessionSettingsPredicateNameContentExclusionSelfFetchEnabled SessionSettingsPredicateName = "contentExclusionSelfFetchEnabled" + // Whether the Dependabot checker is enabled. + SessionSettingsPredicateNameDependabotCheckerEnabled SessionSettingsPredicateName = "dependabotCheckerEnabled" + // Whether the dependency checker is enabled. + SessionSettingsPredicateNameDependencyCheckerEnabled SessionSettingsPredicateName = "dependencyCheckerEnabled" + // Whether validation may run in parallel. + SessionSettingsPredicateNameParallelValidationEnabled SessionSettingsPredicateName = "parallelValidationEnabled" + // Whether runtime timing telemetry is enabled. + SessionSettingsPredicateNameRuntimeTimingTelemetryEnabled SessionSettingsPredicateName = "runtimeTimingTelemetryEnabled" + // Whether the security-tools feature flag enables security tool wiring. + SessionSettingsPredicateNameSecurityToolsEnabled SessionSettingsPredicateName = "securityToolsEnabled" + // Whether third-party security tools should receive the security prompt. + SessionSettingsPredicateNameThirdPartySecurityPromptEnabled SessionSettingsPredicateName = "thirdPartySecurityPromptEnabled" + // Whether trivial-change handling is enabled. + SessionSettingsPredicateNameTrivialChangeEnabled SessionSettingsPredicateName = "trivialChangeEnabled" + // Whether trivial-change handling is enabled for code review. + SessionSettingsPredicateNameTrivialChangeEnabledForCodeReview SessionSettingsPredicateName = "trivialChangeEnabledForCodeReview" + // Whether trivial-change handling is enabled for a specific tool. + SessionSettingsPredicateNameTrivialChangeEnabledForTool SessionSettingsPredicateName = "trivialChangeEnabledForTool" + // Whether trivial-change skip behavior is enabled. + SessionSettingsPredicateNameTrivialChangeSkipEnabled SessionSettingsPredicateName = "trivialChangeSkipEnabled" + // Whether trivial-change skip behavior is enabled for code review. + SessionSettingsPredicateNameTrivialChangeSkipEnabledForCodeReview SessionSettingsPredicateName = "trivialChangeSkipEnabledForCodeReview" + // Whether trivial-change skip behavior is enabled for a specific tool. + SessionSettingsPredicateNameTrivialChangeSkipEnabledForTool SessionSettingsPredicateName = "trivialChangeSkipEnabledForTool" +) + // Task type determines the handoff strategy (CCA fetches events; CLI prepares a transient // session). // Experimental: SessionsOpenHandoffTaskType is part of an experimental API and may change @@ -13672,7 +14248,8 @@ type InternalServerRPC struct { // // RPC method: connect. // -// Parameters: Optional connection token presented by the SDK client during the handshake. +// Parameters: Parameters for the `server.connect` handshake: an optional connection token +// and optional connection-level opt-ins (e.g. GitHub telemetry forwarding). // // Returns: Handshake result reporting the server's protocol version and package version on // success. @@ -14141,6 +14718,41 @@ func (a *CompletionsAPI) Request(ctx context.Context, params *CompletionsRequest return &result, nil } +// Experimental: DebugAPI contains experimental APIs that may change or be removed. +type DebugAPI sessionAPI + +// CollectLogs collects a redacted session debug log bundle into a local archive or staging +// directory. The runtime includes session-owned logs by default and accepts caller-provided +// diagnostic entries so host applications can add their own files without changing this API +// shape. +// +// RPC method: session.debug.collectLogs. +// +// Parameters: Options for collecting a redacted session debug bundle. +// +// Returns: Result of collecting a redacted debug bundle. +func (a *DebugAPI) CollectLogs(ctx context.Context, params *DebugCollectLogsRequest) (*DebugCollectLogsResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + if params.AdditionalEntries != nil { + req["additionalEntries"] = params.AdditionalEntries + } + req["destination"] = params.Destination + if params.Include != nil { + req["include"] = *params.Include + } + } + raw, err := a.client.Request(ctx, "session.debug.collectLogs", req) + if err != nil { + return nil, err + } + var result DebugCollectLogsResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // Experimental: EventLogAPI contains experimental APIs that may change or be removed. type EventLogAPI sessionAPI @@ -15788,12 +16400,11 @@ func (a *PermissionsAPI) Configure(ctx context.Context, params *PermissionsConfi return &result, nil } -// GetAllowAll returns whether full allow-all permissions are currently active for the -// session. +// GetAllowAll returns the current allow-all permission mode for the session. // // RPC method: session.permissions.getAllowAll. // -// Returns: Current full allow-all permission state. +// Returns: Current allow-all permission mode. func (a *PermissionsAPI) GetAllowAll(ctx context.Context) (*AllowAllPermissionState, error) { req := map[string]any{"sessionId": a.sessionID} raw, err := a.client.Request(ctx, "session.permissions.getAllowAll", req) @@ -15928,23 +16539,31 @@ func (a *PermissionsAPI) ResetSessionApprovals(ctx context.Context) (*Permission return &result, nil } -// SetAllowAll enables or disables full allow-all permissions (tools, paths, and URLs) for -// the session. Used by attach-mode clients (e.g. LocalRpcSession's `/allow-all` forwarder) -// to flip the target session's permission state. Unlike `setApproveAll`, this swaps in the -// unrestricted path and URL managers and emits `session.permissions_changed` on transition. -// The result returns the authoritative post-mutation state so callers can update their -// local mirrors without racing the `session.permissions_changed` notification on the same -// wire. +// SetAllowAll sets the allow-all permission mode for the session. Used by attach-mode +// clients (e.g. LocalRpcSession's `/allow-all` forwarder) to flip the target session's +// permission state. The `on` mode swaps in unrestricted path and URL managers and emits +// `session.permissions_changed` on transition; the `auto` mode keeps normal prompt paths +// active while attaching LLM safety recommendations. The result returns the authoritative +// post-mutation state so callers can update their local mirrors without racing the +// `session.permissions_changed` notification on the same wire. // // RPC method: session.permissions.setAllowAll. // -// Parameters: Whether to enable full allow-all permissions for the session. +// Parameters: Allow-all mode to apply for the session. // // Returns: Indicates whether the operation succeeded and reports the post-mutation state. func (a *PermissionsAPI) SetAllowAll(ctx context.Context, params *PermissionsSetAllowAllRequest) (*AllowAllPermissionSetResult, error) { req := map[string]any{"sessionId": a.sessionID} if params != nil { - req["enabled"] = params.Enabled + if params.Enabled != nil { + req["enabled"] = *params.Enabled + } + if params.Mode != nil { + req["mode"] = *params.Mode + } + if params.Model != nil { + req["model"] = *params.Model + } if params.Source != nil { req["source"] = *params.Source } @@ -17851,6 +18470,7 @@ type SessionRPC struct { Canvas *CanvasAPI Commands *CommandsAPI Completions *CompletionsAPI + Debug *DebugAPI EventLog *EventLogAPI Extensions *ExtensionsAPI Fleet *FleetAPI @@ -18064,6 +18684,7 @@ func NewSessionRPC(client *jsonrpc2.Client, sessionID string) *SessionRPC { r.Canvas = (*CanvasAPI)(&r.common) r.Commands = (*CommandsAPI)(&r.common) r.Completions = (*CompletionsAPI)(&r.common) + r.Debug = (*DebugAPI)(&r.common) r.EventLog = (*EventLogAPI)(&r.common) r.Extensions = (*ExtensionsAPI)(&r.common) r.Fleet = (*FleetAPI)(&r.common) @@ -18303,19 +18924,81 @@ func (s *InternalMCPAPI) Oauth() *InternalMCPOauthAPI { return (*InternalMCPOauthAPI)(s) } +// Experimental: InternalSettingsAPI contains experimental APIs that may change or be +// removed. +type InternalSettingsAPI internalSessionAPI + +// EvaluatePredicate evaluates a named Rust-owned settings predicate without exposing raw +// feature flags. Internal: the raw feature-flag names and composition are runtime-internal, +// so this predicate-evaluation helper is kept out of the public SDK surface and is callable +// in-process only. +// +// RPC method: session.settings.evaluatePredicate. +// +// Parameters: Named Rust-owned settings predicate to evaluate for this session. +// +// Returns: Result of evaluating a Rust-owned settings predicate. +// Internal: EvaluatePredicate is part of the SDK's internal handshake/plumbing; external +// callers should not use it. +func (a *InternalSettingsAPI) EvaluatePredicate(ctx context.Context, params *SessionSettingsEvaluatePredicateRequest) (*SessionSettingsEvaluatePredicateResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["name"] = params.Name + if params.ToolName != nil { + req["toolName"] = *params.ToolName + } + } + raw, err := a.client.Request(ctx, "session.settings.evaluatePredicate", req) + if err != nil { + return nil, err + } + var result SessionSettingsEvaluatePredicateResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + +// Snapshot returns a redacted snapshot of session runtime settings, with secrets and raw +// feature flags excluded. Internal: the runtime settings shape is a runtime-internal +// surface and is deliberately kept out of the public SDK, because consumers should not +// depend on the runtime's internal settings layout. It remains callable in-process and is +// expected to be reworked as the runtime internals are consolidated. +// +// RPC method: session.settings.snapshot. +// +// Returns: Redacted, serializable view of session runtime settings for SDK boundary +// consumers. Secrets and raw feature flags are intentionally excluded. +// Internal: Snapshot is part of the SDK's internal handshake/plumbing; external callers +// should not use it. +func (a *InternalSettingsAPI) Snapshot(ctx context.Context) (*SessionSettingsSnapshot, error) { + req := map[string]any{"sessionId": a.sessionID} + raw, err := a.client.Request(ctx, "session.settings.snapshot", req) + if err != nil { + return nil, err + } + var result SessionSettingsSnapshot + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // InternalSessionRPC provides internal SDK session-scoped RPC methods (handshake helpers // etc.). Not part of the public API. type InternalSessionRPC struct { // Reuse a single struct instead of allocating one for each service on the heap. common internalSessionAPI - MCP *InternalMCPAPI + MCP *InternalMCPAPI + Settings *InternalSettingsAPI } func NewInternalSessionRPC(client *jsonrpc2.Client, sessionID string) *InternalSessionRPC { r := &InternalSessionRPC{} r.common = internalSessionAPI{client: client, sessionID: sessionID} r.MCP = (*InternalMCPAPI)(&r.common) + r.Settings = (*InternalSettingsAPI)(&r.common) return r } @@ -18816,13 +19499,15 @@ func RegisterClientSessionAPIHandlers(client *jsonrpc2.Client, getHandlers func( // removed. type GitHubTelemetryHandler interface { // Event forwards a single GitHub telemetry event to a host connection that opted into - // telemetry forwarding for the session. + // 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). // // RPC method: gitHubTelemetry.event. // // Parameters: Payload for a `gitHubTelemetry.event` notification: a single GitHub telemetry - // event the runtime forwards to a host connection that opted into telemetry forwarding for - // the session. + // event the runtime forwards to a host connection that opted into telemetry forwarding + // during the `server.connect` handshake. Event(request *GitHubTelemetryNotification) error } diff --git a/go/rpc/zrpc_encoding.go b/go/rpc/zrpc_encoding.go index 84365d89b..b87db8a8b 100644 --- a/go/rpc/zrpc_encoding.go +++ b/go/rpc/zrpc_encoding.go @@ -669,6 +669,91 @@ func (r *CommandsRespondToQueuedCommandRequest) UnmarshalJSON(data []byte) error return nil } +func unmarshalDebugCollectLogsDestination(data []byte) (DebugCollectLogsDestination, error) { + if string(data) == "null" { + return nil, nil + } + type rawUnion struct { + Kind DebugCollectLogsDestinationKind `json:"kind"` + } + var raw rawUnion + if err := json.Unmarshal(data, &raw); err != nil { + return nil, err + } + + switch raw.Kind { + case DebugCollectLogsDestinationKindArchive: + var d DebugCollectLogsDestinationArchive + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case DebugCollectLogsDestinationKindDirectory: + var d DebugCollectLogsDestinationDirectory + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + default: + return &RawDebugCollectLogsDestinationData{Discriminator: raw.Kind, Raw: data}, nil + } +} + +func (r RawDebugCollectLogsDestinationData) MarshalJSON() ([]byte, error) { + if r.Raw != nil { + return r.Raw, nil + } + return json.Marshal(struct { + Kind DebugCollectLogsDestinationKind `json:"kind"` + }{ + Kind: r.Discriminator, + }) +} + +func (r DebugCollectLogsDestinationArchive) MarshalJSON() ([]byte, error) { + type alias DebugCollectLogsDestinationArchive + return json.Marshal(struct { + Kind DebugCollectLogsDestinationKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + +func (r DebugCollectLogsDestinationDirectory) MarshalJSON() ([]byte, error) { + type alias DebugCollectLogsDestinationDirectory + return json.Marshal(struct { + Kind DebugCollectLogsDestinationKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + +func (r *DebugCollectLogsRequest) UnmarshalJSON(data []byte) error { + type rawDebugCollectLogsRequest struct { + AdditionalEntries []DebugCollectLogsEntry `json:"additionalEntries,omitzero"` + Destination json.RawMessage `json:"destination"` + Include *DebugCollectLogsInclude `json:"include,omitempty"` + } + var raw rawDebugCollectLogsRequest + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + r.AdditionalEntries = raw.AdditionalEntries + if raw.Destination != nil { + value, err := unmarshalDebugCollectLogsDestination(raw.Destination) + if err != nil { + return err + } + r.Destination = value + } + r.Include = raw.Include + return nil +} + func (r EventLogTypes) MarshalJSON() ([]byte, error) { if r.String != nil { return json.Marshal(r.String) @@ -3273,6 +3358,7 @@ func (r *SessionOpenOptions) UnmarshalJSON(data []byte) error { RemoteSteerable *bool `json:"remoteSteerable,omitempty"` RunningInInteractiveMode *bool `json:"runningInInteractiveMode,omitempty"` SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` + SelfFetchManagedSettings *bool `json:"selfFetchManagedSettings,omitempty"` SessionCapabilities []SessionCapability `json:"sessionCapabilities,omitzero"` SessionID *string `json:"sessionId,omitempty"` SessionLimits *SessionLimitsConfig `json:"sessionLimits,omitempty"` @@ -3342,6 +3428,7 @@ func (r *SessionOpenOptions) UnmarshalJSON(data []byte) error { r.RemoteSteerable = raw.RemoteSteerable r.RunningInInteractiveMode = raw.RunningInInteractiveMode r.SandboxConfig = raw.SandboxConfig + r.SelfFetchManagedSettings = raw.SelfFetchManagedSettings r.SessionCapabilities = raw.SessionCapabilities r.SessionID = raw.SessionID r.SessionLimits = raw.SessionLimits diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go index 7d2a230a6..5367f83e8 100644 --- a/go/rpc/zsession_events.go +++ b/go/rpc/zsession_events.go @@ -315,6 +315,8 @@ func (*SessionBinaryAssetData) Type() SessionEventType { return SessionEventType type SessionCompactionStartData struct { // Token count from non-system messages (user, assistant, tool) at compaction start ConversationTokens *int64 `json:"conversationTokens,omitempty"` + // Model identifier used for compaction, when known + Model *string `json:"model,omitempty"` // Token count from system message(s) at compaction start SystemTokens *int64 `json:"systemTokens,omitempty"` // Token count from tool definitions at compaction start @@ -527,6 +529,15 @@ type ElicitationRequestedData struct { func (*ElicitationRequestedData) sessionEventData() {} func (*ElicitationRequestedData) Type() SessionEventType { return SessionEventTypeElicitationRequested } +// Empty payload for `session.background_tasks_changed`, indicating background task state changed. +type SessionBackgroundTasksChangedData struct { +} + +func (*SessionBackgroundTasksChangedData) sessionEventData() {} +func (*SessionBackgroundTasksChangedData) Type() SessionEventType { + return SessionEventTypeSessionBackgroundTasksChanged +} + // Empty payload; the event signals that the custom agent was deselected, returning to the default agent type SubagentDeselectedData struct { } @@ -889,6 +900,166 @@ type SessionIdleData struct { func (*SessionIdleData) sessionEventData() {} func (*SessionIdleData) Type() SessionEventType { return SessionEventTypeSessionIdle } +// Payload of `session.canvas.closed` with the closed canvas instance ID, provider ID, and canvas ID. +// Experimental: SessionCanvasClosedData is part of an experimental API and may change or be removed. +type SessionCanvasClosedData struct { + // Provider-local canvas identifier + CanvasID string `json:"canvasId"` + // Owning provider identifier + ExtensionID string `json:"extensionId"` + // Stable caller-supplied identifier of the canvas instance that was closed + InstanceID string `json:"instanceId"` +} + +func (*SessionCanvasClosedData) sessionEventData() {} +func (*SessionCanvasClosedData) Type() SessionEventType { return SessionEventTypeSessionCanvasClosed } + +// Payload of `session.canvas.opened` with canvas instance and provider IDs plus optional title, status, URL, and input. +// Experimental: SessionCanvasOpenedData is part of an experimental API and may change or be removed. +type SessionCanvasOpenedData struct { + // Provider-local canvas identifier + CanvasID string `json:"canvasId"` + // Owning provider identifier + ExtensionID string `json:"extensionId"` + // Owning extension display name, when available + ExtensionName *string `json:"extensionName,omitempty"` + // Input supplied when the instance was opened + Input any `json:"input,omitempty"` + // Stable caller-supplied canvas instance identifier + InstanceID string `json:"instanceId"` + // Provider-supplied status text + Status *string `json:"status,omitempty"` + // Rendered title + Title *string `json:"title,omitempty"` + // URL for web-rendered canvases + URL *string `json:"url,omitempty"` +} + +func (*SessionCanvasOpenedData) sessionEventData() {} +func (*SessionCanvasOpenedData) Type() SessionEventType { return SessionEventTypeSessionCanvasOpened } + +// Payload of `session.canvas.registry_changed` listing the canvas declarations currently available. +// Experimental: SessionCanvasRegistryChangedData is part of an experimental API and may change or be removed. +type SessionCanvasRegistryChangedData struct { + // Canvas declarations currently available + Canvases []CanvasRegistryChangedCanvas `json:"canvases"` +} + +func (*SessionCanvasRegistryChangedData) sessionEventData() {} +func (*SessionCanvasRegistryChangedData) Type() SessionEventType { + return SessionEventTypeSessionCanvasRegistryChanged +} + +// Payload of `session.custom_agents_updated` with loaded custom agents plus non-fatal warnings and fatal errors. +type SessionCustomAgentsUpdatedData struct { + // Array of loaded custom agent metadata + Agents []CustomAgentsUpdatedAgent `json:"agents"` + // Fatal errors from agent loading + Errors []string `json:"errors"` + // Non-fatal warnings from agent loading + Warnings []string `json:"warnings"` +} + +func (*SessionCustomAgentsUpdatedData) sessionEventData() {} +func (*SessionCustomAgentsUpdatedData) Type() SessionEventType { + return SessionEventTypeSessionCustomAgentsUpdated +} + +// Payload of `session.extensions.attachments_pushed` with extension-contributed attachments for the next send. +type SessionExtensionsAttachmentsPushedData struct { + // Attachments contributed by an extension; the host should surface these as composer pills and forward them via the next session.send call. + Attachments []Attachment `json:"attachments"` +} + +func (*SessionExtensionsAttachmentsPushedData) sessionEventData() {} +func (*SessionExtensionsAttachmentsPushedData) Type() SessionEventType { + return SessionEventTypeSessionExtensionsAttachmentsPushed +} + +// Payload of `session.extensions_loaded` listing discovered extensions and their statuses. +type SessionExtensionsLoadedData struct { + // Array of discovered extensions and their status + Extensions []ExtensionsLoadedExtension `json:"extensions"` +} + +func (*SessionExtensionsLoadedData) sessionEventData() {} +func (*SessionExtensionsLoadedData) Type() SessionEventType { + return SessionEventTypeSessionExtensionsLoaded +} + +// Payload of `session.mcp_server_status_changed` for one MCP server's status and optional failure error. +type SessionMCPServerStatusChangedData struct { + // Error message if the server entered a failed state + Error *string `json:"error,omitempty"` + // Name of the MCP server whose status changed + ServerName string `json:"serverName"` + // Connection status: connected, failed, needs-auth, pending, disabled, or not_configured + Status MCPServerStatus `json:"status"` +} + +func (*SessionMCPServerStatusChangedData) sessionEventData() {} +func (*SessionMCPServerStatusChangedData) Type() SessionEventType { + return SessionEventTypeSessionMCPServerStatusChanged +} + +// Payload of `session.mcp_servers_loaded` listing MCP server status summaries. +type SessionMCPServersLoadedData struct { + // Array of MCP server status summaries + Servers []MCPServersLoadedServer `json:"servers"` +} + +func (*SessionMCPServersLoadedData) sessionEventData() {} +func (*SessionMCPServersLoadedData) Type() SessionEventType { + return SessionEventTypeSessionMCPServersLoaded +} + +// Payload of `session.skills_loaded` listing resolved skill metadata. +type SessionSkillsLoadedData struct { + // Array of resolved skill metadata + Skills []SkillsLoadedSkill `json:"skills"` +} + +func (*SessionSkillsLoadedData) sessionEventData() {} +func (*SessionSkillsLoadedData) Type() SessionEventType { return SessionEventTypeSessionSkillsLoaded } + +// Payload of `session.tools_updated` identifying the model whose resolved tools were updated. +type SessionToolsUpdatedData struct { + // Identifier of the model the resolved tools apply to. + Model string `json:"model"` +} + +func (*SessionToolsUpdatedData) sessionEventData() {} +func (*SessionToolsUpdatedData) Type() SessionEventType { return SessionEventTypeSessionToolsUpdated } + +// Payload of `user.message` with displayed and model-transformed content, attachments, source/delivery metadata, mode, and telemetry IDs. +type UserMessageData struct { + // The agent mode that was active when this message was sent + AgentMode *UserMessageAgentMode `json:"agentMode,omitempty"` + // Files, selections, or GitHub references attached to the message + Attachments []Attachment `json:"attachments,omitzero"` + // The user's message text as displayed in the timeline + Content string `json:"content"` + // How this message was delivered to the agentic loop relative to loop state (idle-start vs. steering/queued while busy). The timing axis; combine with `source` (origin) for the full picture. Used for telemetry attribution. + Delivery *UserMessageDelivery `json:"delivery,omitempty"` + // CAPI interaction ID for correlating this user message with its turn + InteractionID *string `json:"interactionId,omitempty"` + // True when this user message was auto-injected by autopilot's continuation loop rather than typed by the user; used to distinguish autopilot-driven turns in telemetry. + IsAutopilotContinuation *bool `json:"isAutopilotContinuation,omitempty"` + // Path-backed native document attachments that stayed on the tagged_files path flow because native upload could not read them or would exceed the request size limit + NativeDocumentPathFallbackPaths []string `json:"nativeDocumentPathFallbackPaths,omitzero"` + // Parent agent task ID for background telemetry correlated to this user turn + ParentAgentTaskID *string `json:"parentAgentTaskId,omitempty"` + // Origin of this message, used for timeline filtering (e.g., "skill-pdf" for skill-injected messages that should be hidden from the user) + Source *string `json:"source,omitempty"` + // Normalized document MIME types that were sent natively instead of through tagged_files XML + SupportedNativeDocumentMIMETypes []string `json:"supportedNativeDocumentMimeTypes,omitzero"` + // Transformed version of the message sent to the model, with XML wrapping, timestamps, and other augmentations for prompt caching + TransformedContent *string `json:"transformedContent,omitempty"` +} + +func (*UserMessageData) sessionEventData() {} +func (*UserMessageData) Type() SessionEventType { return SessionEventTypeUserMessage } + // Permission request completion notification signaling UI dismissal type PermissionCompletedData struct { // Request ID of the resolved permission request; clients should dismiss any UI for this request @@ -917,10 +1088,16 @@ type PermissionRequestedData struct { func (*PermissionRequestedData) sessionEventData() {} func (*PermissionRequestedData) Type() SessionEventType { return SessionEventTypePermissionRequested } -// Permissions change details carrying the aggregate allow-all boolean transition. +// Permissions change details carrying the aggregate allow-all transition. type SessionPermissionsChangedData struct { + // Allow-all mode after the change + // Experimental: AllowAllPermissionMode is part of an experimental API and may change or be removed. + AllowAllPermissionMode *PermissionAllowAllMode `json:"allowAllPermissionMode,omitempty"` // Aggregate allow-all flag after the change AllowAllPermissions bool `json:"allowAllPermissions"` + // Allow-all mode before the change + // Experimental: PreviousAllowAllPermissionMode is part of an experimental API and may change or be removed. + PreviousAllowAllPermissionMode *PermissionAllowAllMode `json:"previousAllowAllPermissionMode,omitempty"` // Aggregate allow-all flag before the change PreviousAllowAllPermissions bool `json:"previousAllowAllPermissions"` } @@ -1081,175 +1258,6 @@ func (*SessionScheduleCreatedData) Type() SessionEventType { return SessionEventTypeSessionScheduleCreated } -// Schema for the `BackgroundTasksChangedData` type. -type SessionBackgroundTasksChangedData struct { -} - -func (*SessionBackgroundTasksChangedData) sessionEventData() {} -func (*SessionBackgroundTasksChangedData) Type() SessionEventType { - return SessionEventTypeSessionBackgroundTasksChanged -} - -// Schema for the `CanvasClosedData` type. -// Experimental: SessionCanvasClosedData is part of an experimental API and may change or be removed. -type SessionCanvasClosedData struct { - // Provider-local canvas identifier - CanvasID string `json:"canvasId"` - // Owning provider identifier - ExtensionID string `json:"extensionId"` - // Stable caller-supplied identifier of the canvas instance that was closed - InstanceID string `json:"instanceId"` -} - -func (*SessionCanvasClosedData) sessionEventData() {} -func (*SessionCanvasClosedData) Type() SessionEventType { return SessionEventTypeSessionCanvasClosed } - -// Schema for the `CanvasOpenedData` type. -// Experimental: SessionCanvasOpenedData is part of an experimental API and may change or be removed. -type SessionCanvasOpenedData struct { - // Provider-local canvas identifier - CanvasID string `json:"canvasId"` - // Owning provider identifier - ExtensionID string `json:"extensionId"` - // Owning extension display name, when available - ExtensionName *string `json:"extensionName,omitempty"` - // Input supplied when the instance was opened - Input any `json:"input,omitempty"` - // Stable caller-supplied canvas instance identifier - InstanceID string `json:"instanceId"` - // Provider-supplied status text - Status *string `json:"status,omitempty"` - // Rendered title - Title *string `json:"title,omitempty"` - // URL for web-rendered canvases - URL *string `json:"url,omitempty"` -} - -func (*SessionCanvasOpenedData) sessionEventData() {} -func (*SessionCanvasOpenedData) Type() SessionEventType { return SessionEventTypeSessionCanvasOpened } - -// Schema for the `CanvasRegistryChangedData` type. -// Experimental: SessionCanvasRegistryChangedData is part of an experimental API and may change or be removed. -type SessionCanvasRegistryChangedData struct { - // Canvas declarations currently available - Canvases []CanvasRegistryChangedCanvas `json:"canvases"` -} - -func (*SessionCanvasRegistryChangedData) sessionEventData() {} -func (*SessionCanvasRegistryChangedData) Type() SessionEventType { - return SessionEventTypeSessionCanvasRegistryChanged -} - -// Schema for the `CustomAgentsUpdatedData` type. -type SessionCustomAgentsUpdatedData struct { - // Array of loaded custom agent metadata - Agents []CustomAgentsUpdatedAgent `json:"agents"` - // Fatal errors from agent loading - Errors []string `json:"errors"` - // Non-fatal warnings from agent loading - Warnings []string `json:"warnings"` -} - -func (*SessionCustomAgentsUpdatedData) sessionEventData() {} -func (*SessionCustomAgentsUpdatedData) Type() SessionEventType { - return SessionEventTypeSessionCustomAgentsUpdated -} - -// Schema for the `ExtensionsAttachmentsPushedData` type. -type SessionExtensionsAttachmentsPushedData struct { - // Attachments contributed by an extension; the host should surface these as composer pills and forward them via the next session.send call. - Attachments []Attachment `json:"attachments"` -} - -func (*SessionExtensionsAttachmentsPushedData) sessionEventData() {} -func (*SessionExtensionsAttachmentsPushedData) Type() SessionEventType { - return SessionEventTypeSessionExtensionsAttachmentsPushed -} - -// Schema for the `ExtensionsLoadedData` type. -type SessionExtensionsLoadedData struct { - // Array of discovered extensions and their status - Extensions []ExtensionsLoadedExtension `json:"extensions"` -} - -func (*SessionExtensionsLoadedData) sessionEventData() {} -func (*SessionExtensionsLoadedData) Type() SessionEventType { - return SessionEventTypeSessionExtensionsLoaded -} - -// Schema for the `McpServerStatusChangedData` type. -type SessionMCPServerStatusChangedData struct { - // Error message if the server entered a failed state - Error *string `json:"error,omitempty"` - // Name of the MCP server whose status changed - ServerName string `json:"serverName"` - // Connection status: connected, failed, needs-auth, pending, disabled, or not_configured - Status MCPServerStatus `json:"status"` -} - -func (*SessionMCPServerStatusChangedData) sessionEventData() {} -func (*SessionMCPServerStatusChangedData) Type() SessionEventType { - return SessionEventTypeSessionMCPServerStatusChanged -} - -// Schema for the `McpServersLoadedData` type. -type SessionMCPServersLoadedData struct { - // Array of MCP server status summaries - Servers []MCPServersLoadedServer `json:"servers"` -} - -func (*SessionMCPServersLoadedData) sessionEventData() {} -func (*SessionMCPServersLoadedData) Type() SessionEventType { - return SessionEventTypeSessionMCPServersLoaded -} - -// Schema for the `SkillsLoadedData` type. -type SessionSkillsLoadedData struct { - // Array of resolved skill metadata - Skills []SkillsLoadedSkill `json:"skills"` -} - -func (*SessionSkillsLoadedData) sessionEventData() {} -func (*SessionSkillsLoadedData) Type() SessionEventType { return SessionEventTypeSessionSkillsLoaded } - -// Schema for the `ToolsUpdatedData` type. -type SessionToolsUpdatedData struct { - // Identifier of the model the resolved tools apply to. - Model string `json:"model"` -} - -func (*SessionToolsUpdatedData) sessionEventData() {} -func (*SessionToolsUpdatedData) Type() SessionEventType { return SessionEventTypeSessionToolsUpdated } - -// Schema for the `UserMessageData` type. -type UserMessageData struct { - // The agent mode that was active when this message was sent - AgentMode *UserMessageAgentMode `json:"agentMode,omitempty"` - // Files, selections, or GitHub references attached to the message - Attachments []Attachment `json:"attachments,omitzero"` - // The user's message text as displayed in the timeline - Content string `json:"content"` - // How this message was delivered to the agentic loop relative to loop state (idle-start vs. steering/queued while busy). The timing axis; combine with `source` (origin) for the full picture. Used for telemetry attribution. - Delivery *UserMessageDelivery `json:"delivery,omitempty"` - // CAPI interaction ID for correlating this user message with its turn - InteractionID *string `json:"interactionId,omitempty"` - // True when this user message was auto-injected by autopilot's continuation loop rather than typed by the user; used to distinguish autopilot-driven turns in telemetry. - IsAutopilotContinuation *bool `json:"isAutopilotContinuation,omitempty"` - // Path-backed native document attachments that stayed on the tagged_files path flow because native upload could not read them or would exceed the request size limit - NativeDocumentPathFallbackPaths []string `json:"nativeDocumentPathFallbackPaths,omitzero"` - // Parent agent task ID for background telemetry correlated to this user turn - ParentAgentTaskID *string `json:"parentAgentTaskId,omitempty"` - // Origin of this message, used for timeline filtering (e.g., "skill-pdf" for skill-injected messages that should be hidden from the user) - Source *string `json:"source,omitempty"` - // Normalized document MIME types that were sent natively instead of through tagged_files XML - SupportedNativeDocumentMIMETypes []string `json:"supportedNativeDocumentMimeTypes,omitzero"` - // Transformed version of the message sent to the model, with XML wrapping, timestamps, and other augmentations for prompt caching - TransformedContent *string `json:"transformedContent,omitempty"` -} - -func (*UserMessageData) sessionEventData() {} -func (*UserMessageData) Type() SessionEventType { return SessionEventTypeUserMessage } - // Self-paced schedule re-armed for its next run type SessionScheduleRearmedData struct { // Id of the self-paced schedule that was re-armed @@ -1476,6 +1484,8 @@ type SkillInvokedData struct { Content string `json:"content"` // Description of the skill from its SKILL.md frontmatter Description *string `json:"description,omitempty"` + // Model identifier active when the skill was invoked, when known + Model *string `json:"model,omitempty"` // Name of the invoked skill Name string `json:"name"` // File path to the SKILL.md definition @@ -1761,6 +1771,8 @@ func (*AbortData) Type() SessionEventType { return SessionEventTypeAbort } // Turn completion metadata including the turn identifier type AssistantTurnEndData struct { + // Model identifier used for this turn, when known + Model *string `json:"model,omitempty"` // Identifier of the turn that has ended, matching the corresponding assistant.turn_start event TurnID string `json:"turnId"` } @@ -1772,6 +1784,8 @@ func (*AssistantTurnEndData) Type() SessionEventType { return SessionEventTypeAs type AssistantTurnStartData struct { // CAPI interaction ID for correlating this turn with upstream telemetry InteractionID *string `json:"interactionId,omitempty"` + // Model identifier used for this turn, when known + Model *string `json:"model,omitempty"` // Identifier for this turn within the agentic loop, typically a stringified turn number TurnID string `json:"turnId"` } @@ -1924,7 +1938,7 @@ type AssistantUsageCopilotUsageTokenDetail struct { TokenType string `json:"tokenType"` } -// Schema for the `AssistantUsageQuotaSnapshot` type. +// Internal per-quota snapshot for assistant usage, including entitlement, consumed requests, overage, reset date, and remaining quota. // Internal: AssistantUsageQuotaSnapshot is an internal SDK API and is not part of the public surface. type AssistantUsageQuotaSnapshot struct { // Total requests allowed by the entitlement @@ -1962,7 +1976,7 @@ type AssistantUsageQuotaSnapshot struct { UsedRequests int64 `json:"usedRequests"` } -// Schema for the `CanvasRegistryChangedCanvas` type. +// A single canvas declaration in `session.canvas.registry_changed`, including provider IDs, display metadata, input schema, and actions. // Experimental: CanvasRegistryChangedCanvas is part of an experimental API and may change or be removed. type CanvasRegistryChangedCanvas struct { // Actions the agent or host may invoke @@ -1981,7 +1995,7 @@ type CanvasRegistryChangedCanvas struct { InputSchema any `json:"inputSchema,omitempty"` } -// Schema for the `CanvasRegistryChangedCanvasAction` type. +// A single action within a canvas declaration, with its name, optional description, and optional input schema. // Experimental: CanvasRegistryChangedCanvasAction is part of an experimental API and may change or be removed. type CanvasRegistryChangedCanvasAction struct { // Action description @@ -2121,7 +2135,7 @@ type CitationSpan struct { StartIndex int64 `json:"startIndex"` } -// Schema for the `CommandsChangedCommand` type. +// A single slash command available in the session, as listed by the `commands.changed` event. type CommandsChangedCommand struct { // Optional human-readable command description. Description *string `json:"description,omitempty"` @@ -2170,7 +2184,7 @@ type CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail struct { TokenType string `json:"tokenType"` } -// Schema for the `CustomAgentsUpdatedAgent` type. +// A single loaded custom agent in `session.custom_agents_updated`, with identity, source, tools, invocability, and model override. type CustomAgentsUpdatedAgent struct { // Description of what the agent does Description string `json:"description"` @@ -2200,7 +2214,7 @@ type ElicitationRequestedSchema struct { Type ElicitationRequestedSchemaType `json:"type"` } -// Schema for the `ExtensionsLoadedExtension` type. +// A single extension discovered by `session.extensions_loaded`, including qualified ID, source, and current status. type ExtensionsLoadedExtension struct { // Source-qualified extension ID (e.g., 'project:my-ext', 'user:auth-helper', 'plugin:my-plugin:my-ext') ID string `json:"id"` @@ -2240,11 +2254,11 @@ type MCPAppToolCallCompleteError struct { // The tool's `_meta.ui` block at the time of the call, so consumers can decide whether to forward the result to the model without re-listing tools. type MCPAppToolCallCompleteToolMeta struct { - // Schema for the `McpAppToolCallCompleteToolMetaUI` type. + // MCP App tool `_meta.ui` resource URI and SEP-1865 visibility captured with an `mcp_app.tool_call_complete` result. UI *MCPAppToolCallCompleteToolMetaUI `json:"ui,omitempty"` } -// Schema for the `McpAppToolCallCompleteToolMetaUI` type. +// MCP App tool `_meta.ui` resource URI and SEP-1865 visibility captured with an `mcp_app.tool_call_complete` result. type MCPAppToolCallCompleteToolMetaUI struct { // `ui://` URI declared by the tool's `_meta.ui.resourceUri` ResourceURI *string `json:"resourceUri,omitempty"` @@ -2274,7 +2288,7 @@ type MCPOauthWwwAuthenticateParams struct { Scope *string `json:"scope,omitempty"` } -// Schema for the `McpServersLoadedServer` type. +// A single MCP server status summary in `session.mcp_servers_loaded`, including name, status, source, transport, and plugin metadata. type MCPServersLoadedServer struct { // Error message if the server failed to connect Error *string `json:"error,omitempty"` @@ -2310,6 +2324,15 @@ type ModelCallFailureRequestFingerprint struct { ToolResultMessageCount int64 `json:"toolResultMessageCount"` } +// Auto-approval judge information attached to a permission request. Present (non-null) only when the session's allow-all mode is "auto"; its absence means auto mode was off and the judge did not evaluate the request. The `recommendation` conveys the judge's disposition for this request. +// Experimental: PermissionAutoApproval is part of an experimental API and may change or be removed. +type PermissionAutoApproval struct { + // Human-readable reason for the judge's recommendation, when available. + Reason *string `json:"reason,omitempty"` + // The auto-approval safety judge's outcome for this request. + Recommendation AutoApprovalRecommendation `json:"recommendation"` +} + // Derived user-facing permission prompt details for UI consumers type PermissionPromptRequest interface { permissionPromptRequest() @@ -2328,6 +2351,9 @@ func (r RawPermissionPromptRequest) Kind() PermissionPromptRequestKind { // Shell command permission prompt type PermissionPromptRequestCommands struct { + // Auto-approval judge information for this request; present only when auto mode is enabled. + // Experimental: AutoApproval is part of an experimental API and may change or be removed. + AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` // Whether the UI can offer session-wide approval for this command pattern CanOfferSessionApproval bool `json:"canOfferSessionApproval"` // Command identifiers covered by this approval prompt @@ -2351,6 +2377,9 @@ func (PermissionPromptRequestCommands) Kind() PermissionPromptRequestKind { type PermissionPromptRequestCustomTool struct { // Arguments to pass to the custom tool Args any `json:"args,omitempty"` + // Auto-approval judge information for this request; present only when auto mode is enabled. + // Experimental: AutoApproval is part of an experimental API and may change or be removed. + AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` // Tool call ID that triggered this permission request ToolCallID *string `json:"toolCallId,omitempty"` // Description of what the custom tool does @@ -2366,6 +2395,9 @@ func (PermissionPromptRequestCustomTool) Kind() PermissionPromptRequestKind { // Extension management permission prompt type PermissionPromptRequestExtensionManagement struct { + // Auto-approval judge information for this request; present only when auto mode is enabled. + // Experimental: AutoApproval is part of an experimental API and may change or be removed. + AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` // Name of the extension being managed ExtensionName *string `json:"extensionName,omitempty"` // The extension management operation (scaffold, reload) @@ -2381,6 +2413,9 @@ func (PermissionPromptRequestExtensionManagement) Kind() PermissionPromptRequest // Extension permission access prompt type PermissionPromptRequestExtensionPermissionAccess struct { + // Auto-approval judge information for this request; present only when auto mode is enabled. + // Experimental: AutoApproval is part of an experimental API and may change or be removed. + AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` // Capabilities the extension is requesting Capabilities []string `json:"capabilities"` // Name of the extension requesting permission access @@ -2396,6 +2431,9 @@ func (PermissionPromptRequestExtensionPermissionAccess) Kind() PermissionPromptR // Hook confirmation permission prompt type PermissionPromptRequestHook struct { + // Auto-approval judge information for this request; present only when auto mode is enabled. + // Experimental: AutoApproval is part of an experimental API and may change or be removed. + AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` // Optional message from the hook explaining why confirmation is needed HookMessage *string `json:"hookMessage,omitempty"` // Arguments of the tool call being gated @@ -2415,6 +2453,9 @@ func (PermissionPromptRequestHook) Kind() PermissionPromptRequestKind { type PermissionPromptRequestMCP struct { // Arguments to pass to the MCP tool Args any `json:"args,omitempty"` + // Auto-approval judge information for this request; present only when auto mode is enabled. + // Experimental: AutoApproval is part of an experimental API and may change or be removed. + AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` // Name of the MCP server providing the tool ServerName string `json:"serverName"` // Tool call ID that triggered this permission request @@ -2434,6 +2475,9 @@ func (PermissionPromptRequestMCP) Kind() PermissionPromptRequestKind { type PermissionPromptRequestMemory struct { // Whether this is a store or vote memory operation Action *PermissionRequestMemoryAction `json:"action,omitempty"` + // Auto-approval judge information for this request; present only when auto mode is enabled. + // Experimental: AutoApproval is part of an experimental API and may change or be removed. + AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` // Source references for the stored fact (store only) Citations *string `json:"citations,omitempty"` // Vote direction (vote only) @@ -2457,6 +2501,9 @@ func (PermissionPromptRequestMemory) Kind() PermissionPromptRequestKind { type PermissionPromptRequestPath struct { // Underlying permission kind that needs path approval AccessKind PermissionPromptRequestPathAccessKind `json:"accessKind"` + // Auto-approval judge information for this request; present only when auto mode is enabled. + // Experimental: AutoApproval is part of an experimental API and may change or be removed. + AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` // File paths that require explicit approval Paths []string `json:"paths"` // Tool call ID that triggered this permission request @@ -2470,6 +2517,9 @@ func (PermissionPromptRequestPath) Kind() PermissionPromptRequestKind { // File read permission prompt type PermissionPromptRequestRead struct { + // Auto-approval judge information for this request; present only when auto mode is enabled. + // Experimental: AutoApproval is part of an experimental API and may change or be removed. + AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` // Human-readable description of why the file is being read Intention string `json:"intention"` // Path of the file or directory being read @@ -2485,6 +2535,9 @@ func (PermissionPromptRequestRead) Kind() PermissionPromptRequestKind { // URL access permission prompt type PermissionPromptRequestURL struct { + // Auto-approval judge information for this request; present only when auto mode is enabled. + // Experimental: AutoApproval is part of an experimental API and may change or be removed. + AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` // Human-readable description of why the URL is being accessed Intention string `json:"intention"` // Tool call ID that triggered this permission request @@ -2500,6 +2553,9 @@ func (PermissionPromptRequestURL) Kind() PermissionPromptRequestKind { // File write permission prompt type PermissionPromptRequestWrite struct { + // Auto-approval judge information for this request; present only when auto mode is enabled. + // Experimental: AutoApproval is part of an experimental API and may change or be removed. + AutoApproval *PermissionAutoApproval `json:"autoApproval,omitempty"` // Whether the UI can offer session-wide approval for file write operations CanOfferSessionApproval bool `json:"canOfferSessionApproval"` // Unified diff showing the proposed changes @@ -2729,7 +2785,7 @@ func (PermissionRequestWrite) Kind() PermissionRequestKind { return PermissionRequestKindWrite } -// Schema for the `PermissionRequestShellCommand` type. +// A parsed command identifier in a shell permission request, including whether it is read-only. type PermissionRequestShellCommand struct { // Command identifier (e.g., executable name) Identifier string `json:"identifier"` @@ -2737,7 +2793,7 @@ type PermissionRequestShellCommand struct { ReadOnly bool `json:"readOnly"` } -// Schema for the `PermissionRequestShellPossibleUrl` type. +// A URL that may be accessed by a command in a shell permission request. type PermissionRequestShellPossibleURL struct { // URL that may be accessed by the command URL string `json:"url"` @@ -2759,7 +2815,7 @@ func (r RawPermissionResult) Kind() PermissionResultKind { return r.Discriminator } -// Schema for the `PermissionApproved` type. +// Permission response variant indicating the request was approved without persisting an approval rule. type PermissionApproved struct { } @@ -2768,7 +2824,7 @@ func (PermissionApproved) Kind() PermissionResultKind { return PermissionResultKindApproved } -// Schema for the `PermissionApprovedForLocation` type. +// Permission response variant that approves a request and persists the provided approval to a project location key. type PermissionApprovedForLocation struct { // The approval to persist for this location Approval UserToolSessionApproval `json:"approval"` @@ -2781,7 +2837,7 @@ func (PermissionApprovedForLocation) Kind() PermissionResultKind { return PermissionResultKindApprovedForLocation } -// Schema for the `PermissionApprovedForSession` type. +// Permission response variant that approves a request and remembers the provided approval for the rest of the session. type PermissionApprovedForSession struct { // The approval to add as a session-scoped rule Approval UserToolSessionApproval `json:"approval"` @@ -2792,7 +2848,7 @@ func (PermissionApprovedForSession) Kind() PermissionResultKind { return PermissionResultKindApprovedForSession } -// Schema for the `PermissionCancelled` type. +// Permission response variant indicating the request was cancelled before use, with an optional reason. type PermissionCancelled struct { // Optional explanation of why the request was cancelled Reason *string `json:"reason,omitempty"` @@ -2803,7 +2859,7 @@ func (PermissionCancelled) Kind() PermissionResultKind { return PermissionResultKindCancelled } -// Schema for the `PermissionDeniedByContentExclusionPolicy` type. +// Permission response variant denying a path under content exclusion policy, with the path and message. type PermissionDeniedByContentExclusionPolicy struct { // Human-readable explanation of why the path was excluded Message string `json:"message"` @@ -2816,7 +2872,7 @@ func (PermissionDeniedByContentExclusionPolicy) Kind() PermissionResultKind { return PermissionResultKindDeniedByContentExclusionPolicy } -// Schema for the `PermissionDeniedByPermissionRequestHook` type. +// Permission response variant denied by a permission-request hook, with optional message and interrupt flag. type PermissionDeniedByPermissionRequestHook struct { // Whether to interrupt the current agent turn Interrupt *bool `json:"interrupt,omitempty"` @@ -2829,7 +2885,7 @@ func (PermissionDeniedByPermissionRequestHook) Kind() PermissionResultKind { return PermissionResultKindDeniedByPermissionRequestHook } -// Schema for the `PermissionDeniedByRules` type. +// Permission response variant denied because matching approval rules explicitly blocked the request. type PermissionDeniedByRules struct { // Rules that denied the request Rules []PermissionRule `json:"rules"` @@ -2840,7 +2896,7 @@ func (PermissionDeniedByRules) Kind() PermissionResultKind { return PermissionResultKindDeniedByRules } -// Schema for the `PermissionDeniedInteractivelyByUser` type. +// Permission response variant denied in an interactive user prompt, with optional feedback and force-reject flag. type PermissionDeniedInteractivelyByUser struct { // Optional feedback from the user explaining the denial Feedback *string `json:"feedback,omitempty"` @@ -2853,7 +2909,7 @@ func (PermissionDeniedInteractivelyByUser) Kind() PermissionResultKind { return PermissionResultKindDeniedInteractivelyByUser } -// Schema for the `PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type. +// Permission response variant denied because no approval rule matched and user confirmation was unavailable. type PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser struct { } @@ -2966,7 +3022,7 @@ type ShutdownCodeChanges struct { LinesRemoved int64 `json:"linesRemoved"` } -// Schema for the `ShutdownModelMetric` type. +// Per-model shutdown metrics with request counts, token usage, nano-AI units, and token details. type ShutdownModelMetric struct { // Request count and cost metrics Requests ShutdownModelMetricRequests `json:"requests"` @@ -2989,7 +3045,7 @@ type ShutdownModelMetricRequests struct { Count *int64 `json:"count,omitempty"` } -// Schema for the `ShutdownModelMetricTokenDetail` type. +// A token-type entry in a shutdown model metric, storing the accumulated token count. type ShutdownModelMetricTokenDetail struct { // Accumulated token count for this token type TokenCount int64 `json:"tokenCount"` @@ -3009,13 +3065,13 @@ type ShutdownModelMetricUsage struct { ReasoningTokens *int64 `json:"reasoningTokens,omitempty"` } -// Schema for the `ShutdownTokenDetail` type. +// A session-wide shutdown token-type entry storing the accumulated token count. type ShutdownTokenDetail struct { // Accumulated token count for this token type TokenCount int64 `json:"tokenCount"` } -// Schema for the `SkillsLoadedSkill` type. +// A single resolved skill in `session.skills_loaded`, including source, invocability, enabled state, path, and argument hint. type SkillsLoadedSkill struct { // Optional freeform hint describing the skill's expected arguments, from the `argument-hint` frontmatter field ArgumentHint *string `json:"argumentHint,omitempty"` @@ -3057,7 +3113,7 @@ func (r RawSystemNotification) Type() SystemNotificationType { return r.Discriminator } -// Schema for the `SystemNotificationAgentCompleted` type. +// System notification metadata for a background agent that completed or failed, including agent ID, type, status, description, and prompt. type SystemNotificationAgentCompleted struct { // Unique identifier of the background agent AgentID string `json:"agentId"` @@ -3076,7 +3132,7 @@ func (SystemNotificationAgentCompleted) Type() SystemNotificationType { return SystemNotificationTypeAgentCompleted } -// Schema for the `SystemNotificationAgentIdle` type. +// System notification metadata for a background agent that became idle, including agent ID, type, and description. type SystemNotificationAgentIdle struct { // Unique identifier of the background agent AgentID string `json:"agentId"` @@ -3091,7 +3147,7 @@ func (SystemNotificationAgentIdle) Type() SystemNotificationType { return SystemNotificationTypeAgentIdle } -// Schema for the `SystemNotificationInstructionDiscovered` type. +// System notification metadata for an instruction file discovered during tool access, including source, trigger file, and tool. type SystemNotificationInstructionDiscovered struct { // Human-readable label for the timeline (e.g., 'AGENTS.md from packages/billing/') Description *string `json:"description,omitempty"` @@ -3108,7 +3164,7 @@ func (SystemNotificationInstructionDiscovered) Type() SystemNotificationType { return SystemNotificationTypeInstructionDiscovered } -// Schema for the `SystemNotificationNewInboxMessage` type. +// System notification metadata for a new inbox message, including entry ID, sender details, and summary. type SystemNotificationNewInboxMessage struct { // Unique identifier of the inbox entry EntryID string `json:"entryId"` @@ -3125,7 +3181,7 @@ func (SystemNotificationNewInboxMessage) Type() SystemNotificationType { return SystemNotificationTypeNewInboxMessage } -// Schema for the `SystemNotificationShellCompleted` type. +// System notification metadata for a shell session that completed, including shell ID, optional exit code, and description. type SystemNotificationShellCompleted struct { // Human-readable description of the command Description *string `json:"description,omitempty"` @@ -3140,7 +3196,7 @@ func (SystemNotificationShellCompleted) Type() SystemNotificationType { return SystemNotificationTypeShellCompleted } -// Schema for the `SystemNotificationShellDetachedCompleted` type. +// System notification metadata for a detached shell session that completed, including shell ID and description. type SystemNotificationShellDetachedCompleted struct { // Human-readable description of the command Description *string `json:"description,omitempty"` @@ -3332,11 +3388,11 @@ type ToolExecutionCompleteToolDescription struct { // MCP Apps metadata for UI resource association type ToolExecutionCompleteToolDescriptionMeta struct { - // Schema for the `ToolExecutionCompleteToolDescriptionMetaUI` type. + // MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_complete`. UI *ToolExecutionCompleteToolDescriptionMetaUI `json:"ui,omitempty"` } -// Schema for the `ToolExecutionCompleteToolDescriptionMetaUI` type. +// MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_complete`. type ToolExecutionCompleteToolDescriptionMetaUI struct { // URI of the UI resource ResourceURI *string `json:"resourceUri,omitempty"` @@ -3360,21 +3416,21 @@ type ToolExecutionCompleteUIResource struct { // Resource-level UI metadata (CSP, permissions, visual preferences) type ToolExecutionCompleteUIResourceMeta struct { - // Schema for the `ToolExecutionCompleteUIResourceMetaUI` type. + // MCP Apps UI resource metadata for a completed tool result, including CSP, permissions, domain, and border preference. UI *ToolExecutionCompleteUIResourceMetaUI `json:"ui,omitempty"` } -// Schema for the `ToolExecutionCompleteUIResourceMetaUI` type. +// MCP Apps UI resource metadata for a completed tool result, including CSP, permissions, domain, and border preference. type ToolExecutionCompleteUIResourceMetaUI struct { - // Schema for the `ToolExecutionCompleteUIResourceMetaUICsp` type. + // CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. Csp *ToolExecutionCompleteUIResourceMetaUICsp `json:"csp,omitempty"` Domain *string `json:"domain,omitempty"` - // Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissions` type. + // Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. Permissions *ToolExecutionCompleteUIResourceMetaUIPermissions `json:"permissions,omitempty"` PrefersBorder *bool `json:"prefersBorder,omitempty"` } -// Schema for the `ToolExecutionCompleteUIResourceMetaUICsp` type. +// CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. type ToolExecutionCompleteUIResourceMetaUICsp struct { BaseURIDomains []string `json:"baseUriDomains,omitzero"` ConnectDomains []string `json:"connectDomains,omitzero"` @@ -3382,31 +3438,31 @@ type ToolExecutionCompleteUIResourceMetaUICsp struct { ResourceDomains []string `json:"resourceDomains,omitzero"` } -// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissions` type. +// Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. type ToolExecutionCompleteUIResourceMetaUIPermissions struct { - // Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsCamera` type. + // Marker object for camera permission on an MCP Apps UI resource. Camera *ToolExecutionCompleteUIResourceMetaUIPermissionsCamera `json:"camera,omitempty"` - // Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite` type. + // Marker object for clipboard-write permission on an MCP Apps UI resource. ClipboardWrite *ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite `json:"clipboardWrite,omitempty"` - // Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation` type. + // Marker object for geolocation permission on an MCP Apps UI resource. Geolocation *ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation `json:"geolocation,omitempty"` - // Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone` type. + // Marker object for microphone permission on an MCP Apps UI resource. Microphone *ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone `json:"microphone,omitempty"` } -// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsCamera` type. +// Marker object for camera permission on an MCP Apps UI resource. type ToolExecutionCompleteUIResourceMetaUIPermissionsCamera struct { } -// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite` type. +// Marker object for clipboard-write permission on an MCP Apps UI resource. type ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite struct { } -// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation` type. +// Marker object for geolocation permission on an MCP Apps UI resource. type ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation struct { } -// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone` type. +// Marker object for microphone permission on an MCP Apps UI resource. type ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone struct { } @@ -3430,11 +3486,11 @@ type ToolExecutionStartToolDescription struct { // MCP Apps metadata for UI resource association type ToolExecutionStartToolDescriptionMeta struct { - // Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. + // MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_start`. UI *ToolExecutionStartToolDescriptionMetaUI `json:"ui,omitempty"` } -// Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. +// MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_start`. type ToolExecutionStartToolDescriptionMetaUI struct { // URI of the UI resource ResourceURI *string `json:"resourceUri,omitempty"` @@ -3486,6 +3542,21 @@ const ( AssistantUsageAPIEndpointWsResponses AssistantUsageAPIEndpoint = "ws:/responses" ) +// Outcome of the auto-approval safety judge for a permission request. Present only when auto mode is enabled; its absence means the judge did not evaluate the request (auto mode was off). +// Experimental: AutoApprovalRecommendation is part of an experimental API and may change or be removed. +type AutoApprovalRecommendation string + +const ( + // The judge evaluated the request and recommends automatically approving it. + AutoApprovalRecommendationApprove AutoApprovalRecommendation = "approve" + // The judge was consulted but did not return a usable recommendation, so the request requires explicit approval. + AutoApprovalRecommendationError AutoApprovalRecommendation = "error" + // Auto mode is enabled, but this request category is never auto-approvable (for example, sandbox-bypass requests), so the judge was not consulted. + AutoApprovalRecommendationExcluded AutoApprovalRecommendation = "excluded" + // The judge evaluated the request and does not recommend auto-approving it; explicit approval is required. Whether that means prompting, denying, or something else is the consumer's decision. + AutoApprovalRecommendationRequireApproval AutoApprovalRecommendation = "requireApproval" +) + // The user's auto-mode-switch choice type AutoModeSwitchResponse string @@ -3749,6 +3820,19 @@ const ( OmittedBinaryTypeResource OmittedBinaryType = "resource" ) +// Allow-all mode for the session. +// Experimental: PermissionAllowAllMode is part of an experimental API and may change or be removed. +type PermissionAllowAllMode string + +const ( + // Permission requests follow the normal approval flow with an LLM advisory recommendation attached; clients may choose to auto-approve requests the judge evaluated as acceptable. + PermissionAllowAllModeAuto PermissionAllowAllMode = "auto" + // Permission requests follow the normal approval flow. + PermissionAllowAllModeOff PermissionAllowAllMode = "off" + // Tool, path, and URL permission requests are automatically approved. + PermissionAllowAllModeOn PermissionAllowAllMode = "on" +) + // Kind discriminator for PermissionPromptRequest. type PermissionPromptRequestKind string diff --git a/go/zsession_events.go b/go/zsession_events.go index 8d11d4da5..04756c8af 100644 --- a/go/zsession_events.go +++ b/go/zsession_events.go @@ -50,6 +50,7 @@ type ( AttachmentSelectionDetailsEnd = rpc.AttachmentSelectionDetailsEnd AttachmentSelectionDetailsStart = rpc.AttachmentSelectionDetailsStart AttachmentType = rpc.AttachmentType + AutoApprovalRecommendation = rpc.AutoApprovalRecommendation AutoModeSwitchCompletedData = rpc.AutoModeSwitchCompletedData AutoModeSwitchRequestedData = rpc.AutoModeSwitchRequestedData AutoModeSwitchResponse = rpc.AutoModeSwitchResponse @@ -132,9 +133,11 @@ type ( OmittedBinaryResult = rpc.OmittedBinaryResult OmittedBinaryType = rpc.OmittedBinaryType PendingMessagesModifiedData = rpc.PendingMessagesModifiedData + PermissionAllowAllMode = rpc.PermissionAllowAllMode PermissionApproved = rpc.PermissionApproved PermissionApprovedForLocation = rpc.PermissionApprovedForLocation PermissionApprovedForSession = rpc.PermissionApprovedForSession + PermissionAutoApproval = rpc.PermissionAutoApproval PermissionCancelled = rpc.PermissionCancelled PermissionCompletedData = rpc.PermissionCompletedData PermissionDeniedByContentExclusionPolicy = rpc.PermissionDeniedByContentExclusionPolicy @@ -363,6 +366,10 @@ const ( AttachmentTypeGitHubTreeComparison = rpc.AttachmentTypeGitHubTreeComparison AttachmentTypeGitHubURL = rpc.AttachmentTypeGitHubURL AttachmentTypeSelection = rpc.AttachmentTypeSelection + AutoApprovalRecommendationApprove = rpc.AutoApprovalRecommendationApprove + AutoApprovalRecommendationError = rpc.AutoApprovalRecommendationError + AutoApprovalRecommendationExcluded = rpc.AutoApprovalRecommendationExcluded + AutoApprovalRecommendationRequireApproval = rpc.AutoApprovalRecommendationRequireApproval AutoModeSwitchResponseNo = rpc.AutoModeSwitchResponseNo AutoModeSwitchResponseYes = rpc.AutoModeSwitchResponseYes AutoModeSwitchResponseYesAlways = rpc.AutoModeSwitchResponseYesAlways @@ -441,6 +448,9 @@ const ( OmittedBinaryOmittedReasonTooLarge = rpc.OmittedBinaryOmittedReasonTooLarge OmittedBinaryTypeImage = rpc.OmittedBinaryTypeImage OmittedBinaryTypeResource = rpc.OmittedBinaryTypeResource + PermissionAllowAllModeAuto = rpc.PermissionAllowAllModeAuto + PermissionAllowAllModeOff = rpc.PermissionAllowAllModeOff + PermissionAllowAllModeOn = rpc.PermissionAllowAllModeOn PermissionPromptRequestKindCommands = rpc.PermissionPromptRequestKindCommands PermissionPromptRequestKindCustomTool = rpc.PermissionPromptRequestKindCustomTool PermissionPromptRequestKindExtensionManagement = rpc.PermissionPromptRequestKindExtensionManagement diff --git a/java/pom.xml b/java/pom.xml index 3ecd52c45..bd89a1282 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -86,7 +86,7 @@ DO NOT EDIT MANUALLY. Updated by the update-copilot-dependency workflow. --> - ^1.0.69-0 + ^1.0.69-1 diff --git a/java/scripts/codegen/package-lock.json b/java/scripts/codegen/package-lock.json index 1ea69fc03..d08b6fc36 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.69-0", + "@github/copilot": "^1.0.69-1", "json-schema": "^0.4.0", "tsx": "^4.22.4" } @@ -428,9 +428,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.69-0.tgz", - "integrity": "sha512-Y/ZJBo1dtsP7k2LxDQxQT5pj2ZaN7+dCD4vx5jhX3i2T+YFlOx7ZhfUx8Hpe94wQPDlCs+232TXRHl2Wb5p62w==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.69-1.tgz", + "integrity": "sha512-3kWG41prhG/+bMdgW6QvPZXSji2oVGSxQICrUStnW954vvwg0Snabz5g2P3/1EM7BJqoecYSSNIo+vzznxpuTQ==", "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.69-0", - "@github/copilot-darwin-x64": "1.0.69-0", - "@github/copilot-linux-arm64": "1.0.69-0", - "@github/copilot-linux-x64": "1.0.69-0", - "@github/copilot-linuxmusl-arm64": "1.0.69-0", - "@github/copilot-linuxmusl-x64": "1.0.69-0", - "@github/copilot-win32-arm64": "1.0.69-0", - "@github/copilot-win32-x64": "1.0.69-0" + "@github/copilot-darwin-arm64": "1.0.69-1", + "@github/copilot-darwin-x64": "1.0.69-1", + "@github/copilot-linux-arm64": "1.0.69-1", + "@github/copilot-linux-x64": "1.0.69-1", + "@github/copilot-linuxmusl-arm64": "1.0.69-1", + "@github/copilot-linuxmusl-x64": "1.0.69-1", + "@github/copilot-win32-arm64": "1.0.69-1", + "@github/copilot-win32-x64": "1.0.69-1" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.69-0.tgz", - "integrity": "sha512-RyX31WkNGpXycW5FCAgJ7+MXTmfwSkiohHf7jWShKQPP6m/MEM0CrBuS4XPeWK0gjtWM4MdAwmVe7qXtbzZu1w==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.69-1.tgz", + "integrity": "sha512-rCgRgY+5AUK4SEcVxNIHTV4Apl8NwtWwlDMiVIV8UtE+re2oq7ojq3CGSo4wzagHWUQSjEAEpwVBL6+NFnSVYw==", "cpu": [ "arm64" ], @@ -466,9 +466,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.69-0.tgz", - "integrity": "sha512-NaA44Uq6d1ijcF2eT8/Ql0eacyvjGFGYN8hVFLkD6CsjPmSbupMd39NFt2RWnZDjhg3S68J77OSXH4aj3vcaiA==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.69-1.tgz", + "integrity": "sha512-GnrRZziYWQrHJYpvbeZQoBWawbfOdVr43KgTqGru1ybVXh9BCtoYG/wcnIyla5ezlgNOtDphDg64cQHNhypgDQ==", "cpu": [ "x64" ], @@ -482,9 +482,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.69-0.tgz", - "integrity": "sha512-dSFha3BrnGeMKLzqWE8c63tRdKgw3mjV9Apx4/i7L9BMJ0o13oycVVe+D+bEVniWH12gVriIxE1+TQUAAVWLIQ==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.69-1.tgz", + "integrity": "sha512-2Hls3xLhN4Gk1nEHzwEZ+0XySVAZeQa5Gz2KRXUbs+JJ0e0TikT7kKsGtK+1fhEgAFdZ721XvtvxB+LA32y/rQ==", "cpu": [ "arm64" ], @@ -498,9 +498,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.69-0.tgz", - "integrity": "sha512-2zH3yh7//D7rOriDt4eAc4+tYay+oQj9CcENP0Cb8aNEn27hyZmuKiLoA+xyGSrbhVqA4rzYLC3Hx9RI96xxSQ==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.69-1.tgz", + "integrity": "sha512-MqBrjkhoynBYbrEqZjStKNXXIMEu+kSF2aUtGbotyz24vauAeg4lOf4E6uM41B53l1qoMoj34dQ+gPT+Tlvf6A==", "cpu": [ "x64" ], @@ -514,9 +514,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.69-0.tgz", - "integrity": "sha512-vVezUNBfxp4ej9rTQy3zy8UT23imxFWqzkVu0yFrt6lqr9a7RSmPHhhKkPYkyxCWuzhSxGWLm3Ad6TDTYVVGog==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.69-1.tgz", + "integrity": "sha512-KfG+4vW53Aou5s6dYfAlrVIikIGvv8i3UQA+wGRJX0PvhB2Z2xje3+fcGhAGywghhCL/UjZT8rwaeyJWGvdrBg==", "cpu": [ "arm64" ], @@ -530,9 +530,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.69-0.tgz", - "integrity": "sha512-Wlb421yC7iuw6ICMxuNPPL+ItG0f9+vv3wdHUeWhyCMte7+7tqxvhyfxSCzj46V5CXoGo32vUc0oOxmXMfSbyQ==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.69-1.tgz", + "integrity": "sha512-EgW/avqTW1vZp/7LfWotbUce9kkcpKELxn+PiVLGOcEFP/5/3nGt0mkXYpRJQJLwNcHTFFYLBfgLZSMJ3g1hTg==", "cpu": [ "x64" ], @@ -546,9 +546,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.69-0.tgz", - "integrity": "sha512-H0p9kiCO8Rt6tMuZUPzszoxYaipIIvOBbUtqljV56UX+XwBaSnxME/ZjRCNn480jdrA2QbLjaobZWH2w3C4scg==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.69-1.tgz", + "integrity": "sha512-ySorVqbMWdSK21WvEUgSit4jTQcC+MnQeFF0ACWvtKj2q73dzXR6yh8AGJTXG2AzvEgVC2yY0TNAB28nk4zA+Q==", "cpu": [ "arm64" ], @@ -562,9 +562,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.69-0.tgz", - "integrity": "sha512-3W/e8Lhw1eStFJogIP4pf9bxg9izcI/c0KErHLFK+56HqfnzK5ZDQqb+oeqRw3+aq24MvzyLzHA421jPHLIoOQ==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.69-1.tgz", + "integrity": "sha512-S7Oj7o27olpS70s7BaipcDsMif2/YoHj7KyQI/2aoXJG2xZb25wds65f/gTtsgOQOnnpCefywt/bHpX8Bw8wDQ==", "cpu": [ "x64" ], diff --git a/java/scripts/codegen/package.json b/java/scripts/codegen/package.json index 9ad9d25fb..5f3cebfad 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.69-0", + "@github/copilot": "^1.0.69-1", "json-schema": "^0.4.0", "tsx": "^4.22.4" } diff --git a/java/src/generated/java/com/github/copilot/generated/AssistantTurnEndEvent.java b/java/src/generated/java/com/github/copilot/generated/AssistantTurnEndEvent.java index 28146b05b..082f62b47 100644 --- a/java/src/generated/java/com/github/copilot/generated/AssistantTurnEndEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/AssistantTurnEndEvent.java @@ -35,7 +35,9 @@ public final class AssistantTurnEndEvent extends SessionEvent { @JsonInclude(JsonInclude.Include.NON_NULL) public record AssistantTurnEndEventData( /** Identifier of the turn that has ended, matching the corresponding assistant.turn_start event */ - @JsonProperty("turnId") String turnId + @JsonProperty("turnId") String turnId, + /** Model identifier used for this turn, when known */ + @JsonProperty("model") String model ) { } } diff --git a/java/src/generated/java/com/github/copilot/generated/AssistantTurnStartEvent.java b/java/src/generated/java/com/github/copilot/generated/AssistantTurnStartEvent.java index 639ee013f..a9c6b2932 100644 --- a/java/src/generated/java/com/github/copilot/generated/AssistantTurnStartEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/AssistantTurnStartEvent.java @@ -36,6 +36,8 @@ public final class AssistantTurnStartEvent extends SessionEvent { public record AssistantTurnStartEventData( /** Identifier for this turn within the agentic loop, typically a stringified turn number */ @JsonProperty("turnId") String turnId, + /** Model identifier used for this turn, when known */ + @JsonProperty("model") String model, /** CAPI interaction ID for correlating this turn with upstream telemetry */ @JsonProperty("interactionId") String interactionId ) { diff --git a/java/src/generated/java/com/github/copilot/generated/AssistantUsageQuotaSnapshot.java b/java/src/generated/java/com/github/copilot/generated/AssistantUsageQuotaSnapshot.java index 974a7f272..f32dacdee 100644 --- a/java/src/generated/java/com/github/copilot/generated/AssistantUsageQuotaSnapshot.java +++ b/java/src/generated/java/com/github/copilot/generated/AssistantUsageQuotaSnapshot.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `AssistantUsageQuotaSnapshot` type. + * Internal per-quota snapshot for assistant usage, including entitlement, consumed requests, overage, reset date, and remaining quota. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvas.java b/java/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvas.java index b4805b0bb..dbafc5d62 100644 --- a/java/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvas.java +++ b/java/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvas.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `CanvasRegistryChangedCanvas` type. + * A single canvas declaration in `session.canvas.registry_changed`, including provider IDs, display metadata, input schema, and actions. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvasAction.java b/java/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvasAction.java index b8e474e62..99c390efb 100644 --- a/java/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvasAction.java +++ b/java/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvasAction.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `CanvasRegistryChangedCanvasAction` type. + * A single action within a canvas declaration, with its name, optional description, and optional input schema. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/CommandsChangedCommand.java b/java/src/generated/java/com/github/copilot/generated/CommandsChangedCommand.java index 383f141fc..76a30b920 100644 --- a/java/src/generated/java/com/github/copilot/generated/CommandsChangedCommand.java +++ b/java/src/generated/java/com/github/copilot/generated/CommandsChangedCommand.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `CommandsChangedCommand` type. + * A single slash command available in the session, as listed by the `commands.changed` event. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/CustomAgentsUpdatedAgent.java b/java/src/generated/java/com/github/copilot/generated/CustomAgentsUpdatedAgent.java index 642be8694..c2f195e48 100644 --- a/java/src/generated/java/com/github/copilot/generated/CustomAgentsUpdatedAgent.java +++ b/java/src/generated/java/com/github/copilot/generated/CustomAgentsUpdatedAgent.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `CustomAgentsUpdatedAgent` type. + * A single loaded custom agent in `session.custom_agents_updated`, with identity, source, tools, invocability, and model override. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtension.java b/java/src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtension.java index b45c72139..d8c65f455 100644 --- a/java/src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtension.java +++ b/java/src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtension.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ExtensionsLoadedExtension` type. + * A single extension discovered by `session.extensions_loaded`, including qualified ID, source, and current status. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteToolMeta.java b/java/src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteToolMeta.java index 33b9a3725..335f3694a 100644 --- a/java/src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteToolMeta.java +++ b/java/src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteToolMeta.java @@ -21,7 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record McpAppToolCallCompleteToolMeta( - /** Schema for the `McpAppToolCallCompleteToolMetaUI` type. */ + /** MCP App tool `_meta.ui` resource URI and SEP-1865 visibility captured with an `mcp_app.tool_call_complete` result. */ @JsonProperty("ui") McpAppToolCallCompleteToolMetaUI ui ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteToolMetaUI.java b/java/src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteToolMetaUI.java index eb960434a..47708eaaa 100644 --- a/java/src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteToolMetaUI.java +++ b/java/src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteToolMetaUI.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `McpAppToolCallCompleteToolMetaUI` type. + * MCP App tool `_meta.ui` resource URI and SEP-1865 visibility captured with an `mcp_app.tool_call_complete` result. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/McpServersLoadedServer.java b/java/src/generated/java/com/github/copilot/generated/McpServersLoadedServer.java index 9c5d52081..1a2f05023 100644 --- a/java/src/generated/java/com/github/copilot/generated/McpServersLoadedServer.java +++ b/java/src/generated/java/com/github/copilot/generated/McpServersLoadedServer.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `McpServersLoadedServer` type. + * A single MCP server status summary in `session.mcp_servers_loaded`, including name, status, source, transport, and plugin metadata. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/PermissionAllowAllMode.java b/java/src/generated/java/com/github/copilot/generated/PermissionAllowAllMode.java new file mode 100644 index 000000000..d05b936e6 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/PermissionAllowAllMode.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Allow-all mode for the session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum PermissionAllowAllMode { + /** The {@code off} variant. */ + OFF("off"), + /** The {@code on} variant. */ + ON("on"), + /** The {@code auto} variant. */ + AUTO("auto"); + + private final String value; + PermissionAllowAllMode(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static PermissionAllowAllMode fromValue(String value) { + for (PermissionAllowAllMode v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown PermissionAllowAllMode value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/SessionBackgroundTasksChangedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionBackgroundTasksChangedEvent.java index dddb44b84..6058e18c3 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionBackgroundTasksChangedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionBackgroundTasksChangedEvent.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Session event "session.background_tasks_changed". + * Session event "session.background_tasks_changed". Empty payload for `session.background_tasks_changed`, indicating background task state changed. * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/src/generated/java/com/github/copilot/generated/SessionCanvasClosedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionCanvasClosedEvent.java index 79fd365c2..b660c0be6 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionCanvasClosedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionCanvasClosedEvent.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Session event "session.canvas.closed". + * Session event "session.canvas.closed". Payload of `session.canvas.closed` with the closed canvas instance ID, provider ID, and canvas ID. * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/src/generated/java/com/github/copilot/generated/SessionCanvasOpenedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionCanvasOpenedEvent.java index 84f87ffbc..975737b2f 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionCanvasOpenedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionCanvasOpenedEvent.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Session event "session.canvas.opened". + * Session event "session.canvas.opened". Payload of `session.canvas.opened` with canvas instance and provider IDs plus optional title, status, URL, and input. * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/src/generated/java/com/github/copilot/generated/SessionCanvasRegistryChangedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionCanvasRegistryChangedEvent.java index 95ba01763..0a6a9b62d 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionCanvasRegistryChangedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionCanvasRegistryChangedEvent.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Session event "session.canvas.registry_changed". + * Session event "session.canvas.registry_changed". Payload of `session.canvas.registry_changed` listing the canvas declarations currently available. * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/src/generated/java/com/github/copilot/generated/SessionCompactionStartEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionCompactionStartEvent.java index f09e75f4c..e92a3ac50 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionCompactionStartEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionCompactionStartEvent.java @@ -34,6 +34,8 @@ public final class SessionCompactionStartEvent extends SessionEvent { @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) public record SessionCompactionStartEventData( + /** Model identifier used for compaction, when known */ + @JsonProperty("model") String model, /** Token count from system message(s) at compaction start */ @JsonProperty("systemTokens") Long systemTokens, /** Token count from non-system messages (user, assistant, tool) at compaction start */ diff --git a/java/src/generated/java/com/github/copilot/generated/SessionCustomAgentsUpdatedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionCustomAgentsUpdatedEvent.java index e7bbad358..6d7ed6611 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionCustomAgentsUpdatedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionCustomAgentsUpdatedEvent.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Session event "session.custom_agents_updated". + * Session event "session.custom_agents_updated". Payload of `session.custom_agents_updated` with loaded custom agents plus non-fatal warnings and fatal errors. * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/src/generated/java/com/github/copilot/generated/SessionExtensionsAttachmentsPushedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionExtensionsAttachmentsPushedEvent.java index 55a9f6457..72d0a9def 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionExtensionsAttachmentsPushedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionExtensionsAttachmentsPushedEvent.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Session event "session.extensions.attachments_pushed". + * Session event "session.extensions.attachments_pushed". Payload of `session.extensions.attachments_pushed` with extension-contributed attachments for the next send. * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/src/generated/java/com/github/copilot/generated/SessionExtensionsLoadedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionExtensionsLoadedEvent.java index 978162f03..6ec3ec274 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionExtensionsLoadedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionExtensionsLoadedEvent.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Session event "session.extensions_loaded". + * Session event "session.extensions_loaded". Payload of `session.extensions_loaded` listing discovered extensions and their statuses. * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/src/generated/java/com/github/copilot/generated/SessionMcpServerStatusChangedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionMcpServerStatusChangedEvent.java index 6cbcca29f..cb15f1d9e 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionMcpServerStatusChangedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionMcpServerStatusChangedEvent.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Session event "session.mcp_server_status_changed". + * Session event "session.mcp_server_status_changed". Payload of `session.mcp_server_status_changed` for one MCP server's status and optional failure error. * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/src/generated/java/com/github/copilot/generated/SessionMcpServersLoadedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionMcpServersLoadedEvent.java index 59ff2a1aa..98ddc5b19 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionMcpServersLoadedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionMcpServersLoadedEvent.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Session event "session.mcp_servers_loaded". + * Session event "session.mcp_servers_loaded". Payload of `session.mcp_servers_loaded` listing MCP server status summaries. * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/src/generated/java/com/github/copilot/generated/SessionPermissionsChangedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionPermissionsChangedEvent.java index fe91df9d3..c1f82f5af 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionPermissionsChangedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionPermissionsChangedEvent.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Session event "session.permissions_changed". Permissions change details carrying the aggregate allow-all boolean transition. + * Session event "session.permissions_changed". Permissions change details carrying the aggregate allow-all transition. * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) @@ -37,7 +37,11 @@ public record SessionPermissionsChangedEventData( /** Aggregate allow-all flag before the change */ @JsonProperty("previousAllowAllPermissions") Boolean previousAllowAllPermissions, /** Aggregate allow-all flag after the change */ - @JsonProperty("allowAllPermissions") Boolean allowAllPermissions + @JsonProperty("allowAllPermissions") Boolean allowAllPermissions, + /** Allow-all mode before the change */ + @JsonProperty("previousAllowAllPermissionMode") PermissionAllowAllMode previousAllowAllPermissionMode, + /** Allow-all mode after the change */ + @JsonProperty("allowAllPermissionMode") PermissionAllowAllMode allowAllPermissionMode ) { } } diff --git a/java/src/generated/java/com/github/copilot/generated/SessionSkillsLoadedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionSkillsLoadedEvent.java index b2ddd18ed..efe356670 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionSkillsLoadedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionSkillsLoadedEvent.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Session event "session.skills_loaded". + * Session event "session.skills_loaded". Payload of `session.skills_loaded` listing resolved skill metadata. * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/src/generated/java/com/github/copilot/generated/SessionToolsUpdatedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionToolsUpdatedEvent.java index 2b0d94c26..f69954ee5 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionToolsUpdatedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionToolsUpdatedEvent.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Session event "session.tools_updated". + * Session event "session.tools_updated". Payload of `session.tools_updated` identifying the model whose resolved tools were updated. * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/src/generated/java/com/github/copilot/generated/ShutdownModelMetric.java b/java/src/generated/java/com/github/copilot/generated/ShutdownModelMetric.java index b7eb37fd9..1ba45d90b 100644 --- a/java/src/generated/java/com/github/copilot/generated/ShutdownModelMetric.java +++ b/java/src/generated/java/com/github/copilot/generated/ShutdownModelMetric.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ShutdownModelMetric` type. + * Per-model shutdown metrics with request counts, token usage, nano-AI units, and token details. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/ShutdownModelMetricTokenDetail.java b/java/src/generated/java/com/github/copilot/generated/ShutdownModelMetricTokenDetail.java index fe18de6c6..cd0e67d70 100644 --- a/java/src/generated/java/com/github/copilot/generated/ShutdownModelMetricTokenDetail.java +++ b/java/src/generated/java/com/github/copilot/generated/ShutdownModelMetricTokenDetail.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ShutdownModelMetricTokenDetail` type. + * A token-type entry in a shutdown model metric, storing the accumulated token count. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/ShutdownTokenDetail.java b/java/src/generated/java/com/github/copilot/generated/ShutdownTokenDetail.java index 75db095c5..dfc986e83 100644 --- a/java/src/generated/java/com/github/copilot/generated/ShutdownTokenDetail.java +++ b/java/src/generated/java/com/github/copilot/generated/ShutdownTokenDetail.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ShutdownTokenDetail` type. + * A session-wide shutdown token-type entry storing the accumulated token count. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/SkillInvokedEvent.java b/java/src/generated/java/com/github/copilot/generated/SkillInvokedEvent.java index a3bac49bc..6ad04f969 100644 --- a/java/src/generated/java/com/github/copilot/generated/SkillInvokedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SkillInvokedEvent.java @@ -37,6 +37,8 @@ public final class SkillInvokedEvent extends SessionEvent { public record SkillInvokedEventData( /** Name of the invoked skill */ @JsonProperty("name") String name, + /** Model identifier active when the skill was invoked, when known */ + @JsonProperty("model") String model, /** File path to the SKILL.md definition */ @JsonProperty("path") String path, /** Full content of the skill file, injected into the conversation for the model */ diff --git a/java/src/generated/java/com/github/copilot/generated/SkillsLoadedSkill.java b/java/src/generated/java/com/github/copilot/generated/SkillsLoadedSkill.java index a3db9697f..d3196c6bb 100644 --- a/java/src/generated/java/com/github/copilot/generated/SkillsLoadedSkill.java +++ b/java/src/generated/java/com/github/copilot/generated/SkillsLoadedSkill.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `SkillsLoadedSkill` type. + * A single resolved skill in `session.skills_loaded`, including source, invocability, enabled state, path, and argument hint. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMeta.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMeta.java index 563358cfa..f9af397a7 100644 --- a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMeta.java +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMeta.java @@ -21,7 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record ToolExecutionCompleteToolDescriptionMeta( - /** Schema for the `ToolExecutionCompleteToolDescriptionMetaUI` type. */ + /** MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_complete`. */ @JsonProperty("ui") ToolExecutionCompleteToolDescriptionMetaUI ui ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMetaUI.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMetaUI.java index 9acf435bc..1cbe17d49 100644 --- a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMetaUI.java +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMetaUI.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ToolExecutionCompleteToolDescriptionMetaUI` type. + * MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_complete`. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMeta.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMeta.java index 6375222cc..897f0ff39 100644 --- a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMeta.java +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMeta.java @@ -21,7 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record ToolExecutionCompleteUIResourceMeta( - /** Schema for the `ToolExecutionCompleteUIResourceMetaUI` type. */ + /** MCP Apps UI resource metadata for a completed tool result, including CSP, permissions, domain, and border preference. */ @JsonProperty("ui") ToolExecutionCompleteUIResourceMetaUI ui ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUI.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUI.java index 3b9548a8c..6679b85ae 100644 --- a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUI.java +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUI.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUI` type. + * MCP Apps UI resource metadata for a completed tool result, including CSP, permissions, domain, and border preference. * * @since 1.0.0 */ @@ -21,9 +21,9 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record ToolExecutionCompleteUIResourceMetaUI( - /** Schema for the `ToolExecutionCompleteUIResourceMetaUICsp` type. */ + /** CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. */ @JsonProperty("csp") ToolExecutionCompleteUIResourceMetaUICsp csp, - /** Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissions` type. */ + /** Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. */ @JsonProperty("permissions") ToolExecutionCompleteUIResourceMetaUIPermissions permissions, @JsonProperty("domain") String domain, @JsonProperty("prefersBorder") Boolean prefersBorder diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUICsp.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUICsp.java index 0ccb8a3db..41e799cf0 100644 --- a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUICsp.java +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUICsp.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUICsp` type. + * CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissions.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissions.java index 8b1fc5dc9..d9adf5579 100644 --- a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissions.java +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissions.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissions` type. + * Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. * * @since 1.0.0 */ @@ -21,13 +21,13 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record ToolExecutionCompleteUIResourceMetaUIPermissions( - /** Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsCamera` type. */ + /** Marker object for camera permission on an MCP Apps UI resource. */ @JsonProperty("camera") ToolExecutionCompleteUIResourceMetaUIPermissionsCamera camera, - /** Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone` type. */ + /** Marker object for microphone permission on an MCP Apps UI resource. */ @JsonProperty("microphone") ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone microphone, - /** Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation` type. */ + /** Marker object for geolocation permission on an MCP Apps UI resource. */ @JsonProperty("geolocation") ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation geolocation, - /** Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite` type. */ + /** Marker object for clipboard-write permission on an MCP Apps UI resource. */ @JsonProperty("clipboardWrite") ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite clipboardWrite ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsCamera.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsCamera.java index 300967e8c..9a0235535 100644 --- a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsCamera.java +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsCamera.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsCamera` type. + * Marker object for camera permission on an MCP Apps UI resource. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite.java index 485a6946c..0c4e8dad1 100644 --- a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite.java +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite` type. + * Marker object for clipboard-write permission on an MCP Apps UI resource. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation.java index 30ed9bb54..d68147473 100644 --- a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation.java +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation` type. + * Marker object for geolocation permission on an MCP Apps UI resource. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone.java index 1748ccb48..4caa88ede 100644 --- a/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone.java +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone` type. + * Marker object for microphone permission on an MCP Apps UI resource. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMeta.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMeta.java index 25296d1d3..e93bf998a 100644 --- a/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMeta.java +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMeta.java @@ -21,7 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record ToolExecutionStartToolDescriptionMeta( - /** Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. */ + /** MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_start`. */ @JsonProperty("ui") ToolExecutionStartToolDescriptionMetaUI ui ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMetaUI.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMetaUI.java index c928a03f6..954edf210 100644 --- a/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMetaUI.java +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMetaUI.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. + * MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_start`. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/UserMessageEvent.java b/java/src/generated/java/com/github/copilot/generated/UserMessageEvent.java index 57f64b652..5af484243 100644 --- a/java/src/generated/java/com/github/copilot/generated/UserMessageEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/UserMessageEvent.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Session event "user.message". + * Session event "user.message". Payload of `user.message` with displayed and model-transformed content, attachments, source/delivery metadata, mode, and telemetry IDs. * @since 1.0.0 */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/AccountAllUsers.java b/java/src/generated/java/com/github/copilot/generated/rpc/AccountAllUsers.java index a544b8a30..eecdad01e 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/AccountAllUsers.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/AccountAllUsers.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `AccountAllUsers` type. + * Authenticated account entry returned by `account.getAllUsers`, with auth info and an optional associated token. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/AccountQuotaSnapshot.java b/java/src/generated/java/com/github/copilot/generated/rpc/AccountQuotaSnapshot.java index 88e7ba9c6..fe4baf3fd 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/AccountQuotaSnapshot.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/AccountQuotaSnapshot.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `AccountQuotaSnapshot` type. + * Quota usage snapshot for a Copilot quota type, including entitlement, used requests, overage, reset date, and remaining percentage. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/AgentDiscoveryPath.java b/java/src/generated/java/com/github/copilot/generated/rpc/AgentDiscoveryPath.java index 93a4bb1f6..53d48904f 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/AgentDiscoveryPath.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/AgentDiscoveryPath.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `AgentDiscoveryPath` type. + * Canonical directory where custom agents can be discovered or created, with scope, preference, and optional project path. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/AgentInfo.java b/java/src/generated/java/com/github/copilot/generated/rpc/AgentInfo.java index ce8089373..29813e30a 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/AgentInfo.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/AgentInfo.java @@ -15,7 +15,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `AgentInfo` type. + * Custom agent metadata, including identifiers, display details, source, tools, model, MCP servers, skills, and file path. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ConnectParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/ConnectParams.java index 5fa87b3af..491dadad3 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/ConnectParams.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ConnectParams.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Optional connection token presented by the SDK client during the handshake. + * Parameters for the `server.connect` handshake: an optional connection token and optional connection-level opt-ins (e.g. GitHub telemetry forwarding). * * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 @@ -25,6 +25,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record ConnectParams( /** Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN */ - @JsonProperty("token") String token + @JsonProperty("token") String token, + /** 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, in addition to the runtime's normal GitHub/CTS emission (dual-write). 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. */ + @JsonProperty("enableGitHubTelemetryForwarding") Boolean enableGitHubTelemetryForwarding ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsCollectedEntry.java b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsCollectedEntry.java new file mode 100644 index 000000000..9d8592220 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsCollectedEntry.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * A file included in the redacted debug bundle. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record DebugCollectLogsCollectedEntry( + /** Relative path of the file in the staged bundle/archive. */ + @JsonProperty("bundlePath") String bundlePath, + /** Source category for this entry. */ + @JsonProperty("source") DebugCollectLogsSource source, + /** Redacted output size in bytes. */ + @JsonProperty("sizeBytes") Long sizeBytes +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsEntry.java b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsEntry.java new file mode 100644 index 000000000..285b1ef6e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsEntry.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * A caller-provided server-local file or directory to include in the debug bundle. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record DebugCollectLogsEntry( + /** Kind of source path to include. */ + @JsonProperty("kind") DebugCollectLogsEntryKind kind, + /** Server-local source path to read. */ + @JsonProperty("path") String path, + /** Relative path to use inside the staged bundle/archive. */ + @JsonProperty("bundlePath") String bundlePath, + /** How text content from this entry should be redacted. Defaults to plain-text. */ + @JsonProperty("redaction") DebugCollectLogsRedaction redaction, + /** When true, collection fails if this entry cannot be read. Defaults to false, which records the entry in `skippedEntries`. */ + @JsonProperty("required") Boolean required +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsEntryKind.java b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsEntryKind.java new file mode 100644 index 000000000..316b6dcd5 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsEntryKind.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Kind of caller-provided debug log entry. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum DebugCollectLogsEntryKind { + /** The {@code file} variant. */ + FILE("file"), + /** The {@code directory} variant. */ + DIRECTORY("directory"); + + private final String value; + DebugCollectLogsEntryKind(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static DebugCollectLogsEntryKind fromValue(String value) { + for (DebugCollectLogsEntryKind v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown DebugCollectLogsEntryKind value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsInclude.java b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsInclude.java new file mode 100644 index 000000000..0cab63830 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsInclude.java @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Built-in session diagnostics to include in the bundle. Omitted fields default to true. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record DebugCollectLogsInclude( + /** Include the session event log (`events.jsonl`). Defaults to true. */ + @JsonProperty("events") Boolean events, + /** Include process logs for the session. Defaults to true. */ + @JsonProperty("processLogs") Boolean processLogs, + /** Include interactive shell logs written under the session's `shell-logs` directory. Defaults to true. */ + @JsonProperty("shellLogs") Boolean shellLogs, + /** Server-local path to the session's events.jsonl file. Internal callers normally omit this and let the runtime derive it from the session. */ + @JsonProperty("eventsPath") String eventsPath, + /** Server-local path to the current process log. When set, it is included as `process.log` and its directory is searched for prior logs from the same session. */ + @JsonProperty("currentProcessLogPath") String currentProcessLogPath, + /** Server-local process log directory to search when `currentProcessLogPath` is unavailable, useful for collecting logs for inactive sessions. */ + @JsonProperty("processLogDirectory") String processLogDirectory, + /** Maximum number of previous process logs to include. Defaults to 5. */ + @JsonProperty("previousProcessLogLimit") Long previousProcessLogLimit +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsRedaction.java b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsRedaction.java new file mode 100644 index 000000000..5f57e3737 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsRedaction.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * How a collected debug entry should be redacted before being staged. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum DebugCollectLogsRedaction { + /** The {@code plain-text} variant. */ + PLAIN_TEXT("plain-text"), + /** The {@code events-jsonl} variant. */ + EVENTS_JSONL("events-jsonl"); + + private final String value; + DebugCollectLogsRedaction(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static DebugCollectLogsRedaction fromValue(String value) { + for (DebugCollectLogsRedaction v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown DebugCollectLogsRedaction value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsResultKind.java b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsResultKind.java new file mode 100644 index 000000000..00986bd3f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsResultKind.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Destination kind that was written. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum DebugCollectLogsResultKind { + /** The {@code archive} variant. */ + ARCHIVE("archive"), + /** The {@code directory} variant. */ + DIRECTORY("directory"); + + private final String value; + DebugCollectLogsResultKind(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static DebugCollectLogsResultKind fromValue(String value) { + for (DebugCollectLogsResultKind v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown DebugCollectLogsResultKind value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsSkippedEntry.java b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsSkippedEntry.java new file mode 100644 index 000000000..a5a702bcd --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsSkippedEntry.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * An optional debug bundle entry that could not be included. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record DebugCollectLogsSkippedEntry( + /** Relative path requested for this bundle entry. */ + @JsonProperty("bundlePath") String bundlePath, + /** Server-local source path that could not be read. */ + @JsonProperty("path") String path, + /** Reason the entry was skipped. */ + @JsonProperty("reason") String reason +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsSource.java b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsSource.java new file mode 100644 index 000000000..989059f45 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/DebugCollectLogsSource.java @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Source category for a collected debug bundle entry. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum DebugCollectLogsSource { + /** The {@code events} variant. */ + EVENTS("events"), + /** The {@code process-log} variant. */ + PROCESS_LOG("process-log"), + /** The {@code shell-log} variant. */ + SHELL_LOG("shell-log"), + /** The {@code additional} variant. */ + ADDITIONAL("additional"); + + private final String value; + DebugCollectLogsSource(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static DebugCollectLogsSource fromValue(String value) { + for (DebugCollectLogsSource v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown DebugCollectLogsSource value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/DiscoveredMcpServer.java b/java/src/generated/java/com/github/copilot/generated/rpc/DiscoveredMcpServer.java index 60fa5271d..3262994c1 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/DiscoveredMcpServer.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/DiscoveredMcpServer.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `DiscoveredMcpServer` type. + * MCP server discovered by `mcp.discover`, with config source, optional plugin source, transport type, and enabled state. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/Extension.java b/java/src/generated/java/com/github/copilot/generated/rpc/Extension.java index 7bbdb5207..4d3e357cd 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/Extension.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/Extension.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `Extension` type. + * Discovered extension metadata, including source-qualified ID, name, discovery source, status, and optional process ID. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryNotification.java b/java/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryNotification.java index fddcdc70b..6059f1ff6 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryNotification.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryNotification.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Payload for a `gitHubTelemetry.event` notification: a single GitHub telemetry event the runtime forwards to a host connection that opted into telemetry forwarding for the session. + * 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. * * @since 1.0.0 */ @@ -21,7 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record GitHubTelemetryNotification( - /** Session the telemetry event belongs to. */ + /** Session the telemetry event belongs to, when it is session-scoped. Omitted for sessionless events (for example, `server.sendTelemetry` calls with no session id), which are still forwarded to opted-in connections. */ @JsonProperty("sessionId") String sessionId, /** Whether this is a restricted telemetry event (cli.restricted_telemetry). Hosts must route restricted events to first-party Microsoft stores only. */ @JsonProperty("restricted") Boolean restricted, diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/InstalledPlugin.java b/java/src/generated/java/com/github/copilot/generated/rpc/InstalledPlugin.java index c274dfb1a..b3487e7e3 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/InstalledPlugin.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/InstalledPlugin.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `InstalledPlugin` type. + * Installed plugin record from global state, with marketplace, version, install time, enabled state, cache path, and source. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/InstructionDiscoveryPath.java b/java/src/generated/java/com/github/copilot/generated/rpc/InstructionDiscoveryPath.java index b47451bcd..213b003c1 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/InstructionDiscoveryPath.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/InstructionDiscoveryPath.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `InstructionDiscoveryPath` type. + * Canonical file or directory where custom instructions can be discovered or created, with location, kind, preference, and project path. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/InstructionSource.java b/java/src/generated/java/com/github/copilot/generated/rpc/InstructionSource.java index 37d1ead1c..2581375b3 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/InstructionSource.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/InstructionSource.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `InstructionSource` type. + * Loaded instruction source for a session, including path, content, category, location, applicability, and optional description. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/LlmInferenceHttpRequestStartRequest.java b/java/src/generated/java/com/github/copilot/generated/rpc/LlmInferenceHttpRequestStartRequest.java index 4c23404d3..a625e4253 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/LlmInferenceHttpRequestStartRequest.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/LlmInferenceHttpRequestStartRequest.java @@ -33,6 +33,12 @@ public record LlmInferenceHttpRequestStartRequest( @JsonProperty("url") String url, @JsonProperty("headers") Map> headers, /** Transport the runtime would otherwise use for this request. `http` (the default when absent) covers plain HTTP and SSE responses; `websocket` indicates a full-duplex message channel where each body chunk maps to one WebSocket message and the `binary` flag distinguishes text from binary frames. The SDK consumer uses this to decide whether to service the request with an HTTP client or a WebSocket client. It is the one piece of request metadata the consumer cannot reliably infer from the URL or headers alone. */ - @JsonProperty("transport") LlmInferenceHttpRequestStartTransport transport + @JsonProperty("transport") LlmInferenceHttpRequestStartTransport transport, + /** Stable per-agent-instance id attributing this request to a specific agent trajectory. Present when the request originates from an agent turn; absent for requests issued outside any agent context (e.g. some SDK callers). A request with an `agentId` but no `parentAgentId` is a root-agent request; one carrying both is a subagent request. Sourced from the runtime's per-request agent context and surfaced on the envelope independently of transport, so it is available for both first-party (CAPI) and BYOK/custom-provider requests; on the CAPI transport the runtime derives the upstream `X-Agent-Task-Id` header from this same context. Consumers routing each provider call to a training trajectory should key on this rather than on lifecycle events, since it is available on the request path before sampling. */ + @JsonProperty("agentId") String agentId, + /** Id of the parent agent that spawned the agent issuing this request. Present only for subagent requests; absent for root-agent requests and non-agent requests. Combined with `agentId`, this lets consumers attribute a call to a child trajectory versus the root. Like `agentId`, it comes from the runtime's per-request agent context independently of transport; on the CAPI transport the runtime derives the upstream `X-Parent-Agent-Id` header from this same context. */ + @JsonProperty("parentAgentId") String parentAgentId, + /** Coarse classification of the interaction that produced this request. Open string for forward-compatibility; known values include `conversation-agent`, `conversation-subagent`, `conversation-sampling`, `conversation-background`, `conversation-compaction`, and `conversation-user`. Absent when the runtime did not classify the request. Comes from the runtime's per-request agent context independently of transport; on the CAPI transport the runtime derives the upstream `X-Interaction-Type` header from this same context. */ + @JsonProperty("interactionType") String interactionType ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/LocalSessionMetadataValue.java b/java/src/generated/java/com/github/copilot/generated/rpc/LocalSessionMetadataValue.java index 80d058199..c7970940a 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/LocalSessionMetadataValue.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/LocalSessionMetadataValue.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `LocalSessionMetadataValue` type. + * Persisted local session metadata, including identifiers, timestamps, summary/name, client, context, detached state, and task ID. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/MarketplaceRefreshEntry.java b/java/src/generated/java/com/github/copilot/generated/rpc/MarketplaceRefreshEntry.java index c7b6819dc..31d6310e1 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/MarketplaceRefreshEntry.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/MarketplaceRefreshEntry.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `MarketplaceRefreshEntry` type. + * Per-marketplace refresh result, including marketplace name, success flag, and optional failure error. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/McpAllowedServer.java b/java/src/generated/java/com/github/copilot/generated/rpc/McpAllowedServer.java index 8474a916c..1d0a17cc9 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/McpAllowedServer.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/McpAllowedServer.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `McpAllowedServer` type. + * MCP server allowed by policy, with server name and optional PII-free explanatory note. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/McpAppsResourceContent.java b/java/src/generated/java/com/github/copilot/generated/rpc/McpAppsResourceContent.java index 25850f372..0a0f977ff 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/McpAppsResourceContent.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/McpAppsResourceContent.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `McpAppsResourceContent` type. + * MCP Apps resource content with URI, optional MIME type, text or base64 blob, and resource metadata. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/McpFilteredServer.java b/java/src/generated/java/com/github/copilot/generated/rpc/McpFilteredServer.java index 9f5e91910..51dbd2bd1 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/McpFilteredServer.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/McpFilteredServer.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `McpFilteredServer` type. + * MCP server filtered by policy, with name, reason, optional redacted reason, and enterprise login. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/McpServer.java b/java/src/generated/java/com/github/copilot/generated/rpc/McpServer.java index e410cf564..382c54c40 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/McpServer.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/McpServer.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `McpServer` type. + * MCP server status entry, including config source/plugin source and any connection error. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/McpTools.java b/java/src/generated/java/com/github/copilot/generated/rpc/McpTools.java index 31373c1d1..04d688126 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/McpTools.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/McpTools.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `McpTools` type. + * MCP tool metadata with tool name and optional description. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/Model.java b/java/src/generated/java/com/github/copilot/generated/rpc/Model.java index 090451916..c55fc026f 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/Model.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/Model.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `Model` type. + * Copilot model metadata, including identifier, display name, capabilities, policy, billing, reasoning efforts, and picker categories. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicy.java b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicy.java index 13360e808..2864bbd99 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicy.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicy.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `OptionsUpdateAdditionalContentExclusionPolicy` type. + * Content-exclusion policy supplied to `session.options.update`, with rules, last-updated data, and scope. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRule.java b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRule.java index af6917cb7..135a7c7f8 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRule.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRule.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRule` type. + * Single content-exclusion rule supplied to `session.options.update`, with paths, match conditions, and source. * * @since 1.0.0 */ @@ -25,7 +25,7 @@ public record OptionsUpdateAdditionalContentExclusionPolicyRule( @JsonProperty("paths") List paths, @JsonProperty("ifAnyMatch") List ifAnyMatch, @JsonProperty("ifNoneMatch") List ifNoneMatch, - /** Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. */ + /** Source descriptor for a `session.options.update` content-exclusion rule, with source name and type. */ @JsonProperty("source") OptionsUpdateAdditionalContentExclusionPolicyRuleSource source ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRuleSource.java b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRuleSource.java index 8befe476e..a36372280 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRuleSource.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateAdditionalContentExclusionPolicyRuleSource.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. + * Source descriptor for a `session.options.update` content-exclusion rule, with source name and type. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PendingPermissionRequest.java b/java/src/generated/java/com/github/copilot/generated/rpc/PendingPermissionRequest.java index de370ca5d..7042864b0 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/PendingPermissionRequest.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PendingPermissionRequest.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `PendingPermissionRequest` type. + * Pending permission prompt reconstructed from event history, with request ID and user-facing prompt details. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PermissionRule.java b/java/src/generated/java/com/github/copilot/generated/rpc/PermissionRule.java index 7980e0e83..8e7a6c769 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/PermissionRule.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PermissionRule.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `PermissionRule` type. + * A permission approval or denial rule matched against a tool request, identified by a rule kind with an optional argument value. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsAllowAllMode.java b/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsAllowAllMode.java new file mode 100644 index 000000000..db24a2bad --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsAllowAllMode.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Current or requested allow-all mode. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum PermissionsAllowAllMode { + /** The {@code off} variant. */ + OFF("off"), + /** The {@code on} variant. */ + ON("on"), + /** The {@code auto} variant. */ + AUTO("auto"); + + private final String value; + PermissionsAllowAllMode(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static PermissionsAllowAllMode fromValue(String value) { + for (PermissionsAllowAllMode v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown PermissionsAllowAllMode value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicy.java b/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicy.java index 61108c16b..249c7598d 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicy.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicy.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `PermissionsConfigureAdditionalContentExclusionPolicy` type. + * Content-exclusion policy supplied to `session.permissions.configure`, with rules, last-updated data, and scope. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRule.java b/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRule.java index c6c7f649a..b1afc50fc 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRule.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRule.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRule` type. + * Single content-exclusion rule supplied to `session.permissions.configure`, with paths, match conditions, and source. * * @since 1.0.0 */ @@ -25,7 +25,7 @@ public record PermissionsConfigureAdditionalContentExclusionPolicyRule( @JsonProperty("paths") List paths, @JsonProperty("ifAnyMatch") List ifAnyMatch, @JsonProperty("ifNoneMatch") List ifNoneMatch, - /** Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type. */ + /** Source descriptor for a `session.permissions.configure` content-exclusion rule, with source name and type. */ @JsonProperty("source") PermissionsConfigureAdditionalContentExclusionPolicyRuleSource source ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.java b/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.java index a5d4a45f3..f592ae799 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type. + * Source descriptor for a `session.permissions.configure` content-exclusion rule, with source name and type. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/Plugin.java b/java/src/generated/java/com/github/copilot/generated/rpc/Plugin.java index b10cd31cf..65268ab6e 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/Plugin.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/Plugin.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `Plugin` type. + * Session plugin metadata, with name, marketplace, optional version, and enabled state. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PluginUpdateAllEntry.java b/java/src/generated/java/com/github/copilot/generated/rpc/PluginUpdateAllEntry.java index 548ee3931..dab44f168 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/PluginUpdateAllEntry.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PluginUpdateAllEntry.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `PluginUpdateAllEntry` type. + * Per-plugin result from updating all plugins, with versions, skills installed, success flag, and optional error. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/QueuePendingItems.java b/java/src/generated/java/com/github/copilot/generated/rpc/QueuePendingItems.java index bfbc87f46..8767e91d0 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/QueuePendingItems.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/QueuePendingItems.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `QueuePendingItems` type. + * User-facing pending queue entry, with kind and display text for a queued message, slash command, or model change. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyNetwork.java b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyNetwork.java index d3d7b901f..9b8b53c81 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyNetwork.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigUserPolicyNetwork.java @@ -10,7 +10,6 @@ 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; /** @@ -25,10 +24,6 @@ public record SandboxConfigUserPolicyNetwork( /** Whether outbound network traffic is allowed at all. */ @JsonProperty("allowOutbound") Boolean allowOutbound, /** Whether traffic to local/loopback addresses is allowed. */ - @JsonProperty("allowLocalNetwork") Boolean allowLocalNetwork, - /** Hosts allowed in addition to the base policy. */ - @JsonProperty("allowedHosts") List allowedHosts, - /** Hosts explicitly blocked. */ - @JsonProperty("blockedHosts") List blockedHosts + @JsonProperty("allowLocalNetwork") Boolean allowLocalNetwork ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ScheduleEntry.java b/java/src/generated/java/com/github/copilot/generated/rpc/ScheduleEntry.java index 5ffd0a7cd..b88a79cca 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/ScheduleEntry.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ScheduleEntry.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ScheduleEntry` type. + * Scheduled prompt entry with ID, timing (`intervalMs`, `cron`, or `at`), prompt text, recurrence, and next run time. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ServerRpc.java b/java/src/generated/java/com/github/copilot/generated/rpc/ServerRpc.java index ce8c6c34f..21907b7ab 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/ServerRpc.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ServerRpc.java @@ -92,7 +92,7 @@ public CompletableFuture ping(PingParams params) { } /** - * Optional connection token presented by the SDK client during the handshake. + * Parameters for the `server.connect` handshake: an optional connection token and optional connection-level opt-ins (e.g. GitHub telemetry forwarding). * * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ServerSkill.java b/java/src/generated/java/com/github/copilot/generated/rpc/ServerSkill.java index 9752907e9..349824526 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/ServerSkill.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ServerSkill.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `ServerSkill` type. + * Server-side skill metadata, including name, description, source, enabled/invocable state, path, project path, and argument hint. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionDebugApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionDebugApi.java new file mode 100644 index 000000000..e0ca94374 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionDebugApi.java @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.github.copilot.CopilotExperimental; +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code debug} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionDebugApi { + + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionDebugApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Options for collecting a redacted session debug bundle. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + @CopilotExperimental + public CompletableFuture collectLogs(SessionDebugCollectLogsParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.debug.collectLogs", _p, SessionDebugCollectLogsResult.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionDebugCollectLogsParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionDebugCollectLogsParams.java new file mode 100644 index 000000000..2076e2ad7 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionDebugCollectLogsParams.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Options for collecting a redacted session debug bundle. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionDebugCollectLogsParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Where the redacted bundle should be written. Use `archive` to produce a .tgz, or `directory` to stage redacted files for caller-managed upload/post-processing. */ + @JsonProperty("destination") Object destination, + /** Which built-in session diagnostics to include. Omitted fields default to true. */ + @JsonProperty("include") DebugCollectLogsInclude include, + /** Caller-provided server-local files or directories to include in addition to the runtime's built-in session diagnostics. This lets host applications add their own diagnostics without changing the API shape. */ + @JsonProperty("additionalEntries") List additionalEntries +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionDebugCollectLogsResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionDebugCollectLogsResult.java new file mode 100644 index 000000000..623792b02 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionDebugCollectLogsResult.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Result of collecting a redacted debug bundle. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionDebugCollectLogsResult( + /** Destination kind that was written. */ + @JsonProperty("kind") DebugCollectLogsResultKind kind, + /** Actual archive path or staging directory path written. This may differ from the requested path when no-overwrite suffixing or fallback-to-temp-directory was needed. */ + @JsonProperty("path") String path, + /** Files included in the redacted bundle. */ + @JsonProperty("entries") List entries, + /** Optional files or directories that could not be included. */ + @JsonProperty("skippedEntries") List skippedEntries +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionFsReaddirWithTypesEntry.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionFsReaddirWithTypesEntry.java index f4c755951..3afa7fe12 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionFsReaddirWithTypesEntry.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionFsReaddirWithTypesEntry.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `SessionFsReaddirWithTypesEntry` type. + * Directory entry returned by session filesystem `readdirWithTypes`, with name and entry type. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionInstalledPlugin.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionInstalledPlugin.java index 5d1428558..ee1bc7154 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionInstalledPlugin.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionInstalledPlugin.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `SessionInstalledPlugin` type. + * Installed plugin record for a session, with marketplace, version, install time, enabled state, cache path, and source. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsApi.java index bbac10acc..aba317708 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsApi.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsApi.java @@ -103,7 +103,7 @@ public CompletableFuture setApproveAll(Se } /** - * Whether to enable full allow-all permissions for the session. + * Allow-all mode to apply for the session. *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsGetAllowAllResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsGetAllowAllResult.java index 772d9a0de..28d9915df 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsGetAllowAllResult.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsGetAllowAllResult.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Current full allow-all permission state. + * Current allow-all permission mode. * * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 @@ -25,6 +25,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record SessionPermissionsGetAllowAllResult( /** Whether full allow-all permissions are currently active */ - @JsonProperty("enabled") Boolean enabled + @JsonProperty("enabled") Boolean enabled, + /** Current allow-all mode */ + @JsonProperty("mode") PermissionsAllowAllMode mode ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetAllowAllParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetAllowAllParams.java index 4a553ffcf..7bde47bc8 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetAllowAllParams.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetAllowAllParams.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Whether to enable full allow-all permissions for the session. + * Allow-all mode to apply for the session. * * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 @@ -26,8 +26,12 @@ public record SessionPermissionsSetAllowAllParams( /** Target session identifier */ @JsonProperty("sessionId") String sessionId, - /** Whether to enable full allow-all permissions */ + /** Allow-all mode to apply. `on` enables full allow-all; `auto` enables advisory LLM auto-approval; `off` disables both. */ + @JsonProperty("mode") PermissionsAllowAllMode mode, + /** Legacy full allow-all toggle. Prefer `mode`; when `mode` is omitted, `enabled: true` is treated as `mode: "on"` and any other value is treated as `mode: "off"`. */ @JsonProperty("enabled") Boolean enabled, + /** Optional model id for the `auto` mode auto-approval LLM judging. Only meaningful when `mode` is `auto`; ignored otherwise. When omitted, the session's active model is used. */ + @JsonProperty("model") String model, /** Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers. */ @JsonProperty("source") PermissionsSetAllowAllSource source ) { diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetAllowAllResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetAllowAllResult.java index ed14e554b..9b14d8f6a 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetAllowAllResult.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetAllowAllResult.java @@ -26,7 +26,9 @@ public record SessionPermissionsSetAllowAllResult( /** Whether the operation succeeded */ @JsonProperty("success") Boolean success, - /** Authoritative allow-all state after the mutation */ - @JsonProperty("enabled") Boolean enabled + /** Authoritative full allow-all state after the mutation */ + @JsonProperty("enabled") Boolean enabled, + /** Authoritative allow-all mode after the mutation */ + @JsonProperty("mode") PermissionsAllowAllMode mode ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java index 3881140bb..1007c0db7 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java @@ -31,6 +31,8 @@ public final class SessionRpc { /** API methods for the {@code gitHubAuth} namespace. */ public final SessionGitHubAuthApi gitHubAuth; + /** API methods for the {@code debug} namespace. */ + public final SessionDebugApi debug; /** API methods for the {@code canvas} namespace. */ public final SessionCanvasApi canvas; /** API methods for the {@code model} namespace. */ @@ -79,6 +81,8 @@ public final class SessionRpc { public final SessionPermissionsApi permissions; /** API methods for the {@code metadata} namespace. */ public final SessionMetadataApi metadata; + /** API methods for the {@code settings} namespace. */ + public final SessionSettingsApi settings; /** API methods for the {@code shell} namespace. */ public final SessionShellApi shell; /** API methods for the {@code history} namespace. */ @@ -106,6 +110,7 @@ public SessionRpc(RpcCaller caller, String sessionId) { this.caller = caller; this.sessionId = sessionId; this.gitHubAuth = new SessionGitHubAuthApi(caller, sessionId); + this.debug = new SessionDebugApi(caller, sessionId); this.canvas = new SessionCanvasApi(caller, sessionId); this.model = new SessionModelApi(caller, sessionId); this.mode = new SessionModeApi(caller, sessionId); @@ -130,6 +135,7 @@ public SessionRpc(RpcCaller caller, String sessionId) { this.ui = new SessionUiApi(caller, sessionId); this.permissions = new SessionPermissionsApi(caller, sessionId); this.metadata = new SessionMetadataApi(caller, sessionId); + this.settings = new SessionSettingsApi(caller, sessionId); this.shell = new SessionShellApi(caller, sessionId); this.history = new SessionHistoryApi(caller, sessionId); this.queue = new SessionQueueApi(caller, sessionId); diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsApi.java new file mode 100644 index 000000000..dd4acfdb5 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsApi.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.github.copilot.CopilotExperimental; +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code settings} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionSettingsApi { + + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionSettingsApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + @CopilotExperimental + public CompletableFuture snapshot() { + return caller.invoke("session.settings.snapshot", java.util.Map.of("sessionId", this.sessionId), SessionSettingsSnapshotResult.class); + } + + /** + * Named Rust-owned settings predicate to evaluate for this session. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + @CopilotExperimental + public CompletableFuture evaluatePredicate(SessionSettingsEvaluatePredicateParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.settings.evaluatePredicate", _p, SessionSettingsEvaluatePredicateResult.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsBuiltInToolAvailabilitySnapshot.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsBuiltInToolAvailabilitySnapshot.java new file mode 100644 index 000000000..98e6df29f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsBuiltInToolAvailabilitySnapshot.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; + +/** + * Availability of built-in job tools surfaced to boundary consumers. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSettingsBuiltInToolAvailabilitySnapshot( + @JsonProperty("reportProgress") Boolean reportProgress, + @JsonProperty("createPullRequest") Boolean createPullRequest +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsEvaluatePredicateParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsEvaluatePredicateParams.java new file mode 100644 index 000000000..a7c1663e2 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsEvaluatePredicateParams.java @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Named Rust-owned settings predicate to evaluate for this session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSettingsEvaluatePredicateParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Predicate name. The runtime owns the raw feature-flag names and composition logic. */ + @JsonProperty("name") SessionSettingsPredicateName name, + /** Tool name for tool-scoped predicates such as trivial-change handling. */ + @JsonProperty("toolName") String toolName +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsEvaluatePredicateResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsEvaluatePredicateResult.java new file mode 100644 index 000000000..1f4a7ed32 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsEvaluatePredicateResult.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 com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Result of evaluating a Rust-owned settings predicate. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSettingsEvaluatePredicateResult( + @JsonProperty("enabled") Boolean enabled +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsJobSnapshot.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsJobSnapshot.java new file mode 100644 index 000000000..463660d8a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsJobSnapshot.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Redacted job settings for a session. The job nonce is excluded. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSettingsJobSnapshot( + @JsonProperty("eventType") String eventType, + @JsonProperty("isTriggerJob") Boolean isTriggerJob, + @JsonProperty("builtInToolAvailability") SessionSettingsBuiltInToolAvailabilitySnapshot builtInToolAvailability +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsModelSnapshot.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsModelSnapshot.java new file mode 100644 index 000000000..ce515c74d --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsModelSnapshot.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; + +/** + * Redacted model routing settings for a session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSettingsModelSnapshot( + @JsonProperty("model") String model, + @JsonProperty("defaultReasoningEffort") String defaultReasoningEffort, + @JsonProperty("instanceId") String instanceId, + @JsonProperty("callbackUrl") String callbackUrl +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsOnlineEvaluationSnapshot.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsOnlineEvaluationSnapshot.java new file mode 100644 index 000000000..b1a5be6f3 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsOnlineEvaluationSnapshot.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; + +/** + * Online-evaluation settings safe to expose across the SDK boundary. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSettingsOnlineEvaluationSnapshot( + @JsonProperty("disableOnlineEvaluation") Boolean disableOnlineEvaluation, + @JsonProperty("enableOnlineEvaluationOutputFile") Boolean enableOnlineEvaluationOutputFile +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsPredicateName.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsPredicateName.java new file mode 100644 index 000000000..6c99c214a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsPredicateName.java @@ -0,0 +1,69 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Rust-owned settings predicates exposed across the SDK boundary. Raw feature-flag names are intentionally not part of the contract. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum SessionSettingsPredicateName { + /** The {@code securityToolsEnabled} variant. */ + SECURITYTOOLSENABLED("securityToolsEnabled"), + /** The {@code thirdPartySecurityPromptEnabled} variant. */ + THIRDPARTYSECURITYPROMPTENABLED("thirdPartySecurityPromptEnabled"), + /** The {@code parallelValidationEnabled} variant. */ + PARALLELVALIDATIONENABLED("parallelValidationEnabled"), + /** The {@code runtimeTimingTelemetryEnabled} variant. */ + RUNTIMETIMINGTELEMETRYENABLED("runtimeTimingTelemetryEnabled"), + /** The {@code coAuthorHookEnabled} variant. */ + COAUTHORHOOKENABLED("coAuthorHookEnabled"), + /** The {@code chronicleEnabled} variant. */ + CHRONICLEENABLED("chronicleEnabled"), + /** The {@code contentExclusionSelfFetchEnabled} variant. */ + CONTENTEXCLUSIONSELFFETCHENABLED("contentExclusionSelfFetchEnabled"), + /** The {@code capClaudeOpusTokenLimitsEnabled} variant. */ + CAPCLAUDEOPUSTOKENLIMITSENABLED("capClaudeOpusTokenLimitsEnabled"), + /** The {@code codeReviewFeatureEnabled} variant. */ + CODEREVIEWFEATUREENABLED("codeReviewFeatureEnabled"), + /** The {@code ccaUseTsAutofindEnabled} variant. */ + CCAUSETSAUTOFINDENABLED("ccaUseTsAutofindEnabled"), + /** The {@code dependencyCheckerEnabled} variant. */ + DEPENDENCYCHECKERENABLED("dependencyCheckerEnabled"), + /** The {@code dependabotCheckerEnabled} variant. */ + DEPENDABOTCHECKERENABLED("dependabotCheckerEnabled"), + /** The {@code codeqlCheckerEnabled} variant. */ + CODEQLCHECKERENABLED("codeqlCheckerEnabled"), + /** The {@code trivialChangeEnabled} variant. */ + TRIVIALCHANGEENABLED("trivialChangeEnabled"), + /** The {@code trivialChangeSkipEnabled} variant. */ + TRIVIALCHANGESKIPENABLED("trivialChangeSkipEnabled"), + /** The {@code trivialChangeEnabledForCodeReview} variant. */ + TRIVIALCHANGEENABLEDFORCODEREVIEW("trivialChangeEnabledForCodeReview"), + /** The {@code trivialChangeSkipEnabledForCodeReview} variant. */ + TRIVIALCHANGESKIPENABLEDFORCODEREVIEW("trivialChangeSkipEnabledForCodeReview"), + /** The {@code trivialChangeEnabledForTool} variant. */ + TRIVIALCHANGEENABLEDFORTOOL("trivialChangeEnabledForTool"), + /** The {@code trivialChangeSkipEnabledForTool} variant. */ + TRIVIALCHANGESKIPENABLEDFORTOOL("trivialChangeSkipEnabledForTool"); + + private final String value; + SessionSettingsPredicateName(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static SessionSettingsPredicateName fromValue(String value) { + for (SessionSettingsPredicateName v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown SessionSettingsPredicateName value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsRepoSnapshot.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsRepoSnapshot.java new file mode 100644 index 000000000..960853c52 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsRepoSnapshot.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Redacted repository and GitHub host settings for a session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSettingsRepoSnapshot( + @JsonProperty("name") String name, + @JsonProperty("id") Double id, + @JsonProperty("branch") String branch, + @JsonProperty("commit") String commit, + @JsonProperty("readWrite") Boolean readWrite, + @JsonProperty("ownerName") String ownerName, + @JsonProperty("ownerId") Double ownerId, + @JsonProperty("serverUrl") String serverUrl, + @JsonProperty("host") String host, + @JsonProperty("hostProtocol") String hostProtocol, + @JsonProperty("secretScanningUrl") String secretScanningUrl, + @JsonProperty("prCommitCount") Double prCommitCount +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsSnapshotParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsSnapshotParams.java new file mode 100644 index 000000000..8bad93152 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsSnapshotParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSettingsSnapshotParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsSnapshotResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsSnapshotResult.java new file mode 100644 index 000000000..0851474d6 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsSnapshotResult.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Redacted, serializable view of session runtime settings for SDK boundary consumers. Secrets and raw feature flags are intentionally excluded. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSettingsSnapshotResult( + @JsonProperty("version") String version, + @JsonProperty("clientName") String clientName, + @JsonProperty("timeoutMs") Double timeoutMs, + @JsonProperty("startTimeMs") Double startTimeMs, + @JsonProperty("repo") SessionSettingsRepoSnapshot repo, + @JsonProperty("model") SessionSettingsModelSnapshot model, + @JsonProperty("validation") SessionSettingsValidationSnapshot validation, + @JsonProperty("job") SessionSettingsJobSnapshot job, + @JsonProperty("onlineEvaluation") SessionSettingsOnlineEvaluationSnapshot onlineEvaluation +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsValidationSnapshot.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsValidationSnapshot.java new file mode 100644 index 000000000..375cfdfec --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionSettingsValidationSnapshot.java @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Redacted validation and memory-tool settings for a session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSettingsValidationSnapshot( + @JsonProperty("timeout") Double timeout, + @JsonProperty("dependabotTimeout") Double dependabotTimeout, + @JsonProperty("codeqlEnabled") Boolean codeqlEnabled, + @JsonProperty("codeReviewEnabled") Boolean codeReviewEnabled, + @JsonProperty("codeReviewModel") String codeReviewModel, + @JsonProperty("advisoryEnabled") Boolean advisoryEnabled, + @JsonProperty("secretScanningEnabled") Boolean secretScanningEnabled, + @JsonProperty("memoryStoreEnabled") Boolean memoryStoreEnabled, + @JsonProperty("memoryVoteEnabled") Boolean memoryVoteEnabled +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingExitPlanModeParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingExitPlanModeParams.java index 87eccd1e2..2142a98f3 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingExitPlanModeParams.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingExitPlanModeParams.java @@ -28,7 +28,7 @@ public record SessionUiHandlePendingExitPlanModeParams( @JsonProperty("sessionId") String sessionId, /** The unique request ID from the exit_plan_mode.requested event */ @JsonProperty("requestId") String requestId, - /** Schema for the `UIExitPlanModeResponse` type. */ + /** User response for a pending exit-plan-mode request, with approval state, selected action, auto-approve flag, and feedback. */ @JsonProperty("response") UIExitPlanModeResponse response ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingUserInputParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingUserInputParams.java index 224035438..999a8738d 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingUserInputParams.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingUserInputParams.java @@ -28,7 +28,7 @@ public record SessionUiHandlePendingUserInputParams( @JsonProperty("sessionId") String sessionId, /** The unique request ID from the user_input.requested event */ @JsonProperty("requestId") String requestId, - /** Schema for the `UIUserInputResponse` type. */ + /** User response for a pending user-input request, with answer text and whether it was typed freeform. */ @JsonProperty("response") UIUserInputResponse response ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgress.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgress.java index 44d1aa0de..8509295cb 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgress.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionsOpenProgress.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `SessionsOpenProgress` type. + * `sessions.open` handoff progress update with step, status, and optional message. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/Skill.java b/java/src/generated/java/com/github/copilot/generated/rpc/Skill.java index 5b1cea9b7..4ad411687 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/Skill.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/Skill.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `Skill` type. + * Skill metadata available to a session, with name, description, source, enabled/invocable state, path, plugin, and argument hint. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SkillDiscoveryPath.java b/java/src/generated/java/com/github/copilot/generated/rpc/SkillDiscoveryPath.java index 4d2e90a5d..feea2794f 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SkillDiscoveryPath.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SkillDiscoveryPath.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `SkillDiscoveryPath` type. + * Canonical directory where skills can be discovered or created, with scope, preference, and optional project path. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SkillsInvokedSkill.java b/java/src/generated/java/com/github/copilot/generated/rpc/SkillsInvokedSkill.java index 697e18fa4..a020c89ec 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SkillsInvokedSkill.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SkillsInvokedSkill.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `SkillsInvokedSkill` type. + * Skill invocation record with name, path, content, allowed tools, and turn number. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandAgentPromptResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandAgentPromptResult.java index 48a6c08a6..a034458c9 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandAgentPromptResult.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandAgentPromptResult.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `SlashCommandAgentPromptResult` type. + * Slash-command invocation result that submits an agent prompt, with display prompt, optional mode, and settings-change flag. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandCompletedResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandCompletedResult.java index 8c6ef74be..b2a1970a3 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandCompletedResult.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandCompletedResult.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `SlashCommandCompletedResult` type. + * Slash-command invocation result indicating completion, with optional message and settings-change flag. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandInfo.java b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandInfo.java index 61b2e933f..9a725ecec 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandInfo.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandInfo.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `SlashCommandInfo` type. + * Slash-command metadata with name, aliases, description, kind, input hint, execution allowance, and schedulability. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandSelectSubcommandOption.java b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandSelectSubcommandOption.java index 317ec970f..00d8b423e 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandSelectSubcommandOption.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandSelectSubcommandOption.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `SlashCommandSelectSubcommandOption` type. + * Selectable slash-command subcommand option with name, description, and optional group label. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandSelectSubcommandResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandSelectSubcommandResult.java index 512c46355..5c151954b 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandSelectSubcommandResult.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandSelectSubcommandResult.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `SlashCommandSelectSubcommandResult` type. + * Slash-command invocation result asking the client to present subcommand options for a parent command. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandTextResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandTextResult.java index 4aaab6969..5f232e8b9 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandTextResult.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandTextResult.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `SlashCommandTextResult` type. + * Slash-command invocation result containing text output plus Markdown/ANSI rendering flags. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/Tool.java b/java/src/generated/java/com/github/copilot/generated/rpc/Tool.java index e4b1361c8..51fe65e6b 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/Tool.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/Tool.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `Tool` type. + * Built-in tool metadata with identifier, optional namespaced name, description, input-parameter schema, and usage instructions. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/UIExitPlanModeResponse.java b/java/src/generated/java/com/github/copilot/generated/rpc/UIExitPlanModeResponse.java index 50e201142..d74d1b504 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/UIExitPlanModeResponse.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/UIExitPlanModeResponse.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `UIExitPlanModeResponse` type. + * User response for a pending exit-plan-mode request, with approval state, selected action, auto-approve flag, and feedback. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/UIUserInputResponse.java b/java/src/generated/java/com/github/copilot/generated/rpc/UIUserInputResponse.java index d4ce9899d..9abc82505 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/UIUserInputResponse.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/UIUserInputResponse.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `UIUserInputResponse` type. + * User response for a pending user-input request, with answer text and whether it was typed freeform. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/UsageMetricsModelMetric.java b/java/src/generated/java/com/github/copilot/generated/rpc/UsageMetricsModelMetric.java index 7e34f43b3..1b66120cf 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/UsageMetricsModelMetric.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/UsageMetricsModelMetric.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `UsageMetricsModelMetric` type. + * Per-model usage metrics, including request counts/costs, token usage, nano-AI units, and per-token-type details. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/UsageMetricsModelMetricTokenDetail.java b/java/src/generated/java/com/github/copilot/generated/rpc/UsageMetricsModelMetricTokenDetail.java index e47a45fde..90af60c84 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/UsageMetricsModelMetricTokenDetail.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/UsageMetricsModelMetricTokenDetail.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `UsageMetricsModelMetricTokenDetail` type. + * Per-model token-detail entry containing the accumulated token count for one token type. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/UsageMetricsTokenDetail.java b/java/src/generated/java/com/github/copilot/generated/rpc/UsageMetricsTokenDetail.java index 55d0b81c8..32149bfa7 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/UsageMetricsTokenDetail.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/UsageMetricsTokenDetail.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `UsageMetricsTokenDetail` type. + * Session-wide token-detail entry containing the accumulated token count for one token type. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/WorkspacesCheckpoints.java b/java/src/generated/java/com/github/copilot/generated/rpc/WorkspacesCheckpoints.java index 07de034a9..c3696236c 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/WorkspacesCheckpoints.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/WorkspacesCheckpoints.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `WorkspacesCheckpoints` type. + * Workspace checkpoint metadata with assigned number, human-readable title, and checkpoint filename. * * @since 1.0.0 */ diff --git a/nodejs/package-lock.json b/nodejs/package-lock.json index fb0db5f92..b68b1267e 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.69-0", + "@github/copilot": "^1.0.69-1", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }, @@ -699,9 +699,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.69-0.tgz", - "integrity": "sha512-Y/ZJBo1dtsP7k2LxDQxQT5pj2ZaN7+dCD4vx5jhX3i2T+YFlOx7ZhfUx8Hpe94wQPDlCs+232TXRHl2Wb5p62w==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.69-1.tgz", + "integrity": "sha512-3kWG41prhG/+bMdgW6QvPZXSji2oVGSxQICrUStnW954vvwg0Snabz5g2P3/1EM7BJqoecYSSNIo+vzznxpuTQ==", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "detect-libc": "^2.1.2" @@ -710,20 +710,20 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.69-0", - "@github/copilot-darwin-x64": "1.0.69-0", - "@github/copilot-linux-arm64": "1.0.69-0", - "@github/copilot-linux-x64": "1.0.69-0", - "@github/copilot-linuxmusl-arm64": "1.0.69-0", - "@github/copilot-linuxmusl-x64": "1.0.69-0", - "@github/copilot-win32-arm64": "1.0.69-0", - "@github/copilot-win32-x64": "1.0.69-0" + "@github/copilot-darwin-arm64": "1.0.69-1", + "@github/copilot-darwin-x64": "1.0.69-1", + "@github/copilot-linux-arm64": "1.0.69-1", + "@github/copilot-linux-x64": "1.0.69-1", + "@github/copilot-linuxmusl-arm64": "1.0.69-1", + "@github/copilot-linuxmusl-x64": "1.0.69-1", + "@github/copilot-win32-arm64": "1.0.69-1", + "@github/copilot-win32-x64": "1.0.69-1" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.69-0.tgz", - "integrity": "sha512-RyX31WkNGpXycW5FCAgJ7+MXTmfwSkiohHf7jWShKQPP6m/MEM0CrBuS4XPeWK0gjtWM4MdAwmVe7qXtbzZu1w==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.69-1.tgz", + "integrity": "sha512-rCgRgY+5AUK4SEcVxNIHTV4Apl8NwtWwlDMiVIV8UtE+re2oq7ojq3CGSo4wzagHWUQSjEAEpwVBL6+NFnSVYw==", "cpu": [ "arm64" ], @@ -737,9 +737,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.69-0.tgz", - "integrity": "sha512-NaA44Uq6d1ijcF2eT8/Ql0eacyvjGFGYN8hVFLkD6CsjPmSbupMd39NFt2RWnZDjhg3S68J77OSXH4aj3vcaiA==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.69-1.tgz", + "integrity": "sha512-GnrRZziYWQrHJYpvbeZQoBWawbfOdVr43KgTqGru1ybVXh9BCtoYG/wcnIyla5ezlgNOtDphDg64cQHNhypgDQ==", "cpu": [ "x64" ], @@ -753,9 +753,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.69-0.tgz", - "integrity": "sha512-dSFha3BrnGeMKLzqWE8c63tRdKgw3mjV9Apx4/i7L9BMJ0o13oycVVe+D+bEVniWH12gVriIxE1+TQUAAVWLIQ==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.69-1.tgz", + "integrity": "sha512-2Hls3xLhN4Gk1nEHzwEZ+0XySVAZeQa5Gz2KRXUbs+JJ0e0TikT7kKsGtK+1fhEgAFdZ721XvtvxB+LA32y/rQ==", "cpu": [ "arm64" ], @@ -769,9 +769,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.69-0.tgz", - "integrity": "sha512-2zH3yh7//D7rOriDt4eAc4+tYay+oQj9CcENP0Cb8aNEn27hyZmuKiLoA+xyGSrbhVqA4rzYLC3Hx9RI96xxSQ==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.69-1.tgz", + "integrity": "sha512-MqBrjkhoynBYbrEqZjStKNXXIMEu+kSF2aUtGbotyz24vauAeg4lOf4E6uM41B53l1qoMoj34dQ+gPT+Tlvf6A==", "cpu": [ "x64" ], @@ -785,9 +785,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.69-0.tgz", - "integrity": "sha512-vVezUNBfxp4ej9rTQy3zy8UT23imxFWqzkVu0yFrt6lqr9a7RSmPHhhKkPYkyxCWuzhSxGWLm3Ad6TDTYVVGog==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.69-1.tgz", + "integrity": "sha512-KfG+4vW53Aou5s6dYfAlrVIikIGvv8i3UQA+wGRJX0PvhB2Z2xje3+fcGhAGywghhCL/UjZT8rwaeyJWGvdrBg==", "cpu": [ "arm64" ], @@ -801,9 +801,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.69-0.tgz", - "integrity": "sha512-Wlb421yC7iuw6ICMxuNPPL+ItG0f9+vv3wdHUeWhyCMte7+7tqxvhyfxSCzj46V5CXoGo32vUc0oOxmXMfSbyQ==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.69-1.tgz", + "integrity": "sha512-EgW/avqTW1vZp/7LfWotbUce9kkcpKELxn+PiVLGOcEFP/5/3nGt0mkXYpRJQJLwNcHTFFYLBfgLZSMJ3g1hTg==", "cpu": [ "x64" ], @@ -817,9 +817,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.69-0.tgz", - "integrity": "sha512-H0p9kiCO8Rt6tMuZUPzszoxYaipIIvOBbUtqljV56UX+XwBaSnxME/ZjRCNn480jdrA2QbLjaobZWH2w3C4scg==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.69-1.tgz", + "integrity": "sha512-ySorVqbMWdSK21WvEUgSit4jTQcC+MnQeFF0ACWvtKj2q73dzXR6yh8AGJTXG2AzvEgVC2yY0TNAB28nk4zA+Q==", "cpu": [ "arm64" ], @@ -833,9 +833,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.69-0.tgz", - "integrity": "sha512-3W/e8Lhw1eStFJogIP4pf9bxg9izcI/c0KErHLFK+56HqfnzK5ZDQqb+oeqRw3+aq24MvzyLzHA421jPHLIoOQ==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.69-1.tgz", + "integrity": "sha512-S7Oj7o27olpS70s7BaipcDsMif2/YoHj7KyQI/2aoXJG2xZb25wds65f/gTtsgOQOnnpCefywt/bHpX8Bw8wDQ==", "cpu": [ "x64" ], diff --git a/nodejs/package.json b/nodejs/package.json index 7e1e057c9..78182894e 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -56,7 +56,7 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.69-0", + "@github/copilot": "^1.0.69-1", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }, diff --git a/nodejs/samples/package-lock.json b/nodejs/samples/package-lock.json index 122748e05..aafdf5493 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.69-0", + "@github/copilot": "^1.0.69-1", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }, diff --git a/nodejs/src/generated/rpc.ts b/nodejs/src/generated/rpc.ts index cd60dedcb..226236499 100644 --- a/nodejs/src/generated/rpc.ts +++ b/nodejs/src/generated/rpc.ts @@ -202,6 +202,20 @@ export type AgentRegistrySpawnValidationErrorField = | "model" /** The permissionMode parameter */ | "permissionMode"; +/** + * Current or requested allow-all mode. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PermissionsAllowAllMode". + */ +/** @experimental */ +export type PermissionsAllowAllMode = + /** Permission requests follow the normal approval flow. */ + | "off" + /** Tool, path, and URL permission requests are automatically approved. */ + | "on" + /** Permission requests follow the normal approval flow with an LLM advisory recommendation attached; clients may choose to auto-approve requests the judge evaluated as acceptable. */ + | "auto"; /** * Authentication type * @@ -280,6 +294,84 @@ export type ContentFilterMode = | "markdown" /** Remove characters that can hide directives. */ | "hidden_characters"; +/** + * Source category for a collected debug bundle entry. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "DebugCollectLogsSource". + */ +/** @experimental */ +export type DebugCollectLogsSource = + /** Session event log. */ + | "events" + /** Process log for the session. */ + | "process-log" + /** Interactive shell log for the session. */ + | "shell-log" + /** Caller-provided diagnostic entry. */ + | "additional"; +/** + * Destination for the redacted debug bundle. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "DebugCollectLogsDestination". + */ +/** @experimental */ +export type DebugCollectLogsDestination = + | { + /** + * Absolute or server-relative path for the .tgz archive to create. + */ + outputPath: string; + /** + * When true, create the archive atomically without overwriting an existing file by appending ` (N)` before the extension as needed. Defaults to false. + */ + noOverwrite?: boolean; + kind: "archive"; + } + | { + /** + * Directory where redacted files should be staged. The directory is created if needed. + */ + outputDirectory: string; + kind: "directory"; + }; +/** + * Kind of caller-provided debug log entry. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "DebugCollectLogsEntryKind". + */ +/** @experimental */ +export type DebugCollectLogsEntryKind = + /** Include a single server-local file. */ + | "file" + /** Include files from a server-local directory recursively. */ + | "directory"; +/** + * How a collected debug entry should be redacted before being staged. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "DebugCollectLogsRedaction". + */ +/** @experimental */ +export type DebugCollectLogsRedaction = + /** Redact the file as plain UTF-8 log text. */ + | "plain-text" + /** Redact each non-empty line as a session event JSON object, falling back to plain-text redaction for malformed lines. */ + | "events-jsonl"; +/** + * Destination kind that was written. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "DebugCollectLogsResultKind". + */ +/** @experimental */ +export type DebugCollectLogsResultKind = + /** A .tgz archive was written. */ + | "archive" + /** A directory containing redacted files was written. */ + | "directory"; /** * Server transport type: stdio, http, sse (deprecated), or memory * @@ -1254,7 +1346,7 @@ export type ProviderEndpointTransport = /** WebSocket transport. */ | "websockets"; /** - * Schema for the `PushAttachment` type. + * Attachment union accepted by push input, covering files, directories, GitHub objects, blobs, snippets, and extension context. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PushAttachment". @@ -1641,6 +1733,52 @@ export type SessionsOpenProgressStatus = | "in-progress" /** The step has completed successfully. */ | "complete"; +/** + * Rust-owned settings predicates exposed across the SDK boundary. Raw feature-flag names are intentionally not part of the contract. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionSettingsPredicateName". + */ +/** @experimental */ +export type SessionSettingsPredicateName = + /** Whether the security-tools feature flag enables security tool wiring. */ + | "securityToolsEnabled" + /** Whether third-party security tools should receive the security prompt. */ + | "thirdPartySecurityPromptEnabled" + /** Whether validation may run in parallel. */ + | "parallelValidationEnabled" + /** Whether runtime timing telemetry is enabled. */ + | "runtimeTimingTelemetryEnabled" + /** Whether the co-author hook is enabled. */ + | "coAuthorHookEnabled" + /** Whether Chronicle integration is enabled. */ + | "chronicleEnabled" + /** Whether content-exclusion policy may self-fetch data. */ + | "contentExclusionSelfFetchEnabled" + /** Whether Claude Opus token-limit caps should be applied. */ + | "capClaudeOpusTokenLimitsEnabled" + /** Whether code-review behavior is enabled. */ + | "codeReviewFeatureEnabled" + /** Whether CCA should use the TypeScript autofind behavior. */ + | "ccaUseTsAutofindEnabled" + /** Whether the dependency checker is enabled. */ + | "dependencyCheckerEnabled" + /** Whether the Dependabot checker is enabled. */ + | "dependabotCheckerEnabled" + /** Whether the CodeQL checker is enabled. */ + | "codeqlCheckerEnabled" + /** Whether trivial-change handling is enabled. */ + | "trivialChangeEnabled" + /** Whether trivial-change skip behavior is enabled. */ + | "trivialChangeSkipEnabled" + /** Whether trivial-change handling is enabled for code review. */ + | "trivialChangeEnabledForCodeReview" + /** Whether trivial-change skip behavior is enabled for code review. */ + | "trivialChangeSkipEnabledForCodeReview" + /** Whether trivial-change handling is enabled for a specific tool. */ + | "trivialChangeEnabledForTool" + /** Whether trivial-change skip behavior is enabled for a specific tool. */ + | "trivialChangeSkipEnabledForTool"; /** * Which session sources to include. Defaults to `local` for backward compatibility. * @@ -1781,7 +1919,7 @@ export type TaskExecutionMode = /** The task is managed in the background. */ | "background"; /** - * Schema for the `TaskInfo` type. + * Tracked task union returned by task APIs, containing either an agent task or a shell task. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "TaskInfo". @@ -1823,7 +1961,7 @@ export type UIAutoModeSwitchResponse = /** Decline the automatic mode switch. */ | "no"; /** - * Schema for the `UIElicitationFieldValue` type. + * Submitted UI elicitation field value: string, number, boolean, or an array of strings. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UIElicitationFieldValue". @@ -2001,7 +2139,7 @@ export interface AbortResult { error?: string; } /** - * Schema for the `AccountAllUsers` type. + * Authenticated account entry returned by `account.getAllUsers`, with auth info and an optional associated token. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "AccountAllUsers". @@ -2015,7 +2153,7 @@ export interface AccountAllUsers { token?: string; } /** - * Schema for the `HMACAuthInfo` type. + * Authentication-info variant for GitHub-internal HMAC auth, carrying the public GitHub host and HMAC secret. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "HMACAuthInfo". @@ -2044,9 +2182,21 @@ export interface HMACAuthInfo { */ /** @experimental */ export interface CopilotUserResponse { + /** + * GitHub login of the authenticated user. + */ login?: string; + /** + * Copilot access SKU identifier (e.g. `free_limited_copilot`, `copilot_for_business_seat_quota`) used to gate model and feature access. + */ access_type_sku?: string; + /** + * Opaque analytics tracking identifier for the user, forwarded from the Copilot API. + */ analytics_tracking_id?: string; + /** + * Date the Copilot seat was assigned to the user, if applicable. + */ assigned_date?: | ( | { @@ -2055,12 +2205,30 @@ export interface CopilotUserResponse { | string ) | null; + /** + * Whether the user is eligible to sign up for the free/limited Copilot tier. + */ can_signup_for_limited?: boolean; + /** + * Whether Copilot chat is enabled for the user. + */ chat_enabled?: boolean; + /** + * Copilot plan name for the user (e.g. `individual`, `business`, `enterprise`). + */ copilot_plan?: string; + /** + * Whether `.copilotignore` content-exclusion support is enabled for the user. + */ copilotignore_enabled?: boolean; endpoints?: CopilotUserResponseEndpoints; + /** + * Logins of the organizations the user belongs to. + */ organization_login_list?: string[]; + /** + * Organizations the user belongs to, each with an optional login and display name. + */ organization_list?: | ( | { @@ -2086,7 +2254,13 @@ export interface CopilotUserResponse { } | null)[] ) | null; + /** + * Whether the Codex agent is enabled for the user. + */ codex_agent_enabled?: boolean; + /** + * Whether MCP (Model Context Protocol) support is enabled for the user. + */ is_mcp_enabled?: | ( | { @@ -2095,26 +2269,62 @@ export interface CopilotUserResponse { | boolean ) | null; + /** + * Date the user's usage quota next resets, as a raw string from the Copilot API; see `quota_reset_date_utc` for the UTC-normalized value. + */ quota_reset_date?: string; quota_snapshots?: CopilotUserResponseQuotaSnapshots; + /** + * Whether the user's telemetry is subject to restricted-data handling. + */ restricted_telemetry?: boolean; + /** + * Whether the user is a GitHub/Microsoft staff member. + */ is_staff?: boolean; + /** + * Raw passthrough of the Copilot API `te` flag for the user (an opaque server-side eligibility signal surfaced in telemetry); not otherwise interpreted by the runtime. + */ te?: boolean; + /** + * Whether the account is on usage-based (token/AI-credit) billing rather than a fixed premium-request quota. + */ token_based_billing?: boolean; + /** + * Whether the user is able to upgrade their Copilot plan. + */ can_upgrade_plan?: boolean; + /** + * UTC-normalized form of `quota_reset_date` (the date the user's usage quota next resets). + */ quota_reset_date_utc?: string; + /** + * Per-category quota allotments for free/limited-tier users, keyed by quota category. + */ limited_user_quotas?: { [k: string]: number | undefined; }; + /** + * Date the free/limited-tier user's quotas next reset, as a raw string from the Copilot API. + */ limited_user_reset_date?: string; + /** + * Per-category monthly quota allotments, keyed by quota category. + */ monthly_quotas?: { [k: string]: number | undefined; }; + /** + * Whether cloud session storage is enabled for the user. + */ cloud_session_storage_enabled?: boolean; + /** + * Whether CLI remote control is enabled for the user. + */ cli_remote_control_enabled?: boolean; } /** - * Schema for the `CopilotUserResponseEndpoints` type. + * Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "CopilotUserResponseEndpoints". @@ -2127,7 +2337,7 @@ export interface CopilotUserResponseEndpoints { telemetry?: string; } /** - * Schema for the `CopilotUserResponseQuotaSnapshots` type. + * Quota snapshot map from the raw Copilot user-response passthrough, with chat, completions, premium-interactions, and other entries. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "CopilotUserResponseQuotaSnapshots". @@ -2155,70 +2365,178 @@ export interface CopilotUserResponseQuotaSnapshots { | undefined; } /** - * Schema for the `CopilotUserResponseQuotaSnapshotsChat` type. + * Chat quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "CopilotUserResponseQuotaSnapshotsChat". */ /** @experimental */ export interface CopilotUserResponseQuotaSnapshotsChat { + /** + * Number of requests/units included in the entitlement for this period; `-1` denotes an unlimited entitlement. + */ entitlement?: number; + /** + * Count of additional pay-per-request usage consumed this period beyond the entitlement. + */ overage_count?: number; + /** + * Whether usage may continue at pay-per-request rates once the entitlement is exhausted. + */ overage_permitted?: boolean; + /** + * Percentage of the entitlement remaining at the snapshot timestamp. + */ percent_remaining?: number; + /** + * Identifier of the quota bucket this snapshot describes. + */ quota_id?: string; + /** + * Amount of quota remaining at the snapshot timestamp. + */ quota_remaining?: number; + /** + * Remaining entitlement/quota amount at the snapshot timestamp. + */ remaining?: number; + /** + * Whether the entitlement for this category is unlimited. + */ unlimited?: boolean; + /** + * UTC timestamp when this snapshot was captured. + */ timestamp_utc?: string; + /** + * Whether the user currently has quota available; when `false` and not unlimited, further requests are blocked until the quota resets. + */ has_quota?: boolean; + /** + * Unix epoch time, in seconds, when this quota next resets. + */ quota_reset_at?: number; + /** + * Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. + */ token_based_billing?: boolean; } /** - * Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` type. + * Completions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "CopilotUserResponseQuotaSnapshotsCompletions". */ /** @experimental */ export interface CopilotUserResponseQuotaSnapshotsCompletions { + /** + * Number of requests/units included in the entitlement for this period; `-1` denotes an unlimited entitlement. + */ entitlement?: number; + /** + * Count of additional pay-per-request usage consumed this period beyond the entitlement. + */ overage_count?: number; + /** + * Whether usage may continue at pay-per-request rates once the entitlement is exhausted. + */ overage_permitted?: boolean; + /** + * Percentage of the entitlement remaining at the snapshot timestamp. + */ percent_remaining?: number; + /** + * Identifier of the quota bucket this snapshot describes. + */ quota_id?: string; + /** + * Amount of quota remaining at the snapshot timestamp. + */ quota_remaining?: number; + /** + * Remaining entitlement/quota amount at the snapshot timestamp. + */ remaining?: number; + /** + * Whether the entitlement for this category is unlimited. + */ unlimited?: boolean; + /** + * UTC timestamp when this snapshot was captured. + */ timestamp_utc?: string; + /** + * Whether the user currently has quota available; when `false` and not unlimited, further requests are blocked until the quota resets. + */ has_quota?: boolean; + /** + * Unix epoch time, in seconds, when this quota next resets. + */ quota_reset_at?: number; + /** + * Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. + */ token_based_billing?: boolean; } /** - * Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` type. + * Premium-interactions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "CopilotUserResponseQuotaSnapshotsPremiumInteractions". */ /** @experimental */ export interface CopilotUserResponseQuotaSnapshotsPremiumInteractions { + /** + * Number of requests/units included in the entitlement for this period; `-1` denotes an unlimited entitlement. + */ entitlement?: number; + /** + * Count of additional pay-per-request usage consumed this period beyond the entitlement. + */ overage_count?: number; + /** + * Whether usage may continue at pay-per-request rates once the entitlement is exhausted. + */ overage_permitted?: boolean; + /** + * Percentage of the entitlement remaining at the snapshot timestamp. + */ percent_remaining?: number; + /** + * Identifier of the quota bucket this snapshot describes. + */ quota_id?: string; + /** + * Amount of quota remaining at the snapshot timestamp. + */ quota_remaining?: number; + /** + * Remaining entitlement/quota amount at the snapshot timestamp. + */ remaining?: number; + /** + * Whether the entitlement for this category is unlimited. + */ unlimited?: boolean; + /** + * UTC timestamp when this snapshot was captured. + */ timestamp_utc?: string; + /** + * Whether the user currently has quota available; when `false` and not unlimited, further requests are blocked until the quota resets. + */ has_quota?: boolean; + /** + * Unix epoch time, in seconds, when this quota next resets. + */ quota_reset_at?: number; + /** + * Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. + */ token_based_billing?: boolean; } /** - * Schema for the `EnvAuthInfo` type. + * Authentication-info variant for a token sourced from an environment variable, with host, optional login, token, and env var name. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "EnvAuthInfo". @@ -2248,7 +2566,7 @@ export interface EnvAuthInfo { copilotUser?: CopilotUserResponse; } /** - * Schema for the `TokenAuthInfo` type. + * Authentication-info variant for SDK-configured token authentication, carrying host and the secret token value. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "TokenAuthInfo". @@ -2270,7 +2588,7 @@ export interface TokenAuthInfo { copilotUser?: CopilotUserResponse; } /** - * Schema for the `CopilotApiTokenAuthInfo` type. + * Authentication-info variant for direct Copilot API token auth sourced from environment variables, with public GitHub host. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "CopilotApiTokenAuthInfo". @@ -2288,7 +2606,7 @@ export interface CopilotApiTokenAuthInfo { copilotUser?: CopilotUserResponse; } /** - * Schema for the `UserAuthInfo` type. + * Authentication-info variant for OAuth user auth, with host and login; the token remains in the runtime secret store. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UserAuthInfo". @@ -2310,7 +2628,7 @@ export interface UserAuthInfo { copilotUser?: CopilotUserResponse; } /** - * Schema for the `GhCliAuthInfo` type. + * Authentication-info variant for GitHub CLI credentials, carrying host, login, and the `gh auth token` value. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "GhCliAuthInfo". @@ -2336,7 +2654,7 @@ export interface GhCliAuthInfo { copilotUser?: CopilotUserResponse; } /** - * Schema for the `ApiKeyAuthInfo` type. + * Authentication-info variant for API-key authentication to a non-GitHub LLM provider, carrying the secret `apiKey` and host. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "ApiKeyAuthInfo". @@ -2395,7 +2713,7 @@ export interface AccountGetQuotaResult { }; } /** - * Schema for the `AccountQuotaSnapshot` type. + * Quota usage snapshot for a Copilot quota type, including entitlement, used requests, overage, reset date, and remaining percentage. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "AccountQuotaSnapshot". @@ -2493,7 +2811,7 @@ export interface AccountLogoutResult { hasMoreUsers: boolean; } /** - * Schema for the `AgentDiscoveryPath` type. + * Canonical directory where custom agents can be discovered or created, with scope, preference, and optional project path. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "AgentDiscoveryPath". @@ -2541,7 +2859,7 @@ export interface AgentGetCurrentResult { agent?: AgentInfo | null; } /** - * Schema for the `AgentInfo` type. + * Custom agent metadata, including identifiers, display details, source, tools, model, MCP servers, skills, and file path. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "AgentInfo". @@ -2894,12 +3212,13 @@ export interface AllowAllPermissionSetResult { */ success: boolean; /** - * Authoritative allow-all state after the mutation + * Authoritative full allow-all state after the mutation */ enabled: boolean; + mode?: PermissionsAllowAllMode; } /** - * Current full allow-all permission state. + * Current allow-all permission mode. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "AllowAllPermissionState". @@ -2910,6 +3229,7 @@ export interface AllowAllPermissionState { * Whether full allow-all permissions are currently active */ enabled: boolean; + mode?: PermissionsAllowAllMode; } /** * Cancellation result for a user-requested shell command. @@ -3309,7 +3629,7 @@ export interface CommandList { commands: SlashCommandInfo[]; } /** - * Schema for the `SlashCommandInfo` type. + * Slash-command metadata with name, aliases, description, kind, input hint, execution allowance, and schedulability. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SlashCommandInfo". @@ -3469,7 +3789,7 @@ export interface CommandsRespondToQueuedCommandRequest { result: QueuedCommandResult; } /** - * Schema for the `QueuedCommandHandled` type. + * Queued-command response indicating the host executed the command, with an optional flag to stop queue processing. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "QueuedCommandHandled". @@ -3486,7 +3806,7 @@ export interface QueuedCommandHandled { stopProcessingQueue?: boolean; } /** - * Schema for the `QueuedCommandNotHandled` type. + * Queued-command response indicating the host did not execute the command and the queue may continue. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "QueuedCommandNotHandled". @@ -3689,7 +4009,7 @@ export interface ConnectRemoteSessionParams { sessionId: string; } /** - * Optional connection token presented by the SDK client during the handshake. + * Parameters for the `server.connect` handshake: an optional connection token and optional connection-level opt-ins (e.g. GitHub telemetry forwarding). * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "ConnectRequest". @@ -3701,6 +4021,10 @@ export interface ConnectRequest { * Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN */ token?: string; + /** + * 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, in addition to the runtime's normal GitHub/CTS emission (dual-write). 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. + */ + enableGitHubTelemetryForwarding?: boolean; } /** * Handshake result reporting the server's protocol version and package version on success. @@ -3807,7 +4131,143 @@ export interface CurrentToolMetadata { deferLoading?: boolean; } /** - * Schema for the `DiscoveredMcpServer` type. + * A file included in the redacted debug bundle. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "DebugCollectLogsCollectedEntry". + */ +/** @experimental */ +export interface DebugCollectLogsCollectedEntry { + /** + * Relative path of the file in the staged bundle/archive. + */ + bundlePath: string; + source: DebugCollectLogsSource; + /** + * Redacted output size in bytes. + */ + sizeBytes: number; +} +/** + * A caller-provided server-local file or directory to include in the debug bundle. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "DebugCollectLogsEntry". + */ +/** @experimental */ +export interface DebugCollectLogsEntry { + kind: DebugCollectLogsEntryKind; + /** + * Server-local source path to read. + */ + path: string; + /** + * Relative path to use inside the staged bundle/archive. + */ + bundlePath: string; + redaction?: DebugCollectLogsRedaction; + /** + * When true, collection fails if this entry cannot be read. Defaults to false, which records the entry in `skippedEntries`. + */ + required?: boolean; +} +/** + * Built-in session diagnostics to include in the bundle. Omitted fields default to true. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "DebugCollectLogsInclude". + */ +/** @experimental */ +export interface DebugCollectLogsInclude { + /** + * Include the session event log (`events.jsonl`). Defaults to true. + */ + events?: boolean; + /** + * Include process logs for the session. Defaults to true. + */ + processLogs?: boolean; + /** + * Include interactive shell logs written under the session's `shell-logs` directory. Defaults to true. + */ + shellLogs?: boolean; + /** + * Server-local path to the session's events.jsonl file. Internal callers normally omit this and let the runtime derive it from the session. + */ + eventsPath?: string; + /** + * Server-local path to the current process log. When set, it is included as `process.log` and its directory is searched for prior logs from the same session. + */ + currentProcessLogPath?: string; + /** + * Server-local process log directory to search when `currentProcessLogPath` is unavailable, useful for collecting logs for inactive sessions. + */ + processLogDirectory?: string; + /** + * Maximum number of previous process logs to include. Defaults to 5. + */ + previousProcessLogLimit?: number; +} +/** + * Options for collecting a redacted session debug bundle. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "DebugCollectLogsRequest". + */ +/** @experimental */ +export interface DebugCollectLogsRequest { + destination: DebugCollectLogsDestination; + include?: DebugCollectLogsInclude; + /** + * Caller-provided server-local files or directories to include in addition to the runtime's built-in session diagnostics. This lets host applications add their own diagnostics without changing the API shape. + */ + additionalEntries?: DebugCollectLogsEntry[]; +} +/** + * Result of collecting a redacted debug bundle. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "DebugCollectLogsResult". + */ +/** @experimental */ +export interface DebugCollectLogsResult { + kind: DebugCollectLogsResultKind; + /** + * Actual archive path or staging directory path written. This may differ from the requested path when no-overwrite suffixing or fallback-to-temp-directory was needed. + */ + path: string; + /** + * Files included in the redacted bundle. + */ + entries: DebugCollectLogsCollectedEntry[]; + /** + * Optional files or directories that could not be included. + */ + skippedEntries?: DebugCollectLogsSkippedEntry[]; +} +/** + * An optional debug bundle entry that could not be included. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "DebugCollectLogsSkippedEntry". + */ +/** @experimental */ +export interface DebugCollectLogsSkippedEntry { + /** + * Relative path requested for this bundle entry. + */ + bundlePath: string; + /** + * Server-local source path that could not be read. + */ + path?: string; + /** + * Reason the entry was skipped. + */ + reason: string; +} +/** + * MCP server discovered by `mcp.discover`, with config source, optional plugin source, transport type, and enabled state. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "DiscoveredMcpServer". @@ -3961,7 +4421,7 @@ export interface ExecuteCommandResult { error?: string; } /** - * Schema for the `Extension` type. + * Discovered extension metadata, including source-qualified ID, name, discovery source, status, and optional process ID. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "Extension". @@ -4477,7 +4937,7 @@ export interface GitHubTelemetryEvent { client?: GitHubTelemetryClientInfo; } /** - * Payload for a `gitHubTelemetry.event` notification: a single GitHub telemetry event the runtime forwards to a host connection that opted into telemetry forwarding for the session. + * 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. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "GitHubTelemetryNotification". @@ -4485,9 +4945,9 @@ export interface GitHubTelemetryEvent { /** @experimental */ export interface GitHubTelemetryNotification { /** - * Session the telemetry event belongs to. + * Session the telemetry event belongs to, when it is session-scoped. Omitted for sessionless events (for example, `server.sendTelemetry` calls with no session id), which are still forwarded to opted-in connections. */ - sessionId: string; + sessionId?: string; /** * Whether this is a restricted telemetry event (cli.restricted_telemetry). Hosts must route restricted events to first-party Microsoft stores only. */ @@ -4663,7 +5123,7 @@ export interface HistoryTruncateResult { eventsRemoved: number; } /** - * Schema for the `InstalledPlugin` type. + * Installed plugin record from global state, with marketplace, version, install time, enabled state, cache path, and source. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "InstalledPlugin". @@ -4697,7 +5157,7 @@ export interface InstalledPlugin { source?: InstalledPluginSource; } /** - * Schema for the `InstalledPluginSourceGitHub` type. + * Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref, and optional subpath. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "InstalledPluginSourceGitHub". @@ -4713,7 +5173,7 @@ export interface InstalledPluginSourceGitHub { path?: string; } /** - * Schema for the `InstalledPluginSourceUrl` type. + * Source descriptor for a direct URL plugin install, with URL, optional ref, and optional subpath. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "InstalledPluginSourceUrl". @@ -4729,7 +5189,7 @@ export interface InstalledPluginSourceUrl { path?: string; } /** - * Schema for the `InstalledPluginSourceLocal` type. + * Source descriptor for a direct local plugin install, with a local filesystem path. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "InstalledPluginSourceLocal". @@ -4772,7 +5232,7 @@ export interface InstalledPluginInfo { enabled: boolean; } /** - * Schema for the `InstructionDiscoveryPath` type. + * Canonical file or directory where custom instructions can be discovered or created, with location, kind, preference, and project path. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "InstructionDiscoveryPath". @@ -4855,7 +5315,7 @@ export interface InstructionsGetSourcesResult { sources: InstructionSource[]; } /** - * Schema for the `InstructionSource` type. + * Loaded instruction source for a session, including path, content, category, location, applicability, and optional description. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "InstructionSource". @@ -4974,6 +5434,18 @@ export interface LlmInferenceHttpRequestStartRequest { url: string; headers: LlmInferenceHeaders; transport?: LlmInferenceHttpRequestStartTransport; + /** + * Stable per-agent-instance id attributing this request to a specific agent trajectory. Present when the request originates from an agent turn; absent for requests issued outside any agent context (e.g. some SDK callers). A request with an `agentId` but no `parentAgentId` is a root-agent request; one carrying both is a subagent request. Sourced from the runtime's per-request agent context and surfaced on the envelope independently of transport, so it is available for both first-party (CAPI) and BYOK/custom-provider requests; on the CAPI transport the runtime derives the upstream `X-Agent-Task-Id` header from this same context. Consumers routing each provider call to a training trajectory should key on this rather than on lifecycle events, since it is available on the request path before sampling. + */ + agentId?: string; + /** + * Id of the parent agent that spawned the agent issuing this request. Present only for subagent requests; absent for root-agent requests and non-agent requests. Combined with `agentId`, this lets consumers attribute a call to a child trajectory versus the root. Like `agentId`, it comes from the runtime's per-request agent context independently of transport; on the CAPI transport the runtime derives the upstream `X-Parent-Agent-Id` header from this same context. + */ + parentAgentId?: string; + /** + * Coarse classification of the interaction that produced this request. Open string for forward-compatibility; known values include `conversation-agent`, `conversation-subagent`, `conversation-sampling`, `conversation-background`, `conversation-compaction`, and `conversation-user`. Absent when the runtime did not classify the request. Comes from the runtime's per-request agent context independently of transport; on the CAPI transport the runtime derives the upstream `X-Interaction-Type` header from this same context. + */ + interactionType?: string; } /** * Acknowledgement. Returning successfully simply means the SDK accepted the start frame; it does not imply the request will succeed. @@ -5088,7 +5560,7 @@ export interface LlmInferenceSetProviderResult { success: boolean; } /** - * Schema for the `LocalSessionMetadataValue` type. + * Persisted local session metadata, including identifiers, timestamps, summary/name, client, context, detached state, and task ID. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "LocalSessionMetadataValue". @@ -5301,7 +5773,7 @@ export interface MarketplaceListResult { marketplaces: MarketplaceInfo[]; } /** - * Schema for the `MarketplaceRefreshEntry` type. + * Per-marketplace refresh result, including marketplace name, success flag, and optional failure error. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "MarketplaceRefreshEntry". @@ -5352,7 +5824,7 @@ export interface MarketplaceRemoveResult { dependentPlugins?: string[]; } /** - * Schema for the `McpAllowedServer` type. + * MCP server allowed by policy, with server name and optional PII-free explanatory note. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "McpAllowedServer". @@ -5567,7 +6039,7 @@ export interface McpAppsReadResourceResult { contents: McpAppsResourceContent[]; } /** - * Schema for the `McpAppsResourceContent` type. + * MCP Apps resource content with URI, optional MIME type, text or base64 blob, and resource metadata. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "McpAppsResourceContent". @@ -5973,7 +6445,7 @@ export interface McpExecuteSamplingResult { [k: string]: unknown | undefined; } /** - * Schema for the `McpFilteredServer` type. + * MCP server filtered by policy, with name, reason, optional redacted reason, and enterprise login. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "McpFilteredServer". @@ -6148,7 +6620,7 @@ export interface McpListToolsResult { tools: McpTools[]; } /** - * Schema for the `McpTools` type. + * MCP tool metadata with tool name and optional description. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "McpTools". @@ -6379,7 +6851,7 @@ export interface McpSamplingExecutionResult { error?: string; } /** - * Schema for the `McpServer` type. + * MCP server status entry, including config source/plugin source and any connection error. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "McpServer". @@ -6765,7 +7237,7 @@ export interface MetadataSnapshotRemoteMetadataRepository { branch: string; } /** - * Schema for the `Model` type. + * Copilot model metadata, including identifier, display name, capabilities, policy, billing, reasoning efforts, and picker categories. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "Model". @@ -7261,7 +7733,7 @@ export interface NameSetRequest { name: string; } /** - * Schema for the `OptionsUpdateAdditionalContentExclusionPolicy` type. + * Content-exclusion policy supplied to `session.options.update`, with rules, last-updated data, and scope. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "OptionsUpdateAdditionalContentExclusionPolicy". @@ -7273,7 +7745,7 @@ export interface OptionsUpdateAdditionalContentExclusionPolicy { scope: OptionsUpdateAdditionalContentExclusionPolicyScope; } /** - * Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRule` type. + * Single content-exclusion rule supplied to `session.options.update`, with paths, match conditions, and source. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "OptionsUpdateAdditionalContentExclusionPolicyRule". @@ -7286,7 +7758,7 @@ export interface OptionsUpdateAdditionalContentExclusionPolicyRule { source: OptionsUpdateAdditionalContentExclusionPolicyRuleSource; } /** - * Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. + * Source descriptor for a `session.options.update` content-exclusion rule, with source name and type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "OptionsUpdateAdditionalContentExclusionPolicyRuleSource". @@ -7297,7 +7769,7 @@ export interface OptionsUpdateAdditionalContentExclusionPolicyRuleSource { type: string; } /** - * Schema for the `PendingPermissionRequest` type. + * Pending permission prompt reconstructed from event history, with request ID and user-facing prompt details. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PendingPermissionRequest". @@ -7324,7 +7796,7 @@ export interface PendingPermissionRequestList { items: PendingPermissionRequest[]; } /** - * Schema for the `PermissionDecisionApproveOnce` type. + * Permission-decision request variant to approve only the current permission request. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveOnce". @@ -7337,7 +7809,7 @@ export interface PermissionDecisionApproveOnce { kind: "approve-once"; } /** - * Schema for the `PermissionDecisionApproveForSession` type. + * Permission-decision request variant to approve for the rest of the session, with optional tool approval or URL domain. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForSession". @@ -7355,7 +7827,7 @@ export interface PermissionDecisionApproveForSession { domain?: string; } /** - * Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type. + * Session-scoped approval details for specific command identifiers. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForSessionApprovalCommands". @@ -7372,7 +7844,7 @@ export interface PermissionDecisionApproveForSessionApprovalCommands { commandIdentifiers: string[]; } /** - * Schema for the `PermissionDecisionApproveForSessionApprovalRead` type. + * Session-scoped approval details for read-only filesystem operations. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForSessionApprovalRead". @@ -7385,7 +7857,7 @@ export interface PermissionDecisionApproveForSessionApprovalRead { kind: "read"; } /** - * Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type. + * Session-scoped approval details for filesystem write operations. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForSessionApprovalWrite". @@ -7398,7 +7870,7 @@ export interface PermissionDecisionApproveForSessionApprovalWrite { kind: "write"; } /** - * Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type. + * Session-scoped approval details for an MCP server tool, or all tools on the server when `toolName` is null. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForSessionApprovalMcp". @@ -7419,7 +7891,7 @@ export interface PermissionDecisionApproveForSessionApprovalMcp { toolName: string | null; } /** - * Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type. + * Session-scoped approval details for MCP sampling requests from a server. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForSessionApprovalMcpSampling". @@ -7436,7 +7908,7 @@ export interface PermissionDecisionApproveForSessionApprovalMcpSampling { serverName: string; } /** - * Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type. + * Session-scoped approval details for writes to long-term memory. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForSessionApprovalMemory". @@ -7449,7 +7921,7 @@ export interface PermissionDecisionApproveForSessionApprovalMemory { kind: "memory"; } /** - * Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type. + * Session-scoped approval details for a custom tool, keyed by tool name. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForSessionApprovalCustomTool". @@ -7466,7 +7938,7 @@ export interface PermissionDecisionApproveForSessionApprovalCustomTool { toolName: string; } /** - * Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type. + * Session-scoped approval details for extension-management operations, optionally narrowed by operation. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForSessionApprovalExtensionManagement". @@ -7483,7 +7955,7 @@ export interface PermissionDecisionApproveForSessionApprovalExtensionManagement operation?: string; } /** - * Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` type. + * Session-scoped approval details for an extension's permission-gated capability access, keyed by extension name. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess". @@ -7500,7 +7972,7 @@ export interface PermissionDecisionApproveForSessionApprovalExtensionPermissionA extensionName: string; } /** - * Schema for the `PermissionDecisionApproveForLocation` type. + * Permission-decision request variant to approve and persist a permission for a project location, with approval details and location key. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForLocation". @@ -7518,7 +7990,7 @@ export interface PermissionDecisionApproveForLocation { locationKey: string; } /** - * Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type. + * Location-scoped approval details for specific command identifiers. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForLocationApprovalCommands". @@ -7535,7 +8007,7 @@ export interface PermissionDecisionApproveForLocationApprovalCommands { commandIdentifiers: string[]; } /** - * Schema for the `PermissionDecisionApproveForLocationApprovalRead` type. + * Location-scoped approval details for read-only filesystem operations. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForLocationApprovalRead". @@ -7548,7 +8020,7 @@ export interface PermissionDecisionApproveForLocationApprovalRead { kind: "read"; } /** - * Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type. + * Location-scoped approval details for filesystem write operations. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForLocationApprovalWrite". @@ -7561,7 +8033,7 @@ export interface PermissionDecisionApproveForLocationApprovalWrite { kind: "write"; } /** - * Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type. + * Location-scoped approval details for an MCP server tool, or all tools on the server when `toolName` is null. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForLocationApprovalMcp". @@ -7582,7 +8054,7 @@ export interface PermissionDecisionApproveForLocationApprovalMcp { toolName: string | null; } /** - * Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type. + * Location-scoped approval details for MCP sampling requests from a server. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForLocationApprovalMcpSampling". @@ -7599,7 +8071,7 @@ export interface PermissionDecisionApproveForLocationApprovalMcpSampling { serverName: string; } /** - * Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type. + * Location-scoped approval details for writes to long-term memory. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForLocationApprovalMemory". @@ -7612,7 +8084,7 @@ export interface PermissionDecisionApproveForLocationApprovalMemory { kind: "memory"; } /** - * Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type. + * Location-scoped approval details for a custom tool, keyed by tool name. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForLocationApprovalCustomTool". @@ -7629,7 +8101,7 @@ export interface PermissionDecisionApproveForLocationApprovalCustomTool { toolName: string; } /** - * Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type. + * Location-scoped approval details for extension-management operations, optionally narrowed by operation. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForLocationApprovalExtensionManagement". @@ -7646,7 +8118,7 @@ export interface PermissionDecisionApproveForLocationApprovalExtensionManagement operation?: string; } /** - * Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` type. + * Location-scoped approval details for an extension's permission-gated capability access, keyed by extension name. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess". @@ -7663,7 +8135,7 @@ export interface PermissionDecisionApproveForLocationApprovalExtensionPermission extensionName: string; } /** - * Schema for the `PermissionDecisionApprovePermanently` type. + * Permission-decision request variant to permanently approve a URL domain across sessions. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApprovePermanently". @@ -7680,7 +8152,7 @@ export interface PermissionDecisionApprovePermanently { domain: string; } /** - * Schema for the `PermissionDecisionReject` type. + * Permission-decision request variant to reject a pending permission request, with optional feedback. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionReject". @@ -7697,7 +8169,7 @@ export interface PermissionDecisionReject { feedback?: string; } /** - * Schema for the `PermissionDecisionUserNotAvailable` type. + * Permission-decision variant indicating no user was available to confirm the request. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionUserNotAvailable". @@ -7710,7 +8182,7 @@ export interface PermissionDecisionUserNotAvailable { kind: "user-not-available"; } /** - * Schema for the `PermissionDecisionApproved` type. + * Permission-decision variant indicating the request was approved. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApproved". @@ -7723,7 +8195,7 @@ export interface PermissionDecisionApproved { kind: "approved"; } /** - * Schema for the `PermissionDecisionApprovedForSession` type. + * Permission-decision variant indicating approval was remembered for the session, with approval details. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApprovedForSession". @@ -7737,7 +8209,7 @@ export interface PermissionDecisionApprovedForSession { approval: UserToolSessionApproval; } /** - * Schema for the `PermissionDecisionApprovedForLocation` type. + * Permission-decision variant indicating approval was persisted for a project location, with approval details and location key. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionApprovedForLocation". @@ -7755,7 +8227,7 @@ export interface PermissionDecisionApprovedForLocation { locationKey: string; } /** - * Schema for the `PermissionDecisionCancelled` type. + * Permission-decision variant indicating the request was cancelled before use, with an optional reason. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionCancelled". @@ -7772,7 +8244,7 @@ export interface PermissionDecisionCancelled { reason?: string; } /** - * Schema for the `PermissionDecisionDeniedByRules` type. + * Permission-decision variant indicating explicit denial by permission rules, with the matching rules. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionDeniedByRules". @@ -7789,7 +8261,7 @@ export interface PermissionDecisionDeniedByRules { rules: PermissionRule[]; } /** - * Schema for the `PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type. + * Permission-decision variant indicating no approval rule matched and user confirmation was unavailable. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser". @@ -7802,7 +8274,7 @@ export interface PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUse kind: "denied-no-approval-rule-and-could-not-request-from-user"; } /** - * Schema for the `PermissionDecisionDeniedInteractivelyByUser` type. + * Permission-decision variant indicating the user denied an interactive prompt, with optional feedback and force-reject flag. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionDeniedInteractivelyByUser". @@ -7823,7 +8295,7 @@ export interface PermissionDecisionDeniedInteractivelyByUser { forceReject?: boolean; } /** - * Schema for the `PermissionDecisionDeniedByContentExclusionPolicy` type. + * Permission-decision variant indicating denial by content-exclusion policy, with path and message. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionDeniedByContentExclusionPolicy". @@ -7844,7 +8316,7 @@ export interface PermissionDecisionDeniedByContentExclusionPolicy { message: string; } /** - * Schema for the `PermissionDecisionDeniedByPermissionRequestHook` type. + * Permission-decision variant indicating denial by a permission request hook, with optional message and interrupt flag. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionDecisionDeniedByPermissionRequestHook". @@ -7893,7 +8365,7 @@ export interface PermissionLocationAddToolApprovalParams { approval: PermissionsLocationsAddToolApprovalDetails; } /** - * Schema for the `PermissionsLocationsAddToolApprovalDetailsCommands` type. + * Location-persisted tool approval details for specific command identifiers. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsLocationsAddToolApprovalDetailsCommands". @@ -7910,7 +8382,7 @@ export interface PermissionsLocationsAddToolApprovalDetailsCommands { commandIdentifiers: string[]; } /** - * Schema for the `PermissionsLocationsAddToolApprovalDetailsRead` type. + * Location-persisted tool approval details for read-only filesystem operations. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsLocationsAddToolApprovalDetailsRead". @@ -7923,7 +8395,7 @@ export interface PermissionsLocationsAddToolApprovalDetailsRead { kind: "read"; } /** - * Schema for the `PermissionsLocationsAddToolApprovalDetailsWrite` type. + * Location-persisted tool approval details for filesystem write operations. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsLocationsAddToolApprovalDetailsWrite". @@ -7936,7 +8408,7 @@ export interface PermissionsLocationsAddToolApprovalDetailsWrite { kind: "write"; } /** - * Schema for the `PermissionsLocationsAddToolApprovalDetailsMcp` type. + * Location-persisted tool approval details for an MCP server tool, or all tools when `toolName` is null. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsLocationsAddToolApprovalDetailsMcp". @@ -7957,7 +8429,7 @@ export interface PermissionsLocationsAddToolApprovalDetailsMcp { toolName: string | null; } /** - * Schema for the `PermissionsLocationsAddToolApprovalDetailsMcpSampling` type. + * Location-persisted tool approval details for MCP sampling requests from a server. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsLocationsAddToolApprovalDetailsMcpSampling". @@ -7974,7 +8446,7 @@ export interface PermissionsLocationsAddToolApprovalDetailsMcpSampling { serverName: string; } /** - * Schema for the `PermissionsLocationsAddToolApprovalDetailsMemory` type. + * Location-persisted tool approval details for writes to long-term memory. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsLocationsAddToolApprovalDetailsMemory". @@ -7987,7 +8459,7 @@ export interface PermissionsLocationsAddToolApprovalDetailsMemory { kind: "memory"; } /** - * Schema for the `PermissionsLocationsAddToolApprovalDetailsCustomTool` type. + * Location-persisted tool approval details for a custom tool, keyed by tool name. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsLocationsAddToolApprovalDetailsCustomTool". @@ -8004,7 +8476,7 @@ export interface PermissionsLocationsAddToolApprovalDetailsCustomTool { toolName: string; } /** - * Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionManagement` type. + * Location-persisted tool approval details for extension-management operations, optionally narrowed by operation. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsLocationsAddToolApprovalDetailsExtensionManagement". @@ -8021,7 +8493,7 @@ export interface PermissionsLocationsAddToolApprovalDetailsExtensionManagement { operation?: string; } /** - * Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess` type. + * Location-persisted tool approval details for an extension's permission-gated capability access, keyed by extension name. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess". @@ -8271,7 +8743,7 @@ export interface PermissionRulesSet { denied: PermissionRule[]; } /** - * Schema for the `PermissionsConfigureAdditionalContentExclusionPolicy` type. + * Content-exclusion policy supplied to `session.permissions.configure`, with rules, last-updated data, and scope. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsConfigureAdditionalContentExclusionPolicy". @@ -8283,7 +8755,7 @@ export interface PermissionsConfigureAdditionalContentExclusionPolicy { scope: PermissionsConfigureAdditionalContentExclusionPolicyScope; } /** - * Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRule` type. + * Single content-exclusion rule supplied to `session.permissions.configure`, with paths, match conditions, and source. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsConfigureAdditionalContentExclusionPolicyRule". @@ -8296,7 +8768,7 @@ export interface PermissionsConfigureAdditionalContentExclusionPolicyRule { source: PermissionsConfigureAdditionalContentExclusionPolicyRuleSource; } /** - * Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type. + * Source descriptor for a `session.permissions.configure` content-exclusion rule, with source name and type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsConfigureAdditionalContentExclusionPolicyRuleSource". @@ -8506,17 +8978,22 @@ export interface PermissionsResetSessionApprovalsResult { success: boolean; } /** - * Whether to enable full allow-all permissions for the session. + * Allow-all mode to apply for the session. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsSetAllowAllRequest". */ /** @experimental */ export interface PermissionsSetAllowAllRequest { + mode?: PermissionsAllowAllMode; /** - * Whether to enable full allow-all permissions + * Legacy full allow-all toggle. Prefer `mode`; when `mode` is omitted, `enabled: true` is treated as `mode: "on"` and any other value is treated as `mode: "off"`. */ - enabled: boolean; + enabled?: boolean; + /** + * Optional model id for the `auto` mode auto-approval LLM judging. Only meaningful when `mode` is `auto`; ignored otherwise. When omitted, the session's active model is used. + */ + model?: string; source?: PermissionsSetAllowAllSource; } /** @@ -8739,7 +9216,7 @@ export interface PlanUpdateRequest { content: string; } /** - * Schema for the `Plugin` type. + * Session plugin metadata, with name, marketplace, optional version, and enabled state. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "Plugin". @@ -8961,7 +9438,7 @@ export interface PluginsUpdateRequest { name: string; } /** - * Schema for the `PluginUpdateAllEntry` type. + * Per-plugin result from updating all plugins, with versions, skills installed, success flag, and optional error. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PluginUpdateAllEntry". @@ -9713,7 +10190,7 @@ export interface PushAttachmentBlob { displayName?: string; } /** - * Schema for the `QueuePendingItems` type. + * User-facing pending queue entry, with kind and display text for a queued message, slash command, or model change. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "QueuePendingItems". @@ -10258,14 +10735,6 @@ export interface SandboxConfigUserPolicyNetwork { * Whether traffic to local/loopback addresses is allowed. */ allowLocalNetwork?: boolean; - /** - * Hosts allowed in addition to the base policy. - */ - allowedHosts?: string[]; - /** - * Hosts explicitly blocked. - */ - blockedHosts?: string[]; } /** * macOS seatbelt-specific options. @@ -10304,7 +10773,7 @@ export interface SandboxConfigUserPolicyExperimentalSeatbelt { keychainAccess?: boolean; } /** - * Schema for the `ScheduleEntry` type. + * Scheduled prompt entry with ID, timing (`intervalMs`, `cron`, or `at`), prompt text, recurrence, and next run time. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "ScheduleEntry". @@ -10530,7 +10999,7 @@ export interface ServerInstructionSourceList { sources: InstructionSource[]; } /** - * Schema for the `ServerSkill` type. + * Server-side skill metadata, including name, description, source, enabled/invocable state, path, project path, and argument hint. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "ServerSkill". @@ -10781,7 +11250,7 @@ export interface SessionFsReaddirResult { error?: SessionFsError; } /** - * Schema for the `SessionFsReaddirWithTypesEntry` type. + * Directory entry returned by session filesystem `readdirWithTypes`, with name and entry type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionFsReaddirWithTypesEntry". @@ -11085,7 +11554,7 @@ export interface SessionFsWriteFileRequest { mode?: number; } /** - * Schema for the `SessionInstalledPlugin` type. + * Installed plugin record for a session, with marketplace, version, install time, enabled state, cache path, and source. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionInstalledPlugin". @@ -11119,7 +11588,7 @@ export interface SessionInstalledPlugin { source?: SessionInstalledPluginSource; } /** - * Schema for the `SessionInstalledPluginSourceGitHub` type. + * Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref, and optional subpath. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionInstalledPluginSourceGitHub". @@ -11135,7 +11604,7 @@ export interface SessionInstalledPluginSourceGitHub { path?: string; } /** - * Schema for the `SessionInstalledPluginSourceUrl` type. + * Source descriptor for a direct URL plugin install, with URL, optional ref, and optional subpath. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionInstalledPluginSourceUrl". @@ -11151,7 +11620,7 @@ export interface SessionInstalledPluginSourceUrl { path?: string; } /** - * Schema for the `SessionInstalledPluginSourceLocal` type. + * Source descriptor for a direct local plugin install, with a local filesystem path. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionInstalledPluginSourceLocal". @@ -11350,6 +11819,10 @@ export interface SessionOpenOptions { expAssignments?: { [k: string]: unknown | undefined; }; + /** + * Opt-in: self-fetch enterprise managed settings at session bootstrap. + */ + selfFetchManagedSettings?: boolean; /** * Feature-flag values resolved by the host. */ @@ -11527,7 +12000,7 @@ export interface SessionOpenOptions { sessionCapabilities?: SessionCapability[]; } /** - * Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicy` type. + * Content-exclusion policy supplied to `sessions.open` options, with rules, last-updated data, and scope. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionOpenOptionsAdditionalContentExclusionPolicy". @@ -11539,7 +12012,7 @@ export interface SessionOpenOptionsAdditionalContentExclusionPolicy { scope: SessionOpenOptionsAdditionalContentExclusionPolicyScope; } /** - * Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRule` type. + * Single content-exclusion rule supplied to `sessions.open` options, with paths, match conditions, and source. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionOpenOptionsAdditionalContentExclusionPolicyRule". @@ -11552,7 +12025,7 @@ export interface SessionOpenOptionsAdditionalContentExclusionPolicyRule { source: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource; } /** - * Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type. + * Source descriptor for a `sessions.open` content-exclusion rule, with source name and type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource". @@ -11750,7 +12223,7 @@ export interface SessionOpenResult { progress?: SessionsOpenProgress[]; } /** - * Schema for the `SessionsOpenProgress` type. + * `sessions.open` handoff progress update with step, status, and optional message. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionsOpenProgress". @@ -11893,6 +12366,134 @@ export interface SessionSetCredentialsResult { */ copilotUserResolved?: boolean; } +/** + * Availability of built-in job tools surfaced to boundary consumers. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionSettingsBuiltInToolAvailabilitySnapshot". + */ +/** @experimental */ +export interface SessionSettingsBuiltInToolAvailabilitySnapshot { + reportProgress?: boolean; + createPullRequest?: boolean; +} +/** + * Named Rust-owned settings predicate to evaluate for this session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionSettingsEvaluatePredicateRequest". + */ +/** @experimental */ +export interface SessionSettingsEvaluatePredicateRequest { + name: SessionSettingsPredicateName; + /** + * Tool name for tool-scoped predicates such as trivial-change handling. + */ + toolName?: string; +} +/** + * Result of evaluating a Rust-owned settings predicate. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionSettingsEvaluatePredicateResult". + */ +/** @experimental */ +export interface SessionSettingsEvaluatePredicateResult { + enabled: boolean; +} +/** + * Redacted job settings for a session. The job nonce is excluded. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionSettingsJobSnapshot". + */ +/** @experimental */ +export interface SessionSettingsJobSnapshot { + eventType?: string; + isTriggerJob?: boolean; + builtInToolAvailability?: SessionSettingsBuiltInToolAvailabilitySnapshot; +} +/** + * Redacted model routing settings for a session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionSettingsModelSnapshot". + */ +/** @experimental */ +export interface SessionSettingsModelSnapshot { + model?: string; + defaultReasoningEffort?: string; + instanceId?: string; + callbackUrl?: string; +} +/** + * Online-evaluation settings safe to expose across the SDK boundary. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionSettingsOnlineEvaluationSnapshot". + */ +/** @experimental */ +export interface SessionSettingsOnlineEvaluationSnapshot { + disableOnlineEvaluation?: boolean; + enableOnlineEvaluationOutputFile?: boolean; +} +/** + * Redacted repository and GitHub host settings for a session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionSettingsRepoSnapshot". + */ +/** @experimental */ +export interface SessionSettingsRepoSnapshot { + name?: string; + id?: number; + branch?: string; + commit?: string; + readWrite?: boolean; + ownerName?: string; + ownerId?: number; + serverUrl?: string; + host?: string; + hostProtocol?: string; + secretScanningUrl?: string; + prCommitCount?: number; +} +/** + * Redacted, serializable view of session runtime settings for SDK boundary consumers. Secrets and raw feature flags are intentionally excluded. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionSettingsSnapshot". + */ +/** @experimental */ +export interface SessionSettingsSnapshot { + version?: string; + clientName?: string; + timeoutMs?: number; + startTimeMs?: number; + repo: SessionSettingsRepoSnapshot; + model: SessionSettingsModelSnapshot; + validation: SessionSettingsValidationSnapshot; + job: SessionSettingsJobSnapshot; + onlineEvaluation: SessionSettingsOnlineEvaluationSnapshot; +} +/** + * Redacted validation and memory-tool settings for a session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SessionSettingsValidationSnapshot". + */ +/** @experimental */ +export interface SessionSettingsValidationSnapshot { + timeout?: number; + dependabotTimeout?: number; + codeqlEnabled?: boolean; + codeReviewEnabled?: boolean; + codeReviewModel?: string; + advisoryEnabled?: boolean; + secretScanningEnabled?: boolean; + memoryStoreEnabled?: boolean; + memoryVoteEnabled?: boolean; +} /** * UUID prefix to resolve to a unique session ID. * @@ -12637,7 +13238,7 @@ export interface ShutdownRequest { reason?: string; } /** - * Schema for the `Skill` type. + * Skill metadata available to a session, with name, description, source, enabled/invocable state, path, plugin, and argument hint. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "Skill". @@ -12675,7 +13276,7 @@ export interface Skill { argumentHint?: string; } /** - * Schema for the `SkillDiscoveryPath` type. + * Canonical directory where skills can be discovered or created, with scope, preference, and optional project path. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SkillDiscoveryPath". @@ -12813,7 +13414,7 @@ export interface SkillsGetInvokedResult { skills: SkillsInvokedSkill[]; } /** - * Schema for the `SkillsInvokedSkill` type. + * Skill invocation record with name, path, content, allowed tools, and turn number. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SkillsInvokedSkill". @@ -12859,7 +13460,7 @@ export interface SkillsLoadDiagnostics { errors: string[]; } /** - * Schema for the `SlashCommandAgentPromptResult` type. + * Slash-command invocation result that submits an agent prompt, with display prompt, optional mode, and settings-change flag. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SlashCommandAgentPromptResult". @@ -12885,7 +13486,7 @@ export interface SlashCommandAgentPromptResult { runtimeSettingsChanged?: boolean; } /** - * Schema for the `SlashCommandCompletedResult` type. + * Slash-command invocation result indicating completion, with optional message and settings-change flag. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SlashCommandCompletedResult". @@ -12906,7 +13507,7 @@ export interface SlashCommandCompletedResult { runtimeSettingsChanged?: boolean; } /** - * Schema for the `SlashCommandTextResult` type. + * Slash-command invocation result containing text output plus Markdown/ANSI rendering flags. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SlashCommandTextResult". @@ -12935,7 +13536,7 @@ export interface SlashCommandTextResult { runtimeSettingsChanged?: boolean; } /** - * Schema for the `SlashCommandSelectSubcommandResult` type. + * Slash-command invocation result asking the client to present subcommand options for a parent command. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SlashCommandSelectSubcommandResult". @@ -12964,7 +13565,7 @@ export interface SlashCommandSelectSubcommandResult { runtimeSettingsChanged?: boolean; } /** - * Schema for the `SlashCommandSelectSubcommandOption` type. + * Selectable slash-command subcommand option with name, description, and optional group label. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SlashCommandSelectSubcommandOption". @@ -13003,7 +13604,7 @@ export interface SubagentSettingsEntry { contextTier?: SubagentSettingsEntryContextTier; } /** - * Schema for the `TaskAgentInfo` type. + * Tracked background agent task metadata, including IDs, status, timing, agent type, prompt, model, result, and latest response. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "TaskAgentInfo". @@ -13082,7 +13683,7 @@ export interface TaskAgentInfo { idleSince?: string; } /** - * Schema for the `TaskAgentProgress` type. + * Progress snapshot for an agent task, with recent activity lines and optional latest intent. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "TaskAgentProgress". @@ -13103,7 +13704,7 @@ export interface TaskAgentProgress { latestIntent?: string; } /** - * Schema for the `TaskProgressLine` type. + * Timestamped display line for task progress output or recent agent activity. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "TaskProgressLine". @@ -13120,7 +13721,7 @@ export interface TaskProgressLine { timestamp: string; } /** - * Schema for the `TaskShellInfo` type. + * Tracked shell task metadata, including ID, command, status, timing, attachment/execution mode, log path, and PID. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "TaskShellInfo". @@ -13181,7 +13782,7 @@ export interface TaskList { tasks: TaskInfo[]; } /** - * Schema for the `TaskShellProgress` type. + * Progress snapshot for a shell task, with recent stdout/stderr output and optional process ID. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "TaskShellProgress". @@ -13437,7 +14038,7 @@ export interface TelemetrySetFeatureOverridesRequest { }; } /** - * Schema for the `Tool` type. + * Built-in tool metadata with identifier, optional namespaced name, description, input-parameter schema, and usage instructions. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "Tool". @@ -13570,7 +14171,7 @@ export interface UIElicitationArrayAnyOfFieldItems { anyOf: UIElicitationArrayAnyOfFieldItemsAnyOf[]; } /** - * Schema for the `UIElicitationArrayAnyOfFieldItemsAnyOf` type. + * Selectable option for a UI elicitation multi-select array item, with submitted value and display label. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UIElicitationArrayAnyOfFieldItemsAnyOf". @@ -13737,7 +14338,7 @@ export interface UIElicitationStringOneOfField { default?: string; } /** - * Schema for the `UIElicitationStringOneOfFieldOneOf` type. + * Selectable option for a UI elicitation single-select string field, with submitted value and display label. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UIElicitationStringOneOfFieldOneOf". @@ -13919,7 +14520,7 @@ export interface UIEphemeralQueryResult { answer: string; } /** - * Schema for the `UIExitPlanModeResponse` type. + * User response for a pending exit-plan-mode request, with approval state, selected action, auto-approve flag, and feedback. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UIExitPlanModeResponse". @@ -14066,7 +14667,7 @@ export interface UIHandlePendingUserInputRequest { response: UIUserInputResponse; } /** - * Schema for the `UIUserInputResponse` type. + * User response for a pending user-input request, with answer text and whether it was typed freeform. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UIUserInputResponse". @@ -14189,7 +14790,7 @@ export interface UsageGetMetricsResult { lastCallOutputTokens: number; } /** - * Schema for the `UsageMetricsTokenDetail` type. + * Session-wide token-detail entry containing the accumulated token count for one token type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UsageMetricsTokenDetail". @@ -14227,7 +14828,7 @@ export interface UsageMetricsCodeChanges { filesModified: string[]; } /** - * Schema for the `UsageMetricsModelMetric` type. + * Per-model usage metrics, including request counts/costs, token usage, nano-AI units, and per-token-type details. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UsageMetricsModelMetric". @@ -14294,7 +14895,7 @@ export interface UsageMetricsModelMetricUsage { reasoningTokens?: number; } /** - * Schema for the `UsageMetricsModelMetricTokenDetail` type. + * Per-model token-detail entry containing the accumulated token count for one token type. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UsageMetricsModelMetricTokenDetail". @@ -14499,7 +15100,7 @@ export interface WorkspaceDiffResult { isFallback: boolean; } /** - * Schema for the `WorkspacesCheckpoints` type. + * Workspace checkpoint metadata with assigned number, human-readable title, and checkpoint filename. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "WorkspacesCheckpoints". @@ -15363,7 +15964,7 @@ export function createInternalServerRpc(connection: MessageConnection) { /** * Performs the SDK server connection handshake and validates the optional connection token. Marked internal because this is JSON-RPC transport plumbing invoked automatically by an SDK client's own `connect()` wrapper, not a user-facing method. Stays internal as long as the SDK client owns the handshake; would only become public if the SDK ever exposed the raw schema surface to consumers without a connection wrapper. * - * @param params Optional connection token presented by the SDK client during the handshake. + * @param params Parameters for the `server.connect` handshake: an optional connection token and optional connection-level opt-ins (e.g. GitHub telemetry forwarding). * * @returns Handshake result reporting the server's protocol version and package version on success. * @@ -15481,6 +16082,18 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin connection.sendRequest("session.gitHubAuth.setCredentials", { sessionId, ...params }), }, /** @experimental */ + debug: { + /** + * Collects a redacted session debug log bundle into a local archive or staging directory. The runtime includes session-owned logs by default and accepts caller-provided diagnostic entries so host applications can add their own files without changing this API shape. + * + * @param params Options for collecting a redacted session debug bundle. + * + * @returns Result of collecting a redacted debug bundle. + */ + collectLogs: async (params: DebugCollectLogsRequest): Promise => + connection.sendRequest("session.debug.collectLogs", { sessionId, ...params }), + }, + /** @experimental */ canvas: { /** * Lists canvases declared for the session. @@ -16429,18 +17042,18 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin setApproveAll: async (params: PermissionsSetApproveAllRequest): Promise => connection.sendRequest("session.permissions.setApproveAll", { sessionId, ...params }), /** - * Enables or disables full allow-all permissions (tools, paths, and URLs) for the session. Used by attach-mode clients (e.g. LocalRpcSession's `/allow-all` forwarder) to flip the target session's permission state. Unlike `setApproveAll`, this swaps in the unrestricted path and URL managers and emits `session.permissions_changed` on transition. The result returns the authoritative post-mutation state so callers can update their local mirrors without racing the `session.permissions_changed` notification on the same wire. + * Sets the allow-all permission mode for the session. Used by attach-mode clients (e.g. LocalRpcSession's `/allow-all` forwarder) to flip the target session's permission state. The `on` mode swaps in unrestricted path and URL managers and emits `session.permissions_changed` on transition; the `auto` mode keeps normal prompt paths active while attaching LLM safety recommendations. The result returns the authoritative post-mutation state so callers can update their local mirrors without racing the `session.permissions_changed` notification on the same wire. * - * @param params Whether to enable full allow-all permissions for the session. + * @param params Allow-all mode to apply for the session. * * @returns Indicates whether the operation succeeded and reports the post-mutation state. */ setAllowAll: async (params: PermissionsSetAllowAllRequest): Promise => connection.sendRequest("session.permissions.setAllowAll", { sessionId, ...params }), /** - * Returns whether full allow-all permissions are currently active for the session. + * Returns the current allow-all permission mode for the session. * - * @returns Current full allow-all permission state. + * @returns Current allow-all permission mode. */ getAllowAll: async (): Promise => connection.sendRequest("session.permissions.getAllowAll", { sessionId }), @@ -16960,6 +17573,25 @@ export function createInternalSessionRpc(connection: MessageConnection, sessionI connection.sendRequest("session.mcp.oauth.respond", { sessionId, ...params }), }, }, + /** @experimental */ + settings: { + /** + * Returns a redacted snapshot of session runtime settings, with secrets and raw feature flags excluded. Internal: the runtime settings shape is a runtime-internal surface and is deliberately kept out of the public SDK, because consumers should not depend on the runtime's internal settings layout. It remains callable in-process and is expected to be reworked as the runtime internals are consolidated. + * + * @returns Redacted, serializable view of session runtime settings for SDK boundary consumers. Secrets and raw feature flags are intentionally excluded. + */ + snapshot: async (): Promise => + connection.sendRequest("session.settings.snapshot", { sessionId }), + /** + * Evaluates a named Rust-owned settings predicate without exposing raw feature flags. Internal: the raw feature-flag names and composition are runtime-internal, so this predicate-evaluation helper is kept out of the public SDK surface and is callable in-process only. + * + * @param params Named Rust-owned settings predicate to evaluate for this session. + * + * @returns Result of evaluating a Rust-owned settings predicate. + */ + evaluatePredicate: async (params: SessionSettingsEvaluatePredicateRequest): Promise => + connection.sendRequest("session.settings.evaluatePredicate", { sessionId, ...params }), + }, }; } @@ -17228,9 +17860,9 @@ export interface LlmInferenceHandler { /** @experimental */ export interface GitHubTelemetryHandler { /** - * Forwards a single GitHub telemetry event to a host connection that opted into telemetry forwarding for the session. + * 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). * - * @param params Payload for a `gitHubTelemetry.event` notification: a single GitHub telemetry event the runtime forwards to a host connection that opted into telemetry forwarding for the session. + * @param 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. */ event(params: GitHubTelemetryNotification): Promise; } diff --git a/nodejs/src/generated/session-events.ts b/nodejs/src/generated/session-events.ts index 5d7eac82d..2f846c721 100644 --- a/nodejs/src/generated/session-events.ts +++ b/nodejs/src/generated/session-events.ts @@ -167,6 +167,17 @@ export type SessionMode = | "plan" /** The agent is working autonomously toward task completion. */ | "autopilot"; +/** + * Allow-all mode for the session. + */ +/** @experimental */ +export type PermissionAllowAllMode = + /** Permission requests follow the normal approval flow. */ + | "off" + /** Tool, path, and URL permission requests are automatically approved. */ + | "on" + /** Permission requests follow the normal approval flow with an LLM advisory recommendation attached; clients may choose to auto-approve requests the judge evaluated as acceptable. */ + | "auto"; /** * The type of operation performed on the plan file */ @@ -481,6 +492,19 @@ export type PermissionPromptRequest = | PermissionPromptRequestHook | PermissionPromptRequestExtensionManagement | PermissionPromptRequestExtensionPermissionAccess; +/** + * Outcome of the auto-approval safety judge for a permission request. Present only when auto mode is enabled; its absence means the judge did not evaluate the request (auto mode was off). + */ +/** @experimental */ +export type AutoApprovalRecommendation = + /** The judge evaluated the request and recommends automatically approving it. */ + | "approve" + /** The judge evaluated the request and does not recommend auto-approving it; explicit approval is required. Whether that means prompting, denying, or something else is the consumer's decision. */ + | "requireApproval" + /** Auto mode is enabled, but this request category is never auto-approvable (for example, sandbox-bypass requests), so the judge was not consulted. */ + | "excluded" + /** The judge was consulted but did not return a usable recommendation, so the request requires explicit approval. */ + | "error"; /** * Underlying permission kind that needs path approval */ @@ -1515,7 +1539,7 @@ export interface SessionLimitsChangedData { sessionLimits: SessionLimitsConfig | null; } /** - * Session event "session.permissions_changed". Permissions change details carrying the aggregate allow-all boolean transition. + * Session event "session.permissions_changed". Permissions change details carrying the aggregate allow-all transition. */ export interface PermissionsChangedEvent { /** @@ -1545,13 +1569,25 @@ export interface PermissionsChangedEvent { type: "session.permissions_changed"; } /** - * Permissions change details carrying the aggregate allow-all boolean transition. + * Permissions change details carrying the aggregate allow-all transition. */ export interface PermissionsChangedData { + /** + * Allow-all mode after the change + * + * @experimental + */ + allowAllPermissionMode?: PermissionAllowAllMode; /** * Aggregate allow-all flag after the change */ allowAllPermissions: boolean; + /** + * Allow-all mode before the change + * + * @experimental + */ + previousAllowAllPermissionMode?: PermissionAllowAllMode; /** * Aggregate allow-all flag before the change */ @@ -1966,7 +2002,7 @@ export interface ShutdownCodeChanges { linesRemoved: number; } /** - * Schema for the `ShutdownModelMetric` type. + * Per-model shutdown metrics with request counts, token usage, nano-AI units, and token details. */ export interface ShutdownModelMetric { requests: ShutdownModelMetricRequests; @@ -2002,7 +2038,7 @@ export interface ShutdownModelMetricRequests { count?: number; } /** - * Schema for the `ShutdownModelMetricTokenDetail` type. + * A token-type entry in a shutdown model metric, storing the accumulated token count. */ export interface ShutdownModelMetricTokenDetail { /** @@ -2036,7 +2072,7 @@ export interface ShutdownModelMetricUsage { reasoningTokens?: number; } /** - * Schema for the `ShutdownTokenDetail` type. + * A session-wide shutdown token-type entry storing the accumulated token count. */ export interface ShutdownTokenDetail { /** @@ -2220,6 +2256,10 @@ export interface CompactionStartData { * Token count from non-system messages (user, assistant, tool) at compaction start */ conversationTokens?: number; + /** + * Model identifier used for compaction, when known + */ + model?: string; /** * Token count from system message(s) at compaction start */ @@ -2449,7 +2489,7 @@ export interface TaskCompleteData { summary?: string; } /** - * Session event "user.message". + * Session event "user.message". Payload of `user.message` with displayed and model-transformed content, attachments, source/delivery metadata, mode, and telemetry IDs. */ export interface UserMessageEvent { /** @@ -2479,7 +2519,7 @@ export interface UserMessageEvent { type: "user.message"; } /** - * Schema for the `UserMessageData` type. + * Payload of `user.message` with displayed and model-transformed content, attachments, source/delivery metadata, mode, and telemetry IDs. */ export interface UserMessageData { agentMode?: UserMessageAgentMode; @@ -3033,6 +3073,10 @@ export interface AssistantTurnStartData { * CAPI interaction ID for correlating this turn with upstream telemetry */ interactionId?: string; + /** + * Model identifier used for this turn, when known + */ + model?: string; /** * Identifier for this turn within the agentic loop, typically a stringified turn number */ @@ -3613,6 +3657,10 @@ export interface AssistantTurnEndEvent { * Turn completion metadata including the turn identifier */ export interface AssistantTurnEndData { + /** + * Model identifier used for this turn, when known + */ + model?: string; /** * Identifier of the turn that has ended, matching the corresponding assistant.turn_start event */ @@ -3814,7 +3862,7 @@ export interface AssistantUsageCopilotUsageTokenDetail { tokenType: string; } /** - * Schema for the `AssistantUsageQuotaSnapshot` type. + * Internal per-quota snapshot for assistant usage, including entitlement, consumed requests, overage, reset date, and remaining quota. */ /** @internal */ export interface AssistantUsageQuotaSnapshot { @@ -4199,7 +4247,7 @@ export interface ToolExecutionStartToolDescriptionMeta { ui?: ToolExecutionStartToolDescriptionMetaUI; } /** - * Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. + * MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_start`. */ export interface ToolExecutionStartToolDescriptionMetaUI { /** @@ -4692,7 +4740,7 @@ export interface ToolExecutionCompleteContentResource { type: "resource"; } /** - * Schema for the `EmbeddedTextResourceContents` type. + * Embedded text resource contents identified by a URI, with an optional MIME type and a text payload. */ export interface EmbeddedTextResourceContents { /** @@ -4709,7 +4757,7 @@ export interface EmbeddedTextResourceContents { uri: string; } /** - * Schema for the `EmbeddedBlobResourceContents` type. + * Embedded binary resource contents identified by a URI, with an optional MIME type and a base64-encoded blob. */ export interface EmbeddedBlobResourceContents { /** @@ -4754,7 +4802,7 @@ export interface ToolExecutionCompleteUIResourceMeta { ui?: ToolExecutionCompleteUIResourceMetaUI; } /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUI` type. + * MCP Apps UI resource metadata for a completed tool result, including CSP, permissions, domain, and border preference. */ export interface ToolExecutionCompleteUIResourceMetaUI { csp?: ToolExecutionCompleteUIResourceMetaUICsp; @@ -4763,7 +4811,7 @@ export interface ToolExecutionCompleteUIResourceMetaUI { prefersBorder?: boolean; } /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUICsp` type. + * CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. */ export interface ToolExecutionCompleteUIResourceMetaUICsp { baseUriDomains?: string[]; @@ -4772,7 +4820,7 @@ export interface ToolExecutionCompleteUIResourceMetaUICsp { resourceDomains?: string[]; } /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissions` type. + * Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. */ export interface ToolExecutionCompleteUIResourceMetaUIPermissions { camera?: ToolExecutionCompleteUIResourceMetaUIPermissionsCamera; @@ -4781,19 +4829,19 @@ export interface ToolExecutionCompleteUIResourceMetaUIPermissions { microphone?: ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone; } /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsCamera` type. + * Marker object for camera permission on an MCP Apps UI resource. */ export interface ToolExecutionCompleteUIResourceMetaUIPermissionsCamera {} /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite` type. + * Marker object for clipboard-write permission on an MCP Apps UI resource. */ export interface ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite {} /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation` type. + * Marker object for geolocation permission on an MCP Apps UI resource. */ export interface ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation {} /** - * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone` type. + * Marker object for microphone permission on an MCP Apps UI resource. */ export interface ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone {} /** @@ -4817,7 +4865,7 @@ export interface ToolExecutionCompleteToolDescriptionMeta { ui?: ToolExecutionCompleteToolDescriptionMetaUI; } /** - * Schema for the `ToolExecutionCompleteToolDescriptionMetaUI` type. + * MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_complete`. */ export interface ToolExecutionCompleteToolDescriptionMetaUI { /** @@ -4875,6 +4923,10 @@ export interface SkillInvokedData { * Description of the skill from its SKILL.md frontmatter */ description?: string; + /** + * Model identifier active when the skill was invoked, when known + */ + model?: string; /** * Name of the invoked skill */ @@ -5490,7 +5542,7 @@ export interface SystemNotificationData { kind: SystemNotification; } /** - * Schema for the `SystemNotificationAgentCompleted` type. + * System notification metadata for a background agent that completed or failed, including agent ID, type, status, description, and prompt. */ export interface SystemNotificationAgentCompleted { /** @@ -5516,7 +5568,7 @@ export interface SystemNotificationAgentCompleted { type: "agent_completed"; } /** - * Schema for the `SystemNotificationAgentIdle` type. + * System notification metadata for a background agent that became idle, including agent ID, type, and description. */ export interface SystemNotificationAgentIdle { /** @@ -5537,7 +5589,7 @@ export interface SystemNotificationAgentIdle { type: "agent_idle"; } /** - * Schema for the `SystemNotificationNewInboxMessage` type. + * System notification metadata for a new inbox message, including entry ID, sender details, and summary. */ export interface SystemNotificationNewInboxMessage { /** @@ -5562,7 +5614,7 @@ export interface SystemNotificationNewInboxMessage { type: "new_inbox_message"; } /** - * Schema for the `SystemNotificationShellCompleted` type. + * System notification metadata for a shell session that completed, including shell ID, optional exit code, and description. */ export interface SystemNotificationShellCompleted { /** @@ -5583,7 +5635,7 @@ export interface SystemNotificationShellCompleted { type: "shell_completed"; } /** - * Schema for the `SystemNotificationShellDetachedCompleted` type. + * System notification metadata for a detached shell session that completed, including shell ID and description. */ export interface SystemNotificationShellDetachedCompleted { /** @@ -5600,7 +5652,7 @@ export interface SystemNotificationShellDetachedCompleted { type: "shell_detached_completed"; } /** - * Schema for the `SystemNotificationInstructionDiscovered` type. + * System notification metadata for an instruction file discovered during tool access, including source, trigger file, and tool. */ export interface SystemNotificationInstructionDiscovered { /** @@ -5723,7 +5775,7 @@ export interface PermissionRequestShell { warning?: string; } /** - * Schema for the `PermissionRequestShellCommand` type. + * A parsed command identifier in a shell permission request, including whether it is read-only. */ export interface PermissionRequestShellCommand { /** @@ -5736,7 +5788,7 @@ export interface PermissionRequestShellCommand { readOnly: boolean; } /** - * Schema for the `PermissionRequestShellPossibleUrl` type. + * A URL that may be accessed by a command in a shell permission request. */ export interface PermissionRequestShellPossibleUrl { /** @@ -5993,6 +6045,12 @@ export interface PermissionRequestExtensionPermissionAccess { * Shell command permission prompt */ export interface PermissionPromptRequestCommands { + /** + * Auto-approval judge information for this request; present only when auto mode is enabled. + * + * @experimental + */ + autoApproval?: PermissionAutoApproval; /** * Whether the UI can offer session-wide approval for this command pattern */ @@ -6022,10 +6080,27 @@ export interface PermissionPromptRequestCommands { */ warning?: string; } +/** + * Auto-approval judge information attached to a permission request. Present (non-null) only when the session's allow-all mode is "auto"; its absence means auto mode was off and the judge did not evaluate the request. The `recommendation` conveys the judge's disposition for this request. + */ +/** @experimental */ +export interface PermissionAutoApproval { + /** + * Human-readable reason for the judge's recommendation, when available. + */ + reason?: string; + recommendation: AutoApprovalRecommendation; +} /** * File write permission prompt */ export interface PermissionPromptRequestWrite { + /** + * Auto-approval judge information for this request; present only when auto mode is enabled. + * + * @experimental + */ + autoApproval?: PermissionAutoApproval; /** * Whether the UI can offer session-wide approval for file write operations */ @@ -6059,6 +6134,12 @@ export interface PermissionPromptRequestWrite { * File read permission prompt */ export interface PermissionPromptRequestRead { + /** + * Auto-approval judge information for this request; present only when auto mode is enabled. + * + * @experimental + */ + autoApproval?: PermissionAutoApproval; /** * Human-readable description of why the file is being read */ @@ -6086,6 +6167,12 @@ export interface PermissionPromptRequestMcp { args?: { [k: string]: unknown | undefined; }; + /** + * Auto-approval judge information for this request; present only when auto mode is enabled. + * + * @experimental + */ + autoApproval?: PermissionAutoApproval; /** * Prompt kind discriminator */ @@ -6111,6 +6198,12 @@ export interface PermissionPromptRequestMcp { * URL access permission prompt */ export interface PermissionPromptRequestUrl { + /** + * Auto-approval judge information for this request; present only when auto mode is enabled. + * + * @experimental + */ + autoApproval?: PermissionAutoApproval; /** * Human-readable description of why the URL is being accessed */ @@ -6133,6 +6226,12 @@ export interface PermissionPromptRequestUrl { */ export interface PermissionPromptRequestMemory { action?: PermissionRequestMemoryAction; + /** + * Auto-approval judge information for this request; present only when auto mode is enabled. + * + * @experimental + */ + autoApproval?: PermissionAutoApproval; /** * Source references for the stored fact (store only) */ @@ -6169,6 +6268,12 @@ export interface PermissionPromptRequestCustomTool { args?: { [k: string]: unknown | undefined; }; + /** + * Auto-approval judge information for this request; present only when auto mode is enabled. + * + * @experimental + */ + autoApproval?: PermissionAutoApproval; /** * Prompt kind discriminator */ @@ -6191,6 +6296,12 @@ export interface PermissionPromptRequestCustomTool { */ export interface PermissionPromptRequestPath { accessKind: PermissionPromptRequestPathAccessKind; + /** + * Auto-approval judge information for this request; present only when auto mode is enabled. + * + * @experimental + */ + autoApproval?: PermissionAutoApproval; /** * Prompt kind discriminator */ @@ -6208,6 +6319,12 @@ export interface PermissionPromptRequestPath { * Hook confirmation permission prompt */ export interface PermissionPromptRequestHook { + /** + * Auto-approval judge information for this request; present only when auto mode is enabled. + * + * @experimental + */ + autoApproval?: PermissionAutoApproval; /** * Optional message from the hook explaining why confirmation is needed */ @@ -6235,6 +6352,12 @@ export interface PermissionPromptRequestHook { * Extension management permission prompt */ export interface PermissionPromptRequestExtensionManagement { + /** + * Auto-approval judge information for this request; present only when auto mode is enabled. + * + * @experimental + */ + autoApproval?: PermissionAutoApproval; /** * Name of the extension being managed */ @@ -6256,6 +6379,12 @@ export interface PermissionPromptRequestExtensionManagement { * Extension permission access prompt */ export interface PermissionPromptRequestExtensionPermissionAccess { + /** + * Auto-approval judge information for this request; present only when auto mode is enabled. + * + * @experimental + */ + autoApproval?: PermissionAutoApproval; /** * Capabilities the extension is requesting */ @@ -6318,7 +6447,7 @@ export interface PermissionCompletedData { toolCallId?: string; } /** - * Schema for the `PermissionApproved` type. + * Permission response variant indicating the request was approved without persisting an approval rule. */ export interface PermissionApproved { /** @@ -6327,7 +6456,7 @@ export interface PermissionApproved { kind: "approved"; } /** - * Schema for the `PermissionApprovedForSession` type. + * Permission response variant that approves a request and remembers the provided approval for the rest of the session. */ export interface PermissionApprovedForSession { approval: UserToolSessionApproval; @@ -6337,7 +6466,7 @@ export interface PermissionApprovedForSession { kind: "approved-for-session"; } /** - * Schema for the `UserToolSessionApprovalCommands` type. + * Session-scoped tool-approval rule for specific shell command identifiers. */ export interface UserToolSessionApprovalCommands { /** @@ -6350,7 +6479,7 @@ export interface UserToolSessionApprovalCommands { kind: "commands"; } /** - * Schema for the `UserToolSessionApprovalRead` type. + * Session-scoped tool-approval rule for read-only filesystem operations. */ export interface UserToolSessionApprovalRead { /** @@ -6359,7 +6488,7 @@ export interface UserToolSessionApprovalRead { kind: "read"; } /** - * Schema for the `UserToolSessionApprovalWrite` type. + * Session-scoped tool-approval rule for filesystem write operations. */ export interface UserToolSessionApprovalWrite { /** @@ -6368,7 +6497,7 @@ export interface UserToolSessionApprovalWrite { kind: "write"; } /** - * Schema for the `UserToolSessionApprovalMcp` type. + * Session-scoped tool-approval rule for an MCP server tool, or all tools on the server when `toolName` is null. */ export interface UserToolSessionApprovalMcp { /** @@ -6385,7 +6514,7 @@ export interface UserToolSessionApprovalMcp { toolName: string | null; } /** - * Schema for the `UserToolSessionApprovalMemory` type. + * Session-scoped tool-approval rule for writes to long-term memory. */ export interface UserToolSessionApprovalMemory { /** @@ -6394,7 +6523,7 @@ export interface UserToolSessionApprovalMemory { kind: "memory"; } /** - * Schema for the `UserToolSessionApprovalCustomTool` type. + * Session-scoped tool-approval rule for a custom tool, keyed by tool name. */ export interface UserToolSessionApprovalCustomTool { /** @@ -6407,7 +6536,7 @@ export interface UserToolSessionApprovalCustomTool { toolName: string; } /** - * Schema for the `UserToolSessionApprovalExtensionManagement` type. + * Session-scoped tool-approval rule for extension-management operations, optionally narrowed by operation. */ export interface UserToolSessionApprovalExtensionManagement { /** @@ -6420,7 +6549,7 @@ export interface UserToolSessionApprovalExtensionManagement { operation?: string; } /** - * Schema for the `UserToolSessionApprovalExtensionPermissionAccess` type. + * Session-scoped tool-approval rule for an extension's permission-gated capability access, keyed by extension name. */ export interface UserToolSessionApprovalExtensionPermissionAccess { /** @@ -6433,7 +6562,7 @@ export interface UserToolSessionApprovalExtensionPermissionAccess { kind: "extension-permission-access"; } /** - * Schema for the `PermissionApprovedForLocation` type. + * Permission response variant that approves a request and persists the provided approval to a project location key. */ export interface PermissionApprovedForLocation { approval: UserToolSessionApproval; @@ -6447,7 +6576,7 @@ export interface PermissionApprovedForLocation { locationKey: string; } /** - * Schema for the `PermissionCancelled` type. + * Permission response variant indicating the request was cancelled before use, with an optional reason. */ export interface PermissionCancelled { /** @@ -6460,7 +6589,7 @@ export interface PermissionCancelled { reason?: string; } /** - * Schema for the `PermissionDeniedByRules` type. + * Permission response variant denied because matching approval rules explicitly blocked the request. */ export interface PermissionDeniedByRules { /** @@ -6473,7 +6602,7 @@ export interface PermissionDeniedByRules { rules: PermissionRule[]; } /** - * Schema for the `PermissionRule` type. + * A permission approval or denial rule matched against a tool request, identified by a rule kind with an optional argument value. */ export interface PermissionRule { /** @@ -6486,7 +6615,7 @@ export interface PermissionRule { kind: string; } /** - * Schema for the `PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type. + * Permission response variant denied because no approval rule matched and user confirmation was unavailable. */ export interface PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser { /** @@ -6495,7 +6624,7 @@ export interface PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser { kind: "denied-no-approval-rule-and-could-not-request-from-user"; } /** - * Schema for the `PermissionDeniedInteractivelyByUser` type. + * Permission response variant denied in an interactive user prompt, with optional feedback and force-reject flag. */ export interface PermissionDeniedInteractivelyByUser { /** @@ -6512,7 +6641,7 @@ export interface PermissionDeniedInteractivelyByUser { kind: "denied-interactively-by-user"; } /** - * Schema for the `PermissionDeniedByContentExclusionPolicy` type. + * Permission response variant denying a path under content exclusion policy, with the path and message. */ export interface PermissionDeniedByContentExclusionPolicy { /** @@ -6529,7 +6658,7 @@ export interface PermissionDeniedByContentExclusionPolicy { path: string; } /** - * Schema for the `PermissionDeniedByPermissionRequestHook` type. + * Permission response variant denied by a permission-request hook, with optional message and interrupt flag. */ export interface PermissionDeniedByPermissionRequestHook { /** @@ -6770,7 +6899,7 @@ export interface ElicitationCompletedData { requestId: string; } /** - * Schema for the `ElicitationCompletedContent` type. + * Opaque JSON value submitted for one field in accepted `elicitation.completed` form content. */ export interface ElicitationCompletedContent { [k: string]: unknown | undefined; @@ -7613,7 +7742,7 @@ export interface CommandsChangedData { commands: CommandsChangedCommand[]; } /** - * Schema for the `CommandsChangedCommand` type. + * A single slash command available in the session, as listed by the `commands.changed` event. */ export interface CommandsChangedCommand { /** @@ -7783,7 +7912,7 @@ export interface ExitPlanModeCompletedData { selectedAction?: ExitPlanModeAction; } /** - * Session event "session.tools_updated". + * Session event "session.tools_updated". Payload of `session.tools_updated` identifying the model whose resolved tools were updated. */ export interface ToolsUpdatedEvent { /** @@ -7813,7 +7942,7 @@ export interface ToolsUpdatedEvent { type: "session.tools_updated"; } /** - * Schema for the `ToolsUpdatedData` type. + * Payload of `session.tools_updated` identifying the model whose resolved tools were updated. */ export interface ToolsUpdatedData { /** @@ -7822,7 +7951,7 @@ export interface ToolsUpdatedData { model: string; } /** - * Session event "session.background_tasks_changed". + * Session event "session.background_tasks_changed". Empty payload for `session.background_tasks_changed`, indicating background task state changed. */ export interface BackgroundTasksChangedEvent { /** @@ -7852,11 +7981,11 @@ export interface BackgroundTasksChangedEvent { type: "session.background_tasks_changed"; } /** - * Schema for the `BackgroundTasksChangedData` type. + * Empty payload for `session.background_tasks_changed`, indicating background task state changed. */ export interface BackgroundTasksChangedData {} /** - * Session event "session.skills_loaded". + * Session event "session.skills_loaded". Payload of `session.skills_loaded` listing resolved skill metadata. */ export interface SkillsLoadedEvent { /** @@ -7886,7 +8015,7 @@ export interface SkillsLoadedEvent { type: "session.skills_loaded"; } /** - * Schema for the `SkillsLoadedData` type. + * Payload of `session.skills_loaded` listing resolved skill metadata. */ export interface SkillsLoadedData { /** @@ -7895,7 +8024,7 @@ export interface SkillsLoadedData { skills: SkillsLoadedSkill[]; } /** - * Schema for the `SkillsLoadedSkill` type. + * A single resolved skill in `session.skills_loaded`, including source, invocability, enabled state, path, and argument hint. */ export interface SkillsLoadedSkill { /** @@ -7925,7 +8054,7 @@ export interface SkillsLoadedSkill { userInvocable: boolean; } /** - * Session event "session.custom_agents_updated". + * Session event "session.custom_agents_updated". Payload of `session.custom_agents_updated` with loaded custom agents plus non-fatal warnings and fatal errors. */ export interface CustomAgentsUpdatedEvent { /** @@ -7955,7 +8084,7 @@ export interface CustomAgentsUpdatedEvent { type: "session.custom_agents_updated"; } /** - * Schema for the `CustomAgentsUpdatedData` type. + * Payload of `session.custom_agents_updated` with loaded custom agents plus non-fatal warnings and fatal errors. */ export interface CustomAgentsUpdatedData { /** @@ -7972,7 +8101,7 @@ export interface CustomAgentsUpdatedData { warnings: string[]; } /** - * Schema for the `CustomAgentsUpdatedAgent` type. + * A single loaded custom agent in `session.custom_agents_updated`, with identity, source, tools, invocability, and model override. */ export interface CustomAgentsUpdatedAgent { /** @@ -8009,7 +8138,7 @@ export interface CustomAgentsUpdatedAgent { userInvocable: boolean; } /** - * Session event "session.mcp_servers_loaded". + * Session event "session.mcp_servers_loaded". Payload of `session.mcp_servers_loaded` listing MCP server status summaries. */ export interface McpServersLoadedEvent { /** @@ -8039,7 +8168,7 @@ export interface McpServersLoadedEvent { type: "session.mcp_servers_loaded"; } /** - * Schema for the `McpServersLoadedData` type. + * Payload of `session.mcp_servers_loaded` listing MCP server status summaries. */ export interface McpServersLoadedData { /** @@ -8048,7 +8177,7 @@ export interface McpServersLoadedData { servers: McpServersLoadedServer[]; } /** - * Schema for the `McpServersLoadedServer` type. + * A single MCP server status summary in `session.mcp_servers_loaded`, including name, status, source, transport, and plugin metadata. */ export interface McpServersLoadedServer { /** @@ -8072,7 +8201,7 @@ export interface McpServersLoadedServer { transport?: McpServerTransport; } /** - * Session event "session.mcp_server_status_changed". + * Session event "session.mcp_server_status_changed". Payload of `session.mcp_server_status_changed` for one MCP server's status and optional failure error. */ export interface McpServerStatusChangedEvent { /** @@ -8102,7 +8231,7 @@ export interface McpServerStatusChangedEvent { type: "session.mcp_server_status_changed"; } /** - * Schema for the `McpServerStatusChangedData` type. + * Payload of `session.mcp_server_status_changed` for one MCP server's status and optional failure error. */ export interface McpServerStatusChangedData { /** @@ -8116,7 +8245,7 @@ export interface McpServerStatusChangedData { status: McpServerStatus; } /** - * Session event "session.extensions_loaded". + * Session event "session.extensions_loaded". Payload of `session.extensions_loaded` listing discovered extensions and their statuses. */ export interface ExtensionsLoadedEvent { /** @@ -8146,7 +8275,7 @@ export interface ExtensionsLoadedEvent { type: "session.extensions_loaded"; } /** - * Schema for the `ExtensionsLoadedData` type. + * Payload of `session.extensions_loaded` listing discovered extensions and their statuses. */ export interface ExtensionsLoadedData { /** @@ -8155,7 +8284,7 @@ export interface ExtensionsLoadedData { extensions: ExtensionsLoadedExtension[]; } /** - * Schema for the `ExtensionsLoadedExtension` type. + * A single extension discovered by `session.extensions_loaded`, including qualified ID, source, and current status. */ export interface ExtensionsLoadedExtension { /** @@ -8170,7 +8299,7 @@ export interface ExtensionsLoadedExtension { status: ExtensionsLoadedExtensionStatus; } /** - * Session event "session.canvas.opened". + * Session event "session.canvas.opened". Payload of `session.canvas.opened` with canvas instance and provider IDs plus optional title, status, URL, and input. */ /** @experimental */ export interface CanvasOpenedEvent { @@ -8201,7 +8330,7 @@ export interface CanvasOpenedEvent { type: "session.canvas.opened"; } /** - * Schema for the `CanvasOpenedData` type. + * Payload of `session.canvas.opened` with canvas instance and provider IDs plus optional title, status, URL, and input. */ /** @experimental */ export interface CanvasOpenedData { @@ -8241,7 +8370,7 @@ export interface CanvasOpenedData { url?: string; } /** - * Session event "session.canvas.registry_changed". + * Session event "session.canvas.registry_changed". Payload of `session.canvas.registry_changed` listing the canvas declarations currently available. */ /** @experimental */ export interface CanvasRegistryChangedEvent { @@ -8272,7 +8401,7 @@ export interface CanvasRegistryChangedEvent { type: "session.canvas.registry_changed"; } /** - * Schema for the `CanvasRegistryChangedData` type. + * Payload of `session.canvas.registry_changed` listing the canvas declarations currently available. */ /** @experimental */ export interface CanvasRegistryChangedData { @@ -8282,7 +8411,7 @@ export interface CanvasRegistryChangedData { canvases: CanvasRegistryChangedCanvas[]; } /** - * Schema for the `CanvasRegistryChangedCanvas` type. + * A single canvas declaration in `session.canvas.registry_changed`, including provider IDs, display metadata, input schema, and actions. */ /** @experimental */ export interface CanvasRegistryChangedCanvas { @@ -8318,7 +8447,7 @@ export interface CanvasRegistryChangedCanvas { }; } /** - * Schema for the `CanvasRegistryChangedCanvasAction` type. + * A single action within a canvas declaration, with its name, optional description, and optional input schema. */ /** @experimental */ export interface CanvasRegistryChangedCanvasAction { @@ -8338,7 +8467,7 @@ export interface CanvasRegistryChangedCanvasAction { name: string; } /** - * Session event "session.canvas.closed". + * Session event "session.canvas.closed". Payload of `session.canvas.closed` with the closed canvas instance ID, provider ID, and canvas ID. */ /** @experimental */ export interface CanvasClosedEvent { @@ -8369,7 +8498,7 @@ export interface CanvasClosedEvent { type: "session.canvas.closed"; } /** - * Schema for the `CanvasClosedData` type. + * Payload of `session.canvas.closed` with the closed canvas instance ID, provider ID, and canvas ID. */ /** @experimental */ export interface CanvasClosedData { @@ -8544,7 +8673,7 @@ export interface CanvasRemovedData { instanceId: string; } /** - * Session event "session.extensions.attachments_pushed". + * Session event "session.extensions.attachments_pushed". Payload of `session.extensions.attachments_pushed` with extension-contributed attachments for the next send. */ export interface ExtensionsAttachmentsPushedEvent { /** @@ -8574,7 +8703,7 @@ export interface ExtensionsAttachmentsPushedEvent { type: "session.extensions.attachments_pushed"; } /** - * Schema for the `ExtensionsAttachmentsPushedData` type. + * Payload of `session.extensions.attachments_pushed` with extension-contributed attachments for the next send. */ export interface ExtensionsAttachmentsPushedData { /** @@ -8663,7 +8792,7 @@ export interface McpAppToolCallCompleteToolMeta { ui?: McpAppToolCallCompleteToolMetaUI; } /** - * Schema for the `McpAppToolCallCompleteToolMetaUI` type. + * MCP App tool `_meta.ui` resource URI and SEP-1865 visibility captured with an `mcp_app.tool_call_complete` result. */ export interface McpAppToolCallCompleteToolMetaUI { /** diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py index 436f53211..1c12d2ce2 100644 --- a/python/copilot/generated/rpc.py +++ b/python/copilot/generated/rpc.py @@ -123,7 +123,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CopilotUserResponseEndpoints: - """Schema for the `CopilotUserResponseEndpoints` type.""" + """Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough.""" api: str | None = None origin_tracker: str | None = None @@ -151,6 +151,102 @@ def to_dict(self) -> dict: result["telemetry"] = from_union([from_str, from_none], self.telemetry) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class CopilotUserResponseQuotaSnapshots: + """Chat quota snapshot from the raw Copilot user-response passthrough, with entitlement, + overage, remaining quota, reset, and billing fields. + + Completions quota snapshot from the raw Copilot user-response passthrough, with + entitlement, overage, remaining quota, reset, and billing fields. + + Premium-interactions quota snapshot from the raw Copilot user-response passthrough, with + entitlement, overage, remaining quota, reset, and billing fields. + """ + entitlement: float | None = None + """Number of requests/units included in the entitlement for this period; `-1` denotes an + unlimited entitlement. + """ + has_quota: bool | None = None + """Whether the user currently has quota available; when `false` and not unlimited, further + requests are blocked until the quota resets. + """ + overage_count: float | None = None + """Count of additional pay-per-request usage consumed this period beyond the entitlement.""" + + overage_permitted: bool | None = None + """Whether usage may continue at pay-per-request rates once the entitlement is exhausted.""" + + percent_remaining: float | None = None + """Percentage of the entitlement remaining at the snapshot timestamp.""" + + quota_id: str | None = None + """Identifier of the quota bucket this snapshot describes.""" + + quota_remaining: float | None = None + """Amount of quota remaining at the snapshot timestamp.""" + + quota_reset_at: float | None = None + """Unix epoch time, in seconds, when this quota next resets.""" + + remaining: float | None = None + """Remaining entitlement/quota amount at the snapshot timestamp.""" + + timestamp_utc: str | None = None + """UTC timestamp when this snapshot was captured.""" + + token_based_billing: bool | None = None + """Whether this category uses usage-based (token/AI-credit) billing rather than a fixed + premium-request count. + """ + unlimited: bool | None = None + """Whether the entitlement for this category is unlimited.""" + + @staticmethod + def from_dict(obj: Any) -> 'CopilotUserResponseQuotaSnapshots': + assert isinstance(obj, dict) + entitlement = from_union([from_float, from_none], obj.get("entitlement")) + has_quota = from_union([from_bool, from_none], obj.get("has_quota")) + overage_count = from_union([from_float, from_none], obj.get("overage_count")) + overage_permitted = from_union([from_bool, from_none], obj.get("overage_permitted")) + percent_remaining = from_union([from_float, from_none], obj.get("percent_remaining")) + quota_id = from_union([from_str, from_none], obj.get("quota_id")) + quota_remaining = from_union([from_float, from_none], obj.get("quota_remaining")) + quota_reset_at = from_union([from_float, from_none], obj.get("quota_reset_at")) + remaining = from_union([from_float, from_none], obj.get("remaining")) + timestamp_utc = from_union([from_str, from_none], obj.get("timestamp_utc")) + token_based_billing = from_union([from_bool, from_none], obj.get("token_based_billing")) + unlimited = from_union([from_bool, from_none], obj.get("unlimited")) + return CopilotUserResponseQuotaSnapshots(entitlement, has_quota, overage_count, overage_permitted, percent_remaining, quota_id, quota_remaining, quota_reset_at, remaining, timestamp_utc, token_based_billing, unlimited) + + def to_dict(self) -> dict: + result: dict = {} + if self.entitlement is not None: + result["entitlement"] = from_union([to_float, from_none], self.entitlement) + if self.has_quota is not None: + result["has_quota"] = from_union([from_bool, from_none], self.has_quota) + if self.overage_count is not None: + result["overage_count"] = from_union([to_float, from_none], self.overage_count) + if self.overage_permitted is not None: + result["overage_permitted"] = from_union([from_bool, from_none], self.overage_permitted) + if self.percent_remaining is not None: + result["percent_remaining"] = from_union([to_float, from_none], self.percent_remaining) + if self.quota_id is not None: + result["quota_id"] = from_union([from_str, from_none], self.quota_id) + if self.quota_remaining is not None: + result["quota_remaining"] = from_union([to_float, from_none], self.quota_remaining) + if self.quota_reset_at is not None: + result["quota_reset_at"] = from_union([to_float, from_none], self.quota_reset_at) + if self.remaining is not None: + result["remaining"] = from_union([to_float, from_none], self.remaining) + if self.timestamp_utc is not None: + result["timestamp_utc"] = from_union([from_str, from_none], self.timestamp_utc) + if self.token_based_billing is not None: + result["token_based_billing"] = from_union([from_bool, from_none], self.token_based_billing) + if self.unlimited is not None: + result["unlimited"] = from_union([from_bool, from_none], self.unlimited) + return result + # Experimental: this type is part of an experimental API and may change or be removed. class AuthInfoType(Enum): """Authentication type""" @@ -166,7 +262,8 @@ class AuthInfoType(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AccountAllUsers: - """Schema for the `AccountAllUsers` type. + """Authenticated account entry returned by `account.getAllUsers`, with auth info and an + optional associated token. List of all authenticated users """ @@ -239,8 +336,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AccountQuotaSnapshot: - """Schema for the `AccountQuotaSnapshot` type.""" - + """Quota usage snapshot for a Copilot quota type, including entitlement, used requests, + overage, reset date, and remaining percentage. + """ entitlement_requests: int """Number of requests included in the entitlement, or -1 for unlimited entitlements""" @@ -578,47 +676,19 @@ def to_dict(self) -> dict: return result # Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class AllowAllPermissionSetResult: - """Indicates whether the operation succeeded and reports the post-mutation state.""" - - enabled: bool - """Authoritative allow-all state after the mutation""" - - success: bool - """Whether the operation succeeded""" - - @staticmethod - def from_dict(obj: Any) -> 'AllowAllPermissionSetResult': - assert isinstance(obj, dict) - enabled = from_bool(obj.get("enabled")) - success = from_bool(obj.get("success")) - return AllowAllPermissionSetResult(enabled, success) - - def to_dict(self) -> dict: - result: dict = {} - result["enabled"] = from_bool(self.enabled) - result["success"] = from_bool(self.success) - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class AllowAllPermissionState: - """Current full allow-all permission state.""" +class PermissionsAllowAllMode(Enum): + """Authoritative allow-all mode after the mutation - enabled: bool - """Whether full allow-all permissions are currently active""" + Current or requested allow-all mode. - @staticmethod - def from_dict(obj: Any) -> 'AllowAllPermissionState': - assert isinstance(obj, dict) - enabled = from_bool(obj.get("enabled")) - return AllowAllPermissionState(enabled) + Current allow-all mode - def to_dict(self) -> dict: - result: dict = {} - result["enabled"] = from_bool(self.enabled) - return result + Allow-all mode to apply. `on` enables full allow-all; `auto` enables advisory LLM + auto-approval; `off` disables both. + """ + AUTO = "auto" + OFF = "off" + ON = "on" class APIKeyAuthInfoType(Enum): API_KEY = "api-key" @@ -1227,19 +1297,32 @@ def to_dict(self) -> dict: # Internal: this type is an internal SDK API and is not part of the public surface. @dataclass class _ConnectRequest: - """Optional connection token presented by the SDK client during the handshake.""" - + """Parameters for the `server.connect` handshake: an optional connection token and optional + connection-level opt-ins (e.g. GitHub telemetry forwarding). + """ + 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, in + addition to the runtime's normal GitHub/CTS emission (dual-write). 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. + """ 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) + 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(token) + return _ConnectRequest(enable_git_hub_telemetry_forwarding, token) 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) return result @@ -1363,20 +1446,47 @@ class CopilotAPITokenAuthInfoType(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CopilotUserResponseQuotaSnapshotsChat: - """Schema for the `CopilotUserResponseQuotaSnapshotsChat` type.""" - + """Chat quota snapshot from the raw Copilot user-response passthrough, with entitlement, + overage, remaining quota, reset, and billing fields. + """ entitlement: float | None = None + """Number of requests/units included in the entitlement for this period; `-1` denotes an + unlimited entitlement. + """ has_quota: bool | None = None + """Whether the user currently has quota available; when `false` and not unlimited, further + requests are blocked until the quota resets. + """ overage_count: float | None = None + """Count of additional pay-per-request usage consumed this period beyond the entitlement.""" + overage_permitted: bool | None = None + """Whether usage may continue at pay-per-request rates once the entitlement is exhausted.""" + percent_remaining: float | None = None + """Percentage of the entitlement remaining at the snapshot timestamp.""" + quota_id: str | None = None + """Identifier of the quota bucket this snapshot describes.""" + quota_remaining: float | None = None + """Amount of quota remaining at the snapshot timestamp.""" + quota_reset_at: float | None = None + """Unix epoch time, in seconds, when this quota next resets.""" + remaining: float | None = None + """Remaining entitlement/quota amount at the snapshot timestamp.""" + timestamp_utc: str | None = None + """UTC timestamp when this snapshot was captured.""" + token_based_billing: bool | None = None + """Whether this category uses usage-based (token/AI-credit) billing rather than a fixed + premium-request count. + """ unlimited: bool | None = None + """Whether the entitlement for this category is unlimited.""" @staticmethod def from_dict(obj: Any) -> 'CopilotUserResponseQuotaSnapshotsChat': @@ -1426,20 +1536,47 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CopilotUserResponseQuotaSnapshotsCompletions: - """Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` type.""" - + """Completions quota snapshot from the raw Copilot user-response passthrough, with + entitlement, overage, remaining quota, reset, and billing fields. + """ entitlement: float | None = None + """Number of requests/units included in the entitlement for this period; `-1` denotes an + unlimited entitlement. + """ has_quota: bool | None = None + """Whether the user currently has quota available; when `false` and not unlimited, further + requests are blocked until the quota resets. + """ overage_count: float | None = None + """Count of additional pay-per-request usage consumed this period beyond the entitlement.""" + overage_permitted: bool | None = None + """Whether usage may continue at pay-per-request rates once the entitlement is exhausted.""" + percent_remaining: float | None = None + """Percentage of the entitlement remaining at the snapshot timestamp.""" + quota_id: str | None = None + """Identifier of the quota bucket this snapshot describes.""" + quota_remaining: float | None = None + """Amount of quota remaining at the snapshot timestamp.""" + quota_reset_at: float | None = None + """Unix epoch time, in seconds, when this quota next resets.""" + remaining: float | None = None + """Remaining entitlement/quota amount at the snapshot timestamp.""" + timestamp_utc: str | None = None + """UTC timestamp when this snapshot was captured.""" + token_based_billing: bool | None = None + """Whether this category uses usage-based (token/AI-credit) billing rather than a fixed + premium-request count. + """ unlimited: bool | None = None + """Whether the entitlement for this category is unlimited.""" @staticmethod def from_dict(obj: Any) -> 'CopilotUserResponseQuotaSnapshotsCompletions': @@ -1489,20 +1626,47 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CopilotUserResponseQuotaSnapshotsPremiumInteractions: - """Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` type.""" - + """Premium-interactions quota snapshot from the raw Copilot user-response passthrough, with + entitlement, overage, remaining quota, reset, and billing fields. + """ entitlement: float | None = None + """Number of requests/units included in the entitlement for this period; `-1` denotes an + unlimited entitlement. + """ has_quota: bool | None = None + """Whether the user currently has quota available; when `false` and not unlimited, further + requests are blocked until the quota resets. + """ overage_count: float | None = None + """Count of additional pay-per-request usage consumed this period beyond the entitlement.""" + overage_permitted: bool | None = None + """Whether usage may continue at pay-per-request rates once the entitlement is exhausted.""" + percent_remaining: float | None = None + """Percentage of the entitlement remaining at the snapshot timestamp.""" + quota_id: str | None = None + """Identifier of the quota bucket this snapshot describes.""" + quota_remaining: float | None = None + """Amount of quota remaining at the snapshot timestamp.""" + quota_reset_at: float | None = None + """Unix epoch time, in seconds, when this quota next resets.""" + remaining: float | None = None + """Remaining entitlement/quota amount at the snapshot timestamp.""" + timestamp_utc: str | None = None + """UTC timestamp when this snapshot was captured.""" + token_based_billing: bool | None = None + """Whether this category uses usage-based (token/AI-credit) billing rather than a fixed + premium-request count. + """ unlimited: bool | None = None + """Whether the entitlement for this category is unlimited.""" @staticmethod def from_dict(obj: Any) -> 'CopilotUserResponseQuotaSnapshotsPremiumInteractions': @@ -1586,6 +1750,126 @@ def to_dict(self) -> dict: result["reasoningEffort"] = from_union([from_str, from_none], self.reasoning_effort) return result +# Experimental: this type is part of an experimental API and may change or be removed. +class DebugCollectLogsSource(Enum): + """Source category for this entry. + + Source category for a collected debug bundle entry. + """ + ADDITIONAL = "additional" + EVENTS = "events" + PROCESS_LOG = "process-log" + SHELL_LOG = "shell-log" + +# Experimental: this type is part of an experimental API and may change or be removed. +class DebugCollectLogsResultKind(Enum): + """Destination kind that was written.""" + + ARCHIVE = "archive" + DIRECTORY = "directory" + +# Experimental: this type is part of an experimental API and may change or be removed. +class DebugCollectLogsRedaction(Enum): + """How text content from this entry should be redacted. Defaults to plain-text. + + How a collected debug entry should be redacted before being staged. + """ + EVENTS_JSONL = "events-jsonl" + PLAIN_TEXT = "plain-text" + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class DebugCollectLogsInclude: + """Built-in session diagnostics to include in the bundle. Omitted fields default to true. + + Which built-in session diagnostics to include. Omitted fields default to true. + """ + current_process_log_path: str | None = None + """Server-local path to the current process log. When set, it is included as `process.log` + and its directory is searched for prior logs from the same session. + """ + events: bool | None = None + """Include the session event log (`events.jsonl`). Defaults to true.""" + + events_path: str | None = None + """Server-local path to the session's events.jsonl file. Internal callers normally omit this + and let the runtime derive it from the session. + """ + previous_process_log_limit: int | None = None + """Maximum number of previous process logs to include. Defaults to 5.""" + + process_log_directory: str | None = None + """Server-local process log directory to search when `currentProcessLogPath` is unavailable, + useful for collecting logs for inactive sessions. + """ + process_logs: bool | None = None + """Include process logs for the session. Defaults to true.""" + + shell_logs: bool | None = None + """Include interactive shell logs written under the session's `shell-logs` directory. + Defaults to true. + """ + + @staticmethod + def from_dict(obj: Any) -> 'DebugCollectLogsInclude': + assert isinstance(obj, dict) + current_process_log_path = from_union([from_str, from_none], obj.get("currentProcessLogPath")) + events = from_union([from_bool, from_none], obj.get("events")) + events_path = from_union([from_str, from_none], obj.get("eventsPath")) + previous_process_log_limit = from_union([from_int, from_none], obj.get("previousProcessLogLimit")) + process_log_directory = from_union([from_str, from_none], obj.get("processLogDirectory")) + process_logs = from_union([from_bool, from_none], obj.get("processLogs")) + shell_logs = from_union([from_bool, from_none], obj.get("shellLogs")) + return DebugCollectLogsInclude(current_process_log_path, events, events_path, previous_process_log_limit, process_log_directory, process_logs, shell_logs) + + def to_dict(self) -> dict: + result: dict = {} + if self.current_process_log_path is not None: + result["currentProcessLogPath"] = from_union([from_str, from_none], self.current_process_log_path) + if self.events is not None: + result["events"] = from_union([from_bool, from_none], self.events) + if self.events_path is not None: + result["eventsPath"] = from_union([from_str, from_none], self.events_path) + if self.previous_process_log_limit is not None: + result["previousProcessLogLimit"] = from_union([from_int, from_none], self.previous_process_log_limit) + if self.process_log_directory is not None: + result["processLogDirectory"] = from_union([from_str, from_none], self.process_log_directory) + if self.process_logs is not None: + result["processLogs"] = from_union([from_bool, from_none], self.process_logs) + if self.shell_logs is not None: + result["shellLogs"] = from_union([from_bool, from_none], self.shell_logs) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class DebugCollectLogsSkippedEntry: + """An optional debug bundle entry that could not be included.""" + + bundle_path: str + """Relative path requested for this bundle entry.""" + + reason: str + """Reason the entry was skipped.""" + + path: str | None = None + """Server-local source path that could not be read.""" + + @staticmethod + def from_dict(obj: Any) -> 'DebugCollectLogsSkippedEntry': + assert isinstance(obj, dict) + bundle_path = from_str(obj.get("bundlePath")) + reason = from_str(obj.get("reason")) + path = from_union([from_str, from_none], obj.get("path")) + return DebugCollectLogsSkippedEntry(bundle_path, reason, path) + + def to_dict(self) -> dict: + result: dict = {} + result["bundlePath"] = from_str(self.bundle_path) + result["reason"] = from_str(self.reason) + if self.path is not None: + 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 DiscoveredMCPServerType(Enum): """Server transport type: stdio, http, sse (deprecated), or memory""" @@ -2655,8 +2939,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MarketplaceRefreshEntry: - """Schema for the `MarketplaceRefreshEntry` type.""" - + """Per-marketplace refresh result, including marketplace name, success flag, and optional + failure error. + """ name: str """Marketplace name that was refreshed""" @@ -2711,7 +2996,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPAllowedServer: - """Schema for the `McpAllowedServer` type.""" + """MCP server allowed by policy, with server name and optional PII-free explanatory note.""" name: str """Allowed server name""" @@ -2907,8 +3192,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPAppsResourceContent: - """Schema for the `McpAppsResourceContent` type.""" - + """MCP Apps resource content with URI, optional MIME type, text or base64 blob, and resource + metadata. + """ uri: str """The resource URI (typically ui://...)""" @@ -3200,8 +3486,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPFilteredServer: - """Schema for the `McpFilteredServer` type.""" - + """MCP server filtered by policy, with name, reason, optional redacted reason, and + enterprise login. + """ name: str """Filtered server name""" @@ -4269,8 +4556,9 @@ class ProviderWireAPI(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class OptionsUpdateAdditionalContentExclusionPolicyRuleSource: - """Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type.""" - + """Source descriptor for a `session.options.update` content-exclusion rule, with source name + and type. + """ name: str type: str @@ -4320,8 +4608,9 @@ class OptionsUpdateToolFilterPrecedence(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PendingPermissionRequest: - """Schema for the `PendingPermissionRequest` type.""" - + """Pending permission prompt reconstructed from event history, with request ID and + user-facing prompt details. + """ request: PermissionPromptRequest """The user-facing permission prompt details (commands, write, read, mcp, url, memory, custom-tool, path, hook) @@ -4773,8 +5062,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsConfigureAdditionalContentExclusionPolicyRuleSource: - """Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type.""" - + """Source descriptor for a `session.permissions.configure` content-exclusion rule, with + source name and type. + """ name: str type: str @@ -5247,7 +5537,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class Plugin: - """Schema for the `Plugin` type.""" + """Session plugin metadata, with name, marketplace, optional version, and enabled state.""" enabled: bool """Whether the plugin is currently enabled""" @@ -5731,8 +6021,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class QueuedCommandHandled: - """Schema for the `QueuedCommandHandled` type.""" - + """Queued-command response indicating the host executed the command, with an optional flag + to stop queue processing. + """ handled: ClassVar[str] = "true" """The host actually executed the queued command.""" @@ -5757,8 +6048,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class QueuedCommandNotHandled: - """Schema for the `QueuedCommandNotHandled` type.""" - + """Queued-command response indicating the host did not execute the command and the queue may + continue. + """ handled: ClassVar[str] = "false" """The host did not execute the queued command. Unblocks the queue without claiming the command was processed (e.g. when the handler threw before completing). @@ -6179,37 +6471,25 @@ def to_dict(self) -> dict: class SandboxConfigUserPolicyNetwork: """Network rules to merge into the base policy.""" - allowed_hosts: list[str] | None = None - """Hosts allowed in addition to the base policy.""" - allow_local_network: bool | None = None """Whether traffic to local/loopback addresses is allowed.""" allow_outbound: bool | None = None """Whether outbound network traffic is allowed at all.""" - blocked_hosts: list[str] | None = None - """Hosts explicitly blocked.""" - @staticmethod def from_dict(obj: Any) -> 'SandboxConfigUserPolicyNetwork': assert isinstance(obj, dict) - allowed_hosts = from_union([lambda x: from_list(from_str, x), from_none], obj.get("allowedHosts")) allow_local_network = from_union([from_bool, from_none], obj.get("allowLocalNetwork")) allow_outbound = from_union([from_bool, from_none], obj.get("allowOutbound")) - blocked_hosts = from_union([lambda x: from_list(from_str, x), from_none], obj.get("blockedHosts")) - return SandboxConfigUserPolicyNetwork(allowed_hosts, allow_local_network, allow_outbound, blocked_hosts) + return SandboxConfigUserPolicyNetwork(allow_local_network, allow_outbound) def to_dict(self) -> dict: result: dict = {} - if self.allowed_hosts is not None: - result["allowedHosts"] = from_union([lambda x: from_list(from_str, x), from_none], self.allowed_hosts) if self.allow_local_network is not None: result["allowLocalNetwork"] = from_union([from_bool, from_none], self.allow_local_network) if self.allow_outbound is not None: result["allowOutbound"] = from_union([from_bool, from_none], self.allow_outbound) - if self.blocked_hosts is not None: - result["blockedHosts"] = from_union([lambda x: from_list(from_str, x), from_none], self.blocked_hosts) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -6237,7 +6517,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ScheduleEntry: - """Schema for the `ScheduleEntry` type. + """Scheduled prompt entry with ID, timing (`intervalMs`, `cron`, or `at`), prompt text, + recurrence, and next run time. The removed entry, or omitted if no entry matched. """ @@ -6436,8 +6717,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ServerSkill: - """Schema for the `ServerSkill` type.""" - + """Server-side skill metadata, including name, description, source, enabled/invocable state, + path, project path, and argument hint. + """ description: str """Description of what the skill does""" @@ -7084,7 +7366,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource: - """Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type.""" + """Source descriptor for a `sessions.open` content-exclusion rule, with source name and type.""" name: str type: str @@ -7243,55 +7525,291 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class SessionSizes: - """Map of sessionId -> on-disk size in bytes for each session's workspace directory.""" +class SessionSettingsBuiltInToolAvailabilitySnapshot: + """Availability of built-in job tools surfaced to boundary consumers.""" - sizes: dict[str, int] - """Map of sessionId -> on-disk size in bytes for the session's workspace directory""" + create_pull_request: bool | None = None + report_progress: bool | None = None @staticmethod - def from_dict(obj: Any) -> 'SessionSizes': + def from_dict(obj: Any) -> 'SessionSettingsBuiltInToolAvailabilitySnapshot': assert isinstance(obj, dict) - sizes = from_dict(from_int, obj.get("sizes")) - return SessionSizes(sizes) + create_pull_request = from_union([from_bool, from_none], obj.get("createPullRequest")) + report_progress = from_union([from_bool, from_none], obj.get("reportProgress")) + return SessionSettingsBuiltInToolAvailabilitySnapshot(create_pull_request, report_progress) def to_dict(self) -> dict: result: dict = {} - result["sizes"] = from_dict(from_int, self.sizes) + if self.create_pull_request is not None: + result["createPullRequest"] = from_union([from_bool, from_none], self.create_pull_request) + if self.report_progress is not None: + result["reportProgress"] = from_union([from_bool, from_none], self.report_progress) return result # Experimental: this type is part of an experimental API and may change or be removed. -class SessionSource(Enum): - """Which session sources to include. Defaults to `local` for backward compatibility.""" +class SessionSettingsPredicateName(Enum): + """Predicate name. The runtime owns the raw feature-flag names and composition logic. - ALL = "all" - LOCAL = "local" - REMOTE = "remote" + Rust-owned settings predicates exposed across the SDK boundary. Raw feature-flag names + are intentionally not part of the contract. + """ + CAP_CLAUDE_OPUS_TOKEN_LIMITS_ENABLED = "capClaudeOpusTokenLimitsEnabled" + CCA_USE_TS_AUTOFIND_ENABLED = "ccaUseTsAutofindEnabled" + CHRONICLE_ENABLED = "chronicleEnabled" + CODEQL_CHECKER_ENABLED = "codeqlCheckerEnabled" + CODE_REVIEW_FEATURE_ENABLED = "codeReviewFeatureEnabled" + CONTENT_EXCLUSION_SELF_FETCH_ENABLED = "contentExclusionSelfFetchEnabled" + CO_AUTHOR_HOOK_ENABLED = "coAuthorHookEnabled" + DEPENDABOT_CHECKER_ENABLED = "dependabotCheckerEnabled" + DEPENDENCY_CHECKER_ENABLED = "dependencyCheckerEnabled" + PARALLEL_VALIDATION_ENABLED = "parallelValidationEnabled" + RUNTIME_TIMING_TELEMETRY_ENABLED = "runtimeTimingTelemetryEnabled" + SECURITY_TOOLS_ENABLED = "securityToolsEnabled" + THIRD_PARTY_SECURITY_PROMPT_ENABLED = "thirdPartySecurityPromptEnabled" + TRIVIAL_CHANGE_ENABLED = "trivialChangeEnabled" + TRIVIAL_CHANGE_ENABLED_FOR_CODE_REVIEW = "trivialChangeEnabledForCodeReview" + TRIVIAL_CHANGE_ENABLED_FOR_TOOL = "trivialChangeEnabledForTool" + TRIVIAL_CHANGE_SKIP_ENABLED = "trivialChangeSkipEnabled" + TRIVIAL_CHANGE_SKIP_ENABLED_FOR_CODE_REVIEW = "trivialChangeSkipEnabledForCodeReview" + TRIVIAL_CHANGE_SKIP_ENABLED_FOR_TOOL = "trivialChangeSkipEnabledForTool" # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class SessionTelemetryEngagement: - """Telemetry engagement ID for the session, when available.""" +class SessionSettingsEvaluatePredicateResult: + """Result of evaluating a Rust-owned settings predicate.""" - engagement_id: str | None = None - """Current telemetry engagement ID, when available.""" + enabled: bool @staticmethod - def from_dict(obj: Any) -> 'SessionTelemetryEngagement': + def from_dict(obj: Any) -> 'SessionSettingsEvaluatePredicateResult': assert isinstance(obj, dict) - engagement_id = from_union([from_str, from_none], obj.get("engagementId")) - return SessionTelemetryEngagement(engagement_id) + enabled = from_bool(obj.get("enabled")) + return SessionSettingsEvaluatePredicateResult(enabled) def to_dict(self) -> dict: result: dict = {} - if self.engagement_id is not None: - result["engagementId"] = from_union([from_str, from_none], self.engagement_id) + result["enabled"] = from_bool(self.enabled) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class SessionUpdateOptionsResult: - """Indicates whether the session options patch was applied successfully.""" +class SessionSettingsModelSnapshot: + """Redacted model routing settings for a session.""" + + callback_url: str | None = None + default_reasoning_effort: str | None = None + instance_id: str | None = None + model: str | None = None + + @staticmethod + def from_dict(obj: Any) -> 'SessionSettingsModelSnapshot': + assert isinstance(obj, dict) + callback_url = from_union([from_str, from_none], obj.get("callbackUrl")) + default_reasoning_effort = from_union([from_str, from_none], obj.get("defaultReasoningEffort")) + instance_id = from_union([from_str, from_none], obj.get("instanceId")) + model = from_union([from_str, from_none], obj.get("model")) + return SessionSettingsModelSnapshot(callback_url, default_reasoning_effort, instance_id, model) + + def to_dict(self) -> dict: + result: dict = {} + if self.callback_url is not None: + result["callbackUrl"] = from_union([from_str, from_none], self.callback_url) + if self.default_reasoning_effort is not None: + result["defaultReasoningEffort"] = from_union([from_str, from_none], self.default_reasoning_effort) + if self.instance_id is not None: + result["instanceId"] = from_union([from_str, from_none], self.instance_id) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionSettingsOnlineEvaluationSnapshot: + """Online-evaluation settings safe to expose across the SDK boundary.""" + + disable_online_evaluation: bool | None = None + enable_online_evaluation_output_file: bool | None = None + + @staticmethod + def from_dict(obj: Any) -> 'SessionSettingsOnlineEvaluationSnapshot': + assert isinstance(obj, dict) + disable_online_evaluation = from_union([from_bool, from_none], obj.get("disableOnlineEvaluation")) + enable_online_evaluation_output_file = from_union([from_bool, from_none], obj.get("enableOnlineEvaluationOutputFile")) + return SessionSettingsOnlineEvaluationSnapshot(disable_online_evaluation, enable_online_evaluation_output_file) + + def to_dict(self) -> dict: + result: dict = {} + if self.disable_online_evaluation is not None: + result["disableOnlineEvaluation"] = from_union([from_bool, from_none], self.disable_online_evaluation) + if self.enable_online_evaluation_output_file is not None: + result["enableOnlineEvaluationOutputFile"] = from_union([from_bool, from_none], self.enable_online_evaluation_output_file) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionSettingsRepoSnapshot: + """Redacted repository and GitHub host settings for a session.""" + + branch: str | None = None + commit: str | None = None + host: str | None = None + host_protocol: str | None = None + id: float | None = None + name: str | None = None + owner_id: float | None = None + owner_name: str | None = None + pr_commit_count: float | None = None + read_write: bool | None = None + secret_scanning_url: str | None = None + server_url: str | None = None + + @staticmethod + def from_dict(obj: Any) -> 'SessionSettingsRepoSnapshot': + assert isinstance(obj, dict) + branch = from_union([from_str, from_none], obj.get("branch")) + commit = from_union([from_str, from_none], obj.get("commit")) + host = from_union([from_str, from_none], obj.get("host")) + host_protocol = from_union([from_str, from_none], obj.get("hostProtocol")) + id = from_union([from_float, from_none], obj.get("id")) + name = from_union([from_str, from_none], obj.get("name")) + owner_id = from_union([from_float, from_none], obj.get("ownerId")) + owner_name = from_union([from_str, from_none], obj.get("ownerName")) + pr_commit_count = from_union([from_float, from_none], obj.get("prCommitCount")) + read_write = from_union([from_bool, from_none], obj.get("readWrite")) + secret_scanning_url = from_union([from_str, from_none], obj.get("secretScanningUrl")) + server_url = from_union([from_str, from_none], obj.get("serverUrl")) + return SessionSettingsRepoSnapshot(branch, commit, host, host_protocol, id, name, owner_id, owner_name, pr_commit_count, read_write, secret_scanning_url, server_url) + + def to_dict(self) -> dict: + result: dict = {} + if self.branch is not None: + result["branch"] = from_union([from_str, from_none], self.branch) + if self.commit is not None: + result["commit"] = from_union([from_str, from_none], self.commit) + if self.host is not None: + result["host"] = from_union([from_str, from_none], self.host) + if self.host_protocol is not None: + result["hostProtocol"] = from_union([from_str, from_none], self.host_protocol) + if self.id is not None: + result["id"] = from_union([to_float, from_none], self.id) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.owner_id is not None: + result["ownerId"] = from_union([to_float, from_none], self.owner_id) + if self.owner_name is not None: + result["ownerName"] = from_union([from_str, from_none], self.owner_name) + if self.pr_commit_count is not None: + result["prCommitCount"] = from_union([to_float, from_none], self.pr_commit_count) + if self.read_write is not None: + result["readWrite"] = from_union([from_bool, from_none], self.read_write) + if self.secret_scanning_url is not None: + result["secretScanningUrl"] = from_union([from_str, from_none], self.secret_scanning_url) + if self.server_url is not None: + result["serverUrl"] = from_union([from_str, from_none], self.server_url) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionSettingsValidationSnapshot: + """Redacted validation and memory-tool settings for a session.""" + + advisory_enabled: bool | None = None + codeql_enabled: bool | None = None + code_review_enabled: bool | None = None + code_review_model: str | None = None + dependabot_timeout: float | None = None + memory_store_enabled: bool | None = None + memory_vote_enabled: bool | None = None + secret_scanning_enabled: bool | None = None + timeout: float | None = None + + @staticmethod + def from_dict(obj: Any) -> 'SessionSettingsValidationSnapshot': + assert isinstance(obj, dict) + advisory_enabled = from_union([from_bool, from_none], obj.get("advisoryEnabled")) + codeql_enabled = from_union([from_bool, from_none], obj.get("codeqlEnabled")) + code_review_enabled = from_union([from_bool, from_none], obj.get("codeReviewEnabled")) + code_review_model = from_union([from_str, from_none], obj.get("codeReviewModel")) + dependabot_timeout = from_union([from_float, from_none], obj.get("dependabotTimeout")) + memory_store_enabled = from_union([from_bool, from_none], obj.get("memoryStoreEnabled")) + memory_vote_enabled = from_union([from_bool, from_none], obj.get("memoryVoteEnabled")) + secret_scanning_enabled = from_union([from_bool, from_none], obj.get("secretScanningEnabled")) + timeout = from_union([from_float, from_none], obj.get("timeout")) + return SessionSettingsValidationSnapshot(advisory_enabled, codeql_enabled, code_review_enabled, code_review_model, dependabot_timeout, memory_store_enabled, memory_vote_enabled, secret_scanning_enabled, timeout) + + def to_dict(self) -> dict: + result: dict = {} + if self.advisory_enabled is not None: + result["advisoryEnabled"] = from_union([from_bool, from_none], self.advisory_enabled) + if self.codeql_enabled is not None: + result["codeqlEnabled"] = from_union([from_bool, from_none], self.codeql_enabled) + if self.code_review_enabled is not None: + result["codeReviewEnabled"] = from_union([from_bool, from_none], self.code_review_enabled) + if self.code_review_model is not None: + result["codeReviewModel"] = from_union([from_str, from_none], self.code_review_model) + if self.dependabot_timeout is not None: + result["dependabotTimeout"] = from_union([to_float, from_none], self.dependabot_timeout) + if self.memory_store_enabled is not None: + result["memoryStoreEnabled"] = from_union([from_bool, from_none], self.memory_store_enabled) + if self.memory_vote_enabled is not None: + result["memoryVoteEnabled"] = from_union([from_bool, from_none], self.memory_vote_enabled) + if self.secret_scanning_enabled is not None: + result["secretScanningEnabled"] = from_union([from_bool, from_none], self.secret_scanning_enabled) + if self.timeout is not None: + result["timeout"] = from_union([to_float, from_none], self.timeout) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionSizes: + """Map of sessionId -> on-disk size in bytes for each session's workspace directory.""" + + sizes: dict[str, int] + """Map of sessionId -> on-disk size in bytes for the session's workspace directory""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionSizes': + assert isinstance(obj, dict) + sizes = from_dict(from_int, obj.get("sizes")) + return SessionSizes(sizes) + + def to_dict(self) -> dict: + result: dict = {} + result["sizes"] = from_dict(from_int, self.sizes) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +class SessionSource(Enum): + """Which session sources to include. Defaults to `local` for backward compatibility.""" + + ALL = "all" + LOCAL = "local" + REMOTE = "remote" + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionTelemetryEngagement: + """Telemetry engagement ID for the session, when available.""" + + engagement_id: str | None = None + """Current telemetry engagement ID, when available.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionTelemetryEngagement': + assert isinstance(obj, dict) + engagement_id = from_union([from_str, from_none], obj.get("engagementId")) + return SessionTelemetryEngagement(engagement_id) + + def to_dict(self) -> dict: + result: dict = {} + if self.engagement_id is not None: + result["engagementId"] = from_union([from_str, from_none], self.engagement_id) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionUpdateOptionsResult: + """Indicates whether the session options patch was applied successfully.""" success: bool """Whether the operation succeeded""" @@ -8129,8 +8647,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class Skill: - """Schema for the `Skill` type.""" - + """Skill metadata available to a session, with name, description, source, enabled/invocable + state, path, plugin, and argument hint. + """ description: str """Description of what the skill does""" @@ -8293,46 +8812,6 @@ def to_dict(self) -> dict: result["projectPaths"] = from_union([lambda x: from_list(from_str, x), from_none], self.project_paths) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class SkillsInvokedSkill: - """Schema for the `SkillsInvokedSkill` type.""" - - content: str - """Full content of the skill file""" - - invoked_at_turn: int - """Turn number when the skill was invoked""" - - name: str - """Unique identifier for the skill""" - - path: str - """Path to the SKILL.md file""" - - allowed_tools: list[str] | None = None - """Tools that should be auto-approved when this skill is active, captured at invocation time""" - - @staticmethod - def from_dict(obj: Any) -> 'SkillsInvokedSkill': - assert isinstance(obj, dict) - content = from_str(obj.get("content")) - invoked_at_turn = from_int(obj.get("invokedAtTurn")) - name = from_str(obj.get("name")) - path = from_str(obj.get("path")) - allowed_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("allowedTools")) - return SkillsInvokedSkill(content, invoked_at_turn, name, path, allowed_tools) - - def to_dict(self) -> dict: - result: dict = {} - result["content"] = from_str(self.content) - result["invokedAtTurn"] = from_int(self.invoked_at_turn) - result["name"] = from_str(self.name) - result["path"] = from_str(self.path) - if self.allowed_tools is not None: - result["allowedTools"] = from_union([lambda x: from_list(from_str, x), from_none], self.allowed_tools) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SkillsLoadDiagnostics: @@ -8372,8 +8851,9 @@ class SlashCommandInvocationResultKind(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandSelectSubcommandOption: - """Schema for the `SlashCommandSelectSubcommandOption` type.""" - + """Selectable slash-command subcommand option with name, description, and optional group + label. + """ description: str """Human-readable description of the subcommand""" @@ -8433,7 +8913,7 @@ class TaskAgentInfoType(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TaskProgressLine: - """Schema for the `TaskProgressLine` type.""" + """Timestamped display line for task progress output or recent agent activity.""" message: str """Display message, e.g., "▸ bash", "✓ edit src/foo.ts\"""" @@ -8846,8 +9326,9 @@ class TokenAuthInfoType(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class Tool: - """Schema for the `Tool` type.""" - + """Built-in tool metadata with identifier, optional namespaced name, description, + input-parameter schema, and usage instructions. + """ description: str """Description of what the tool does""" @@ -8949,8 +9430,9 @@ class UIAutoModeSwitchResponse(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIElicitationArrayAnyOfFieldItemsAnyOf: - """Schema for the `UIElicitationArrayAnyOfFieldItemsAnyOf` type.""" - + """Selectable option for a UI elicitation multi-select array item, with submitted value and + display label. + """ const: str """Value submitted when this option is selected.""" @@ -8988,8 +9470,9 @@ class UIElicitationSchemaPropertyStringFormat(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIElicitationStringOneOfFieldOneOf: - """Schema for the `UIElicitationStringOneOfFieldOneOf` type.""" - + """Selectable option for a UI elicitation single-select string field, with submitted value + and display label. + """ const: str """Value submitted when this option is selected.""" @@ -9154,8 +9637,9 @@ class UISessionLimitsExhaustedResponseAction(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIUserInputResponse: - """Schema for the `UIUserInputResponse` type.""" - + """User response for a pending user-input request, with answer text and whether it was typed + freeform. + """ answer: str """The user's answer text""" @@ -9304,7 +9788,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UsageMetricsModelMetricTokenDetail: - """Schema for the `UsageMetricsModelMetricTokenDetail` type.""" + """Per-model token-detail entry containing the accumulated token count for one token type.""" token_count: int """Accumulated token count for this token type""" @@ -9363,7 +9847,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UsageMetricsTokenDetail: - """Schema for the `UsageMetricsTokenDetail` type.""" + """Session-wide token-detail entry containing the accumulated token count for one token type.""" token_count: int """Accumulated token count for this token type""" @@ -9476,35 +9960,6 @@ class WorkspaceDiffMode(Enum): SESSION = "session" UNSTAGED = "unstaged" -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class WorkspacesCheckpoints: - """Schema for the `WorkspacesCheckpoints` type.""" - - filename: str - """Filename of the checkpoint within the workspace checkpoints directory""" - - number: int - """Checkpoint number assigned by the workspace manager""" - - title: str - """Human-readable checkpoint title""" - - @staticmethod - def from_dict(obj: Any) -> 'WorkspacesCheckpoints': - assert isinstance(obj, dict) - filename = from_str(obj.get("filename")) - number = from_int(obj.get("number")) - title = from_str(obj.get("title")) - return WorkspacesCheckpoints(filename, number, title) - - def to_dict(self) -> dict: - result: dict = {} - result["filename"] = from_str(self.filename) - result["number"] = from_int(self.number) - result["title"] = from_str(self.title) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class WorkspacesCreateFileRequest: @@ -9806,8 +10261,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AgentDiscoveryPath: - """Schema for the `AgentDiscoveryPath` type.""" - + """Canonical directory where custom agents can be discovered or created, with scope, + preference, and optional project path. + """ path: str """Absolute path of the search/create directory (may not exist on disk yet)""" @@ -9942,6 +10398,61 @@ def to_dict(self) -> dict: result["field"] = from_union([lambda x: to_enum(AgentRegistrySpawnValidationErrorField, x), from_none], self.field) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class AllowAllPermissionSetResult: + """Indicates whether the operation succeeded and reports the post-mutation state.""" + + enabled: bool + """Authoritative full allow-all state after the mutation""" + + success: bool + """Whether the operation succeeded""" + + mode: PermissionsAllowAllMode | None = None + """Authoritative allow-all mode after the mutation""" + + @staticmethod + def from_dict(obj: Any) -> 'AllowAllPermissionSetResult': + assert isinstance(obj, dict) + enabled = from_bool(obj.get("enabled")) + success = from_bool(obj.get("success")) + mode = from_union([PermissionsAllowAllMode, from_none], obj.get("mode")) + return AllowAllPermissionSetResult(enabled, success, mode) + + def to_dict(self) -> dict: + result: dict = {} + result["enabled"] = from_bool(self.enabled) + result["success"] = from_bool(self.success) + if self.mode is not None: + result["mode"] = from_union([lambda x: to_enum(PermissionsAllowAllMode, x), from_none], self.mode) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class AllowAllPermissionState: + """Current allow-all permission mode.""" + + enabled: bool + """Whether full allow-all permissions are currently active""" + + mode: PermissionsAllowAllMode | None = None + """Current allow-all mode""" + + @staticmethod + def from_dict(obj: Any) -> 'AllowAllPermissionState': + assert isinstance(obj, dict) + enabled = from_bool(obj.get("enabled")) + mode = from_union([PermissionsAllowAllMode, from_none], obj.get("mode")) + return AllowAllPermissionState(enabled, mode) + + def to_dict(self) -> dict: + result: dict = {} + result["enabled"] = from_bool(self.enabled) + if self.mode is not None: + result["mode"] = from_union([lambda x: to_enum(PermissionsAllowAllMode, x), from_none], self.mode) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class DiscoveredCanvas: @@ -10231,69 +10742,70 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class CopilotUserResponseQuotaSnapshots: - """Schema for the `CopilotUserResponseQuotaSnapshotsChat` type. +class DebugCollectLogsCollectedEntry: + """A file included in the redacted debug bundle.""" - Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` type. + bundle_path: str + """Relative path of the file in the staged bundle/archive.""" - Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` type. - """ - entitlement: float | None = None - has_quota: bool | None = None - overage_count: float | None = None - overage_permitted: bool | None = None - percent_remaining: float | None = None - quota_id: str | None = None - quota_remaining: float | None = None - quota_reset_at: float | None = None - remaining: float | None = None - timestamp_utc: str | None = None - token_based_billing: bool | None = None - unlimited: bool | None = None + size_bytes: int + """Redacted output size in bytes.""" + + source: DebugCollectLogsSource + """Source category for this entry.""" @staticmethod - def from_dict(obj: Any) -> 'CopilotUserResponseQuotaSnapshots': + def from_dict(obj: Any) -> 'DebugCollectLogsCollectedEntry': assert isinstance(obj, dict) - entitlement = from_union([from_float, from_none], obj.get("entitlement")) - has_quota = from_union([from_bool, from_none], obj.get("has_quota")) - overage_count = from_union([from_float, from_none], obj.get("overage_count")) - overage_permitted = from_union([from_bool, from_none], obj.get("overage_permitted")) - percent_remaining = from_union([from_float, from_none], obj.get("percent_remaining")) - quota_id = from_union([from_str, from_none], obj.get("quota_id")) - quota_remaining = from_union([from_float, from_none], obj.get("quota_remaining")) - quota_reset_at = from_union([from_float, from_none], obj.get("quota_reset_at")) - remaining = from_union([from_float, from_none], obj.get("remaining")) - timestamp_utc = from_union([from_str, from_none], obj.get("timestamp_utc")) - token_based_billing = from_union([from_bool, from_none], obj.get("token_based_billing")) - unlimited = from_union([from_bool, from_none], obj.get("unlimited")) - return CopilotUserResponseQuotaSnapshots(entitlement, has_quota, overage_count, overage_permitted, percent_remaining, quota_id, quota_remaining, quota_reset_at, remaining, timestamp_utc, token_based_billing, unlimited) + bundle_path = from_str(obj.get("bundlePath")) + size_bytes = from_int(obj.get("sizeBytes")) + source = DebugCollectLogsSource(obj.get("source")) + return DebugCollectLogsCollectedEntry(bundle_path, size_bytes, source) def to_dict(self) -> dict: result: dict = {} - if self.entitlement is not None: - result["entitlement"] = from_union([to_float, from_none], self.entitlement) - if self.has_quota is not None: - result["has_quota"] = from_union([from_bool, from_none], self.has_quota) - if self.overage_count is not None: - result["overage_count"] = from_union([to_float, from_none], self.overage_count) - if self.overage_permitted is not None: - result["overage_permitted"] = from_union([from_bool, from_none], self.overage_permitted) - if self.percent_remaining is not None: - result["percent_remaining"] = from_union([to_float, from_none], self.percent_remaining) - if self.quota_id is not None: - result["quota_id"] = from_union([from_str, from_none], self.quota_id) - if self.quota_remaining is not None: - result["quota_remaining"] = from_union([to_float, from_none], self.quota_remaining) - if self.quota_reset_at is not None: - result["quota_reset_at"] = from_union([to_float, from_none], self.quota_reset_at) - if self.remaining is not None: - result["remaining"] = from_union([to_float, from_none], self.remaining) - if self.timestamp_utc is not None: - result["timestamp_utc"] = from_union([from_str, from_none], self.timestamp_utc) - if self.token_based_billing is not None: - result["token_based_billing"] = from_union([from_bool, from_none], self.token_based_billing) - if self.unlimited is not None: - result["unlimited"] = from_union([from_bool, from_none], self.unlimited) + result["bundlePath"] = from_str(self.bundle_path) + result["sizeBytes"] = from_int(self.size_bytes) + result["source"] = to_enum(DebugCollectLogsSource, self.source) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class DebugCollectLogsDestination: + """Destination for the redacted debug bundle. + + Where the redacted bundle should be written. Use `archive` to produce a .tgz, or + `directory` to stage redacted files for caller-managed upload/post-processing. + """ + kind: DebugCollectLogsResultKind + no_overwrite: bool | None = None + """When true, create the archive atomically without overwriting an existing file by + appending ` (N)` before the extension as needed. Defaults to false. + """ + output_path: str | None = None + """Absolute or server-relative path for the .tgz archive to create.""" + + output_directory: str | None = None + """Directory where redacted files should be staged. The directory is created if needed.""" + + @staticmethod + def from_dict(obj: Any) -> 'DebugCollectLogsDestination': + assert isinstance(obj, dict) + kind = DebugCollectLogsResultKind(obj.get("kind")) + no_overwrite = from_union([from_bool, from_none], obj.get("noOverwrite")) + output_path = from_union([from_str, from_none], obj.get("outputPath")) + output_directory = from_union([from_str, from_none], obj.get("outputDirectory")) + return DebugCollectLogsDestination(kind, no_overwrite, output_path, output_directory) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(DebugCollectLogsResultKind, self.kind) + if self.no_overwrite is not None: + result["noOverwrite"] = from_union([from_bool, from_none], self.no_overwrite) + if self.output_path is not None: + result["outputPath"] = from_union([from_str, from_none], self.output_path) + if self.output_directory is not None: + 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. @@ -10395,8 +10907,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class Extension: - """Schema for the `Extension` type.""" - + """Discovered extension metadata, including source-qualified ID, name, discovery source, + status, and optional process ID. + """ id: str """Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper', 'plugin:my-plugin:my-ext') @@ -10730,7 +11243,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandTextResult: - """Schema for the `SlashCommandTextResult` type.""" + """Slash-command invocation result containing text output plus Markdown/ANSI rendering flags.""" kind: ClassVar[str] = "text" """Text result discriminator""" @@ -10816,9 +11329,102 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class InstalledPluginSourceGitHub: - """Schema for the `InstalledPluginSourceGitHub` type.""" +class InstalledPluginSource: + """Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref, + and optional subpath. + + Source descriptor for a direct URL plugin install, with URL, optional ref, and optional + subpath. + + Source descriptor for a direct local plugin install, with a local filesystem path. + """ + source: PurpleSource + """Constant value. Always "github". + + Constant value. Always "url". + + Constant value. Always "local". + """ + path: str | None = None + ref: str | None = None + repo: str | None = None + url: str | None = None + + @staticmethod + def from_dict(obj: Any) -> 'InstalledPluginSource': + assert isinstance(obj, dict) + source = PurpleSource(obj.get("source")) + path = from_union([from_str, from_none], obj.get("path")) + ref = from_union([from_str, from_none], obj.get("ref")) + repo = from_union([from_str, from_none], obj.get("repo")) + url = from_union([from_str, from_none], obj.get("url")) + return InstalledPluginSource(source, path, ref, repo, url) + + def to_dict(self) -> dict: + result: dict = {} + result["source"] = to_enum(PurpleSource, self.source) + if self.path is not None: + result["path"] = from_union([from_str, from_none], self.path) + if self.ref is not None: + result["ref"] = from_union([from_str, from_none], self.ref) + if self.repo is not None: + result["repo"] = from_union([from_str, from_none], self.repo) + if self.url is not None: + result["url"] = from_union([from_str, from_none], self.url) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionInstalledPluginSource: + """Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref, + and optional subpath. + + Source descriptor for a direct URL plugin install, with URL, optional ref, and optional + subpath. + + Source descriptor for a direct local plugin install, with a local filesystem path. + """ + source: PurpleSource + """Constant value. Always "github". + + Constant value. Always "url". + + Constant value. Always "local". + """ + path: str | None = None + ref: str | None = None + repo: str | None = None + url: str | None = None + + @staticmethod + def from_dict(obj: Any) -> 'SessionInstalledPluginSource': + assert isinstance(obj, dict) + source = PurpleSource(obj.get("source")) + path = from_union([from_str, from_none], obj.get("path")) + ref = from_union([from_str, from_none], obj.get("ref")) + repo = from_union([from_str, from_none], obj.get("repo")) + url = from_union([from_str, from_none], obj.get("url")) + return SessionInstalledPluginSource(source, path, ref, repo, url) + + def to_dict(self) -> dict: + result: dict = {} + result["source"] = to_enum(PurpleSource, self.source) + if self.path is not None: + result["path"] = from_union([from_str, from_none], self.path) + if self.ref is not None: + result["ref"] = from_union([from_str, from_none], self.ref) + if self.repo is not None: + result["repo"] = from_union([from_str, from_none], self.repo) + if self.url is not None: + result["url"] = from_union([from_str, from_none], self.url) + return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class InstalledPluginSourceGitHub: + """Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref, + and optional subpath. + """ repo: str source: FluffySource """Constant value. Always "github".""" @@ -10848,8 +11454,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionInstalledPluginSourceGitHub: - """Schema for the `SessionInstalledPluginSourceGitHub` type.""" - + """Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref, + and optional subpath. + """ repo: str source: FluffySource """Constant value. Always "github".""" @@ -10879,7 +11486,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class InstalledPluginSourceLocal: - """Schema for the `InstalledPluginSourceLocal` type.""" + """Source descriptor for a direct local plugin install, with a local filesystem path.""" path: str source: TentacledSource @@ -10901,7 +11508,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionInstalledPluginSourceLocal: - """Schema for the `SessionInstalledPluginSourceLocal` type.""" + """Source descriptor for a direct local plugin install, with a local filesystem path.""" path: str source: TentacledSource @@ -10923,8 +11530,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class InstalledPluginSourceURL: - """Schema for the `InstalledPluginSourceUrl` type.""" - + """Source descriptor for a direct URL plugin install, with URL, optional ref, and optional + subpath. + """ source: StickySource """Constant value. Always "url".""" @@ -10954,8 +11562,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionInstalledPluginSourceURL: - """Schema for the `SessionInstalledPluginSourceUrl` type.""" - + """Source descriptor for a direct URL plugin install, with URL, optional ref, and optional + subpath. + """ source: StickySource """Constant value. Always "url".""" @@ -10985,8 +11594,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class InstructionSource: - """Schema for the `InstructionSource` type.""" - + """Loaded instruction source for a session, including path, content, category, location, + applicability, and optional description. + """ content: str """Raw content of the instruction file""" @@ -11071,6 +11681,35 @@ class LlmInferenceHTTPRequestStartRequest: url: str """Absolute request URL.""" + agent_id: str | None = None + """Stable per-agent-instance id attributing this request to a specific agent trajectory. + Present when the request originates from an agent turn; absent for requests issued + outside any agent context (e.g. some SDK callers). A request with an `agentId` but no + `parentAgentId` is a root-agent request; one carrying both is a subagent request. Sourced + from the runtime's per-request agent context and surfaced on the envelope independently + of transport, so it is available for both first-party (CAPI) and BYOK/custom-provider + requests; on the CAPI transport the runtime derives the upstream `X-Agent-Task-Id` header + from this same context. Consumers routing each provider call to a training trajectory + should key on this rather than on lifecycle events, since it is available on the request + path before sampling. + """ + interaction_type: str | None = None + """Coarse classification of the interaction that produced this request. Open string for + forward-compatibility; known values include `conversation-agent`, + `conversation-subagent`, `conversation-sampling`, `conversation-background`, + `conversation-compaction`, and `conversation-user`. Absent when the runtime did not + classify the request. Comes from the runtime's per-request agent context independently of + transport; on the CAPI transport the runtime derives the upstream `X-Interaction-Type` + header from this same context. + """ + parent_agent_id: str | None = None + """Id of the parent agent that spawned the agent issuing this request. Present only for + subagent requests; absent for root-agent requests and non-agent requests. Combined with + `agentId`, this lets consumers attribute a call to a child trajectory versus the root. + Like `agentId`, it comes from the runtime's per-request agent context independently of + transport; on the CAPI transport the runtime derives the upstream `X-Parent-Agent-Id` + header from this same context. + """ session_id: str | None = None """Id of the runtime session that triggered this request, when one is in scope. Absent for requests issued outside any session (e.g. startup model-catalog or capability @@ -11093,9 +11732,12 @@ def from_dict(obj: Any) -> 'LlmInferenceHTTPRequestStartRequest': method = from_str(obj.get("method")) request_id = from_str(obj.get("requestId")) url = from_str(obj.get("url")) + agent_id = from_union([from_str, from_none], obj.get("agentId")) + interaction_type = from_union([from_str, from_none], obj.get("interactionType")) + parent_agent_id = from_union([from_str, from_none], obj.get("parentAgentId")) session_id = from_union([from_str, from_none], obj.get("sessionId")) transport = from_union([LlmInferenceHTTPRequestStartTransport, from_none], obj.get("transport")) - return LlmInferenceHTTPRequestStartRequest(headers, method, request_id, url, session_id, transport) + return LlmInferenceHTTPRequestStartRequest(headers, method, request_id, url, agent_id, interaction_type, parent_agent_id, session_id, transport) def to_dict(self) -> dict: result: dict = {} @@ -11103,6 +11745,12 @@ def to_dict(self) -> dict: result["method"] = from_str(self.method) result["requestId"] = from_str(self.request_id) result["url"] = from_str(self.url) + if self.agent_id is not None: + result["agentId"] = from_union([from_str, from_none], self.agent_id) + if self.interaction_type is not None: + result["interactionType"] = from_union([from_str, from_none], self.interaction_type) + if self.parent_agent_id is not None: + result["parentAgentId"] = from_union([from_str, from_none], self.parent_agent_id) if self.session_id is not None: result["sessionId"] = from_union([from_str, from_none], self.session_id) if self.transport is not None: @@ -12185,8 +12833,12 @@ def to_dict(self) -> dict: return result # Experimental: this type is part of an experimental API and may change or be removed. -class InstructionDiscoveryPathKind(Enum): - """Whether the target is a single file or a directory of instruction files +class DebugCollectLogsEntryKind(Enum): + """Kind of source path to include. + + Kind of caller-provided debug log entry. + + Whether the target is a single file or a directory of instruction files Entry type """ @@ -12656,12 +13308,14 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class OptionsUpdateAdditionalContentExclusionPolicyRule: - """Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRule` type.""" - + """Single content-exclusion rule supplied to `session.options.update`, with paths, match + conditions, and source. + """ paths: list[str] source: OptionsUpdateAdditionalContentExclusionPolicyRuleSource - """Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type.""" - + """Source descriptor for a `session.options.update` content-exclusion rule, with source name + and type. + """ if_any_match: list[str] | None = None if_none_match: list[str] | None = None @@ -12710,8 +13364,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocation: - """Schema for the `PermissionDecisionApproveForLocation` type.""" - + """Permission-decision request variant to approve and persist a permission for a project + location, with approval details and location key. + """ approval: PermissionDecisionApproveForLocationApproval """Approval to persist for this location""" @@ -12738,7 +13393,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalCommands: - """Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type.""" + """Location-scoped approval details for specific command identifiers.""" command_identifiers: list[str] """Command identifiers covered by this approval.""" @@ -12761,7 +13416,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalCommands: - """Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type.""" + """Session-scoped approval details for specific command identifiers.""" command_identifiers: list[str] """Command identifiers covered by this approval.""" @@ -12784,7 +13439,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsLocationsAddToolApprovalDetailsCommands: - """Schema for the `PermissionsLocationsAddToolApprovalDetailsCommands` type.""" + """Location-persisted tool approval details for specific command identifiers.""" command_identifiers: list[str] """Command identifiers covered by this approval.""" @@ -12807,7 +13462,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalCustomTool: - """Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type.""" + """Location-scoped approval details for a custom tool, keyed by tool name.""" kind: ClassVar[str] = "custom-tool" """Approval covering a custom tool.""" @@ -12830,7 +13485,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalCustomTool: - """Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type.""" + """Session-scoped approval details for a custom tool, keyed by tool name.""" kind: ClassVar[str] = "custom-tool" """Approval covering a custom tool.""" @@ -12853,7 +13508,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsLocationsAddToolApprovalDetailsCustomTool: - """Schema for the `PermissionsLocationsAddToolApprovalDetailsCustomTool` type.""" + """Location-persisted tool approval details for a custom tool, keyed by tool name.""" kind: ClassVar[str] = "custom-tool" """Approval covering a custom tool.""" @@ -12876,8 +13531,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalExtensionManagement: - """Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type.""" - + """Location-scoped approval details for extension-management operations, optionally narrowed + by operation. + """ kind: ClassVar[str] = "extension-management" """Approval covering extension lifecycle operations such as enable, disable, or reload.""" @@ -12902,8 +13558,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalExtensionManagement: - """Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type.""" - + """Session-scoped approval details for extension-management operations, optionally narrowed + by operation. + """ kind: ClassVar[str] = "extension-management" """Approval covering extension lifecycle operations such as enable, disable, or reload.""" @@ -12928,8 +13585,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsLocationsAddToolApprovalDetailsExtensionManagement: - """Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionManagement` type.""" - + """Location-persisted tool approval details for extension-management operations, optionally + narrowed by operation. + """ kind: ClassVar[str] = "extension-management" """Approval covering extension lifecycle operations such as enable, disable, or reload.""" @@ -12954,8 +13612,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalMCP: - """Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type.""" - + """Location-scoped approval details for an MCP server tool, or all tools on the server when + `toolName` is null. + """ kind: ClassVar[str] = "mcp" """Approval covering an MCP tool.""" @@ -12982,8 +13641,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalMCP: - """Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type.""" - + """Session-scoped approval details for an MCP server tool, or all tools on the server when + `toolName` is null. + """ kind: ClassVar[str] = "mcp" """Approval covering an MCP tool.""" @@ -13010,8 +13670,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsLocationsAddToolApprovalDetailsMCP: - """Schema for the `PermissionsLocationsAddToolApprovalDetailsMcp` type.""" - + """Location-persisted tool approval details for an MCP server tool, or all tools when + `toolName` is null. + """ kind: ClassVar[str] = "mcp" """Approval covering an MCP tool.""" @@ -13038,7 +13699,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalMCPSampling: - """Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type.""" + """Location-scoped approval details for MCP sampling requests from a server.""" kind: ClassVar[str] = "mcp-sampling" """Approval covering MCP sampling requests for a server.""" @@ -13061,7 +13722,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalMCPSampling: - """Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type.""" + """Session-scoped approval details for MCP sampling requests from a server.""" kind: ClassVar[str] = "mcp-sampling" """Approval covering MCP sampling requests for a server.""" @@ -13084,7 +13745,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsLocationsAddToolApprovalDetailsMCPSampling: - """Schema for the `PermissionsLocationsAddToolApprovalDetailsMcpSampling` type.""" + """Location-persisted tool approval details for MCP sampling requests from a server.""" kind: ClassVar[str] = "mcp-sampling" """Approval covering MCP sampling requests for a server.""" @@ -13107,7 +13768,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalMemory: - """Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type.""" + """Location-scoped approval details for writes to long-term memory.""" kind: ClassVar[str] = "memory" """Approval covering writes to long-term memory.""" @@ -13125,7 +13786,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalMemory: - """Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type.""" + """Session-scoped approval details for writes to long-term memory.""" kind: ClassVar[str] = "memory" """Approval covering writes to long-term memory.""" @@ -13143,7 +13804,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsLocationsAddToolApprovalDetailsMemory: - """Schema for the `PermissionsLocationsAddToolApprovalDetailsMemory` type.""" + """Location-persisted tool approval details for writes to long-term memory.""" kind: ClassVar[str] = "memory" """Approval covering writes to long-term memory.""" @@ -13161,7 +13822,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalRead: - """Schema for the `PermissionDecisionApproveForLocationApprovalRead` type.""" + """Location-scoped approval details for read-only filesystem operations.""" kind: ClassVar[str] = "read" """Approval covering read-only filesystem operations.""" @@ -13179,7 +13840,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalRead: - """Schema for the `PermissionDecisionApproveForSessionApprovalRead` type.""" + """Session-scoped approval details for read-only filesystem operations.""" kind: ClassVar[str] = "read" """Approval covering read-only filesystem operations.""" @@ -13197,7 +13858,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsLocationsAddToolApprovalDetailsRead: - """Schema for the `PermissionsLocationsAddToolApprovalDetailsRead` type.""" + """Location-persisted tool approval details for read-only filesystem operations.""" kind: ClassVar[str] = "read" """Approval covering read-only filesystem operations.""" @@ -13215,7 +13876,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalWrite: - """Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type.""" + """Location-scoped approval details for filesystem write operations.""" kind: ClassVar[str] = "write" """Approval covering filesystem write operations.""" @@ -13233,7 +13894,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalWrite: - """Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type.""" + """Session-scoped approval details for filesystem write operations.""" kind: ClassVar[str] = "write" """Approval covering filesystem write operations.""" @@ -13251,7 +13912,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsLocationsAddToolApprovalDetailsWrite: - """Schema for the `PermissionsLocationsAddToolApprovalDetailsWrite` type.""" + """Location-persisted tool approval details for filesystem write operations.""" kind: ClassVar[str] = "write" """Approval covering filesystem write operations.""" @@ -13269,8 +13930,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSession: - """Schema for the `PermissionDecisionApproveForSession` type.""" - + """Permission-decision request variant to approve for the rest of the session, with optional + tool approval or URL domain. + """ kind: ClassVar[str] = "approve-for-session" """Approve and remember for the rest of the session""" @@ -13299,7 +13961,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveOnce: - """Schema for the `PermissionDecisionApproveOnce` type.""" + """Permission-decision request variant to approve only the current permission request.""" kind: ClassVar[str] = "approve-once" """Approve this single request only""" @@ -13317,7 +13979,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApprovePermanently: - """Schema for the `PermissionDecisionApprovePermanently` type.""" + """Permission-decision request variant to permanently approve a URL domain across sessions.""" domain: str """URL domain to approve permanently""" @@ -13340,7 +14002,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproved: - """Schema for the `PermissionDecisionApproved` type.""" + """Permission-decision variant indicating the request was approved.""" kind: ClassVar[str] = "approved" """The permission request was approved""" @@ -13358,8 +14020,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApprovedForLocation: - """Schema for the `PermissionDecisionApprovedForLocation` type.""" - + """Permission-decision variant indicating approval was persisted for a project location, + with approval details and location key. + """ approval: UserToolSessionApproval """The approval to persist for this location""" @@ -13386,8 +14049,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApprovedForSession: - """Schema for the `PermissionDecisionApprovedForSession` type.""" - + """Permission-decision variant indicating approval was remembered for the session, with + approval details. + """ approval: UserToolSessionApproval """The approval to add as a session-scoped rule""" @@ -13409,8 +14073,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionCancelled: - """Schema for the `PermissionDecisionCancelled` type.""" - + """Permission-decision variant indicating the request was cancelled before use, with an + optional reason. + """ kind: ClassVar[str] = "cancelled" """The permission request was cancelled before a response was used""" @@ -13433,8 +14098,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionDeniedByContentExclusionPolicy: - """Schema for the `PermissionDecisionDeniedByContentExclusionPolicy` type.""" - + """Permission-decision variant indicating denial by content-exclusion policy, with path and + message. + """ kind: ClassVar[str] = "denied-by-content-exclusion-policy" """Denied by the organization's content exclusion policy""" @@ -13461,8 +14127,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionDeniedByPermissionRequestHook: - """Schema for the `PermissionDecisionDeniedByPermissionRequestHook` type.""" - + """Permission-decision variant indicating denial by a permission request hook, with optional + message and interrupt flag. + """ kind: ClassVar[str] = "denied-by-permission-request-hook" """Denied by a permission request hook registered by an extension or plugin""" @@ -13491,8 +14158,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionDeniedByRules: - """Schema for the `PermissionDecisionDeniedByRules` type.""" - + """Permission-decision variant indicating explicit denial by permission rules, with the + matching rules. + """ kind: ClassVar[str] = "denied-by-rules" """Denied because approval rules explicitly blocked it""" @@ -13514,8 +14182,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionDeniedInteractivelyByUser: - """Schema for the `PermissionDecisionDeniedInteractivelyByUser` type.""" - + """Permission-decision variant indicating the user denied an interactive prompt, with + optional feedback and force-reject flag. + """ kind: ClassVar[str] = "denied-interactively-by-user" """Denied by the user during an interactive prompt""" @@ -13544,8 +14213,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser: - """Schema for the `PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type.""" - + """Permission-decision variant indicating no approval rule matched and user confirmation was + unavailable. + """ kind: ClassVar[str] = "denied-no-approval-rule-and-could-not-request-from-user" """Denied because no approval rule matched and user confirmation was unavailable""" @@ -13562,8 +14232,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionReject: - """Schema for the `PermissionDecisionReject` type.""" - + """Permission-decision request variant to reject a pending permission request, with optional + feedback. + """ kind: ClassVar[str] = "reject" """Reject the request""" @@ -13586,7 +14257,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionUserNotAvailable: - """Schema for the `PermissionDecisionUserNotAvailable` type.""" + """Permission-decision variant indicating no user was available to confirm the request.""" kind: ClassVar[str] = "user-not-available" """No user is available to confirm the request""" @@ -13672,12 +14343,14 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsConfigureAdditionalContentExclusionPolicyRule: - """Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRule` type.""" - + """Single content-exclusion rule supplied to `session.permissions.configure`, with paths, + match conditions, and source. + """ paths: list[str] source: PermissionsConfigureAdditionalContentExclusionPolicyRuleSource - """Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type.""" - + """Source descriptor for a `session.permissions.configure` content-exclusion rule, with + source name and type. + """ if_any_match: list[str] | None = None if_none_match: list[str] | None = None @@ -13791,8 +14464,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class DiscoveredMCPServer: - """Schema for the `DiscoveredMcpServer` type.""" - + """MCP server discovered by `mcp.discover`, with config source, optional plugin source, + transport type, and enabled state. + """ enabled: bool """Whether the server is enabled (not in the disabled list)""" @@ -13909,7 +14583,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPServer: - """Schema for the `McpServer` type.""" + """MCP server status entry, including config source/plugin source and any connection error.""" name: str """Server name (config key)""" @@ -13976,8 +14650,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PluginUpdateAllEntry: - """Schema for the `PluginUpdateAllEntry` type.""" - + """Per-plugin result from updating all plugins, with versions, skills installed, success + flag, and optional error. + """ marketplace: str """Marketplace the plugin came from. Empty string ("") for direct installs.""" @@ -14722,8 +15397,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class QueuePendingItems: - """Schema for the `QueuePendingItems` type.""" - + """User-facing pending queue entry, with kind and display text for a queued message, slash + command, or model change. + """ display_text: str """Human-readable text to display for this queue entry in the UI""" @@ -15249,11 +15925,12 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionOpenOptionsAdditionalContentExclusionPolicyRule: - """Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRule` type.""" - + """Single content-exclusion rule supplied to `sessions.open` options, with paths, match + conditions, and source. + """ paths: list[str] source: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource - """Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type.""" + """Source descriptor for a `sessions.open` content-exclusion rule, with source name and type.""" if_any_match: list[str] | None = None if_none_match: list[str] | None = None @@ -15280,7 +15957,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionsOpenProgress: - """Schema for the `SessionsOpenProgress` type.""" + """`sessions.open` handoff progress update with step, status, and optional message.""" status: SessionsOpenProgressStatus """Step status.""" @@ -15307,6 +15984,33 @@ def to_dict(self) -> dict: result["message"] = from_union([from_str, from_none], self.message) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionSettingsJobSnapshot: + """Redacted job settings for a session. The job nonce is excluded.""" + + built_in_tool_availability: SessionSettingsBuiltInToolAvailabilitySnapshot | None = None + event_type: str | None = None + is_trigger_job: bool | None = None + + @staticmethod + def from_dict(obj: Any) -> 'SessionSettingsJobSnapshot': + assert isinstance(obj, dict) + built_in_tool_availability = from_union([SessionSettingsBuiltInToolAvailabilitySnapshot.from_dict, from_none], obj.get("builtInToolAvailability")) + event_type = from_union([from_str, from_none], obj.get("eventType")) + is_trigger_job = from_union([from_bool, from_none], obj.get("isTriggerJob")) + return SessionSettingsJobSnapshot(built_in_tool_availability, event_type, is_trigger_job) + + def to_dict(self) -> dict: + result: dict = {} + if self.built_in_tool_availability is not None: + result["builtInToolAvailability"] = from_union([lambda x: to_class(SessionSettingsBuiltInToolAvailabilitySnapshot, x), from_none], self.built_in_tool_availability) + if self.event_type is not None: + result["eventType"] = from_union([from_str, from_none], self.event_type) + if self.is_trigger_job is not None: + result["isTriggerJob"] = from_union([from_bool, from_none], self.is_trigger_job) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionsListRequest: @@ -15505,7 +16209,8 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AgentInfo: - """Schema for the `AgentInfo` type. + """Custom agent metadata, including identifiers, display details, source, tools, model, MCP + servers, skills, and file path. The newly selected custom agent """ @@ -15626,9 +16331,50 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class SkillDiscoveryPath: - """Schema for the `SkillDiscoveryPath` type.""" +class SkillsInvokedSkill: + """Skill invocation record with name, path, content, allowed tools, and turn number.""" + + content: str + """Full content of the skill file""" + + invoked_at_turn: int + """Turn number when the skill was invoked""" + + name: str + """Unique identifier for the skill""" + + path: str + """Path to the SKILL.md file""" + + allowed_tools: list[str] | None = None + """Tools that should be auto-approved when this skill is active, captured at invocation time""" + + @staticmethod + def from_dict(obj: Any) -> 'SkillsInvokedSkill': + assert isinstance(obj, dict) + content = from_str(obj.get("content")) + invoked_at_turn = from_int(obj.get("invokedAtTurn")) + name = from_str(obj.get("name")) + path = from_str(obj.get("path")) + allowed_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("allowedTools")) + return SkillsInvokedSkill(content, invoked_at_turn, name, path, allowed_tools) + + def to_dict(self) -> dict: + result: dict = {} + result["content"] = from_str(self.content) + result["invokedAtTurn"] = from_int(self.invoked_at_turn) + result["name"] = from_str(self.name) + result["path"] = from_str(self.path) + if self.allowed_tools is not None: + result["allowedTools"] = from_union([lambda x: from_list(from_str, x), from_none], self.allowed_tools) + return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SkillDiscoveryPath: + """Canonical directory where skills can be discovered or created, with scope, preference, + and optional project path. + """ path: str """Absolute path of the create/discovery target (may not exist on disk yet)""" @@ -15663,33 +16409,15 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class SkillsGetInvokedResult: - """Skills invoked during this session, ordered by invocation time (most recent last).""" +class SlashCommandAgentPromptResult: + """Slash-command invocation result that submits an agent prompt, with display prompt, + optional mode, and settings-change flag. + """ + display_prompt: str + """Prompt text to display to the user""" - skills: list[SkillsInvokedSkill] - """Skills invoked during this session, ordered by invocation time (most recent last)""" - - @staticmethod - def from_dict(obj: Any) -> 'SkillsGetInvokedResult': - assert isinstance(obj, dict) - skills = from_list(SkillsInvokedSkill.from_dict, obj.get("skills")) - return SkillsGetInvokedResult(skills) - - def to_dict(self) -> dict: - result: dict = {} - result["skills"] = from_list(lambda x: to_class(SkillsInvokedSkill, x), self.skills) - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class SlashCommandAgentPromptResult: - """Schema for the `SlashCommandAgentPromptResult` type.""" - - display_prompt: str - """Prompt text to display to the user""" - - kind: ClassVar[str] = "agent-prompt" - """Agent prompt result discriminator""" + kind: ClassVar[str] = "agent-prompt" + """Agent prompt result discriminator""" prompt: str """Prompt to submit to the agent""" @@ -15725,8 +16453,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandCompletedResult: - """Schema for the `SlashCommandCompletedResult` type.""" - + """Slash-command invocation result indicating completion, with optional message and + settings-change flag. + """ kind: ClassVar[str] = "completed" """Completed result discriminator""" @@ -15757,8 +16486,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandSelectSubcommandResult: - """Schema for the `SlashCommandSelectSubcommandResult` type.""" - + """Slash-command invocation result asking the client to present subcommand options for a + parent command. + """ command: str """Parent command name that requires subcommand selection""" @@ -15798,8 +16528,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TaskAgentProgress: - """Schema for the `TaskAgentProgress` type.""" - + """Progress snapshot for an agent task, with recent activity lines and optional latest + intent. + """ recent_activity: list[TaskProgressLine] """Recent tool execution events converted to display lines""" @@ -15827,9 +16558,57 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class TaskShellInfo: - """Schema for the `TaskShellInfo` type.""" +class TaskProgress: + """Progress snapshot for an agent task, with recent activity lines and optional latest + intent. + + Progress snapshot for a shell task, with recent stdout/stderr output and optional process + ID. + """ + type: TaskInfoType + """Progress kind""" + + latest_intent: str | None = None + """The most recent intent reported by the agent""" + + recent_activity: list[TaskProgressLine] | None = None + """Recent tool execution events converted to display lines""" + + pid: int | None = None + """Process ID when available""" + + recent_output: str | None = None + """Recent stdout/stderr lines from the running shell command""" + + @staticmethod + def from_dict(obj: Any) -> 'TaskProgress': + assert isinstance(obj, dict) + type = TaskInfoType(obj.get("type")) + latest_intent = from_union([from_str, from_none], obj.get("latestIntent")) + recent_activity = from_union([lambda x: from_list(TaskProgressLine.from_dict, x), from_none], obj.get("recentActivity")) + pid = from_union([from_int, from_none], obj.get("pid")) + recent_output = from_union([from_str, from_none], obj.get("recentOutput")) + return TaskProgress(type, latest_intent, recent_activity, pid, recent_output) + + def to_dict(self) -> dict: + result: dict = {} + result["type"] = to_enum(TaskInfoType, self.type) + if self.latest_intent is not None: + result["latestIntent"] = from_union([from_str, from_none], self.latest_intent) + if self.recent_activity is not None: + result["recentActivity"] = from_union([lambda x: from_list(lambda x: to_class(TaskProgressLine, x), x), from_none], self.recent_activity) + if self.pid is not None: + result["pid"] = from_union([from_int, from_none], self.pid) + if self.recent_output is not None: + result["recentOutput"] = from_union([from_str, from_none], self.recent_output) + return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class TaskShellInfo: + """Tracked shell task metadata, including ID, command, status, timing, attachment/execution + mode, log path, and PID. + """ attachment_mode: TaskShellInfoAttachmentMode """Whether the shell runs inside a managed PTY session or as an independent background process @@ -15907,8 +16686,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TaskShellProgress: - """Schema for the `TaskShellProgress` type.""" - + """Progress snapshot for a shell task, with recent stdout/stderr output and optional process + ID. + """ recent_output: str """Recent stdout/stderr lines from the running shell command""" @@ -15974,7 +16754,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPTools: - """Schema for the `McpTools` type.""" + """MCP tool metadata with tool name and optional description.""" name: str """Tool name.""" @@ -16022,9 +16802,35 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class TaskAgentInfo: - """Schema for the `TaskAgentInfo` type.""" +class SessionSettingsEvaluatePredicateRequest: + """Named Rust-owned settings predicate to evaluate for this session.""" + + name: SessionSettingsPredicateName + """Predicate name. The runtime owns the raw feature-flag names and composition logic.""" + + tool_name: str | None = None + """Tool name for tool-scoped predicates such as trivial-change handling.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionSettingsEvaluatePredicateRequest': + assert isinstance(obj, dict) + name = SessionSettingsPredicateName(obj.get("name")) + tool_name = from_union([from_str, from_none], obj.get("toolName")) + return SessionSettingsEvaluatePredicateRequest(name, tool_name) + + def to_dict(self) -> dict: + result: dict = {} + result["name"] = to_enum(SessionSettingsPredicateName, self.name) + if self.tool_name is not None: + result["toolName"] = from_union([from_str, from_none], self.tool_name) + return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class TaskAgentInfo: + """Tracked background agent task metadata, including IDs, status, timing, agent type, + prompt, model, result, and latest response. + """ agent_type: str """Type of agent running this task""" @@ -16561,8 +17367,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIExitPlanModeResponse: - """Schema for the `UIExitPlanModeResponse` type.""" - + """User response for a pending exit-plan-mode request, with approval state, selected action, + auto-approve flag, and feedback. + """ approved: bool """Whether the plan was approved.""" @@ -16639,7 +17446,9 @@ class UIHandlePendingUserInputRequest: """The unique request ID from the user_input.requested event""" response: UIUserInputResponse - """Schema for the `UIUserInputResponse` type.""" + """User response for a pending user-input request, with answer text and whether it was typed + freeform. + """ @staticmethod def from_dict(obj: Any) -> 'UIHandlePendingUserInputRequest': @@ -16657,8 +17466,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UsageMetricsModelMetric: - """Schema for the `UsageMetricsModelMetric` type.""" - + """Per-model usage metrics, including request counts/costs, token usage, nano-AI units, and + per-token-type details. + """ requests: UsageMetricsModelMetricRequests """Request count and cost metrics for this model""" @@ -16871,8 +17681,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandInfo: - """Schema for the `SlashCommandInfo` type.""" - + """Slash-command metadata with name, aliases, description, kind, input hint, execution + allowance, and schedulability. + """ allow_during_agent_execution: bool """Whether the command may run while an agent turn is active""" @@ -16976,127 +17787,38 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class CopilotUserResponse: - """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. - """ - access_type_sku: str | None = None - analytics_tracking_id: str | None = None - assigned_date: Any = None - can_signup_for_limited: bool | None = None - can_upgrade_plan: bool | None = None - chat_enabled: bool | None = None - cli_remote_control_enabled: bool | None = None - cloud_session_storage_enabled: bool | None = None - codex_agent_enabled: bool | None = None - copilot_plan: str | None = None - copilotignore_enabled: bool | None = None - endpoints: CopilotUserResponseEndpoints | None = None - """Schema for the `CopilotUserResponseEndpoints` type.""" +class DebugCollectLogsResult: + """Result of collecting a redacted debug bundle.""" - is_mcp_enabled: Any = None - is_staff: bool | None = None - limited_user_quotas: dict[str, float] | None = None - limited_user_reset_date: str | None = None - login: str | None = None - monthly_quotas: dict[str, float] | None = None - organization_list: Any = None - organization_login_list: list[str] | None = None - quota_reset_date: str | None = None - quota_reset_date_utc: str | None = None - quota_snapshots: dict[str, CopilotUserResponseQuotaSnapshots | None] | None = None - """Schema for the `CopilotUserResponseQuotaSnapshots` type.""" + entries: list[DebugCollectLogsCollectedEntry] + """Files included in the redacted bundle.""" - restricted_telemetry: bool | None = None - te: bool | None = None - token_based_billing: bool | None = None + kind: DebugCollectLogsResultKind + """Destination kind that was written.""" + + path: str + """Actual archive path or staging directory path written. This may differ from the requested + path when no-overwrite suffixing or fallback-to-temp-directory was needed. + """ + skipped_entries: list[DebugCollectLogsSkippedEntry] | None = None + """Optional files or directories that could not be included.""" @staticmethod - def from_dict(obj: Any) -> 'CopilotUserResponse': + def from_dict(obj: Any) -> 'DebugCollectLogsResult': assert isinstance(obj, dict) - access_type_sku = from_union([from_str, from_none], obj.get("access_type_sku")) - analytics_tracking_id = from_union([from_str, from_none], obj.get("analytics_tracking_id")) - assigned_date = obj.get("assigned_date") - can_signup_for_limited = from_union([from_bool, from_none], obj.get("can_signup_for_limited")) - can_upgrade_plan = from_union([from_bool, from_none], obj.get("can_upgrade_plan")) - chat_enabled = from_union([from_bool, from_none], obj.get("chat_enabled")) - cli_remote_control_enabled = from_union([from_bool, from_none], obj.get("cli_remote_control_enabled")) - cloud_session_storage_enabled = from_union([from_bool, from_none], obj.get("cloud_session_storage_enabled")) - codex_agent_enabled = from_union([from_bool, from_none], obj.get("codex_agent_enabled")) - copilot_plan = from_union([from_str, from_none], obj.get("copilot_plan")) - copilotignore_enabled = from_union([from_bool, from_none], obj.get("copilotignore_enabled")) - endpoints = from_union([CopilotUserResponseEndpoints.from_dict, from_none], obj.get("endpoints")) - is_mcp_enabled = obj.get("is_mcp_enabled") - is_staff = from_union([from_bool, from_none], obj.get("is_staff")) - limited_user_quotas = from_union([lambda x: from_dict(from_float, x), from_none], obj.get("limited_user_quotas")) - limited_user_reset_date = from_union([from_str, from_none], obj.get("limited_user_reset_date")) - login = from_union([from_str, from_none], obj.get("login")) - monthly_quotas = from_union([lambda x: from_dict(from_float, x), from_none], obj.get("monthly_quotas")) - organization_list = obj.get("organization_list") - organization_login_list = from_union([lambda x: from_list(from_str, x), from_none], obj.get("organization_login_list")) - quota_reset_date = from_union([from_str, from_none], obj.get("quota_reset_date")) - quota_reset_date_utc = from_union([from_str, from_none], obj.get("quota_reset_date_utc")) - quota_snapshots = from_union([lambda x: from_dict(lambda x: from_union([CopilotUserResponseQuotaSnapshots.from_dict, from_none], x), x), from_none], obj.get("quota_snapshots")) - restricted_telemetry = from_union([from_bool, from_none], obj.get("restricted_telemetry")) - te = from_union([from_bool, from_none], obj.get("te")) - token_based_billing = from_union([from_bool, from_none], obj.get("token_based_billing")) - return CopilotUserResponse(access_type_sku, analytics_tracking_id, assigned_date, can_signup_for_limited, can_upgrade_plan, chat_enabled, cli_remote_control_enabled, cloud_session_storage_enabled, codex_agent_enabled, copilot_plan, copilotignore_enabled, endpoints, is_mcp_enabled, is_staff, limited_user_quotas, limited_user_reset_date, login, monthly_quotas, organization_list, organization_login_list, quota_reset_date, quota_reset_date_utc, quota_snapshots, restricted_telemetry, te, token_based_billing) + entries = from_list(DebugCollectLogsCollectedEntry.from_dict, obj.get("entries")) + kind = DebugCollectLogsResultKind(obj.get("kind")) + path = from_str(obj.get("path")) + skipped_entries = from_union([lambda x: from_list(DebugCollectLogsSkippedEntry.from_dict, x), from_none], obj.get("skippedEntries")) + return DebugCollectLogsResult(entries, kind, path, skipped_entries) def to_dict(self) -> dict: result: dict = {} - if self.access_type_sku is not None: - result["access_type_sku"] = from_union([from_str, from_none], self.access_type_sku) - if self.analytics_tracking_id is not None: - result["analytics_tracking_id"] = from_union([from_str, from_none], self.analytics_tracking_id) - if self.assigned_date is not None: - result["assigned_date"] = self.assigned_date - if self.can_signup_for_limited is not None: - result["can_signup_for_limited"] = from_union([from_bool, from_none], self.can_signup_for_limited) - if self.can_upgrade_plan is not None: - result["can_upgrade_plan"] = from_union([from_bool, from_none], self.can_upgrade_plan) - if self.chat_enabled is not None: - result["chat_enabled"] = from_union([from_bool, from_none], self.chat_enabled) - if self.cli_remote_control_enabled is not None: - result["cli_remote_control_enabled"] = from_union([from_bool, from_none], self.cli_remote_control_enabled) - if self.cloud_session_storage_enabled is not None: - result["cloud_session_storage_enabled"] = from_union([from_bool, from_none], self.cloud_session_storage_enabled) - if self.codex_agent_enabled is not None: - result["codex_agent_enabled"] = from_union([from_bool, from_none], self.codex_agent_enabled) - if self.copilot_plan is not None: - result["copilot_plan"] = from_union([from_str, from_none], self.copilot_plan) - if self.copilotignore_enabled is not None: - result["copilotignore_enabled"] = from_union([from_bool, from_none], self.copilotignore_enabled) - if self.endpoints is not None: - result["endpoints"] = from_union([lambda x: to_class(CopilotUserResponseEndpoints, x), from_none], self.endpoints) - if self.is_mcp_enabled is not None: - result["is_mcp_enabled"] = self.is_mcp_enabled - if self.is_staff is not None: - result["is_staff"] = from_union([from_bool, from_none], self.is_staff) - if self.limited_user_quotas is not None: - result["limited_user_quotas"] = from_union([lambda x: from_dict(to_float, x), from_none], self.limited_user_quotas) - if self.limited_user_reset_date is not None: - result["limited_user_reset_date"] = from_union([from_str, from_none], self.limited_user_reset_date) - if self.login is not None: - result["login"] = from_union([from_str, from_none], self.login) - if self.monthly_quotas is not None: - result["monthly_quotas"] = from_union([lambda x: from_dict(to_float, x), from_none], self.monthly_quotas) - if self.organization_list is not None: - result["organization_list"] = self.organization_list - if self.organization_login_list is not None: - result["organization_login_list"] = from_union([lambda x: from_list(from_str, x), from_none], self.organization_login_list) - if self.quota_reset_date is not None: - result["quota_reset_date"] = from_union([from_str, from_none], self.quota_reset_date) - if self.quota_reset_date_utc is not None: - result["quota_reset_date_utc"] = from_union([from_str, from_none], self.quota_reset_date_utc) - if self.quota_snapshots is not None: - result["quota_snapshots"] = from_union([lambda x: from_dict(lambda x: from_union([lambda x: to_class(CopilotUserResponseQuotaSnapshots, x), from_none], x), x), from_none], self.quota_snapshots) - if self.restricted_telemetry is not None: - result["restricted_telemetry"] = from_union([from_bool, from_none], self.restricted_telemetry) - if self.te is not None: - result["te"] = from_union([from_bool, from_none], self.te) - if self.token_based_billing is not None: - result["token_based_billing"] = from_union([from_bool, from_none], self.token_based_billing) + result["entries"] = from_list(lambda x: to_class(DebugCollectLogsCollectedEntry, x), self.entries) + result["kind"] = to_enum(DebugCollectLogsResultKind, self.kind) + result["path"] = from_str(self.path) + if self.skipped_entries is not None: + 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. @@ -17118,60 +17840,182 @@ def to_dict(self) -> dict: result["extensions"] = from_list(lambda x: to_class(Extension, x), self.extensions) return result -# Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess: - """Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` - type. - """ - extension_name: str - """Extension name.""" +class PermissionDecisionApproveForIonApproval: + """Session-scoped approval to remember (tool prompts only; omitted for path/url prompts) - kind: ClassVar[str] = "extension-permission-access" - """Approval covering an extension's request to access a permission-gated capability.""" + Session-scoped approval details for specific command identifiers. - @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess': - assert isinstance(obj, dict) - extension_name = from_str(obj.get("extensionName")) - return PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess(extension_name) + Session-scoped approval details for read-only filesystem operations. - def to_dict(self) -> dict: - result: dict = {} - result["extensionName"] = from_str(self.extension_name) - result["kind"] = self.kind - return result + Session-scoped approval details for filesystem write operations. -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess: - """Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` - type. - """ - extension_name: str - """Extension name.""" + Session-scoped approval details for an MCP server tool, or all tools on the server when + `toolName` is null. - kind: ClassVar[str] = "extension-permission-access" - """Approval covering an extension's request to access a permission-gated capability.""" + Session-scoped approval details for MCP sampling requests from a server. - @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess': - assert isinstance(obj, dict) - extension_name = from_str(obj.get("extensionName")) - return PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess(extension_name) + Session-scoped approval details for writes to long-term memory. - def to_dict(self) -> dict: - result: dict = {} - result["extensionName"] = from_str(self.extension_name) - result["kind"] = self.kind - return result + Session-scoped approval details for a custom tool, keyed by tool name. -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess: - """Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess` type.""" + Session-scoped approval details for extension-management operations, optionally narrowed + by operation. - extension_name: str + Session-scoped approval details for an extension's permission-gated capability access, + keyed by extension name. + + Approval to persist for this location + + Location-scoped approval details for specific command identifiers. + + Location-scoped approval details for read-only filesystem operations. + + Location-scoped approval details for filesystem write operations. + + Location-scoped approval details for an MCP server tool, or all tools on the server when + `toolName` is null. + + Location-scoped approval details for MCP sampling requests from a server. + + Location-scoped approval details for writes to long-term memory. + + Location-scoped approval details for a custom tool, keyed by tool name. + + Location-scoped approval details for extension-management operations, optionally narrowed + by operation. + + Location-scoped approval details for an extension's permission-gated capability access, + keyed by extension name. + + The approval to add as a session-scoped rule + + The approval to persist for this location + """ + command_identifiers: list[str] | None = None + """Command identifiers covered by this approval.""" + + kind: ApprovalKind | None = None + """Approval scoped to specific command identifiers. + + Approval covering read-only filesystem operations. + + Approval covering filesystem write operations. + + Approval covering an MCP tool. + + Approval covering MCP sampling requests for a server. + + Approval covering writes to long-term memory. + + Approval covering a custom tool. + + Approval covering extension lifecycle operations such as enable, disable, or reload. + + Approval covering an extension's request to access a permission-gated capability. + """ + server_name: str | None = None + """MCP server name.""" + + tool_name: str | None = None + """MCP tool name, or null to cover every tool on the server. + + Custom tool name. + """ + operation: str | None = None + """Optional operation identifier; when omitted, the approval covers all extension management + operations. + """ + extension_name: str | None = None + """Extension name.""" + + external_ref_marker_external_ref_user_tool_session_approval: str | None = None + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionApproveForIonApproval': + assert isinstance(obj, dict) + command_identifiers = from_union([lambda x: from_list(from_str, x), from_none], obj.get("commandIdentifiers")) + kind = from_union([ApprovalKind, from_none], obj.get("kind")) + server_name = from_union([from_str, from_none], obj.get("serverName")) + tool_name = from_union([from_none, from_str], obj.get("toolName")) + operation = from_union([from_str, from_none], obj.get("operation")) + extension_name = from_union([from_str, from_none], obj.get("extensionName")) + external_ref_marker_external_ref_user_tool_session_approval = from_union([from_str, from_none], obj.get("__externalRefMarker___ExternalRef_UserToolSessionApproval")) + return PermissionDecisionApproveForIonApproval(command_identifiers, kind, server_name, tool_name, operation, extension_name, external_ref_marker_external_ref_user_tool_session_approval) + + def to_dict(self) -> dict: + result: dict = {} + if self.command_identifiers is not None: + result["commandIdentifiers"] = from_union([lambda x: from_list(from_str, x), from_none], self.command_identifiers) + if self.kind is not None: + result["kind"] = from_union([lambda x: to_enum(ApprovalKind, x), from_none], self.kind) + if self.server_name is not None: + result["serverName"] = from_union([from_str, from_none], self.server_name) + if self.tool_name is not None: + result["toolName"] = from_union([from_none, from_str], self.tool_name) + if self.operation is not None: + result["operation"] = from_union([from_str, from_none], self.operation) + if self.extension_name is not None: + result["extensionName"] = from_union([from_str, from_none], self.extension_name) + if self.external_ref_marker_external_ref_user_tool_session_approval is not None: + result["__externalRefMarker___ExternalRef_UserToolSessionApproval"] = from_union([from_str, from_none], self.external_ref_marker_external_ref_user_tool_session_approval) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess: + """Location-scoped approval details for an extension's permission-gated capability access, + keyed by extension name. + """ + extension_name: str + """Extension name.""" + + kind: ClassVar[str] = "extension-permission-access" + """Approval covering an extension's request to access a permission-gated capability.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess': + assert isinstance(obj, dict) + extension_name = from_str(obj.get("extensionName")) + return PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess(extension_name) + + def to_dict(self) -> dict: + result: dict = {} + result["extensionName"] = from_str(self.extension_name) + result["kind"] = self.kind + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess: + """Session-scoped approval details for an extension's permission-gated capability access, + keyed by extension name. + """ + extension_name: str + """Extension name.""" + + kind: ClassVar[str] = "extension-permission-access" + """Approval covering an extension's request to access a permission-gated capability.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess': + assert isinstance(obj, dict) + extension_name = from_str(obj.get("extensionName")) + return PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess(extension_name) + + def to_dict(self) -> dict: + result: dict = {} + result["extensionName"] = from_str(self.extension_name) + result["kind"] = self.kind + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess: + """Location-persisted tool approval details for an extension's permission-gated capability + access, keyed by extension name. + """ + extension_name: str """Extension name.""" kind: ClassVar[str] = "extension-permission-access" @@ -17313,105 +18157,123 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class InstalledPluginSource: - """Schema for the `InstalledPluginSourceGitHub` type. +class InstalledPlugin: + """Installed plugin record from global state, with marketplace, version, install time, + enabled state, cache path, and source. + """ + enabled: bool + """Whether the plugin is currently enabled""" - Schema for the `InstalledPluginSourceUrl` type. + installed_at: str + """Installation timestamp""" - Schema for the `InstalledPluginSourceLocal` type. - """ - source: PurpleSource - """Constant value. Always "github". + marketplace: str + """Marketplace the plugin came from (empty string for direct repo installs)""" - Constant value. Always "url". + name: str + """Plugin name""" - Constant value. Always "local". - """ - path: str | None = None - ref: str | None = None - repo: str | None = None - url: str | None = None + cache_path: str | None = None + """Path where the plugin is cached locally""" + + source: InstalledPluginSource | str | None = None + """Source for direct repo installs (when marketplace is empty)""" + + version: str | None = None + """Version installed (if available)""" @staticmethod - def from_dict(obj: Any) -> 'InstalledPluginSource': + def from_dict(obj: Any) -> 'InstalledPlugin': assert isinstance(obj, dict) - source = PurpleSource(obj.get("source")) - path = from_union([from_str, from_none], obj.get("path")) - ref = from_union([from_str, from_none], obj.get("ref")) - repo = from_union([from_str, from_none], obj.get("repo")) - url = from_union([from_str, from_none], obj.get("url")) - return InstalledPluginSource(source, path, ref, repo, url) + enabled = from_bool(obj.get("enabled")) + installed_at = from_str(obj.get("installed_at")) + marketplace = from_str(obj.get("marketplace")) + name = from_str(obj.get("name")) + cache_path = from_union([from_str, from_none], obj.get("cache_path")) + source = from_union([InstalledPluginSource.from_dict, from_str, from_none], obj.get("source")) + version = from_union([from_str, from_none], obj.get("version")) + return InstalledPlugin(enabled, installed_at, marketplace, name, cache_path, source, version) def to_dict(self) -> dict: result: dict = {} - result["source"] = to_enum(PurpleSource, self.source) - if self.path is not None: - result["path"] = from_union([from_str, from_none], self.path) - if self.ref is not None: - result["ref"] = from_union([from_str, from_none], self.ref) - if self.repo is not None: - result["repo"] = from_union([from_str, from_none], self.repo) - if self.url is not None: - result["url"] = from_union([from_str, from_none], self.url) + result["enabled"] = from_bool(self.enabled) + result["installed_at"] = from_str(self.installed_at) + result["marketplace"] = from_str(self.marketplace) + 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.source is not None: + result["source"] = from_union([lambda x: to_class(InstalledPluginSource, x), from_str, from_none], self.source) + if self.version is not None: + result["version"] = from_union([from_str, from_none], self.version) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class SessionInstalledPluginSource: - """Schema for the `SessionInstalledPluginSourceGitHub` type. - - Schema for the `SessionInstalledPluginSourceUrl` type. - - Schema for the `SessionInstalledPluginSourceLocal` type. +class SessionInstalledPlugin: + """Installed plugin record for a session, with marketplace, version, install time, enabled + state, cache path, and source. """ - source: PurpleSource - """Constant value. Always "github". + enabled: bool + """Whether the plugin is currently enabled""" - Constant value. Always "url". + installed_at: str + """Installation timestamp (ISO-8601)""" - Constant value. Always "local". - """ - path: str | None = None - ref: str | None = None - repo: str | None = None - url: str | None = None + marketplace: str + """Marketplace the plugin came from (empty string for direct repo installs)""" - @staticmethod - def from_dict(obj: Any) -> 'SessionInstalledPluginSource': - assert isinstance(obj, dict) - source = PurpleSource(obj.get("source")) - path = from_union([from_str, from_none], obj.get("path")) - ref = from_union([from_str, from_none], obj.get("ref")) - repo = from_union([from_str, from_none], obj.get("repo")) - url = from_union([from_str, from_none], obj.get("url")) - return SessionInstalledPluginSource(source, path, ref, repo, url) + name: str + """Plugin name""" - def to_dict(self) -> dict: - result: dict = {} - result["source"] = to_enum(PurpleSource, self.source) - if self.path is not None: - result["path"] = from_union([from_str, from_none], self.path) - if self.ref is not None: - result["ref"] = from_union([from_str, from_none], self.ref) - if self.repo is not None: - result["repo"] = from_union([from_str, from_none], self.repo) - if self.url is not None: - result["url"] = from_union([from_str, from_none], self.url) - return result + cache_path: str | None = None + """Path where the plugin is cached locally""" -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class InstructionsGetSourcesResult: - """Instruction sources loaded for the session, in merge order.""" + source: SessionInstalledPluginSource | str | None = None + """Source descriptor for direct repo installs (when marketplace is empty)""" - sources: list[InstructionSource] - """Instruction sources for the session""" + version: str | None = None + """Installed version, if known""" @staticmethod - def from_dict(obj: Any) -> 'InstructionsGetSourcesResult': + def from_dict(obj: Any) -> 'SessionInstalledPlugin': assert isinstance(obj, dict) - sources = from_list(InstructionSource.from_dict, obj.get("sources")) - return InstructionsGetSourcesResult(sources) + enabled = from_bool(obj.get("enabled")) + installed_at = from_str(obj.get("installed_at")) + marketplace = from_str(obj.get("marketplace")) + name = from_str(obj.get("name")) + cache_path = from_union([from_str, from_none], obj.get("cache_path")) + source = from_union([SessionInstalledPluginSource.from_dict, from_str, from_none], obj.get("source")) + version = from_union([from_str, from_none], obj.get("version")) + return SessionInstalledPlugin(enabled, installed_at, marketplace, name, cache_path, source, version) + + def to_dict(self) -> dict: + result: dict = {} + result["enabled"] = from_bool(self.enabled) + result["installed_at"] = from_str(self.installed_at) + result["marketplace"] = from_str(self.marketplace) + 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.source is not None: + result["source"] = from_union([lambda x: to_class(SessionInstalledPluginSource, x), from_str, from_none], self.source) + if self.version is not None: + result["version"] = from_union([from_str, from_none], self.version) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class InstructionsGetSourcesResult: + """Instruction sources loaded for the session, in merge order.""" + + sources: list[InstructionSource] + """Instruction sources for the session""" + + @staticmethod + def from_dict(obj: Any) -> 'InstructionsGetSourcesResult': + assert isinstance(obj, dict) + sources = from_list(InstructionSource.from_dict, obj.get("sources")) + return InstructionsGetSourcesResult(sources) def to_dict(self) -> dict: result: dict = {} @@ -17440,8 +18302,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class LocalSessionMetadataValue: - """Schema for the `LocalSessionMetadataValue` type.""" - + """Persisted local session metadata, including identifiers, timestamps, summary/name, + client, context, detached state, and task ID. + """ is_remote: bool """Always false for local sessions.""" @@ -17769,6 +18632,36 @@ def to_dict(self) -> dict: result["user_named"] = from_union([from_bool, from_none], self.user_named) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class WorkspacesCheckpoints: + """Workspace checkpoint metadata with assigned number, human-readable title, and checkpoint + filename. + """ + filename: str + """Filename of the checkpoint within the workspace checkpoints directory""" + + number: int + """Checkpoint number assigned by the workspace manager""" + + title: str + """Human-readable checkpoint title""" + + @staticmethod + def from_dict(obj: Any) -> 'WorkspacesCheckpoints': + assert isinstance(obj, dict) + filename = from_str(obj.get("filename")) + number = from_int(obj.get("number")) + title = from_str(obj.get("title")) + return WorkspacesCheckpoints(filename, number, title) + + def to_dict(self) -> dict: + result: dict = {} + result["filename"] = from_str(self.filename) + result["number"] = from_int(self.number) + result["title"] = from_str(self.title) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class WorkspacesGetWorkspaceResult: @@ -17796,25 +18689,6 @@ def to_dict(self) -> dict: result["workspace"] = from_union([lambda x: to_class(Workspace, x), from_none], self.workspace) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class WorkspacesListCheckpointsResult: - """Workspace checkpoints in chronological order; empty when the workspace is not enabled.""" - - checkpoints: list[WorkspacesCheckpoints] - """Workspace checkpoints in chronological order. Empty when workspace is not enabled.""" - - @staticmethod - def from_dict(obj: Any) -> 'WorkspacesListCheckpointsResult': - assert isinstance(obj, dict) - checkpoints = from_list(WorkspacesCheckpoints.from_dict, obj.get("checkpoints")) - return WorkspacesListCheckpointsResult(checkpoints) - - def to_dict(self) -> dict: - result: dict = {} - result["checkpoints"] = from_list(lambda x: to_class(WorkspacesCheckpoints, x), self.checkpoints) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class MCPAppsHostContext: @@ -18022,10 +18896,54 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class InstructionDiscoveryPath: - """Schema for the `InstructionDiscoveryPath` type.""" +class DebugCollectLogsEntry: + """A caller-provided server-local file or directory to include in the debug bundle.""" + + bundle_path: str + """Relative path to use inside the staged bundle/archive.""" + + kind: DebugCollectLogsEntryKind + """Kind of source path to include.""" + + path: str + """Server-local source path to read.""" + + redaction: DebugCollectLogsRedaction | None = None + """How text content from this entry should be redacted. Defaults to plain-text.""" + + required: bool | None = None + """When true, collection fails if this entry cannot be read. Defaults to false, which + records the entry in `skippedEntries`. + """ + + @staticmethod + def from_dict(obj: Any) -> 'DebugCollectLogsEntry': + assert isinstance(obj, dict) + bundle_path = from_str(obj.get("bundlePath")) + kind = DebugCollectLogsEntryKind(obj.get("kind")) + path = from_str(obj.get("path")) + redaction = from_union([DebugCollectLogsRedaction, from_none], obj.get("redaction")) + required = from_union([from_bool, from_none], obj.get("required")) + return DebugCollectLogsEntry(bundle_path, kind, path, redaction, required) + + def to_dict(self) -> dict: + result: dict = {} + result["bundlePath"] = from_str(self.bundle_path) + result["kind"] = to_enum(DebugCollectLogsEntryKind, self.kind) + result["path"] = from_str(self.path) + if self.redaction is not None: + result["redaction"] = from_union([lambda x: to_enum(DebugCollectLogsRedaction, x), from_none], self.redaction) + if self.required is not None: + result["required"] = from_union([from_bool, from_none], self.required) + return result - kind: InstructionDiscoveryPathKind +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class InstructionDiscoveryPath: + """Canonical file or directory where custom instructions can be discovered or created, with + location, kind, preference, and project path. + """ + kind: DebugCollectLogsEntryKind """Whether the target is a single file or a directory of instruction files""" location: InstructionLocation @@ -18044,7 +18962,7 @@ class InstructionDiscoveryPath: @staticmethod def from_dict(obj: Any) -> 'InstructionDiscoveryPath': assert isinstance(obj, dict) - kind = InstructionDiscoveryPathKind(obj.get("kind")) + kind = DebugCollectLogsEntryKind(obj.get("kind")) location = InstructionLocation(obj.get("location")) path = from_str(obj.get("path")) preferred_for_creation = from_bool(obj.get("preferredForCreation")) @@ -18053,7 +18971,7 @@ def from_dict(obj: Any) -> 'InstructionDiscoveryPath': def to_dict(self) -> dict: result: dict = {} - result["kind"] = to_enum(InstructionDiscoveryPathKind, self.kind) + result["kind"] = to_enum(DebugCollectLogsEntryKind, self.kind) result["location"] = to_enum(InstructionLocation, self.location) result["path"] = from_str(self.path) result["preferredForCreation"] = from_bool(self.preferred_for_creation) @@ -18064,25 +18982,26 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionFSReaddirWithTypesEntry: - """Schema for the `SessionFsReaddirWithTypesEntry` type.""" - + """Directory entry returned by session filesystem `readdirWithTypes`, with name and entry + type. + """ name: str """Entry name""" - type: InstructionDiscoveryPathKind + type: DebugCollectLogsEntryKind """Entry type""" @staticmethod def from_dict(obj: Any) -> 'SessionFSReaddirWithTypesEntry': assert isinstance(obj, dict) name = from_str(obj.get("name")) - type = InstructionDiscoveryPathKind(obj.get("type")) + type = DebugCollectLogsEntryKind(obj.get("type")) return SessionFSReaddirWithTypesEntry(name, type) def to_dict(self) -> dict: result: dict = {} result["name"] = from_str(self.name) - result["type"] = to_enum(InstructionDiscoveryPathKind, self.type) + result["type"] = to_enum(DebugCollectLogsEntryKind, self.type) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -18204,8 +19123,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class OptionsUpdateAdditionalContentExclusionPolicy: - """Schema for the `OptionsUpdateAdditionalContentExclusionPolicy` type.""" - + """Content-exclusion policy supplied to `session.options.update`, with rules, last-updated + data, and scope. + """ last_updated_at: Any rules: list[OptionsUpdateAdditionalContentExclusionPolicyRule] scope: AdditionalContentExclusionPolicyScope @@ -18229,8 +19149,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsConfigureAdditionalContentExclusionPolicy: - """Schema for the `PermissionsConfigureAdditionalContentExclusionPolicy` type.""" - + """Content-exclusion policy supplied to `session.permissions.configure`, with rules, + last-updated data, and scope. + """ last_updated_at: Any rules: list[PermissionsConfigureAdditionalContentExclusionPolicyRule] scope: AdditionalContentExclusionPolicyScope @@ -18727,8 +19648,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionOpenOptionsAdditionalContentExclusionPolicy: - """Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicy` type.""" - + """Content-exclusion policy supplied to `sessions.open` options, with rules, last-updated + data, and scope. + """ last_updated_at: Any rules: list[SessionOpenOptionsAdditionalContentExclusionPolicyRule] scope: AdditionalContentExclusionPolicyScope @@ -18751,6 +19673,53 @@ def to_dict(self) -> dict: result["scope"] = to_enum(AdditionalContentExclusionPolicyScope, self.scope) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionSettingsSnapshot: + """Redacted, serializable view of session runtime settings for SDK boundary consumers. + Secrets and raw feature flags are intentionally excluded. + """ + job: SessionSettingsJobSnapshot + model: SessionSettingsModelSnapshot + online_evaluation: SessionSettingsOnlineEvaluationSnapshot + repo: SessionSettingsRepoSnapshot + validation: SessionSettingsValidationSnapshot + client_name: str | None = None + start_time_ms: float | None = None + timeout_ms: float | None = None + version: str | None = None + + @staticmethod + def from_dict(obj: Any) -> 'SessionSettingsSnapshot': + assert isinstance(obj, dict) + job = SessionSettingsJobSnapshot.from_dict(obj.get("job")) + model = SessionSettingsModelSnapshot.from_dict(obj.get("model")) + online_evaluation = SessionSettingsOnlineEvaluationSnapshot.from_dict(obj.get("onlineEvaluation")) + repo = SessionSettingsRepoSnapshot.from_dict(obj.get("repo")) + validation = SessionSettingsValidationSnapshot.from_dict(obj.get("validation")) + client_name = from_union([from_str, from_none], obj.get("clientName")) + start_time_ms = from_union([from_float, from_none], obj.get("startTimeMs")) + timeout_ms = from_union([from_float, from_none], obj.get("timeoutMs")) + version = from_union([from_str, from_none], obj.get("version")) + return SessionSettingsSnapshot(job, model, online_evaluation, repo, validation, client_name, start_time_ms, timeout_ms, version) + + def to_dict(self) -> dict: + result: dict = {} + result["job"] = to_class(SessionSettingsJobSnapshot, self.job) + result["model"] = to_class(SessionSettingsModelSnapshot, self.model) + result["onlineEvaluation"] = to_class(SessionSettingsOnlineEvaluationSnapshot, self.online_evaluation) + result["repo"] = to_class(SessionSettingsRepoSnapshot, self.repo) + result["validation"] = to_class(SessionSettingsValidationSnapshot, self.validation) + if self.client_name is not None: + result["clientName"] = from_union([from_str, from_none], self.client_name) + if self.start_time_ms is not None: + result["startTimeMs"] = from_union([to_float, from_none], self.start_time_ms) + if self.timeout_ms is not None: + result["timeoutMs"] = from_union([to_float, from_none], self.timeout_ms) + if self.version is not None: + result["version"] = from_union([from_str, from_none], self.version) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AgentGetCurrentResult: @@ -18847,6 +19816,25 @@ def to_dict(self) -> dict: result["agents"] = from_list(lambda x: to_class(AgentInfo, x), self.agents) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SkillsGetInvokedResult: + """Skills invoked during this session, ordered by invocation time (most recent last).""" + + skills: list[SkillsInvokedSkill] + """Skills invoked during this session, ordered by invocation time (most recent last)""" + + @staticmethod + def from_dict(obj: Any) -> 'SkillsGetInvokedResult': + assert isinstance(obj, dict) + skills = from_list(SkillsInvokedSkill.from_dict, obj.get("skills")) + return SkillsGetInvokedResult(skills) + + def to_dict(self) -> dict: + result: dict = {} + result["skills"] = from_list(lambda x: to_class(SkillsInvokedSkill, x), self.skills) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SkillDiscoveryPathList: @@ -18868,47 +19856,24 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class TaskProgress: - """Schema for the `TaskAgentProgress` type. +class TasksGetProgressResult: + """Progress information for the task, or null when no task with that ID is tracked.""" - Schema for the `TaskShellProgress` type. + progress: TaskProgress | None = None + """Progress information for the task, discriminated by type. Returns null when no task with + this ID is currently tracked. """ - type: TaskInfoType - """Progress kind""" - - latest_intent: str | None = None - """The most recent intent reported by the agent""" - - recent_activity: list[TaskProgressLine] | None = None - """Recent tool execution events converted to display lines""" - - pid: int | None = None - """Process ID when available""" - - recent_output: str | None = None - """Recent stdout/stderr lines from the running shell command""" @staticmethod - def from_dict(obj: Any) -> 'TaskProgress': + def from_dict(obj: Any) -> 'TasksGetProgressResult': assert isinstance(obj, dict) - type = TaskInfoType(obj.get("type")) - latest_intent = from_union([from_str, from_none], obj.get("latestIntent")) - recent_activity = from_union([lambda x: from_list(TaskProgressLine.from_dict, x), from_none], obj.get("recentActivity")) - pid = from_union([from_int, from_none], obj.get("pid")) - recent_output = from_union([from_str, from_none], obj.get("recentOutput")) - return TaskProgress(type, latest_intent, recent_activity, pid, recent_output) + progress = from_union([TaskProgress.from_dict, from_none], obj.get("progress")) + return TasksGetProgressResult(progress) def to_dict(self) -> dict: result: dict = {} - result["type"] = to_enum(TaskInfoType, self.type) - if self.latest_intent is not None: - result["latestIntent"] = from_union([from_str, from_none], self.latest_intent) - if self.recent_activity is not None: - result["recentActivity"] = from_union([lambda x: from_list(lambda x: to_class(TaskProgressLine, x), x), from_none], self.recent_activity) - if self.pid is not None: - result["pid"] = from_union([from_int, from_none], self.pid) - if self.recent_output is not None: - result["recentOutput"] = from_union([from_str, from_none], self.recent_output) + if self.progress is not None: + result["progress"] = from_union([lambda x: to_class(TaskProgress, x), from_none], self.progress) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -19199,7 +20164,9 @@ class UIHandlePendingExitPlanModeRequest: """The unique request ID from the exit_plan_mode.requested event""" response: UIExitPlanModeResponse - """Schema for the `UIExitPlanModeResponse` type.""" + """User response for a pending exit-plan-mode request, with approval state, selected action, + auto-approve flag, and feedback. + """ @staticmethod def from_dict(obj: Any) -> 'UIHandlePendingExitPlanModeRequest': @@ -19457,466 +20424,74 @@ def from_dict(obj: Any) -> 'CanvasProviderInvokeActionRequest': session_id = from_str(obj.get("sessionId")) host = from_union([CanvasHostContext.from_dict, from_none], obj.get("host")) input = obj.get("input") - session = from_union([CanvasSessionContext.from_dict, from_none], obj.get("session")) - return CanvasProviderInvokeActionRequest(action_name, canvas_id, extension_id, instance_id, session_id, host, input, session) - - def to_dict(self) -> dict: - result: dict = {} - result["actionName"] = from_str(self.action_name) - result["canvasId"] = from_str(self.canvas_id) - result["extensionId"] = from_str(self.extension_id) - result["instanceId"] = from_str(self.instance_id) - result["sessionId"] = from_str(self.session_id) - if self.host is not None: - result["host"] = from_union([lambda x: to_class(CanvasHostContext, x), from_none], self.host) - if self.input is not None: - result["input"] = self.input - if self.session is not None: - result["session"] = from_union([lambda x: to_class(CanvasSessionContext, x), from_none], self.session) - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class CanvasProviderOpenRequest: - """Canvas open parameters sent to the provider.""" - - canvas_id: str - """Provider-local canvas identifier""" - - extension_id: str - """Owning provider identifier""" - - instance_id: str - """Stable caller-supplied canvas instance identifier""" - - session_id: str - """Target session identifier""" - - host: CanvasHostContext | None = None - """Host context supplied by the runtime.""" - - input: Any = None - """Canvas open input""" - - session: CanvasSessionContext | None = None - """Session context supplied by the runtime.""" - - @staticmethod - def from_dict(obj: Any) -> 'CanvasProviderOpenRequest': - assert isinstance(obj, dict) - canvas_id = from_str(obj.get("canvasId")) - extension_id = from_str(obj.get("extensionId")) - instance_id = from_str(obj.get("instanceId")) - session_id = from_str(obj.get("sessionId")) - host = from_union([CanvasHostContext.from_dict, from_none], obj.get("host")) - input = obj.get("input") - session = from_union([CanvasSessionContext.from_dict, from_none], obj.get("session")) - return CanvasProviderOpenRequest(canvas_id, extension_id, instance_id, session_id, host, input, session) - - def to_dict(self) -> dict: - result: dict = {} - result["canvasId"] = from_str(self.canvas_id) - result["extensionId"] = from_str(self.extension_id) - result["instanceId"] = from_str(self.instance_id) - result["sessionId"] = from_str(self.session_id) - if self.host is not None: - result["host"] = from_union([lambda x: to_class(CanvasHostContext, x), from_none], self.host) - if self.input is not None: - result["input"] = self.input - if self.session is not None: - result["session"] = from_union([lambda x: to_class(CanvasSessionContext, x), from_none], self.session) - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class APIKeyAuthInfo: - """Schema for the `ApiKeyAuthInfo` type.""" - - api_key: str - """The API key. Treat as a secret.""" - - host: str - """Authentication host.""" - - type: ClassVar[str] = "api-key" - """API-key authentication for non-GitHub LLM providers (e.g. when running BYOM-style).""" - - copilot_user: CopilotUserResponse | None = None - """Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the - GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this - verbatim and does not re-fetch when set. - """ - - @staticmethod - def from_dict(obj: Any) -> 'APIKeyAuthInfo': - assert isinstance(obj, dict) - api_key = from_str(obj.get("apiKey")) - host = from_str(obj.get("host")) - copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) - return APIKeyAuthInfo(api_key, host, copilot_user) - - def to_dict(self) -> dict: - result: dict = {} - result["apiKey"] = from_str(self.api_key) - result["host"] = from_str(self.host) - 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 CopilotAPITokenAuthInfo: - """Schema for the `CopilotApiTokenAuthInfo` type.""" - - host: Host - """Authentication host (always the public GitHub host).""" - - type: ClassVar[str] = "copilot-api-token" - """Direct Copilot API authentication via the `GITHUB_COPILOT_API_TOKEN` + `COPILOT_API_URL` - environment-variable pair. The token itself is read from the environment by the runtime, - not carried in this struct. - """ - 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) -> 'CopilotAPITokenAuthInfo': - assert isinstance(obj, dict) - host = Host(obj.get("host")) - copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) - return CopilotAPITokenAuthInfo(host, copilot_user) - - def to_dict(self) -> dict: - result: dict = {} - result["host"] = to_enum(Host, self.host) - 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 EnvAuthInfo: - """Schema for the `EnvAuthInfo` type.""" - - env_var: str - """Name of the environment variable the token was sourced from.""" - - host: str - """Authentication host (e.g. https://github.com or a GHES host).""" - - token: str - """The token value itself. Treat as a secret.""" - - type: ClassVar[str] = "env" - """Personal access token (PAT) or server-to-server token sourced from an environment - variable. - """ - 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. - """ - login: str | None = None - """User login associated with the token. Undefined for server-to-server tokens (those - starting with `ghs_`). - """ - - @staticmethod - def from_dict(obj: Any) -> 'EnvAuthInfo': - assert isinstance(obj, dict) - env_var = from_str(obj.get("envVar")) - host = from_str(obj.get("host")) - token = from_str(obj.get("token")) - copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) - login = from_union([from_str, from_none], obj.get("login")) - return EnvAuthInfo(env_var, host, token, copilot_user, login) - - def to_dict(self) -> dict: - result: dict = {} - result["envVar"] = from_str(self.env_var) - 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.login is not None: - result["login"] = from_union([from_str, from_none], self.login) - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class GhCLIAuthInfo: - """Schema for the `GhCliAuthInfo` type.""" - - host: str - """Authentication host.""" - - login: str - """User login as reported by `gh auth status`.""" - - token: str - """The token returned by `gh auth token`. Treat as a secret.""" - - type: ClassVar[str] = "gh-cli" - """Authentication via the `gh` CLI's saved credentials.""" - - 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) -> 'GhCLIAuthInfo': - assert isinstance(obj, dict) - host = from_str(obj.get("host")) - login = from_str(obj.get("login")) - token = from_str(obj.get("token")) - copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) - return GhCLIAuthInfo(host, login, token, copilot_user) - - def to_dict(self) -> dict: - result: dict = {} - result["host"] = from_str(self.host) - result["login"] = from_str(self.login) - result["token"] = from_str(self.token) - 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 HMACAuthInfo: - """Schema for the `HMACAuthInfo` type.""" - - hmac: str - """HMAC secret used to sign requests.""" - - host: Host - """Authentication host. HMAC auth always targets the public GitHub host.""" - - type: ClassVar[str] = "hmac" - """HMAC-based authentication used by GitHub-internal services.""" - - 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) -> 'HMACAuthInfo': - assert isinstance(obj, dict) - hmac = from_str(obj.get("hmac")) - host = Host(obj.get("host")) - copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) - return HMACAuthInfo(hmac, host, copilot_user) - - def to_dict(self) -> dict: - result: dict = {} - result["hmac"] = from_str(self.hmac) - result["host"] = to_enum(Host, self.host) - 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 TokenAuthInfo: - """Schema for the `TokenAuthInfo` type.""" - - 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) -> 'TokenAuthInfo': - 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 TokenAuthInfo(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 UserAuthInfo: - """Schema for the `UserAuthInfo` type.""" - - host: str - """Authentication host.""" - - login: str - """OAuth user login.""" - - type: ClassVar[str] = "user" - """OAuth user authentication. The token itself is held in the runtime's secret token store - (keyed by host+login) and is NOT carried in this struct. - """ - 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) -> 'UserAuthInfo': - assert isinstance(obj, dict) - host = from_str(obj.get("host")) - login = from_str(obj.get("login")) - copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) - return UserAuthInfo(host, login, copilot_user) - - def to_dict(self) -> dict: - result: dict = {} - result["host"] = from_str(self.host) - result["login"] = from_str(self.login) - 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 - -@dataclass -class PermissionDecisionApproveForIonApproval: - """Session-scoped approval to remember (tool prompts only; omitted for path/url prompts) - - Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type. - - Schema for the `PermissionDecisionApproveForSessionApprovalRead` type. - - Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type. - - Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type. - - Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type. - - Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type. - - Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type. - - Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type. - - Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` - type. - - Approval to persist for this location - - Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type. - - Schema for the `PermissionDecisionApproveForLocationApprovalRead` type. - - Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type. - - Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type. - - Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type. - - Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type. - - Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type. - - Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type. - - Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` - type. - - The approval to add as a session-scoped rule - - The approval to persist for this location - """ - command_identifiers: list[str] | None = None - """Command identifiers covered by this approval.""" - - kind: ApprovalKind | None = None - """Approval scoped to specific command identifiers. - - Approval covering read-only filesystem operations. - - Approval covering filesystem write operations. + session = from_union([CanvasSessionContext.from_dict, from_none], obj.get("session")) + return CanvasProviderInvokeActionRequest(action_name, canvas_id, extension_id, instance_id, session_id, host, input, session) - Approval covering an MCP tool. + def to_dict(self) -> dict: + result: dict = {} + result["actionName"] = from_str(self.action_name) + result["canvasId"] = from_str(self.canvas_id) + result["extensionId"] = from_str(self.extension_id) + result["instanceId"] = from_str(self.instance_id) + result["sessionId"] = from_str(self.session_id) + if self.host is not None: + result["host"] = from_union([lambda x: to_class(CanvasHostContext, x), from_none], self.host) + if self.input is not None: + result["input"] = self.input + if self.session is not None: + result["session"] = from_union([lambda x: to_class(CanvasSessionContext, x), from_none], self.session) + return result - Approval covering MCP sampling requests for a server. +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class CanvasProviderOpenRequest: + """Canvas open parameters sent to the provider.""" - Approval covering writes to long-term memory. + canvas_id: str + """Provider-local canvas identifier""" - Approval covering a custom tool. + extension_id: str + """Owning provider identifier""" - Approval covering extension lifecycle operations such as enable, disable, or reload. + instance_id: str + """Stable caller-supplied canvas instance identifier""" - Approval covering an extension's request to access a permission-gated capability. - """ - server_name: str | None = None - """MCP server name.""" + session_id: str + """Target session identifier""" - tool_name: str | None = None - """MCP tool name, or null to cover every tool on the server. + host: CanvasHostContext | None = None + """Host context supplied by the runtime.""" - Custom tool name. - """ - operation: str | None = None - """Optional operation identifier; when omitted, the approval covers all extension management - operations. - """ - extension_name: str | None = None - """Extension name.""" + input: Any = None + """Canvas open input""" - external_ref_marker_external_ref_user_tool_session_approval: str | None = None + session: CanvasSessionContext | None = None + """Session context supplied by the runtime.""" @staticmethod - def from_dict(obj: Any) -> 'PermissionDecisionApproveForIonApproval': + def from_dict(obj: Any) -> 'CanvasProviderOpenRequest': assert isinstance(obj, dict) - command_identifiers = from_union([lambda x: from_list(from_str, x), from_none], obj.get("commandIdentifiers")) - kind = from_union([ApprovalKind, from_none], obj.get("kind")) - server_name = from_union([from_str, from_none], obj.get("serverName")) - tool_name = from_union([from_none, from_str], obj.get("toolName")) - operation = from_union([from_str, from_none], obj.get("operation")) - extension_name = from_union([from_str, from_none], obj.get("extensionName")) - external_ref_marker_external_ref_user_tool_session_approval = from_union([from_str, from_none], obj.get("__externalRefMarker___ExternalRef_UserToolSessionApproval")) - return PermissionDecisionApproveForIonApproval(command_identifiers, kind, server_name, tool_name, operation, extension_name, external_ref_marker_external_ref_user_tool_session_approval) + canvas_id = from_str(obj.get("canvasId")) + extension_id = from_str(obj.get("extensionId")) + instance_id = from_str(obj.get("instanceId")) + session_id = from_str(obj.get("sessionId")) + host = from_union([CanvasHostContext.from_dict, from_none], obj.get("host")) + input = obj.get("input") + session = from_union([CanvasSessionContext.from_dict, from_none], obj.get("session")) + return CanvasProviderOpenRequest(canvas_id, extension_id, instance_id, session_id, host, input, session) def to_dict(self) -> dict: result: dict = {} - if self.command_identifiers is not None: - result["commandIdentifiers"] = from_union([lambda x: from_list(from_str, x), from_none], self.command_identifiers) - if self.kind is not None: - result["kind"] = from_union([lambda x: to_enum(ApprovalKind, x), from_none], self.kind) - if self.server_name is not None: - result["serverName"] = from_union([from_str, from_none], self.server_name) - if self.tool_name is not None: - result["toolName"] = from_union([from_none, from_str], self.tool_name) - if self.operation is not None: - result["operation"] = from_union([from_str, from_none], self.operation) - if self.extension_name is not None: - result["extensionName"] = from_union([from_str, from_none], self.extension_name) - if self.external_ref_marker_external_ref_user_tool_session_approval is not None: - result["__externalRefMarker___ExternalRef_UserToolSessionApproval"] = from_union([from_str, from_none], self.external_ref_marker_external_ref_user_tool_session_approval) + result["canvasId"] = from_str(self.canvas_id) + result["extensionId"] = from_str(self.extension_id) + result["instanceId"] = from_str(self.instance_id) + result["sessionId"] = from_str(self.session_id) + if self.host is not None: + result["host"] = from_union([lambda x: to_class(CanvasHostContext, x), from_none], self.host) + if self.input is not None: + result["input"] = self.input + if self.session is not None: + result["session"] = from_union([lambda x: to_class(CanvasSessionContext, x), from_none], self.session) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -19953,106 +20528,23 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class InstalledPlugin: - """Schema for the `InstalledPlugin` type.""" - - enabled: bool - """Whether the plugin is currently enabled""" - - installed_at: str - """Installation timestamp""" - - marketplace: str - """Marketplace the plugin came from (empty string for direct repo installs)""" - - name: str - """Plugin name""" - - cache_path: str | None = None - """Path where the plugin is cached locally""" - - source: InstalledPluginSource | str | None = None - """Source for direct repo installs (when marketplace is empty)""" - - version: str | None = None - """Version installed (if available)""" - - @staticmethod - def from_dict(obj: Any) -> 'InstalledPlugin': - assert isinstance(obj, dict) - enabled = from_bool(obj.get("enabled")) - installed_at = from_str(obj.get("installed_at")) - marketplace = from_str(obj.get("marketplace")) - name = from_str(obj.get("name")) - cache_path = from_union([from_str, from_none], obj.get("cache_path")) - source = from_union([InstalledPluginSource.from_dict, from_str, from_none], obj.get("source")) - version = from_union([from_str, from_none], obj.get("version")) - return InstalledPlugin(enabled, installed_at, marketplace, name, cache_path, source, version) - - def to_dict(self) -> dict: - result: dict = {} - result["enabled"] = from_bool(self.enabled) - result["installed_at"] = from_str(self.installed_at) - result["marketplace"] = from_str(self.marketplace) - 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.source is not None: - result["source"] = from_union([lambda x: to_class(InstalledPluginSource, x), from_str, from_none], self.source) - if self.version is not None: - result["version"] = from_union([from_str, from_none], self.version) - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class SessionInstalledPlugin: - """Schema for the `SessionInstalledPlugin` type.""" - - enabled: bool - """Whether the plugin is currently enabled""" - - installed_at: str - """Installation timestamp (ISO-8601)""" - - marketplace: str - """Marketplace the plugin came from (empty string for direct repo installs)""" - - name: str - """Plugin name""" - - cache_path: str | None = None - """Path where the plugin is cached locally""" - - source: SessionInstalledPluginSource | str | None = None - """Source descriptor for direct repo installs (when marketplace is empty)""" +class SessionsSetAdditionalPluginsRequest: + """Manager-wide additional plugins to register; replaces any previously-configured set.""" - version: str | None = None - """Installed version, if known""" + plugins: list[InstalledPlugin] + """Manager-wide additional plugins to register. Replaces any previously-configured set. Pass + an empty array to clear. + """ @staticmethod - def from_dict(obj: Any) -> 'SessionInstalledPlugin': + def from_dict(obj: Any) -> 'SessionsSetAdditionalPluginsRequest': assert isinstance(obj, dict) - enabled = from_bool(obj.get("enabled")) - installed_at = from_str(obj.get("installed_at")) - marketplace = from_str(obj.get("marketplace")) - name = from_str(obj.get("name")) - cache_path = from_union([from_str, from_none], obj.get("cache_path")) - source = from_union([SessionInstalledPluginSource.from_dict, from_str, from_none], obj.get("source")) - version = from_union([from_str, from_none], obj.get("version")) - return SessionInstalledPlugin(enabled, installed_at, marketplace, name, cache_path, source, version) + plugins = from_list(InstalledPlugin.from_dict, obj.get("plugins")) + return SessionsSetAdditionalPluginsRequest(plugins) def to_dict(self) -> dict: result: dict = {} - result["enabled"] = from_bool(self.enabled) - result["installed_at"] = from_str(self.installed_at) - result["marketplace"] = from_str(self.marketplace) - 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.source is not None: - result["source"] = from_union([lambda x: to_class(SessionInstalledPluginSource, x), from_str, from_none], self.source) - if self.version is not None: - result["version"] = from_union([from_str, from_none], self.version) + result["plugins"] = from_list(lambda x: to_class(InstalledPlugin, x), self.plugins) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -20265,6 +20757,59 @@ def to_dict(self) -> dict: result["workspacePath"] = from_union([from_none, from_str], self.workspace_path) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class WorkspacesListCheckpointsResult: + """Workspace checkpoints in chronological order; empty when the workspace is not enabled.""" + + checkpoints: list[WorkspacesCheckpoints] + """Workspace checkpoints in chronological order. Empty when workspace is not enabled.""" + + @staticmethod + def from_dict(obj: Any) -> 'WorkspacesListCheckpointsResult': + assert isinstance(obj, dict) + checkpoints = from_list(WorkspacesCheckpoints.from_dict, obj.get("checkpoints")) + return WorkspacesListCheckpointsResult(checkpoints) + + def to_dict(self) -> dict: + result: dict = {} + result["checkpoints"] = from_list(lambda x: to_class(WorkspacesCheckpoints, x), self.checkpoints) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class DebugCollectLogsRequest: + """Options for collecting a redacted session debug bundle.""" + + destination: DebugCollectLogsDestination + """Where the redacted bundle should be written. Use `archive` to produce a .tgz, or + `directory` to stage redacted files for caller-managed upload/post-processing. + """ + additional_entries: list[DebugCollectLogsEntry] | None = None + """Caller-provided server-local files or directories to include in addition to the runtime's + built-in session diagnostics. This lets host applications add their own diagnostics + without changing the API shape. + """ + include: DebugCollectLogsInclude | None = None + """Which built-in session diagnostics to include. Omitted fields default to true.""" + + @staticmethod + def from_dict(obj: Any) -> 'DebugCollectLogsRequest': + assert isinstance(obj, dict) + destination = DebugCollectLogsDestination.from_dict(obj.get("destination")) + additional_entries = from_union([lambda x: from_list(DebugCollectLogsEntry.from_dict, x), from_none], obj.get("additionalEntries")) + include = from_union([DebugCollectLogsInclude.from_dict, from_none], obj.get("include")) + return DebugCollectLogsRequest(destination, additional_entries, include) + + def to_dict(self) -> dict: + result: dict = {} + result["destination"] = to_class(DebugCollectLogsDestination, self.destination) + if self.additional_entries is not None: + result["additionalEntries"] = from_union([lambda x: from_list(lambda x: to_class(DebugCollectLogsEntry, x), x), from_none], self.additional_entries) + if self.include is not None: + result["include"] = from_union([lambda x: to_class(DebugCollectLogsInclude, x), from_none], self.include) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class InstructionDiscoveryPathList: @@ -20454,42 +20999,20 @@ class SandboxConfig: """User-managed sandbox policy fragment merged into the auto-discovered base policy.""" @staticmethod - def from_dict(obj: Any) -> 'SandboxConfig': - assert isinstance(obj, dict) - enabled = from_bool(obj.get("enabled")) - add_current_working_directory = from_union([from_bool, from_none], obj.get("addCurrentWorkingDirectory")) - user_policy = from_union([SandboxConfigUserPolicy.from_dict, from_none], obj.get("userPolicy")) - return SandboxConfig(enabled, add_current_working_directory, user_policy) - - def to_dict(self) -> dict: - result: dict = {} - result["enabled"] = from_bool(self.enabled) - if self.add_current_working_directory is not None: - result["addCurrentWorkingDirectory"] = from_union([from_bool, from_none], self.add_current_working_directory) - if self.user_policy is not None: - result["userPolicy"] = from_union([lambda x: to_class(SandboxConfigUserPolicy, x), from_none], self.user_policy) - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class TasksGetProgressResult: - """Progress information for the task, or null when no task with that ID is tracked.""" - - progress: TaskProgress | None = None - """Progress information for the task, discriminated by type. Returns null when no task with - this ID is currently tracked. - """ - - @staticmethod - def from_dict(obj: Any) -> 'TasksGetProgressResult': + def from_dict(obj: Any) -> 'SandboxConfig': assert isinstance(obj, dict) - progress = from_union([TaskProgress.from_dict, from_none], obj.get("progress")) - return TasksGetProgressResult(progress) + enabled = from_bool(obj.get("enabled")) + add_current_working_directory = from_union([from_bool, from_none], obj.get("addCurrentWorkingDirectory")) + user_policy = from_union([SandboxConfigUserPolicy.from_dict, from_none], obj.get("userPolicy")) + return SandboxConfig(enabled, add_current_working_directory, user_policy) def to_dict(self) -> dict: result: dict = {} - if self.progress is not None: - result["progress"] = from_union([lambda x: to_class(TaskProgress, x), from_none], self.progress) + result["enabled"] = from_bool(self.enabled) + if self.add_current_working_directory is not None: + result["addCurrentWorkingDirectory"] = from_union([from_bool, from_none], self.add_current_working_directory) + if self.user_policy is not None: + result["userPolicy"] = from_union([lambda x: to_class(SandboxConfigUserPolicy, x), from_none], self.user_policy) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -20522,27 +21045,6 @@ def to_dict(self) -> dict: result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) return result -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class SessionsSetAdditionalPluginsRequest: - """Manager-wide additional plugins to register; replaces any previously-configured set.""" - - plugins: list[InstalledPlugin] - """Manager-wide additional plugins to register. Replaces any previously-configured set. Pass - an empty array to clear. - """ - - @staticmethod - def from_dict(obj: Any) -> 'SessionsSetAdditionalPluginsRequest': - assert isinstance(obj, dict) - plugins = from_list(InstalledPlugin.from_dict, obj.get("plugins")) - return SessionsSetAdditionalPluginsRequest(plugins) - - def to_dict(self) -> dict: - result: dict = {} - result["plugins"] = from_list(lambda x: to_class(InstalledPlugin, x), self.plugins) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ProviderAddRequest: @@ -20743,6 +21245,9 @@ class SessionOpenOptions: sandbox_config: SandboxConfig | None = None """Resolved sandbox configuration.""" + self_fetch_managed_settings: bool | None = None + """Opt-in: self-fetch enterprise managed settings at session bootstrap.""" + session_capabilities: list[SessionCapability] | None = None """Capabilities enabled for this session.""" @@ -20824,6 +21329,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")) + self_fetch_managed_settings = from_union([from_bool, from_none], obj.get("selfFetchManagedSettings")) 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")) @@ -20834,7 +21340,7 @@ def from_dict(obj: Any) -> 'SessionOpenOptions': trajectory_file = from_union([from_str, from_none], obj.get("trajectoryFile")) working_directory = from_union([from_str, from_none], obj.get("workingDirectory")) working_directory_context = from_union([SessionContext.from_dict, from_none], obj.get("workingDirectoryContext")) - return SessionOpenOptions(additional_content_exclusion_policies, agent_context, 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_skills, enable_citations, enable_on_demand_instruction_discovery, enable_script_safety, enable_streaming, env_value_mode, events_log_directory, excluded_builtin_agents, excluded_tools, exp_assignments, feature_flags, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, 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_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, trajectory_file, working_directory, working_directory_context) + return SessionOpenOptions(additional_content_exclusion_policies, 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_skills, enable_citations, enable_on_demand_instruction_discovery, enable_script_safety, enable_streaming, env_value_mode, events_log_directory, excluded_builtin_agents, excluded_tools, exp_assignments, feature_flags, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, 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, self_fetch_managed_settings, session_capabilities, session_id, session_limits, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, trajectory_file, working_directory, working_directory_context) def to_dict(self) -> dict: result: dict = {} @@ -20934,6 +21440,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.self_fetch_managed_settings is not None: + result["selfFetchManagedSettings"] = from_union([from_bool, from_none], self.self_fetch_managed_settings) 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: @@ -21477,6 +21985,184 @@ def to_dict(self) -> dict: result["suppressResumeWorkspaceMetadataWriteback"] = from_union([from_bool, from_none], self.suppress_resume_workspace_metadata_writeback) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class CopilotUserResponse: + """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. + """ + access_type_sku: str | None = None + """Copilot access SKU identifier (e.g. `free_limited_copilot`, + `copilot_for_business_seat_quota`) used to gate model and feature access. + """ + analytics_tracking_id: str | None = None + """Opaque analytics tracking identifier for the user, forwarded from the Copilot API.""" + + assigned_date: Any = None + """Date the Copilot seat was assigned to the user, if applicable.""" + + can_signup_for_limited: bool | None = None + """Whether the user is eligible to sign up for the free/limited Copilot tier.""" + + can_upgrade_plan: bool | None = None + """Whether the user is able to upgrade their Copilot plan.""" + + chat_enabled: bool | None = None + """Whether Copilot chat is enabled for the user.""" + + cli_remote_control_enabled: bool | None = None + """Whether CLI remote control is enabled for the user.""" + + cloud_session_storage_enabled: bool | None = None + """Whether cloud session storage is enabled for the user.""" + + codex_agent_enabled: bool | None = None + """Whether the Codex agent is enabled for the user.""" + + copilot_plan: str | None = None + """Copilot plan name for the user (e.g. `individual`, `business`, `enterprise`).""" + + copilotignore_enabled: bool | None = None + """Whether `.copilotignore` content-exclusion support is enabled for the user.""" + + endpoints: CopilotUserResponseEndpoints | None = None + """Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough.""" + + is_mcp_enabled: Any = None + """Whether MCP (Model Context Protocol) support is enabled for the user.""" + + is_staff: bool | None = None + """Whether the user is a GitHub/Microsoft staff member.""" + + limited_user_quotas: dict[str, float] | None = None + """Per-category quota allotments for free/limited-tier users, keyed by quota category.""" + + limited_user_reset_date: str | None = None + """Date the free/limited-tier user's quotas next reset, as a raw string from the Copilot API.""" + + login: str | None = None + """GitHub login of the authenticated user.""" + + monthly_quotas: dict[str, float] | None = None + """Per-category monthly quota allotments, keyed by quota category.""" + + organization_list: Any = None + """Organizations the user belongs to, each with an optional login and display name.""" + + organization_login_list: list[str] | None = None + """Logins of the organizations the user belongs to.""" + + quota_reset_date: str | None = None + """Date the user's usage quota next resets, as a raw string from the Copilot API; see + `quota_reset_date_utc` for the UTC-normalized value. + """ + quota_reset_date_utc: str | None = None + """UTC-normalized form of `quota_reset_date` (the date the user's usage quota next resets).""" + + quota_snapshots: dict[str, CopilotUserResponseQuotaSnapshots | None] | None = None + """Quota snapshot map from the raw Copilot user-response passthrough, with chat, + completions, premium-interactions, and other entries. + """ + restricted_telemetry: bool | None = None + """Whether the user's telemetry is subject to restricted-data handling.""" + + te: bool | None = None + """Raw passthrough of the Copilot API `te` flag for the user (an opaque server-side + eligibility signal surfaced in telemetry); not otherwise interpreted by the runtime. + """ + token_based_billing: bool | None = None + """Whether the account is on usage-based (token/AI-credit) billing rather than a fixed + premium-request quota. + """ + + @staticmethod + def from_dict(obj: Any) -> 'CopilotUserResponse': + assert isinstance(obj, dict) + access_type_sku = from_union([from_str, from_none], obj.get("access_type_sku")) + analytics_tracking_id = from_union([from_str, from_none], obj.get("analytics_tracking_id")) + assigned_date = obj.get("assigned_date") + can_signup_for_limited = from_union([from_bool, from_none], obj.get("can_signup_for_limited")) + can_upgrade_plan = from_union([from_bool, from_none], obj.get("can_upgrade_plan")) + chat_enabled = from_union([from_bool, from_none], obj.get("chat_enabled")) + cli_remote_control_enabled = from_union([from_bool, from_none], obj.get("cli_remote_control_enabled")) + cloud_session_storage_enabled = from_union([from_bool, from_none], obj.get("cloud_session_storage_enabled")) + codex_agent_enabled = from_union([from_bool, from_none], obj.get("codex_agent_enabled")) + copilot_plan = from_union([from_str, from_none], obj.get("copilot_plan")) + copilotignore_enabled = from_union([from_bool, from_none], obj.get("copilotignore_enabled")) + endpoints = from_union([CopilotUserResponseEndpoints.from_dict, from_none], obj.get("endpoints")) + is_mcp_enabled = obj.get("is_mcp_enabled") + is_staff = from_union([from_bool, from_none], obj.get("is_staff")) + limited_user_quotas = from_union([lambda x: from_dict(from_float, x), from_none], obj.get("limited_user_quotas")) + limited_user_reset_date = from_union([from_str, from_none], obj.get("limited_user_reset_date")) + login = from_union([from_str, from_none], obj.get("login")) + monthly_quotas = from_union([lambda x: from_dict(from_float, x), from_none], obj.get("monthly_quotas")) + organization_list = obj.get("organization_list") + organization_login_list = from_union([lambda x: from_list(from_str, x), from_none], obj.get("organization_login_list")) + quota_reset_date = from_union([from_str, from_none], obj.get("quota_reset_date")) + quota_reset_date_utc = from_union([from_str, from_none], obj.get("quota_reset_date_utc")) + quota_snapshots = from_union([lambda x: from_dict(lambda x: from_union([CopilotUserResponseQuotaSnapshots.from_dict, from_none], x), x), from_none], obj.get("quota_snapshots")) + restricted_telemetry = from_union([from_bool, from_none], obj.get("restricted_telemetry")) + te = from_union([from_bool, from_none], obj.get("te")) + token_based_billing = from_union([from_bool, from_none], obj.get("token_based_billing")) + return CopilotUserResponse(access_type_sku, analytics_tracking_id, assigned_date, can_signup_for_limited, can_upgrade_plan, chat_enabled, cli_remote_control_enabled, cloud_session_storage_enabled, codex_agent_enabled, copilot_plan, copilotignore_enabled, endpoints, is_mcp_enabled, is_staff, limited_user_quotas, limited_user_reset_date, login, monthly_quotas, organization_list, organization_login_list, quota_reset_date, quota_reset_date_utc, quota_snapshots, restricted_telemetry, te, token_based_billing) + + def to_dict(self) -> dict: + result: dict = {} + if self.access_type_sku is not None: + result["access_type_sku"] = from_union([from_str, from_none], self.access_type_sku) + if self.analytics_tracking_id is not None: + result["analytics_tracking_id"] = from_union([from_str, from_none], self.analytics_tracking_id) + if self.assigned_date is not None: + result["assigned_date"] = self.assigned_date + if self.can_signup_for_limited is not None: + result["can_signup_for_limited"] = from_union([from_bool, from_none], self.can_signup_for_limited) + if self.can_upgrade_plan is not None: + result["can_upgrade_plan"] = from_union([from_bool, from_none], self.can_upgrade_plan) + if self.chat_enabled is not None: + result["chat_enabled"] = from_union([from_bool, from_none], self.chat_enabled) + if self.cli_remote_control_enabled is not None: + result["cli_remote_control_enabled"] = from_union([from_bool, from_none], self.cli_remote_control_enabled) + if self.cloud_session_storage_enabled is not None: + result["cloud_session_storage_enabled"] = from_union([from_bool, from_none], self.cloud_session_storage_enabled) + if self.codex_agent_enabled is not None: + result["codex_agent_enabled"] = from_union([from_bool, from_none], self.codex_agent_enabled) + if self.copilot_plan is not None: + result["copilot_plan"] = from_union([from_str, from_none], self.copilot_plan) + if self.copilotignore_enabled is not None: + result["copilotignore_enabled"] = from_union([from_bool, from_none], self.copilotignore_enabled) + if self.endpoints is not None: + result["endpoints"] = from_union([lambda x: to_class(CopilotUserResponseEndpoints, x), from_none], self.endpoints) + if self.is_mcp_enabled is not None: + result["is_mcp_enabled"] = self.is_mcp_enabled + if self.is_staff is not None: + result["is_staff"] = from_union([from_bool, from_none], self.is_staff) + if self.limited_user_quotas is not None: + result["limited_user_quotas"] = from_union([lambda x: from_dict(to_float, x), from_none], self.limited_user_quotas) + if self.limited_user_reset_date is not None: + result["limited_user_reset_date"] = from_union([from_str, from_none], self.limited_user_reset_date) + if self.login is not None: + result["login"] = from_union([from_str, from_none], self.login) + if self.monthly_quotas is not None: + result["monthly_quotas"] = from_union([lambda x: from_dict(to_float, x), from_none], self.monthly_quotas) + if self.organization_list is not None: + result["organization_list"] = self.organization_list + if self.organization_login_list is not None: + result["organization_login_list"] = from_union([lambda x: from_list(from_str, x), from_none], self.organization_login_list) + if self.quota_reset_date is not None: + result["quota_reset_date"] = from_union([from_str, from_none], self.quota_reset_date) + if self.quota_reset_date_utc is not None: + result["quota_reset_date_utc"] = from_union([from_str, from_none], self.quota_reset_date_utc) + if self.quota_snapshots is not None: + result["quota_snapshots"] = from_union([lambda x: from_dict(lambda x: from_union([lambda x: to_class(CopilotUserResponseQuotaSnapshots, x), from_none], x), x), from_none], self.quota_snapshots) + if self.restricted_telemetry is not None: + result["restricted_telemetry"] = from_union([from_bool, from_none], self.restricted_telemetry) + if self.te is not None: + result["te"] = from_union([from_bool, from_none], self.te) + if self.token_based_billing is not None: + result["token_based_billing"] = from_union([from_bool, from_none], self.token_based_billing) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AgentRegistryLiveTargetEntry: @@ -21687,14 +22373,87 @@ def from_dict(obj: Any) -> 'AgentRegistrySpawnSpawned': def to_dict(self) -> dict: result: dict = {} - result["entry"] = to_class(AgentRegistryLiveTargetEntry, self.entry) - result["kind"] = self.kind - if self.initial_prompt_error is not None: - result["initialPromptError"] = from_union([from_str, from_none], self.initial_prompt_error) - if self.initial_prompt_sent is not None: - result["initialPromptSent"] = from_union([from_bool, from_none], self.initial_prompt_sent) - if self.log_capture is not None: - result["logCapture"] = from_union([lambda x: to_class(AgentRegistryLogCapture, x), from_none], self.log_capture) + result["entry"] = to_class(AgentRegistryLiveTargetEntry, self.entry) + result["kind"] = self.kind + if self.initial_prompt_error is not None: + result["initialPromptError"] = from_union([from_str, from_none], self.initial_prompt_error) + if self.initial_prompt_sent is not None: + result["initialPromptSent"] = from_union([from_bool, from_none], self.initial_prompt_sent) + if self.log_capture is not None: + result["logCapture"] = from_union([lambda x: to_class(AgentRegistryLogCapture, x), from_none], self.log_capture) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class APIKeyAuthInfo: + """Authentication-info variant for API-key authentication to a non-GitHub LLM provider, + carrying the secret `apiKey` and host. + """ + api_key: str + """The API key. Treat as a secret.""" + + host: str + """Authentication host.""" + + type: ClassVar[str] = "api-key" + """API-key authentication for non-GitHub LLM providers (e.g. when running BYOM-style).""" + + copilot_user: CopilotUserResponse | None = None + """Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the + GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this + verbatim and does not re-fetch when set. + """ + + @staticmethod + def from_dict(obj: Any) -> 'APIKeyAuthInfo': + assert isinstance(obj, dict) + api_key = from_str(obj.get("apiKey")) + host = from_str(obj.get("host")) + copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) + return APIKeyAuthInfo(api_key, host, copilot_user) + + def to_dict(self) -> dict: + result: dict = {} + result["apiKey"] = from_str(self.api_key) + result["host"] = from_str(self.host) + 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 CopilotAPITokenAuthInfo: + """Authentication-info variant for direct Copilot API token auth sourced from environment + variables, with public GitHub host. + """ + host: Host + """Authentication host (always the public GitHub host).""" + + type: ClassVar[str] = "copilot-api-token" + """Direct Copilot API authentication via the `GITHUB_COPILOT_API_TOKEN` + `COPILOT_API_URL` + environment-variable pair. The token itself is read from the environment by the runtime, + not carried in this struct. + """ + 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) -> 'CopilotAPITokenAuthInfo': + assert isinstance(obj, dict) + host = Host(obj.get("host")) + copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) + return CopilotAPITokenAuthInfo(host, copilot_user) + + def to_dict(self) -> dict: + result: dict = {} + result["host"] = to_enum(Host, self.host) + 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. @@ -21751,6 +22510,100 @@ def to_dict(self) -> dict: result["namespacedName"] = from_union([from_str, from_none], self.namespaced_name) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class EnvAuthInfo: + """Authentication-info variant for a token sourced from an environment variable, with host, + optional login, token, and env var name. + """ + env_var: str + """Name of the environment variable the token was sourced from.""" + + host: str + """Authentication host (e.g. https://github.com or a GHES host).""" + + token: str + """The token value itself. Treat as a secret.""" + + type: ClassVar[str] = "env" + """Personal access token (PAT) or server-to-server token sourced from an environment + variable. + """ + 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. + """ + login: str | None = None + """User login associated with the token. Undefined for server-to-server tokens (those + starting with `ghs_`). + """ + + @staticmethod + def from_dict(obj: Any) -> 'EnvAuthInfo': + assert isinstance(obj, dict) + env_var = from_str(obj.get("envVar")) + host = from_str(obj.get("host")) + token = from_str(obj.get("token")) + copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) + login = from_union([from_str, from_none], obj.get("login")) + return EnvAuthInfo(env_var, host, token, copilot_user, login) + + def to_dict(self) -> dict: + result: dict = {} + result["envVar"] = from_str(self.env_var) + 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.login is not None: + result["login"] = from_union([from_str, from_none], self.login) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class GhCLIAuthInfo: + """Authentication-info variant for GitHub CLI credentials, carrying host, login, and the `gh + auth token` value. + """ + host: str + """Authentication host.""" + + login: str + """User login as reported by `gh auth status`.""" + + token: str + """The token returned by `gh auth token`. Treat as a secret.""" + + type: ClassVar[str] = "gh-cli" + """Authentication via the `gh` CLI's saved credentials.""" + + 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) -> 'GhCLIAuthInfo': + assert isinstance(obj, dict) + host = from_str(obj.get("host")) + login = from_str(obj.get("login")) + token = from_str(obj.get("token")) + copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) + return GhCLIAuthInfo(host, login, token, copilot_user) + + def to_dict(self) -> dict: + result: dict = {} + result["host"] = from_str(self.host) + result["login"] = from_str(self.login) + result["token"] = from_str(self.token) + 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 GitHubTelemetryEvent: @@ -21831,8 +22684,8 @@ def to_dict(self) -> dict: @dataclass class GitHubTelemetryNotification: """Payload for a `gitHubTelemetry.event` notification: a single GitHub telemetry event the - runtime forwards to a host connection that opted into telemetry forwarding for the - session. + runtime forwards to a host connection that opted into telemetry forwarding during the + `server.connect` handshake. """ event: GitHubTelemetryEvent """The telemetry event, in the runtime's native GitHub-shaped telemetry format.""" @@ -21841,22 +22694,64 @@ class GitHubTelemetryNotification: """Whether this is a restricted telemetry event (cli.restricted_telemetry). Hosts must route restricted events to first-party Microsoft stores only. """ - session_id: str - """Session the telemetry event belongs to.""" + session_id: str | None = None + """Session the telemetry event belongs to, when it is session-scoped. Omitted for + sessionless events (for example, `server.sendTelemetry` calls with no session id), which + are still forwarded to opted-in connections. + """ @staticmethod def from_dict(obj: Any) -> 'GitHubTelemetryNotification': assert isinstance(obj, dict) event = GitHubTelemetryEvent.from_dict(obj.get("event")) restricted = from_bool(obj.get("restricted")) - session_id = from_str(obj.get("sessionId")) + session_id = from_union([from_str, from_none], obj.get("sessionId")) return GitHubTelemetryNotification(event, restricted, session_id) def to_dict(self) -> dict: result: dict = {} result["event"] = to_class(GitHubTelemetryEvent, self.event) result["restricted"] = from_bool(self.restricted) - result["sessionId"] = from_str(self.session_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 HMACAuthInfo: + """Authentication-info variant for GitHub-internal HMAC auth, carrying the public GitHub + host and HMAC secret. + """ + hmac: str + """HMAC secret used to sign requests.""" + + host: Host + """Authentication host. HMAC auth always targets the public GitHub host.""" + + type: ClassVar[str] = "hmac" + """HMAC-based authentication used by GitHub-internal services.""" + + 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) -> 'HMACAuthInfo': + assert isinstance(obj, dict) + hmac = from_str(obj.get("hmac")) + host = Host(obj.get("host")) + copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) + return HMACAuthInfo(hmac, host, copilot_user) + + def to_dict(self) -> dict: + result: dict = {} + result["hmac"] = from_str(self.hmac) + result["host"] = to_enum(Host, self.host) + 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. @@ -22056,8 +22951,9 @@ class ModelPickerCategory(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class Model: - """Schema for the `Model` type.""" - + """Copilot model metadata, including identifier, display name, capabilities, policy, + billing, reasoning efforts, and picker categories. + """ capabilities: ModelCapabilities """Model capabilities and limits""" @@ -22197,24 +23093,40 @@ class PermissionsSetAAllSource(Enum): # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsSetAllowAllRequest: - """Whether to enable full allow-all permissions for the session.""" - - enabled: bool - """Whether to enable full allow-all permissions""" + """Allow-all mode to apply for the session.""" + enabled: bool | None = None + """Legacy full allow-all toggle. Prefer `mode`; when `mode` is omitted, `enabled: true` is + treated as `mode: "on"` and any other value is treated as `mode: "off"`. + """ + mode: PermissionsAllowAllMode | None = None + """Allow-all mode to apply. `on` enables full allow-all; `auto` enables advisory LLM + auto-approval; `off` disables both. + """ + model: str | None = None + """Optional model id for the `auto` mode auto-approval LLM judging. Only meaningful when + `mode` is `auto`; ignored otherwise. When omitted, the session's active model is used. + """ source: PermissionsSetAAllSource | None = None """Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers.""" @staticmethod def from_dict(obj: Any) -> 'PermissionsSetAllowAllRequest': assert isinstance(obj, dict) - enabled = from_bool(obj.get("enabled")) + enabled = from_union([from_bool, from_none], obj.get("enabled")) + mode = from_union([PermissionsAllowAllMode, from_none], obj.get("mode")) + model = from_union([from_str, from_none], obj.get("model")) source = from_union([PermissionsSetAAllSource, from_none], obj.get("source")) - return PermissionsSetAllowAllRequest(enabled, source) + return PermissionsSetAllowAllRequest(enabled, mode, model, source) def to_dict(self) -> dict: result: dict = {} - result["enabled"] = from_bool(self.enabled) + if self.enabled is not None: + result["enabled"] = from_union([from_bool, from_none], self.enabled) + if self.mode is not None: + result["mode"] = from_union([lambda x: to_enum(PermissionsAllowAllMode, x), from_none], self.mode) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) if self.source is not None: result["source"] = from_union([lambda x: to_enum(PermissionsSetAAllSource, x), from_none], self.source) return result @@ -22457,6 +23369,44 @@ def to_dict(self) -> dict: result["maxDepth"] = from_union([from_int, from_none], self.max_depth) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class TokenAuthInfo: + """Authentication-info variant for SDK-configured token authentication, carrying host and + the secret token value. + """ + 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) -> 'TokenAuthInfo': + 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 TokenAuthInfo(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 ToolsGetCurrentMetadataResult: @@ -22534,6 +23484,45 @@ def to_dict(self) -> dict: result["subagents"] = from_union([lambda x: to_class(SubagentSettings, x), from_none], self.subagents) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class UserAuthInfo: + """Authentication-info variant for OAuth user auth, with host and login; the token remains + in the runtime secret store. + """ + host: str + """Authentication host.""" + + login: str + """OAuth user login.""" + + type: ClassVar[str] = "user" + """OAuth user authentication. The token itself is held in the runtime's secret token store + (keyed by host+login) and is NOT carried in this struct. + """ + 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) -> 'UserAuthInfo': + assert isinstance(obj, dict) + host = from_str(obj.get("host")) + login = from_str(obj.get("login")) + copilot_user = from_union([CopilotUserResponse.from_dict, from_none], obj.get("copilotUser")) + return UserAuthInfo(host, login, copilot_user) + + def to_dict(self) -> dict: + result: dict = {} + result["host"] = from_str(self.host) + result["login"] = from_str(self.login) + 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 + @dataclass class RPC: abort_request: AbortRequest @@ -22627,6 +23616,17 @@ class RPC: copilot_user_response_quota_snapshots_premium_interactions: CopilotUserResponseQuotaSnapshotsPremiumInteractions current_model: CurrentModel current_tool_metadata: CurrentToolMetadata + debug_collect_logs_collected_entry: DebugCollectLogsCollectedEntry + debug_collect_logs_destination: DebugCollectLogsDestination + debug_collect_logs_entry: DebugCollectLogsEntry + debug_collect_logs_entry_kind: DebugCollectLogsEntryKind + debug_collect_logs_include: DebugCollectLogsInclude + debug_collect_logs_redaction: DebugCollectLogsRedaction + debug_collect_logs_request: DebugCollectLogsRequest + debug_collect_logs_result: DebugCollectLogsResult + debug_collect_logs_result_kind: DebugCollectLogsResultKind + debug_collect_logs_skipped_entry: DebugCollectLogsSkippedEntry + debug_collect_logs_source: DebugCollectLogsSource discovered_canvas: DiscoveredCanvas discovered_mcp_server: DiscoveredMCPServer discovered_mcp_server_type: DiscoveredMCPServerType @@ -22692,7 +23692,7 @@ class RPC: installed_plugin_source_local: InstalledPluginSourceLocal installed_plugin_source_url: InstalledPluginSourceURL instruction_discovery_path: InstructionDiscoveryPath - instruction_discovery_path_kind: InstructionDiscoveryPathKind + instruction_discovery_path_kind: DebugCollectLogsEntryKind instruction_discovery_path_list: InstructionDiscoveryPathList instruction_discovery_path_location: InstructionLocation instructions_discover_request: InstructionsDiscoverRequest @@ -22919,6 +23919,7 @@ class RPC: permission_prompt_shown_notification: PermissionPromptShownNotification permission_request_result: PermissionRequestResult permission_rules_set: PermissionRulesSet + permissions_allow_all_mode: PermissionsAllowAllMode permissions_configure_additional_content_exclusion_policy: PermissionsConfigureAdditionalContentExclusionPolicy permissions_configure_additional_content_exclusion_policy_rule: PermissionsConfigureAdditionalContentExclusionPolicyRule permissions_configure_additional_content_exclusion_policy_rule_source: PermissionsConfigureAdditionalContentExclusionPolicyRuleSource @@ -23093,7 +24094,7 @@ class RPC: session_fs_readdir_request: SessionFSReaddirRequest session_fs_readdir_result: SessionFSReaddirResult session_fs_readdir_with_types_entry: SessionFSReaddirWithTypesEntry - session_fs_readdir_with_types_entry_type: InstructionDiscoveryPathKind + session_fs_readdir_with_types_entry_type: DebugCollectLogsEntryKind session_fs_readdir_with_types_request: SessionFSReaddirWithTypesRequest session_fs_readdir_with_types_result: SessionFSReaddirWithTypesResult session_fs_read_file_request: SessionFSReadFileRequest @@ -23144,6 +24145,16 @@ class RPC: sessions_enrich_metadata_request: SessionsEnrichMetadataRequest session_set_credentials_params: SessionSetCredentialsParams session_set_credentials_result: SessionSetCredentialsResult + session_settings_built_in_tool_availability_snapshot: SessionSettingsBuiltInToolAvailabilitySnapshot + session_settings_evaluate_predicate_request: SessionSettingsEvaluatePredicateRequest + session_settings_evaluate_predicate_result: SessionSettingsEvaluatePredicateResult + session_settings_job_snapshot: SessionSettingsJobSnapshot + session_settings_model_snapshot: SessionSettingsModelSnapshot + session_settings_online_evaluation_snapshot: SessionSettingsOnlineEvaluationSnapshot + session_settings_predicate_name: SessionSettingsPredicateName + session_settings_repo_snapshot: SessionSettingsRepoSnapshot + session_settings_snapshot: SessionSettingsSnapshot + session_settings_validation_snapshot: SessionSettingsValidationSnapshot sessions_find_by_prefix_request: SessionsFindByPrefixRequest sessions_find_by_prefix_result: SessionsFindByPrefixResult sessions_find_by_task_id_request: SessionsFindByTaskIDRequest @@ -23437,6 +24448,17 @@ def from_dict(obj: Any) -> 'RPC': copilot_user_response_quota_snapshots_premium_interactions = CopilotUserResponseQuotaSnapshotsPremiumInteractions.from_dict(obj.get("CopilotUserResponseQuotaSnapshotsPremiumInteractions")) current_model = CurrentModel.from_dict(obj.get("CurrentModel")) current_tool_metadata = CurrentToolMetadata.from_dict(obj.get("CurrentToolMetadata")) + debug_collect_logs_collected_entry = DebugCollectLogsCollectedEntry.from_dict(obj.get("DebugCollectLogsCollectedEntry")) + debug_collect_logs_destination = DebugCollectLogsDestination.from_dict(obj.get("DebugCollectLogsDestination")) + debug_collect_logs_entry = DebugCollectLogsEntry.from_dict(obj.get("DebugCollectLogsEntry")) + debug_collect_logs_entry_kind = DebugCollectLogsEntryKind(obj.get("DebugCollectLogsEntryKind")) + debug_collect_logs_include = DebugCollectLogsInclude.from_dict(obj.get("DebugCollectLogsInclude")) + debug_collect_logs_redaction = DebugCollectLogsRedaction(obj.get("DebugCollectLogsRedaction")) + debug_collect_logs_request = DebugCollectLogsRequest.from_dict(obj.get("DebugCollectLogsRequest")) + debug_collect_logs_result = DebugCollectLogsResult.from_dict(obj.get("DebugCollectLogsResult")) + 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")) discovered_canvas = DiscoveredCanvas.from_dict(obj.get("DiscoveredCanvas")) discovered_mcp_server = DiscoveredMCPServer.from_dict(obj.get("DiscoveredMcpServer")) discovered_mcp_server_type = DiscoveredMCPServerType(obj.get("DiscoveredMcpServerType")) @@ -23502,7 +24524,7 @@ def from_dict(obj: Any) -> 'RPC': installed_plugin_source_local = InstalledPluginSourceLocal.from_dict(obj.get("InstalledPluginSourceLocal")) installed_plugin_source_url = InstalledPluginSourceURL.from_dict(obj.get("InstalledPluginSourceUrl")) instruction_discovery_path = InstructionDiscoveryPath.from_dict(obj.get("InstructionDiscoveryPath")) - instruction_discovery_path_kind = InstructionDiscoveryPathKind(obj.get("InstructionDiscoveryPathKind")) + instruction_discovery_path_kind = DebugCollectLogsEntryKind(obj.get("InstructionDiscoveryPathKind")) instruction_discovery_path_list = InstructionDiscoveryPathList.from_dict(obj.get("InstructionDiscoveryPathList")) instruction_discovery_path_location = InstructionLocation(obj.get("InstructionDiscoveryPathLocation")) instructions_discover_request = InstructionsDiscoverRequest.from_dict(obj.get("InstructionsDiscoverRequest")) @@ -23729,6 +24751,7 @@ def from_dict(obj: Any) -> 'RPC': permission_prompt_shown_notification = PermissionPromptShownNotification.from_dict(obj.get("PermissionPromptShownNotification")) permission_request_result = PermissionRequestResult.from_dict(obj.get("PermissionRequestResult")) permission_rules_set = PermissionRulesSet.from_dict(obj.get("PermissionRulesSet")) + permissions_allow_all_mode = PermissionsAllowAllMode(obj.get("PermissionsAllowAllMode")) permissions_configure_additional_content_exclusion_policy = PermissionsConfigureAdditionalContentExclusionPolicy.from_dict(obj.get("PermissionsConfigureAdditionalContentExclusionPolicy")) permissions_configure_additional_content_exclusion_policy_rule = PermissionsConfigureAdditionalContentExclusionPolicyRule.from_dict(obj.get("PermissionsConfigureAdditionalContentExclusionPolicyRule")) permissions_configure_additional_content_exclusion_policy_rule_source = PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.from_dict(obj.get("PermissionsConfigureAdditionalContentExclusionPolicyRuleSource")) @@ -23903,7 +24926,7 @@ def from_dict(obj: Any) -> 'RPC': session_fs_readdir_request = SessionFSReaddirRequest.from_dict(obj.get("SessionFsReaddirRequest")) session_fs_readdir_result = SessionFSReaddirResult.from_dict(obj.get("SessionFsReaddirResult")) session_fs_readdir_with_types_entry = SessionFSReaddirWithTypesEntry.from_dict(obj.get("SessionFsReaddirWithTypesEntry")) - session_fs_readdir_with_types_entry_type = InstructionDiscoveryPathKind(obj.get("SessionFsReaddirWithTypesEntryType")) + session_fs_readdir_with_types_entry_type = DebugCollectLogsEntryKind(obj.get("SessionFsReaddirWithTypesEntryType")) session_fs_readdir_with_types_request = SessionFSReaddirWithTypesRequest.from_dict(obj.get("SessionFsReaddirWithTypesRequest")) session_fs_readdir_with_types_result = SessionFSReaddirWithTypesResult.from_dict(obj.get("SessionFsReaddirWithTypesResult")) session_fs_read_file_request = SessionFSReadFileRequest.from_dict(obj.get("SessionFsReadFileRequest")) @@ -23954,6 +24977,16 @@ def from_dict(obj: Any) -> 'RPC': sessions_enrich_metadata_request = SessionsEnrichMetadataRequest.from_dict(obj.get("SessionsEnrichMetadataRequest")) session_set_credentials_params = SessionSetCredentialsParams.from_dict(obj.get("SessionSetCredentialsParams")) session_set_credentials_result = SessionSetCredentialsResult.from_dict(obj.get("SessionSetCredentialsResult")) + session_settings_built_in_tool_availability_snapshot = SessionSettingsBuiltInToolAvailabilitySnapshot.from_dict(obj.get("SessionSettingsBuiltInToolAvailabilitySnapshot")) + session_settings_evaluate_predicate_request = SessionSettingsEvaluatePredicateRequest.from_dict(obj.get("SessionSettingsEvaluatePredicateRequest")) + session_settings_evaluate_predicate_result = SessionSettingsEvaluatePredicateResult.from_dict(obj.get("SessionSettingsEvaluatePredicateResult")) + session_settings_job_snapshot = SessionSettingsJobSnapshot.from_dict(obj.get("SessionSettingsJobSnapshot")) + session_settings_model_snapshot = SessionSettingsModelSnapshot.from_dict(obj.get("SessionSettingsModelSnapshot")) + session_settings_online_evaluation_snapshot = SessionSettingsOnlineEvaluationSnapshot.from_dict(obj.get("SessionSettingsOnlineEvaluationSnapshot")) + session_settings_predicate_name = SessionSettingsPredicateName(obj.get("SessionSettingsPredicateName")) + session_settings_repo_snapshot = SessionSettingsRepoSnapshot.from_dict(obj.get("SessionSettingsRepoSnapshot")) + session_settings_snapshot = SessionSettingsSnapshot.from_dict(obj.get("SessionSettingsSnapshot")) + session_settings_validation_snapshot = SessionSettingsValidationSnapshot.from_dict(obj.get("SessionSettingsValidationSnapshot")) sessions_find_by_prefix_request = SessionsFindByPrefixRequest.from_dict(obj.get("SessionsFindByPrefixRequest")) sessions_find_by_prefix_result = SessionsFindByPrefixResult.from_dict(obj.get("SessionsFindByPrefixResult")) sessions_find_by_task_id_request = SessionsFindByTaskIDRequest.from_dict(obj.get("SessionsFindByTaskIDRequest")) @@ -24152,7 +25185,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_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, agents_get_discovery_paths_request, allow_all_permission_set_result, allow_all_permission_state, api_key_auth_info, auth_info, auth_info_type, cancel_user_requested_shell_command_result, canvas_action, canvas_action_invoke_request, canvas_action_invoke_result, canvas_close_request, canvas_host_context, canvas_host_context_capabilities, canvas_json_schema, canvas_list, canvas_list_open_result, canvas_open_request, canvas_provider_close_request, canvas_provider_invoke_action_request, canvas_provider_open_request, canvas_provider_open_result, canvas_session_context, capi_session_options, command_list, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, completions_get_trigger_characters_result, completions_request_request, completions_request_result, configure_session_extensions_params, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_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, discovered_canvas, discovered_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_result, execute_command_params, execute_command_result, extension, extension_context_push_input, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_shell_exit, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, filter_mapping, fleet_start_request, fleet_start_result, folder_trust_add_params, folder_trust_check_params, folder_trust_check_result, gh_cli_auth_info, 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_compact_context_window, history_compact_request, history_compact_result, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, installed_plugin, installed_plugin_info, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, 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, 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, marketplace_add_result, marketplace_browse_result, marketplace_info, marketplace_list_result, marketplace_plugin_info, marketplace_refresh_entry, marketplace_refresh_result, marketplace_remove_result, mcp_allowed_server, mcp_apps_call_tool_request, mcp_apps_diagnose_capability, mcp_apps_diagnose_request, mcp_apps_diagnose_result, mcp_apps_diagnose_server, mcp_apps_host_context, mcp_apps_host_context_details, mcp_apps_host_context_details_available_display_mode, mcp_apps_host_context_details_display_mode, mcp_apps_host_context_details_platform, mcp_apps_host_context_details_theme, mcp_apps_list_tools_request, mcp_apps_list_tools_result, mcp_apps_read_resource_request, mcp_apps_read_resource_result, mcp_apps_resource_content, mcp_apps_set_host_context_details, mcp_apps_set_host_context_details_available_display_mode, mcp_apps_set_host_context_details_display_mode, mcp_apps_set_host_context_details_platform, mcp_apps_set_host_context_details_theme, mcp_apps_set_host_context_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_configure_git_hub_request, mcp_configure_git_hub_result, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_filtered_server, mcp_headers_handle_pending_headers_refresh_request, mcp_headers_handle_pending_headers_refresh_request_request, mcp_headers_handle_pending_headers_refresh_request_result, mcp_host_state, mcp_is_server_running_request, mcp_is_server_running_result, mcp_list_tools_request, mcp_list_tools_result, mcp_oauth_handle_pending_request, mcp_oauth_handle_pending_result, mcp_oauth_login_grant_type, mcp_oauth_login_request, mcp_oauth_login_result, mcp_oauth_pending_request_response, mcp_oauth_respond_request, mcp_oauth_respond_result, mcp_register_external_client_request, mcp_reload_with_config_request, mcp_remove_git_hub_result, mcp_restart_server_request, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_auth_config, mcp_server_auth_config_redirect_port, mcp_server_config, mcp_server_config_defer_tools, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_failure_info, mcp_server_list, mcp_server_needs_auth_info, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, mcp_start_server_request, mcp_start_servers_result, mcp_stop_server_request, mcp_tools, mcp_unregister_external_client_request, memory_configuration, metadata_context_attribution_result, metadata_context_heaviest_messages_request, metadata_context_heaviest_messages_result, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_billing, model_billing_token_prices, model_billing_token_prices_long_context, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_list_request, model_picker_category, model_picker_price_category, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, named_provider_config, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, open_canvas_instance, options_update_additional_content_exclusion_policy, options_update_additional_content_exclusion_policy_rule, options_update_additional_content_exclusion_policy_rule_source, options_update_additional_content_exclusion_policy_scope, options_update_context_tier, options_update_env_value_mode, options_update_reasoning_summary, options_update_tool_filter_precedence, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_cancelled, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_reject, permission_decision_request, permission_decision_user_not_available, permission_location_add_tool_approval_params, permission_location_apply_params, permission_location_apply_result, permission_location_resolve_params, permission_location_resolve_result, permission_location_type, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_rules_set, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_folder_trust_add_trusted_result, permissions_get_allow_all_request, permissions_locations_add_tool_approval_details, permissions_locations_add_tool_approval_details_commands, permissions_locations_add_tool_approval_details_custom_tool, permissions_locations_add_tool_approval_details_extension_management, permissions_locations_add_tool_approval_details_extension_permission_access, permissions_locations_add_tool_approval_details_mcp, permissions_locations_add_tool_approval_details_mcp_sampling, permissions_locations_add_tool_approval_details_memory, permissions_locations_add_tool_approval_details_read, permissions_locations_add_tool_approval_details_write, permissions_locations_add_tool_approval_result, permissions_modify_rules_params, permissions_modify_rules_result, permissions_modify_rules_scope, permissions_notify_prompt_shown_result, permissions_paths_add_result, permissions_paths_list_request, permissions_paths_update_primary_result, permissions_pending_requests_request, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_allow_all_request, permissions_set_allow_all_source, permissions_set_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_read_sql_todos_result, plan_read_sql_todos_with_dependencies_result, plan_sql_todo_dependency, plan_sql_todos_row, plan_update_request, plugin, plugin_install_result, plugin_list, plugin_list_result, plugins_disable_request, plugins_enable_request, plugins_install_request, plugins_marketplaces_add_request, plugins_marketplaces_browse_request, plugins_marketplaces_refresh_request, plugins_marketplaces_remove_request, plugins_reload_request, plugins_uninstall_request, plugins_update_request, plugin_update_all_entry, plugin_update_all_result, plugin_update_result, provider_add_request, provider_add_result, provider_config, provider_config_azure, provider_config_transport, provider_config_type, provider_config_wire_api, provider_endpoint, provider_endpoint_transport, provider_endpoint_type, provider_endpoint_wire_api, provider_get_endpoint_request, provider_model_config, provider_session_token, provider_token_acquire_request, provider_token_acquire_result, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_actions_job, push_attachment_git_hub_commit, push_attachment_git_hub_file, push_attachment_git_hub_file_diff, push_attachment_git_hub_file_diff_side, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_git_hub_release, push_attachment_git_hub_repository, push_attachment_git_hub_snippet, push_attachment_git_hub_tree_comparison, push_attachment_git_hub_tree_comparison_side, push_attachment_git_hub_url, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, push_git_hub_repo_ref, queued_command_handled, queued_command_not_handled, queued_command_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_most_recent_result, register_event_interest_params, register_event_interest_result, register_extension_tools_params, register_extension_tools_result, release_event_interest_params, remote_control_config, remote_control_config_existing_mc_session, remote_control_status, remote_control_status_active, remote_control_status_connecting, remote_control_status_error, remote_control_status_off, remote_control_status_result, remote_control_stop_result, remote_control_transfer_result, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_metadata_repository, remote_session_metadata_task_type, remote_session_metadata_value, remote_session_mode, remote_session_repository, sandbox_config, sandbox_config_user_policy, sandbox_config_user_policy_experimental, sandbox_config_user_policy_experimental_seatbelt, sandbox_config_user_policy_filesystem, sandbox_config_user_policy_network, sandbox_config_user_policy_seatbelt, schedule_entry, schedule_list, schedule_stop_request, schedule_stop_result, secrets_add_filter_values_request, secrets_add_filter_values_result, send_agent_mode, send_attachments_to_message_params, send_mode, send_request, send_result, server_agent_list, server_instruction_source_list, server_skill, server_skill_list, session_activity, session_auth_status, session_bulk_delete_result, session_capability, 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_stat_request, session_fs_stat_result, session_fs_write_file_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_git_hub, session_installed_plugin_source_local, session_installed_plugin_source_url, session_list, session_list_entry, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_mcp_apps_call_tool_result, session_metadata_snapshot, session_mode, session_model_list, session_open_options, session_open_options_additional_content_exclusion_policy, session_open_options_additional_content_exclusion_policy_rule, session_open_options_additional_content_exclusion_policy_rule_source, session_open_options_additional_content_exclusion_policy_scope, session_open_options_env_value_mode, session_open_options_reasoning_summary, session_open_params, session_open_result, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, sessions_find_by_prefix_request, sessions_find_by_prefix_result, sessions_find_by_task_id_request, sessions_find_by_task_id_result, sessions_fork_request, sessions_fork_result, sessions_get_board_entry_count_request, sessions_get_board_entry_count_result, sessions_get_event_file_path_request, sessions_get_event_file_path_result, sessions_get_last_for_context_request, sessions_get_last_for_context_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_open_attach, sessions_open_cloud, sessions_open_create, sessions_open_handoff, sessions_open_handoff_task_type, sessions_open_progress, sessions_open_progress_status, sessions_open_progress_step, sessions_open_remote, sessions_open_resume, sessions_open_resume_last, sessions_open_status, session_source, sessions_prune_old_request, sessions_register_extension_tools_on_session_options, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, sessions_set_remote_control_steering_request, sessions_start_remote_control_request, sessions_stop_remote_control_request, sessions_transfer_remote_control_request, session_telemetry_engagement, session_update_options_params, session_update_options_result, session_visibility_status, session_working_directory_context, session_working_directory_context_host_type, shell_cancel_user_requested_request, shell_exec_request, shell_exec_result, shell_execute_user_requested_request, shell_kill_request, shell_kill_result, shell_kill_signal, shutdown_request, skill, skill_discovery_path, skill_discovery_path_list, skill_discovery_scope, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_discovery_paths_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_choice, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_select_subcommand_option, slash_command_select_subcommand_result, slash_command_text_result, subagent_settings_entry, subagent_settings_entry_context_tier, task_agent_info, task_agent_progress, task_execution_mode, task_info, task_list, task_progress_line, tasks_cancel_request, tasks_cancel_result, tasks_get_current_promotable_result, tasks_get_progress_request, tasks_get_progress_result, task_shell_info, task_shell_info_attachment_mode, task_shell_progress, tasks_promote_current_to_background_result, tasks_promote_to_background_request, tasks_promote_to_background_result, tasks_refresh_result, tasks_remove_request, tasks_remove_result, tasks_send_message_request, tasks_send_message_result, tasks_start_agent_request, tasks_start_agent_result, task_status, tasks_wait_for_pending_result, telemetry_set_feature_overrides_request, token_auth_info, tool, tool_list, tools_get_current_metadata_result, tools_initialize_and_validate_result, tools_list_request, tools_update_subagent_settings_result, ui_auto_mode_switch_response, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_ephemeral_query_request, ui_ephemeral_query_result, ui_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_session_limits_exhausted_request, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_session_limits_exhausted_response, ui_session_limits_exhausted_response_action, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, update_subagent_settings_request, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_requested_shell_command_result, user_setting_metadata, user_settings_get_result, user_settings_set_request, user_settings_set_result, visibility_get_result, visibility_set_request, visibility_set_result, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_diff_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, workspace_summary_host_type, workspaces_workspace_details_host_type, session_context_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_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, agents_get_discovery_paths_request, allow_all_permission_set_result, allow_all_permission_state, api_key_auth_info, auth_info, auth_info_type, cancel_user_requested_shell_command_result, canvas_action, canvas_action_invoke_request, canvas_action_invoke_result, canvas_close_request, canvas_host_context, canvas_host_context_capabilities, canvas_json_schema, canvas_list, canvas_list_open_result, canvas_open_request, canvas_provider_close_request, canvas_provider_invoke_action_request, canvas_provider_open_request, canvas_provider_open_result, canvas_session_context, capi_session_options, command_list, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, completions_get_trigger_characters_result, completions_request_request, completions_request_result, configure_session_extensions_params, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_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_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_result, execute_command_params, execute_command_result, extension, extension_context_push_input, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_shell_exit, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, filter_mapping, fleet_start_request, fleet_start_result, folder_trust_add_params, folder_trust_check_params, folder_trust_check_result, gh_cli_auth_info, 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_compact_context_window, history_compact_request, history_compact_result, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, installed_plugin, installed_plugin_info, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, 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, 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, marketplace_add_result, marketplace_browse_result, marketplace_info, marketplace_list_result, marketplace_plugin_info, marketplace_refresh_entry, marketplace_refresh_result, marketplace_remove_result, mcp_allowed_server, mcp_apps_call_tool_request, mcp_apps_diagnose_capability, mcp_apps_diagnose_request, mcp_apps_diagnose_result, mcp_apps_diagnose_server, mcp_apps_host_context, mcp_apps_host_context_details, mcp_apps_host_context_details_available_display_mode, mcp_apps_host_context_details_display_mode, mcp_apps_host_context_details_platform, mcp_apps_host_context_details_theme, mcp_apps_list_tools_request, mcp_apps_list_tools_result, mcp_apps_read_resource_request, mcp_apps_read_resource_result, mcp_apps_resource_content, mcp_apps_set_host_context_details, mcp_apps_set_host_context_details_available_display_mode, mcp_apps_set_host_context_details_display_mode, mcp_apps_set_host_context_details_platform, mcp_apps_set_host_context_details_theme, mcp_apps_set_host_context_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_configure_git_hub_request, mcp_configure_git_hub_result, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_filtered_server, mcp_headers_handle_pending_headers_refresh_request, mcp_headers_handle_pending_headers_refresh_request_request, mcp_headers_handle_pending_headers_refresh_request_result, mcp_host_state, mcp_is_server_running_request, mcp_is_server_running_result, mcp_list_tools_request, mcp_list_tools_result, mcp_oauth_handle_pending_request, mcp_oauth_handle_pending_result, mcp_oauth_login_grant_type, mcp_oauth_login_request, mcp_oauth_login_result, mcp_oauth_pending_request_response, mcp_oauth_respond_request, mcp_oauth_respond_result, mcp_register_external_client_request, mcp_reload_with_config_request, mcp_remove_git_hub_result, mcp_restart_server_request, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_auth_config, mcp_server_auth_config_redirect_port, mcp_server_config, mcp_server_config_defer_tools, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_failure_info, mcp_server_list, mcp_server_needs_auth_info, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, mcp_start_server_request, mcp_start_servers_result, mcp_stop_server_request, mcp_tools, mcp_unregister_external_client_request, memory_configuration, metadata_context_attribution_result, metadata_context_heaviest_messages_request, metadata_context_heaviest_messages_result, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_billing, model_billing_token_prices, model_billing_token_prices_long_context, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_list_request, model_picker_category, model_picker_price_category, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, named_provider_config, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, open_canvas_instance, options_update_additional_content_exclusion_policy, options_update_additional_content_exclusion_policy_rule, options_update_additional_content_exclusion_policy_rule_source, options_update_additional_content_exclusion_policy_scope, options_update_context_tier, options_update_env_value_mode, options_update_reasoning_summary, options_update_tool_filter_precedence, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_cancelled, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_reject, permission_decision_request, permission_decision_user_not_available, permission_location_add_tool_approval_params, permission_location_apply_params, permission_location_apply_result, permission_location_resolve_params, permission_location_resolve_result, permission_location_type, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_rules_set, permissions_allow_all_mode, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_folder_trust_add_trusted_result, permissions_get_allow_all_request, permissions_locations_add_tool_approval_details, permissions_locations_add_tool_approval_details_commands, permissions_locations_add_tool_approval_details_custom_tool, permissions_locations_add_tool_approval_details_extension_management, permissions_locations_add_tool_approval_details_extension_permission_access, permissions_locations_add_tool_approval_details_mcp, permissions_locations_add_tool_approval_details_mcp_sampling, permissions_locations_add_tool_approval_details_memory, permissions_locations_add_tool_approval_details_read, permissions_locations_add_tool_approval_details_write, permissions_locations_add_tool_approval_result, permissions_modify_rules_params, permissions_modify_rules_result, permissions_modify_rules_scope, permissions_notify_prompt_shown_result, permissions_paths_add_result, permissions_paths_list_request, permissions_paths_update_primary_result, permissions_pending_requests_request, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_allow_all_request, permissions_set_allow_all_source, permissions_set_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_read_sql_todos_result, plan_read_sql_todos_with_dependencies_result, plan_sql_todo_dependency, plan_sql_todos_row, plan_update_request, plugin, plugin_install_result, plugin_list, plugin_list_result, plugins_disable_request, plugins_enable_request, plugins_install_request, plugins_marketplaces_add_request, plugins_marketplaces_browse_request, plugins_marketplaces_refresh_request, plugins_marketplaces_remove_request, plugins_reload_request, plugins_uninstall_request, plugins_update_request, plugin_update_all_entry, plugin_update_all_result, plugin_update_result, provider_add_request, provider_add_result, provider_config, provider_config_azure, provider_config_transport, provider_config_type, provider_config_wire_api, provider_endpoint, provider_endpoint_transport, provider_endpoint_type, provider_endpoint_wire_api, provider_get_endpoint_request, provider_model_config, provider_session_token, provider_token_acquire_request, provider_token_acquire_result, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_actions_job, push_attachment_git_hub_commit, push_attachment_git_hub_file, push_attachment_git_hub_file_diff, push_attachment_git_hub_file_diff_side, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_git_hub_release, push_attachment_git_hub_repository, push_attachment_git_hub_snippet, push_attachment_git_hub_tree_comparison, push_attachment_git_hub_tree_comparison_side, push_attachment_git_hub_url, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, push_git_hub_repo_ref, queued_command_handled, queued_command_not_handled, queued_command_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_most_recent_result, register_event_interest_params, register_event_interest_result, register_extension_tools_params, register_extension_tools_result, release_event_interest_params, remote_control_config, remote_control_config_existing_mc_session, remote_control_status, remote_control_status_active, remote_control_status_connecting, remote_control_status_error, remote_control_status_off, remote_control_status_result, remote_control_stop_result, remote_control_transfer_result, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_metadata_repository, remote_session_metadata_task_type, remote_session_metadata_value, remote_session_mode, remote_session_repository, sandbox_config, sandbox_config_user_policy, sandbox_config_user_policy_experimental, sandbox_config_user_policy_experimental_seatbelt, sandbox_config_user_policy_filesystem, sandbox_config_user_policy_network, sandbox_config_user_policy_seatbelt, schedule_entry, schedule_list, schedule_stop_request, schedule_stop_result, secrets_add_filter_values_request, secrets_add_filter_values_result, send_agent_mode, send_attachments_to_message_params, send_mode, send_request, send_result, server_agent_list, server_instruction_source_list, server_skill, server_skill_list, session_activity, session_auth_status, session_bulk_delete_result, session_capability, 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_stat_request, session_fs_stat_result, session_fs_write_file_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_git_hub, session_installed_plugin_source_local, session_installed_plugin_source_url, session_list, session_list_entry, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_mcp_apps_call_tool_result, session_metadata_snapshot, session_mode, session_model_list, session_open_options, session_open_options_additional_content_exclusion_policy, session_open_options_additional_content_exclusion_policy_rule, session_open_options_additional_content_exclusion_policy_rule_source, session_open_options_additional_content_exclusion_policy_scope, session_open_options_env_value_mode, session_open_options_reasoning_summary, session_open_params, session_open_result, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, 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_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_open_attach, sessions_open_cloud, sessions_open_create, sessions_open_handoff, sessions_open_handoff_task_type, sessions_open_progress, sessions_open_progress_status, sessions_open_progress_step, sessions_open_remote, sessions_open_resume, sessions_open_resume_last, sessions_open_status, session_source, sessions_prune_old_request, sessions_register_extension_tools_on_session_options, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, sessions_set_remote_control_steering_request, sessions_start_remote_control_request, sessions_stop_remote_control_request, sessions_transfer_remote_control_request, session_telemetry_engagement, session_update_options_params, session_update_options_result, session_visibility_status, session_working_directory_context, session_working_directory_context_host_type, shell_cancel_user_requested_request, shell_exec_request, shell_exec_result, shell_execute_user_requested_request, shell_kill_request, shell_kill_result, shell_kill_signal, shutdown_request, skill, skill_discovery_path, skill_discovery_path_list, skill_discovery_scope, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_discovery_paths_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_choice, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_select_subcommand_option, slash_command_select_subcommand_result, slash_command_text_result, subagent_settings_entry, subagent_settings_entry_context_tier, task_agent_info, task_agent_progress, task_execution_mode, task_info, task_list, task_progress_line, tasks_cancel_request, tasks_cancel_result, tasks_get_current_promotable_result, tasks_get_progress_request, tasks_get_progress_result, task_shell_info, task_shell_info_attachment_mode, task_shell_progress, tasks_promote_current_to_background_result, tasks_promote_to_background_request, tasks_promote_to_background_result, tasks_refresh_result, tasks_remove_request, tasks_remove_result, tasks_send_message_request, tasks_send_message_result, tasks_start_agent_request, tasks_start_agent_result, task_status, tasks_wait_for_pending_result, telemetry_set_feature_overrides_request, token_auth_info, tool, tool_list, tools_get_current_metadata_result, tools_initialize_and_validate_result, tools_list_request, tools_update_subagent_settings_result, ui_auto_mode_switch_response, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_ephemeral_query_request, ui_ephemeral_query_result, ui_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_session_limits_exhausted_request, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_session_limits_exhausted_response, ui_session_limits_exhausted_response_action, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, update_subagent_settings_request, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_requested_shell_command_result, user_setting_metadata, user_settings_get_result, user_settings_set_request, user_settings_set_result, visibility_get_result, visibility_set_request, visibility_set_result, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_diff_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, workspace_summary_host_type, workspaces_workspace_details_host_type, session_context_attribution, session_context_info, subagent_settings, task_progress, workspace_summary) def to_dict(self) -> dict: result: dict = {} @@ -24247,6 +25280,17 @@ def to_dict(self) -> dict: result["CopilotUserResponseQuotaSnapshotsPremiumInteractions"] = to_class(CopilotUserResponseQuotaSnapshotsPremiumInteractions, self.copilot_user_response_quota_snapshots_premium_interactions) result["CurrentModel"] = to_class(CurrentModel, self.current_model) result["CurrentToolMetadata"] = to_class(CurrentToolMetadata, self.current_tool_metadata) + result["DebugCollectLogsCollectedEntry"] = to_class(DebugCollectLogsCollectedEntry, self.debug_collect_logs_collected_entry) + result["DebugCollectLogsDestination"] = to_class(DebugCollectLogsDestination, self.debug_collect_logs_destination) + result["DebugCollectLogsEntry"] = to_class(DebugCollectLogsEntry, self.debug_collect_logs_entry) + result["DebugCollectLogsEntryKind"] = to_enum(DebugCollectLogsEntryKind, self.debug_collect_logs_entry_kind) + result["DebugCollectLogsInclude"] = to_class(DebugCollectLogsInclude, self.debug_collect_logs_include) + result["DebugCollectLogsRedaction"] = to_enum(DebugCollectLogsRedaction, self.debug_collect_logs_redaction) + result["DebugCollectLogsRequest"] = to_class(DebugCollectLogsRequest, self.debug_collect_logs_request) + result["DebugCollectLogsResult"] = to_class(DebugCollectLogsResult, self.debug_collect_logs_result) + 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["DiscoveredCanvas"] = to_class(DiscoveredCanvas, self.discovered_canvas) result["DiscoveredMcpServer"] = to_class(DiscoveredMCPServer, self.discovered_mcp_server) result["DiscoveredMcpServerType"] = to_enum(DiscoveredMCPServerType, self.discovered_mcp_server_type) @@ -24312,7 +25356,7 @@ def to_dict(self) -> dict: result["InstalledPluginSourceLocal"] = to_class(InstalledPluginSourceLocal, self.installed_plugin_source_local) result["InstalledPluginSourceUrl"] = to_class(InstalledPluginSourceURL, self.installed_plugin_source_url) result["InstructionDiscoveryPath"] = to_class(InstructionDiscoveryPath, self.instruction_discovery_path) - result["InstructionDiscoveryPathKind"] = to_enum(InstructionDiscoveryPathKind, self.instruction_discovery_path_kind) + result["InstructionDiscoveryPathKind"] = to_enum(DebugCollectLogsEntryKind, self.instruction_discovery_path_kind) result["InstructionDiscoveryPathList"] = to_class(InstructionDiscoveryPathList, self.instruction_discovery_path_list) result["InstructionDiscoveryPathLocation"] = to_enum(InstructionLocation, self.instruction_discovery_path_location) result["InstructionsDiscoverRequest"] = to_class(InstructionsDiscoverRequest, self.instructions_discover_request) @@ -24539,6 +25583,7 @@ def to_dict(self) -> dict: result["PermissionPromptShownNotification"] = to_class(PermissionPromptShownNotification, self.permission_prompt_shown_notification) result["PermissionRequestResult"] = to_class(PermissionRequestResult, self.permission_request_result) result["PermissionRulesSet"] = to_class(PermissionRulesSet, self.permission_rules_set) + result["PermissionsAllowAllMode"] = to_enum(PermissionsAllowAllMode, self.permissions_allow_all_mode) result["PermissionsConfigureAdditionalContentExclusionPolicy"] = to_class(PermissionsConfigureAdditionalContentExclusionPolicy, self.permissions_configure_additional_content_exclusion_policy) result["PermissionsConfigureAdditionalContentExclusionPolicyRule"] = to_class(PermissionsConfigureAdditionalContentExclusionPolicyRule, self.permissions_configure_additional_content_exclusion_policy_rule) result["PermissionsConfigureAdditionalContentExclusionPolicyRuleSource"] = to_class(PermissionsConfigureAdditionalContentExclusionPolicyRuleSource, self.permissions_configure_additional_content_exclusion_policy_rule_source) @@ -24713,7 +25758,7 @@ def to_dict(self) -> dict: result["SessionFsReaddirRequest"] = to_class(SessionFSReaddirRequest, self.session_fs_readdir_request) result["SessionFsReaddirResult"] = to_class(SessionFSReaddirResult, self.session_fs_readdir_result) result["SessionFsReaddirWithTypesEntry"] = to_class(SessionFSReaddirWithTypesEntry, self.session_fs_readdir_with_types_entry) - result["SessionFsReaddirWithTypesEntryType"] = to_enum(InstructionDiscoveryPathKind, self.session_fs_readdir_with_types_entry_type) + result["SessionFsReaddirWithTypesEntryType"] = to_enum(DebugCollectLogsEntryKind, self.session_fs_readdir_with_types_entry_type) result["SessionFsReaddirWithTypesRequest"] = to_class(SessionFSReaddirWithTypesRequest, self.session_fs_readdir_with_types_request) result["SessionFsReaddirWithTypesResult"] = to_class(SessionFSReaddirWithTypesResult, self.session_fs_readdir_with_types_result) result["SessionFsReadFileRequest"] = to_class(SessionFSReadFileRequest, self.session_fs_read_file_request) @@ -24764,6 +25809,16 @@ def to_dict(self) -> dict: result["SessionsEnrichMetadataRequest"] = to_class(SessionsEnrichMetadataRequest, self.sessions_enrich_metadata_request) result["SessionSetCredentialsParams"] = to_class(SessionSetCredentialsParams, self.session_set_credentials_params) result["SessionSetCredentialsResult"] = to_class(SessionSetCredentialsResult, self.session_set_credentials_result) + result["SessionSettingsBuiltInToolAvailabilitySnapshot"] = to_class(SessionSettingsBuiltInToolAvailabilitySnapshot, self.session_settings_built_in_tool_availability_snapshot) + result["SessionSettingsEvaluatePredicateRequest"] = to_class(SessionSettingsEvaluatePredicateRequest, self.session_settings_evaluate_predicate_request) + result["SessionSettingsEvaluatePredicateResult"] = to_class(SessionSettingsEvaluatePredicateResult, self.session_settings_evaluate_predicate_result) + result["SessionSettingsJobSnapshot"] = to_class(SessionSettingsJobSnapshot, self.session_settings_job_snapshot) + result["SessionSettingsModelSnapshot"] = to_class(SessionSettingsModelSnapshot, self.session_settings_model_snapshot) + result["SessionSettingsOnlineEvaluationSnapshot"] = to_class(SessionSettingsOnlineEvaluationSnapshot, self.session_settings_online_evaluation_snapshot) + result["SessionSettingsPredicateName"] = to_enum(SessionSettingsPredicateName, self.session_settings_predicate_name) + result["SessionSettingsRepoSnapshot"] = to_class(SessionSettingsRepoSnapshot, self.session_settings_repo_snapshot) + result["SessionSettingsSnapshot"] = to_class(SessionSettingsSnapshot, self.session_settings_snapshot) + result["SessionSettingsValidationSnapshot"] = to_class(SessionSettingsValidationSnapshot, self.session_settings_validation_snapshot) result["SessionsFindByPrefixRequest"] = to_class(SessionsFindByPrefixRequest, self.sessions_find_by_prefix_request) result["SessionsFindByPrefixResult"] = to_class(SessionsFindByPrefixResult, self.sessions_find_by_prefix_result) result["SessionsFindByTaskIDRequest"] = to_class(SessionsFindByTaskIDRequest, self.sessions_find_by_task_id_request) @@ -25093,7 +26148,7 @@ def _load_PermissionsLocationsAddToolApprovalDetails(obj: Any) -> "PermissionsLo case "extension-permission-access": return PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess.from_dict(obj) case _: raise ValueError(f"Unknown PermissionsLocationsAddToolApprovalDetails kind: {kind!r}") -# Schema for the `PushAttachment` type. +# Attachment union accepted by push input, covering files, directories, GitHub objects, blobs, snippets, and extension context. PushAttachment = PushAttachmentFile | PushAttachmentDirectory | PushAttachmentSelection | PushAttachmentGitHubReference | PushAttachmentGitHubCommit | PushAttachmentGitHubRelease | PushAttachmentGitHubActionsJob | PushAttachmentGitHubRepository | PushAttachmentGitHubFileDiff | PushAttachmentGitHubTreeComparison | PushAttachmentGitHubURL | PushAttachmentGitHubFile | PushAttachmentGitHubSnippet | PushAttachmentBlob | ExtensionContextPushInput def _load_PushAttachment(obj: Any) -> "PushAttachment": @@ -25181,7 +26236,7 @@ def _load_SlashCommandInvocationResult(obj: Any) -> "SlashCommandInvocationResul case "select-subcommand": return SlashCommandSelectSubcommandResult.from_dict(obj) case _: raise ValueError(f"Unknown SlashCommandInvocationResult kind: {kind!r}") -# Schema for the `TaskInfo` type. +# Tracked task union returned by task APIs, containing either an agent task or a shell task. TaskInfo = TaskAgentInfo | TaskShellInfo def _load_TaskInfo(obj: Any) -> "TaskInfo": @@ -25199,6 +26254,7 @@ def _load_TaskInfo(obj: Any) -> "TaskInfo": ExternalToolResult = ExternalToolTextResultForLlm ExternalToolTextResultForLlmContentResourceLinkIconTheme = Theme FilterMapping = dict +InstructionDiscoveryPathKind = DebugCollectLogsEntryKind InstructionDiscoveryPathLocation = InstructionLocation InstructionSourceLocation = InstructionLocation LlmInferenceHeaders = dict @@ -25229,7 +26285,7 @@ def _load_TaskInfo(obj: Any) -> "TaskInfo": ProviderEndpointWireApi = ProviderWireAPI RemoteSessionMetadataTaskType = TaskType SessionContextHostType = HostType -SessionFsReaddirWithTypesEntryType = InstructionDiscoveryPathKind +SessionFsReaddirWithTypesEntryType = DebugCollectLogsEntryKind SessionMcpAppsCallToolResult = dict SessionOpenOptionsAdditionalContentExclusionPolicyScope = AdditionalContentExclusionPolicyScope SessionOpenOptionsEnvValueMode = MCPSetEnvValueModeDetails @@ -25773,7 +26829,7 @@ def __init__(self, client: "JsonRpcClient"): self.sessions = _InternalServerSessionsApi(client) async def _connect(self, params: _ConnectRequest, *, timeout: float | None = None) -> _ConnectResult: - "Performs the SDK server connection handshake and validates the optional connection token. Marked internal because this is JSON-RPC transport plumbing invoked automatically by an SDK client's own `connect()` wrapper, not a user-facing method. Stays internal as long as the SDK client owns the handshake; would only become public if the SDK ever exposed the raw schema surface to consumers without a connection wrapper.\n\nArgs:\n params: Optional connection token presented by the SDK client during the handshake.\n\nReturns:\n Handshake result reporting the server's protocol version and package version on success.\n\n.. warning:: This API is experimental and may change or be removed in future versions.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + "Performs the SDK server connection handshake and validates the optional connection token. Marked internal because this is JSON-RPC transport plumbing invoked automatically by an SDK client's own `connect()` wrapper, not a user-facing method. Stays internal as long as the SDK client owns the handshake; would only become public if the SDK ever exposed the raw schema surface to consumers without a connection wrapper.\n\nArgs:\n params: Parameters for the `server.connect` handshake: an optional connection token and optional connection-level opt-ins (e.g. GitHub telemetry forwarding).\n\nReturns:\n Handshake result reporting the server's protocol version and package version on success.\n\n.. warning:: This API is experimental and may change or be removed in future versions.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." params_dict = {k: v for k, v in params.to_dict().items() if v is not None} return _ConnectResult.from_dict(await self._client.request("connect", params_dict, **_timeout_kwargs(timeout))) @@ -25795,6 +26851,19 @@ async def set_credentials(self, params: SessionSetCredentialsParams, *, timeout: return SessionSetCredentialsResult.from_dict(await self._client.request("session.gitHubAuth.setCredentials", params_dict, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. +class DebugApi: + def __init__(self, client: "JsonRpcClient", session_id: str): + self._client = client + self._session_id = session_id + + async def collect_logs(self, params: DebugCollectLogsRequest, *, timeout: float | None = None) -> DebugCollectLogsResult: + "Collects a redacted session debug log bundle into a local archive or staging directory. The runtime includes session-owned logs by default and accepts caller-provided diagnostic entries so host applications can add their own files without changing this API shape.\n\nArgs:\n params: Options for collecting a redacted session debug bundle.\n\nReturns:\n Result of collecting a redacted debug bundle." + 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 DebugCollectLogsResult.from_dict(await self._client.request("session.debug.collectLogs", params_dict, **_timeout_kwargs(timeout))) + + # Experimental: this API group is experimental and may change or be removed. class CanvasActionApi: def __init__(self, client: "JsonRpcClient", session_id: str): @@ -26666,13 +27735,13 @@ async def set_approve_all(self, params: PermissionsSetApproveAllRequest, *, time return PermissionsSetApproveAllResult.from_dict(await self._client.request("session.permissions.setApproveAll", params_dict, **_timeout_kwargs(timeout))) async def set_allow_all(self, params: PermissionsSetAllowAllRequest, *, timeout: float | None = None) -> AllowAllPermissionSetResult: - "Enables or disables full allow-all permissions (tools, paths, and URLs) for the session. Used by attach-mode clients (e.g. LocalRpcSession's `/allow-all` forwarder) to flip the target session's permission state. Unlike `setApproveAll`, this swaps in the unrestricted path and URL managers and emits `session.permissions_changed` on transition. The result returns the authoritative post-mutation state so callers can update their local mirrors without racing the `session.permissions_changed` notification on the same wire.\n\nArgs:\n params: Whether to enable full allow-all permissions for the session.\n\nReturns:\n Indicates whether the operation succeeded and reports the post-mutation state." + "Sets the allow-all permission mode for the session. Used by attach-mode clients (e.g. LocalRpcSession's `/allow-all` forwarder) to flip the target session's permission state. The `on` mode swaps in unrestricted path and URL managers and emits `session.permissions_changed` on transition; the `auto` mode keeps normal prompt paths active while attaching LLM safety recommendations. The result returns the authoritative post-mutation state so callers can update their local mirrors without racing the `session.permissions_changed` notification on the same wire.\n\nArgs:\n params: Allow-all mode to apply for the session.\n\nReturns:\n Indicates whether the operation succeeded and reports the post-mutation state." 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 AllowAllPermissionSetResult.from_dict(await self._client.request("session.permissions.setAllowAll", params_dict, **_timeout_kwargs(timeout))) async def get_allow_all(self, *, timeout: float | None = None) -> AllowAllPermissionState: - "Returns whether full allow-all permissions are currently active for the session.\n\nReturns:\n Current full allow-all permission state." + "Returns the current allow-all permission mode for the session.\n\nReturns:\n Current allow-all permission mode." return AllowAllPermissionState.from_dict(await self._client.request("session.permissions.getAllowAll", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) async def modify_rules(self, params: PermissionsModifyRulesParams, *, timeout: float | None = None) -> PermissionsModifyRulesResult: @@ -26935,6 +28004,7 @@ def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client self._session_id = session_id self.git_hub_auth = GitHubAuthApi(client, session_id) + self.debug = DebugApi(client, session_id) self.canvas = CanvasApi(client, session_id) self.model = ModelApi(client, session_id) self.mode = ModeApi(client, session_id) @@ -27054,12 +28124,30 @@ async def _unregister_external_client(self, params: MCPUnregisterExternalClientR await self._client.request("session.mcp.unregisterExternalClient", params_dict, **_timeout_kwargs(timeout)) +# Experimental: this API group is experimental and may change or be removed. +class _InternalSettingsApi: + def __init__(self, client: "JsonRpcClient", session_id: str): + self._client = client + self._session_id = session_id + + async def _snapshot(self, *, timeout: float | None = None) -> SessionSettingsSnapshot: + "Returns a redacted snapshot of session runtime settings, with secrets and raw feature flags excluded. Internal: the runtime settings shape is a runtime-internal surface and is deliberately kept out of the public SDK, because consumers should not depend on the runtime's internal settings layout. It remains callable in-process and is expected to be reworked as the runtime internals are consolidated.\n\nReturns:\n Redacted, serializable view of session runtime settings for SDK boundary consumers. Secrets and raw feature flags are intentionally excluded.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + return SessionSettingsSnapshot.from_dict(await self._client.request("session.settings.snapshot", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + + async def _evaluate_predicate(self, params: SessionSettingsEvaluatePredicateRequest, *, timeout: float | None = None) -> SessionSettingsEvaluatePredicateResult: + "Evaluates a named Rust-owned settings predicate without exposing raw feature flags. Internal: the raw feature-flag names and composition are runtime-internal, so this predicate-evaluation helper is kept out of the public SDK surface and is callable in-process only.\n\nArgs:\n params: Named Rust-owned settings predicate to evaluate for this session.\n\nReturns:\n Result of evaluating a Rust-owned settings predicate.\n\n:meta private:\n\nInternal SDK API; not part of the public surface." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + return SessionSettingsEvaluatePredicateResult.from_dict(await self._client.request("session.settings.evaluatePredicate", params_dict, **_timeout_kwargs(timeout))) + + class _InternalSessionRpc: """Internal SDK session-scoped RPC methods. Not part of the public API.""" def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client self._session_id = session_id self.mcp = _InternalMcpApi(client, session_id) + self.settings = _InternalSettingsApi(client, session_id) # Experimental: this API group is experimental and may change or be removed. @@ -27255,7 +28343,7 @@ async def http_request_chunk(self, params: LlmInferenceHTTPRequestChunkRequest) # Experimental: this API group is experimental and may change or be removed. class GitHubTelemetryHandler(Protocol): async def event(self, params: GitHubTelemetryNotification) -> None: - "Forwards a single GitHub telemetry event to a host connection that opted into telemetry forwarding for the session.\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 for the session." + "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 @dataclass @@ -27402,6 +28490,18 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "CopilotUserResponseQuotaSnapshotsPremiumInteractions", "CurrentModel", "CurrentToolMetadata", + "DebugApi", + "DebugCollectLogsCollectedEntry", + "DebugCollectLogsDestination", + "DebugCollectLogsEntry", + "DebugCollectLogsEntryKind", + "DebugCollectLogsInclude", + "DebugCollectLogsRedaction", + "DebugCollectLogsRequest", + "DebugCollectLogsResult", + "DebugCollectLogsResultKind", + "DebugCollectLogsSkippedEntry", + "DebugCollectLogsSource", "DiscoveredCanvas", "DiscoveredMCPServer", "DiscoveredMCPServerType", @@ -27761,6 +28861,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "PermissionRulesSet", "PermissionUrlsConfig", "PermissionUrlsSetUnrestrictedModeParams", + "PermissionsAllowAllMode", "PermissionsApi", "PermissionsConfigureAdditionalContentExclusionPolicy", "PermissionsConfigureAdditionalContentExclusionPolicyRule", @@ -28039,6 +29140,16 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "SessionRpc", "SessionSetCredentialsParams", "SessionSetCredentialsResult", + "SessionSettingsBuiltInToolAvailabilitySnapshot", + "SessionSettingsEvaluatePredicateRequest", + "SessionSettingsEvaluatePredicateResult", + "SessionSettingsJobSnapshot", + "SessionSettingsModelSnapshot", + "SessionSettingsOnlineEvaluationSnapshot", + "SessionSettingsPredicateName", + "SessionSettingsRepoSnapshot", + "SessionSettingsSnapshot", + "SessionSettingsValidationSnapshot", "SessionSizes", "SessionSource", "SessionTelemetryEngagement", diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py index 8dca9a511..59351d30f 100644 --- a/python/copilot/generated/session_events.py +++ b/python/copilot/generated/session_events.py @@ -423,7 +423,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CanvasRegistryChangedCanvas: - "Schema for the `CanvasRegistryChangedCanvas` type." + "A single canvas declaration in `session.canvas.registry_changed`, including provider IDs, display metadata, input schema, and actions." canvas_id: str description: str display_name: str @@ -470,7 +470,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CanvasRegistryChangedCanvasAction: - "Schema for the `CanvasRegistryChangedCanvasAction` type." + "A single action within a canvas declaration, with its name, optional description, and optional input schema." name: str description: str | None = None input_schema: Any = None @@ -782,10 +782,35 @@ def to_dict(self) -> dict: return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionAutoApproval: + "Auto-approval judge information attached to a permission request. Present (non-null) only when the session's allow-all mode is \"auto\"; its absence means auto mode was off and the judge did not evaluate the request. The `recommendation` conveys the judge's disposition for this request." + recommendation: AutoApprovalRecommendation + reason: str | None = None + + @staticmethod + def from_dict(obj: Any) -> "PermissionAutoApproval": + assert isinstance(obj, dict) + recommendation = parse_enum(AutoApprovalRecommendation, obj.get("recommendation")) + reason = from_union([from_none, from_str], obj.get("reason")) + return PermissionAutoApproval( + recommendation=recommendation, + reason=reason, + ) + + def to_dict(self) -> dict: + result: dict = {} + result["recommendation"] = to_enum(AutoApprovalRecommendation, self.recommendation) + if self.reason is not None: + result["reason"] = from_union([from_none, from_str], self.reason) + return result + + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionCanvasClosedData: - "Schema for the `CanvasClosedData` type." + "Payload of `session.canvas.closed` with the closed canvas instance ID, provider ID, and canvas ID." canvas_id: str extension_id: str instance_id: str @@ -813,7 +838,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionCanvasOpenedData: - "Schema for the `CanvasOpenedData` type." + "Payload of `session.canvas.opened` with canvas instance and provider IDs plus optional title, status, URL, and input." canvas_id: str extension_id: str instance_id: str @@ -904,7 +929,7 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionCanvasRegistryChangedData: - "Schema for the `CanvasRegistryChangedData` type." + "Payload of `session.canvas.registry_changed` listing the canvas declarations currently available." canvases: list[CanvasRegistryChangedCanvas] @staticmethod @@ -1315,18 +1340,23 @@ def to_dict(self) -> dict: class AssistantTurnEndData: "Turn completion metadata including the turn identifier" turn_id: str + model: str | None = None @staticmethod def from_dict(obj: Any) -> "AssistantTurnEndData": assert isinstance(obj, dict) turn_id = from_str(obj.get("turnId")) + model = from_union([from_none, from_str], obj.get("model")) return AssistantTurnEndData( turn_id=turn_id, + model=model, ) def to_dict(self) -> dict: result: dict = {} result["turnId"] = from_str(self.turn_id) + if self.model is not None: + result["model"] = from_union([from_none, from_str], self.model) return result @@ -1335,15 +1365,18 @@ class AssistantTurnStartData: "Turn initialization metadata including identifier and interaction tracking" turn_id: str interaction_id: str | None = None + model: str | None = None @staticmethod def from_dict(obj: Any) -> "AssistantTurnStartData": assert isinstance(obj, dict) turn_id = from_str(obj.get("turnId")) interaction_id = from_union([from_none, from_str], obj.get("interactionId")) + model = from_union([from_none, from_str], obj.get("model")) return AssistantTurnStartData( turn_id=turn_id, interaction_id=interaction_id, + model=model, ) def to_dict(self) -> dict: @@ -1351,6 +1384,8 @@ def to_dict(self) -> dict: result["turnId"] = from_str(self.turn_id) if self.interaction_id is not None: result["interactionId"] = from_union([from_none, from_str], self.interaction_id) + if self.model is not None: + result["model"] = from_union([from_none, from_str], self.model) return result @@ -1534,7 +1569,7 @@ def to_dict(self) -> dict: @dataclass class _AssistantUsageQuotaSnapshot: - "Schema for the `_AssistantUsageQuotaSnapshot` type." + "Internal per-quota snapshot for assistant usage, including entitlement, consumed requests, overage, reset date, and remaining quota." # Internal: this field is an internal SDK API and is not part of the public surface. _entitlement_requests: int # Internal: this field is an internal SDK API and is not part of the public surface. @@ -2464,7 +2499,7 @@ def to_dict(self) -> dict: @dataclass class CommandsChangedCommand: - "Schema for the `CommandsChangedCommand` type." + "A single slash command available in the session, as listed by the `commands.changed` event." name: str description: str | None = None @@ -2614,7 +2649,7 @@ def to_dict(self) -> dict: @dataclass class CustomAgentsUpdatedAgent: - "Schema for the `CustomAgentsUpdatedAgent` type." + "A single loaded custom agent in `session.custom_agents_updated`, with identity, source, tools, invocability, and model override." description: str display_name: str id: str @@ -2767,7 +2802,7 @@ def to_dict(self) -> dict: @dataclass class EmbeddedBlobResourceContents: - "Schema for the `EmbeddedBlobResourceContents` type." + "Embedded binary resource contents identified by a URI, with an optional MIME type and a base64-encoded blob." blob: str uri: str mime_type: str | None = None @@ -2795,7 +2830,7 @@ def to_dict(self) -> dict: @dataclass class EmbeddedTextResourceContents: - "Schema for the `EmbeddedTextResourceContents` type." + "Embedded text resource contents identified by a URI, with an optional MIME type and a text payload." text: str uri: str mime_type: str | None = None @@ -2897,7 +2932,7 @@ def to_dict(self) -> dict: @dataclass class ExtensionsLoadedExtension: - "Schema for the `ExtensionsLoadedExtension` type." + "A single extension discovered by `session.extensions_loaded`, including qualified ID, source, and current status." id: str name: str source: ExtensionsLoadedExtensionSource @@ -3262,7 +3297,7 @@ def to_dict(self) -> dict: @dataclass class McpAppToolCallCompleteToolMetaUI: - "Schema for the `McpAppToolCallCompleteToolMetaUI` type." + "MCP App tool `_meta.ui` resource URI and SEP-1865 visibility captured with an `mcp_app.tool_call_complete` result." resource_uri: str | None = None visibility: list[str] | None = None @@ -3474,7 +3509,7 @@ def to_dict(self) -> dict: @dataclass class McpServersLoadedServer: - "Schema for the `McpServersLoadedServer` type." + "A single MCP server status summary in `session.mcp_servers_loaded`, including name, status, source, transport, and plugin metadata." name: str status: McpServerStatus error: str | None = None @@ -3663,7 +3698,7 @@ def to_dict(self) -> dict: @dataclass class PermissionApproved: - "Schema for the `PermissionApproved` type." + "Permission response variant indicating the request was approved without persisting an approval rule." kind: ClassVar[str] = "approved" @staticmethod @@ -3680,7 +3715,7 @@ def to_dict(self) -> dict: @dataclass class PermissionApprovedForLocation: - "Schema for the `PermissionApprovedForLocation` type." + "Permission response variant that approves a request and persists the provided approval to a project location key." approval: UserToolSessionApproval kind: ClassVar[str] = "approved-for-location" location_key: str @@ -3705,7 +3740,7 @@ def to_dict(self) -> dict: @dataclass class PermissionApprovedForSession: - "Schema for the `PermissionApprovedForSession` type." + "Permission response variant that approves a request and remembers the provided approval for the rest of the session." approval: UserToolSessionApproval kind: ClassVar[str] = "approved-for-session" @@ -3726,7 +3761,7 @@ def to_dict(self) -> dict: @dataclass class PermissionCancelled: - "Schema for the `PermissionCancelled` type." + "Permission response variant indicating the request was cancelled before use, with an optional reason." kind: ClassVar[str] = "cancelled" reason: str | None = None @@ -3776,7 +3811,7 @@ def to_dict(self) -> dict: @dataclass class PermissionDeniedByContentExclusionPolicy: - "Schema for the `PermissionDeniedByContentExclusionPolicy` type." + "Permission response variant denying a path under content exclusion policy, with the path and message." kind: ClassVar[str] = "denied-by-content-exclusion-policy" message: str path: str @@ -3801,7 +3836,7 @@ def to_dict(self) -> dict: @dataclass class PermissionDeniedByPermissionRequestHook: - "Schema for the `PermissionDeniedByPermissionRequestHook` type." + "Permission response variant denied by a permission-request hook, with optional message and interrupt flag." kind: ClassVar[str] = "denied-by-permission-request-hook" interrupt: bool | None = None message: str | None = None @@ -3828,7 +3863,7 @@ def to_dict(self) -> dict: @dataclass class PermissionDeniedByRules: - "Schema for the `PermissionDeniedByRules` type." + "Permission response variant denied because matching approval rules explicitly blocked the request." kind: ClassVar[str] = "denied-by-rules" rules: list[PermissionRule] @@ -3849,7 +3884,7 @@ def to_dict(self) -> dict: @dataclass class PermissionDeniedInteractivelyByUser: - "Schema for the `PermissionDeniedInteractivelyByUser` type." + "Permission response variant denied in an interactive user prompt, with optional feedback and force-reject flag." kind: ClassVar[str] = "denied-interactively-by-user" feedback: str | None = None force_reject: bool | None = None @@ -3876,7 +3911,7 @@ def to_dict(self) -> dict: @dataclass class PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser: - "Schema for the `PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type." + "Permission response variant denied because no approval rule matched and user confirmation was unavailable." kind: ClassVar[str] = "denied-no-approval-rule-and-could-not-request-from-user" @staticmethod @@ -3899,6 +3934,8 @@ class PermissionPromptRequestCommands: full_command_text: str intention: str kind: ClassVar[str] = "commands" + # Experimental: this field is part of an experimental API and may change or be removed. + auto_approval: PermissionAutoApproval | None = None tool_call_id: str | None = None warning: str | None = None @@ -3909,6 +3946,7 @@ def from_dict(obj: Any) -> "PermissionPromptRequestCommands": command_identifiers = from_list(from_str, obj.get("commandIdentifiers")) full_command_text = from_str(obj.get("fullCommandText")) intention = from_str(obj.get("intention")) + auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) warning = from_union([from_none, from_str], obj.get("warning")) return PermissionPromptRequestCommands( @@ -3916,6 +3954,7 @@ def from_dict(obj: Any) -> "PermissionPromptRequestCommands": command_identifiers=command_identifiers, full_command_text=full_command_text, intention=intention, + auto_approval=auto_approval, tool_call_id=tool_call_id, warning=warning, ) @@ -3927,6 +3966,8 @@ def to_dict(self) -> dict: result["fullCommandText"] = from_str(self.full_command_text) result["intention"] = from_str(self.intention) result["kind"] = self.kind + if self.auto_approval is not None: + result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) if self.warning is not None: @@ -3941,6 +3982,8 @@ class PermissionPromptRequestCustomTool: tool_description: str tool_name: str args: Any = None + # Experimental: this field is part of an experimental API and may change or be removed. + auto_approval: PermissionAutoApproval | None = None tool_call_id: str | None = None @staticmethod @@ -3949,11 +3992,13 @@ def from_dict(obj: Any) -> "PermissionPromptRequestCustomTool": tool_description = from_str(obj.get("toolDescription")) tool_name = from_str(obj.get("toolName")) args = obj.get("args") + auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionPromptRequestCustomTool( tool_description=tool_description, tool_name=tool_name, args=args, + auto_approval=auto_approval, tool_call_id=tool_call_id, ) @@ -3964,6 +4009,8 @@ def to_dict(self) -> dict: result["toolName"] = from_str(self.tool_name) if self.args is not None: result["args"] = self.args + if self.auto_approval is not None: + result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) return result @@ -3974,6 +4021,8 @@ class PermissionPromptRequestExtensionManagement: "Extension management permission prompt" kind: ClassVar[str] = "extension-management" operation: str + # Experimental: this field is part of an experimental API and may change or be removed. + auto_approval: PermissionAutoApproval | None = None extension_name: str | None = None tool_call_id: str | None = None @@ -3981,10 +4030,12 @@ class PermissionPromptRequestExtensionManagement: def from_dict(obj: Any) -> "PermissionPromptRequestExtensionManagement": assert isinstance(obj, dict) operation = from_str(obj.get("operation")) + auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) extension_name = from_union([from_none, from_str], obj.get("extensionName")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionPromptRequestExtensionManagement( operation=operation, + auto_approval=auto_approval, extension_name=extension_name, tool_call_id=tool_call_id, ) @@ -3993,6 +4044,8 @@ def to_dict(self) -> dict: result: dict = {} result["kind"] = self.kind result["operation"] = from_str(self.operation) + if self.auto_approval is not None: + result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) if self.extension_name is not None: result["extensionName"] = from_union([from_none, from_str], self.extension_name) if self.tool_call_id is not None: @@ -4006,6 +4059,8 @@ class PermissionPromptRequestExtensionPermissionAccess: capabilities: list[str] extension_name: str kind: ClassVar[str] = "extension-permission-access" + # Experimental: this field is part of an experimental API and may change or be removed. + auto_approval: PermissionAutoApproval | None = None tool_call_id: str | None = None @staticmethod @@ -4013,10 +4068,12 @@ def from_dict(obj: Any) -> "PermissionPromptRequestExtensionPermissionAccess": assert isinstance(obj, dict) capabilities = from_list(from_str, obj.get("capabilities")) extension_name = from_str(obj.get("extensionName")) + auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionPromptRequestExtensionPermissionAccess( capabilities=capabilities, extension_name=extension_name, + auto_approval=auto_approval, tool_call_id=tool_call_id, ) @@ -4025,6 +4082,8 @@ def to_dict(self) -> dict: result["capabilities"] = from_list(from_str, self.capabilities) result["extensionName"] = from_str(self.extension_name) result["kind"] = self.kind + if self.auto_approval is not None: + result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) return result @@ -4035,6 +4094,8 @@ class PermissionPromptRequestHook: "Hook confirmation permission prompt" kind: ClassVar[str] = "hook" tool_name: str + # Experimental: this field is part of an experimental API and may change or be removed. + auto_approval: PermissionAutoApproval | None = None hook_message: str | None = None tool_args: Any = None tool_call_id: str | None = None @@ -4043,11 +4104,13 @@ class PermissionPromptRequestHook: def from_dict(obj: Any) -> "PermissionPromptRequestHook": assert isinstance(obj, dict) tool_name = from_str(obj.get("toolName")) + auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) hook_message = from_union([from_none, from_str], obj.get("hookMessage")) tool_args = obj.get("toolArgs") tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionPromptRequestHook( tool_name=tool_name, + auto_approval=auto_approval, hook_message=hook_message, tool_args=tool_args, tool_call_id=tool_call_id, @@ -4057,6 +4120,8 @@ def to_dict(self) -> dict: result: dict = {} result["kind"] = self.kind result["toolName"] = from_str(self.tool_name) + if self.auto_approval is not None: + result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) if self.hook_message is not None: result["hookMessage"] = from_union([from_none, from_str], self.hook_message) if self.tool_args is not None: @@ -4074,6 +4139,8 @@ class PermissionPromptRequestMcp: tool_name: str tool_title: str args: Any = None + # Experimental: this field is part of an experimental API and may change or be removed. + auto_approval: PermissionAutoApproval | None = None tool_call_id: str | None = None @staticmethod @@ -4083,12 +4150,14 @@ def from_dict(obj: Any) -> "PermissionPromptRequestMcp": tool_name = from_str(obj.get("toolName")) tool_title = from_str(obj.get("toolTitle")) args = obj.get("args") + auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionPromptRequestMcp( server_name=server_name, tool_name=tool_name, tool_title=tool_title, args=args, + auto_approval=auto_approval, tool_call_id=tool_call_id, ) @@ -4100,6 +4169,8 @@ def to_dict(self) -> dict: result["toolTitle"] = from_str(self.tool_title) if self.args is not None: result["args"] = self.args + if self.auto_approval is not None: + result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) return result @@ -4111,6 +4182,8 @@ class PermissionPromptRequestMemory: fact: str kind: ClassVar[str] = "memory" action: PermissionRequestMemoryAction | None = None + # Experimental: this field is part of an experimental API and may change or be removed. + auto_approval: PermissionAutoApproval | None = None citations: str | None = None direction: PermissionRequestMemoryDirection | None = None reason: str | None = None @@ -4122,6 +4195,7 @@ def from_dict(obj: Any) -> "PermissionPromptRequestMemory": assert isinstance(obj, dict) fact = from_str(obj.get("fact")) action = from_union([from_none, lambda x: parse_enum(PermissionRequestMemoryAction, x)], obj.get("action")) + auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) citations = from_union([from_none, from_str], obj.get("citations")) direction = from_union([from_none, lambda x: parse_enum(PermissionRequestMemoryDirection, x)], obj.get("direction")) reason = from_union([from_none, from_str], obj.get("reason")) @@ -4130,6 +4204,7 @@ def from_dict(obj: Any) -> "PermissionPromptRequestMemory": return PermissionPromptRequestMemory( fact=fact, action=action, + auto_approval=auto_approval, citations=citations, direction=direction, reason=reason, @@ -4143,6 +4218,8 @@ def to_dict(self) -> dict: result["kind"] = self.kind if self.action is not None: result["action"] = from_union([from_none, lambda x: to_enum(PermissionRequestMemoryAction, x)], self.action) + if self.auto_approval is not None: + result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) if self.citations is not None: result["citations"] = from_union([from_none, from_str], self.citations) if self.direction is not None: @@ -4162,6 +4239,8 @@ class PermissionPromptRequestPath: access_kind: PermissionPromptRequestPathAccessKind kind: ClassVar[str] = "path" paths: list[str] + # Experimental: this field is part of an experimental API and may change or be removed. + auto_approval: PermissionAutoApproval | None = None tool_call_id: str | None = None @staticmethod @@ -4169,10 +4248,12 @@ def from_dict(obj: Any) -> "PermissionPromptRequestPath": assert isinstance(obj, dict) access_kind = parse_enum(PermissionPromptRequestPathAccessKind, obj.get("accessKind")) paths = from_list(from_str, obj.get("paths")) + auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionPromptRequestPath( access_kind=access_kind, paths=paths, + auto_approval=auto_approval, tool_call_id=tool_call_id, ) @@ -4181,6 +4262,8 @@ def to_dict(self) -> dict: result["accessKind"] = to_enum(PermissionPromptRequestPathAccessKind, self.access_kind) result["kind"] = self.kind result["paths"] = from_list(from_str, self.paths) + if self.auto_approval is not None: + result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) return result @@ -4192,6 +4275,8 @@ class PermissionPromptRequestRead: intention: str kind: ClassVar[str] = "read" path: str + # Experimental: this field is part of an experimental API and may change or be removed. + auto_approval: PermissionAutoApproval | None = None tool_call_id: str | None = None @staticmethod @@ -4199,10 +4284,12 @@ def from_dict(obj: Any) -> "PermissionPromptRequestRead": assert isinstance(obj, dict) intention = from_str(obj.get("intention")) path = from_str(obj.get("path")) + auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionPromptRequestRead( intention=intention, path=path, + auto_approval=auto_approval, tool_call_id=tool_call_id, ) @@ -4211,6 +4298,8 @@ def to_dict(self) -> dict: result["intention"] = from_str(self.intention) result["kind"] = self.kind result["path"] = from_str(self.path) + if self.auto_approval is not None: + result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) return result @@ -4222,6 +4311,8 @@ class PermissionPromptRequestUrl: intention: str kind: ClassVar[str] = "url" url: str + # Experimental: this field is part of an experimental API and may change or be removed. + auto_approval: PermissionAutoApproval | None = None tool_call_id: str | None = None @staticmethod @@ -4229,10 +4320,12 @@ def from_dict(obj: Any) -> "PermissionPromptRequestUrl": assert isinstance(obj, dict) intention = from_str(obj.get("intention")) url = from_str(obj.get("url")) + auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionPromptRequestUrl( intention=intention, url=url, + auto_approval=auto_approval, tool_call_id=tool_call_id, ) @@ -4241,6 +4334,8 @@ def to_dict(self) -> dict: result["intention"] = from_str(self.intention) result["kind"] = self.kind result["url"] = from_str(self.url) + if self.auto_approval is not None: + result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) return result @@ -4254,6 +4349,8 @@ class PermissionPromptRequestWrite: file_name: str intention: str kind: ClassVar[str] = "write" + # Experimental: this field is part of an experimental API and may change or be removed. + auto_approval: PermissionAutoApproval | None = None new_file_contents: str | None = None tool_call_id: str | None = None @@ -4264,6 +4361,7 @@ def from_dict(obj: Any) -> "PermissionPromptRequestWrite": diff = from_str(obj.get("diff")) file_name = from_str(obj.get("fileName")) intention = from_str(obj.get("intention")) + auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) new_file_contents = from_union([from_none, from_str], obj.get("newFileContents")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionPromptRequestWrite( @@ -4271,6 +4369,7 @@ def from_dict(obj: Any) -> "PermissionPromptRequestWrite": diff=diff, file_name=file_name, intention=intention, + auto_approval=auto_approval, new_file_contents=new_file_contents, tool_call_id=tool_call_id, ) @@ -4282,6 +4381,8 @@ def to_dict(self) -> dict: result["fileName"] = from_str(self.file_name) result["intention"] = from_str(self.intention) result["kind"] = self.kind + if self.auto_approval is not None: + result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) if self.new_file_contents is not None: result["newFileContents"] = from_union([from_none, from_str], self.new_file_contents) if self.tool_call_id is not None: @@ -4622,7 +4723,7 @@ def to_dict(self) -> dict: @dataclass class PermissionRequestShellCommand: - "Schema for the `PermissionRequestShellCommand` type." + "A parsed command identifier in a shell permission request, including whether it is read-only." identifier: str read_only: bool @@ -4645,7 +4746,7 @@ def to_dict(self) -> dict: @dataclass class PermissionRequestShellPossibleUrl: - "Schema for the `PermissionRequestShellPossibleUrl` type." + "A URL that may be accessed by a command in a shell permission request." url: str @staticmethod @@ -4770,7 +4871,7 @@ def to_dict(self) -> dict: @dataclass class PermissionRule: - "Schema for the `PermissionRule` type." + "A permission approval or denial rule matched against a tool request, identified by a rule kind with an optional argument value." argument: str | None kind: str @@ -4905,7 +5006,7 @@ def to_dict(self) -> dict: @dataclass class SessionBackgroundTasksChangedData: - "Schema for the `BackgroundTasksChangedData` type." + "Empty payload for `session.background_tasks_changed`, indicating background task state changed." @staticmethod def from_dict(obj: Any) -> "SessionBackgroundTasksChangedData": assert isinstance(obj, dict) @@ -5068,6 +5169,7 @@ def to_dict(self) -> dict: class SessionCompactionStartData: "Context window breakdown at the start of LLM-powered conversation compaction" conversation_tokens: int | None = None + model: str | None = None system_tokens: int | None = None tool_definitions_tokens: int | None = None @@ -5075,10 +5177,12 @@ class SessionCompactionStartData: def from_dict(obj: Any) -> "SessionCompactionStartData": assert isinstance(obj, dict) conversation_tokens = from_union([from_none, from_int], obj.get("conversationTokens")) + model = from_union([from_none, from_str], obj.get("model")) system_tokens = from_union([from_none, from_int], obj.get("systemTokens")) tool_definitions_tokens = from_union([from_none, from_int], obj.get("toolDefinitionsTokens")) return SessionCompactionStartData( conversation_tokens=conversation_tokens, + model=model, system_tokens=system_tokens, tool_definitions_tokens=tool_definitions_tokens, ) @@ -5087,6 +5191,8 @@ def to_dict(self) -> dict: result: dict = {} if self.conversation_tokens is not None: result["conversationTokens"] = from_union([from_none, to_int], self.conversation_tokens) + if self.model is not None: + result["model"] = from_union([from_none, from_str], self.model) if self.system_tokens is not None: result["systemTokens"] = from_union([from_none, to_int], self.system_tokens) if self.tool_definitions_tokens is not None: @@ -5150,7 +5256,7 @@ def to_dict(self) -> dict: @dataclass class SessionCustomAgentsUpdatedData: - "Schema for the `CustomAgentsUpdatedData` type." + "Payload of `session.custom_agents_updated` with loaded custom agents plus non-fatal warnings and fatal errors." agents: list[CustomAgentsUpdatedAgent] errors: list[str] warnings: list[str] @@ -5272,7 +5378,7 @@ def to_dict(self) -> dict: @dataclass class SessionExtensionsAttachmentsPushedData: - "Schema for the `ExtensionsAttachmentsPushedData` type." + "Payload of `session.extensions.attachments_pushed` with extension-contributed attachments for the next send." attachments: list[Attachment] @staticmethod @@ -5291,7 +5397,7 @@ def to_dict(self) -> dict: @dataclass class SessionExtensionsLoadedData: - "Schema for the `ExtensionsLoadedData` type." + "Payload of `session.extensions_loaded` listing discovered extensions and their statuses." extensions: list[ExtensionsLoadedExtension] @staticmethod @@ -5510,7 +5616,7 @@ def to_dict(self) -> dict: @dataclass class SessionMcpServerStatusChangedData: - "Schema for the `McpServerStatusChangedData` type." + "Payload of `session.mcp_server_status_changed` for one MCP server's status and optional failure error." server_name: str status: McpServerStatus error: str | None = None @@ -5538,7 +5644,7 @@ def to_dict(self) -> dict: @dataclass class SessionMcpServersLoadedData: - "Schema for the `McpServersLoadedData` type." + "Payload of `session.mcp_servers_loaded` listing MCP server status summaries." servers: list[McpServersLoadedServer] @staticmethod @@ -5634,24 +5740,36 @@ def to_dict(self) -> dict: @dataclass class SessionPermissionsChangedData: - "Permissions change details carrying the aggregate allow-all boolean transition." + "Permissions change details carrying the aggregate allow-all transition." allow_all_permissions: bool previous_allow_all_permissions: bool + # Experimental: this field is part of an experimental API and may change or be removed. + allow_all_permission_mode: PermissionAllowAllMode | None = None + # Experimental: this field is part of an experimental API and may change or be removed. + previous_allow_all_permission_mode: PermissionAllowAllMode | None = None @staticmethod def from_dict(obj: Any) -> "SessionPermissionsChangedData": assert isinstance(obj, dict) allow_all_permissions = from_bool(obj.get("allowAllPermissions")) previous_allow_all_permissions = from_bool(obj.get("previousAllowAllPermissions")) + allow_all_permission_mode = from_union([from_none, lambda x: parse_enum(PermissionAllowAllMode, x)], obj.get("allowAllPermissionMode")) + previous_allow_all_permission_mode = from_union([from_none, lambda x: parse_enum(PermissionAllowAllMode, x)], obj.get("previousAllowAllPermissionMode")) return SessionPermissionsChangedData( allow_all_permissions=allow_all_permissions, previous_allow_all_permissions=previous_allow_all_permissions, + allow_all_permission_mode=allow_all_permission_mode, + previous_allow_all_permission_mode=previous_allow_all_permission_mode, ) def to_dict(self) -> dict: result: dict = {} result["allowAllPermissions"] = from_bool(self.allow_all_permissions) result["previousAllowAllPermissions"] = from_bool(self.previous_allow_all_permissions) + if self.allow_all_permission_mode is not None: + result["allowAllPermissionMode"] = from_union([from_none, lambda x: to_enum(PermissionAllowAllMode, x)], self.allow_all_permission_mode) + if self.previous_allow_all_permission_mode is not None: + result["previousAllowAllPermissionMode"] = from_union([from_none, lambda x: to_enum(PermissionAllowAllMode, x)], self.previous_allow_all_permission_mode) return result @@ -5979,7 +6097,7 @@ def to_dict(self) -> dict: @dataclass class SessionSkillsLoadedData: - "Schema for the `SkillsLoadedData` type." + "Payload of `session.skills_loaded` listing resolved skill metadata." skills: list[SkillsLoadedSkill] @staticmethod @@ -6157,7 +6275,7 @@ def to_dict(self) -> dict: @dataclass class SessionToolsUpdatedData: - "Schema for the `ToolsUpdatedData` type." + "Payload of `session.tools_updated` identifying the model whose resolved tools were updated." model: str @staticmethod @@ -6373,7 +6491,7 @@ def to_dict(self) -> dict: @dataclass class ShutdownModelMetric: - "Schema for the `ShutdownModelMetric` type." + "Per-model shutdown metrics with request counts, token usage, nano-AI units, and token details." requests: ShutdownModelMetricRequests usage: ShutdownModelMetricUsage token_details: dict[str, ShutdownModelMetricTokenDetail] | None = None @@ -6434,7 +6552,7 @@ def to_dict(self) -> dict: @dataclass class ShutdownModelMetricTokenDetail: - "Schema for the `ShutdownModelMetricTokenDetail` type." + "A token-type entry in a shutdown model metric, storing the accumulated token count." token_count: int @staticmethod @@ -6489,7 +6607,7 @@ def to_dict(self) -> dict: @dataclass class ShutdownTokenDetail: - "Schema for the `ShutdownTokenDetail` type." + "A session-wide shutdown token-type entry storing the accumulated token count." token_count: int @staticmethod @@ -6514,6 +6632,7 @@ class SkillInvokedData: path: str allowed_tools: list[str] | None = None description: str | None = None + model: str | None = None plugin_name: str | None = None plugin_version: str | None = None source: str | None = None @@ -6527,6 +6646,7 @@ def from_dict(obj: Any) -> "SkillInvokedData": path = from_str(obj.get("path")) allowed_tools = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("allowedTools")) description = from_union([from_none, from_str], obj.get("description")) + model = from_union([from_none, from_str], obj.get("model")) plugin_name = from_union([from_none, from_str], obj.get("pluginName")) plugin_version = from_union([from_none, from_str], obj.get("pluginVersion")) source = from_union([from_none, from_str], obj.get("source")) @@ -6537,6 +6657,7 @@ def from_dict(obj: Any) -> "SkillInvokedData": path=path, allowed_tools=allowed_tools, description=description, + model=model, plugin_name=plugin_name, plugin_version=plugin_version, source=source, @@ -6552,6 +6673,8 @@ def to_dict(self) -> dict: result["allowedTools"] = from_union([from_none, lambda x: from_list(from_str, x)], self.allowed_tools) if self.description is not None: result["description"] = from_union([from_none, from_str], self.description) + if self.model is not None: + result["model"] = from_union([from_none, from_str], self.model) if self.plugin_name is not None: result["pluginName"] = from_union([from_none, from_str], self.plugin_name) if self.plugin_version is not None: @@ -6565,7 +6688,7 @@ def to_dict(self) -> dict: @dataclass class SkillsLoadedSkill: - "Schema for the `SkillsLoadedSkill` type." + "A single resolved skill in `session.skills_loaded`, including source, invocability, enabled state, path, and argument hint." description: str enabled: bool name: str @@ -6841,7 +6964,7 @@ def to_dict(self) -> dict: @dataclass class SystemNotificationAgentCompleted: - "Schema for the `SystemNotificationAgentCompleted` type." + "System notification metadata for a background agent that completed or failed, including agent ID, type, status, description, and prompt." agent_id: str agent_type: str status: SystemNotificationAgentCompletedStatus @@ -6880,7 +7003,7 @@ def to_dict(self) -> dict: @dataclass class SystemNotificationAgentIdle: - "Schema for the `SystemNotificationAgentIdle` type." + "System notification metadata for a background agent that became idle, including agent ID, type, and description." agent_id: str agent_type: str type: ClassVar[str] = "agent_idle" @@ -6933,7 +7056,7 @@ def to_dict(self) -> dict: @dataclass class SystemNotificationInstructionDiscovered: - "Schema for the `SystemNotificationInstructionDiscovered` type." + "System notification metadata for an instruction file discovered during tool access, including source, trigger file, and tool." source_path: str trigger_file: str trigger_tool: str @@ -6967,7 +7090,7 @@ def to_dict(self) -> dict: @dataclass class SystemNotificationNewInboxMessage: - "Schema for the `SystemNotificationNewInboxMessage` type." + "System notification metadata for a new inbox message, including entry ID, sender details, and summary." entry_id: str sender_name: str sender_type: str @@ -7000,7 +7123,7 @@ def to_dict(self) -> dict: @dataclass class SystemNotificationShellCompleted: - "Schema for the `SystemNotificationShellCompleted` type." + "System notification metadata for a shell session that completed, including shell ID, optional exit code, and description." shell_id: str type: ClassVar[str] = "shell_completed" description: str | None = None @@ -7031,7 +7154,7 @@ def to_dict(self) -> dict: @dataclass class SystemNotificationShellDetachedCompleted: - "Schema for the `SystemNotificationShellDetachedCompleted` type." + "System notification metadata for a detached shell session that completed, including shell ID and description." shell_id: str type: ClassVar[str] = "shell_detached_completed" description: str | None = None @@ -7471,7 +7594,7 @@ def to_dict(self) -> dict: @dataclass class ToolExecutionCompleteToolDescriptionMetaUI: - "Schema for the `ToolExecutionCompleteToolDescriptionMetaUI` type." + "MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_complete`." resource_uri: str | None = None visibility: list[ToolExecutionCompleteToolDescriptionMetaUIVisibility] | None = None @@ -7554,7 +7677,7 @@ def to_dict(self) -> dict: @dataclass class ToolExecutionCompleteUIResourceMetaUI: - "Schema for the `ToolExecutionCompleteUIResourceMetaUI` type." + "MCP Apps UI resource metadata for a completed tool result, including CSP, permissions, domain, and border preference." csp: ToolExecutionCompleteUIResourceMetaUICsp | None = None domain: str | None = None permissions: ToolExecutionCompleteUIResourceMetaUIPermissions | None = None @@ -7589,7 +7712,7 @@ def to_dict(self) -> dict: @dataclass class ToolExecutionCompleteUIResourceMetaUICsp: - "Schema for the `ToolExecutionCompleteUIResourceMetaUICsp` type." + "CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains." base_uri_domains: list[str] | None = None connect_domains: list[str] | None = None frame_domains: list[str] | None = None @@ -7624,7 +7747,7 @@ def to_dict(self) -> dict: @dataclass class ToolExecutionCompleteUIResourceMetaUIPermissions: - "Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissions` type." + "Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write." camera: ToolExecutionCompleteUIResourceMetaUIPermissionsCamera | None = None clipboard_write: ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite | None = None geolocation: ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation | None = None @@ -7659,7 +7782,7 @@ def to_dict(self) -> dict: @dataclass class ToolExecutionCompleteUIResourceMetaUIPermissionsCamera: - "Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsCamera` type." + "Marker object for camera permission on an MCP Apps UI resource." @staticmethod def from_dict(obj: Any) -> "ToolExecutionCompleteUIResourceMetaUIPermissionsCamera": assert isinstance(obj, dict) @@ -7671,7 +7794,7 @@ def to_dict(self) -> dict: @dataclass class ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite: - "Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite` type." + "Marker object for clipboard-write permission on an MCP Apps UI resource." @staticmethod def from_dict(obj: Any) -> "ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite": assert isinstance(obj, dict) @@ -7683,7 +7806,7 @@ def to_dict(self) -> dict: @dataclass class ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation: - "Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation` type." + "Marker object for geolocation permission on an MCP Apps UI resource." @staticmethod def from_dict(obj: Any) -> "ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation": assert isinstance(obj, dict) @@ -7695,7 +7818,7 @@ def to_dict(self) -> dict: @dataclass class ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone: - "Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone` type." + "Marker object for microphone permission on an MCP Apps UI resource." @staticmethod def from_dict(obj: Any) -> "ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone": assert isinstance(obj, dict) @@ -7894,7 +8017,7 @@ def to_dict(self) -> dict: @dataclass class ToolExecutionStartToolDescriptionMetaUI: - "Schema for the `ToolExecutionStartToolDescriptionMetaUI` type." + "MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_start`." resource_uri: str | None = None visibility: list[ToolExecutionStartToolDescriptionMetaUIVisibility] | None = None @@ -8014,7 +8137,7 @@ def to_dict(self) -> dict: @dataclass class UserMessageData: - "Schema for the `UserMessageData` type." + "Payload of `user.message` with displayed and model-transformed content, attachments, source/delivery metadata, mode, and telemetry IDs." content: str agent_mode: UserMessageAgentMode | None = None attachments: list[Attachment] | None = None @@ -8083,7 +8206,7 @@ def to_dict(self) -> dict: @dataclass class UserToolSessionApprovalCommands: - "Schema for the `UserToolSessionApprovalCommands` type." + "Session-scoped tool-approval rule for specific shell command identifiers." command_identifiers: list[str] kind: ClassVar[str] = "commands" @@ -8104,7 +8227,7 @@ def to_dict(self) -> dict: @dataclass class UserToolSessionApprovalCustomTool: - "Schema for the `UserToolSessionApprovalCustomTool` type." + "Session-scoped tool-approval rule for a custom tool, keyed by tool name." kind: ClassVar[str] = "custom-tool" tool_name: str @@ -8125,7 +8248,7 @@ def to_dict(self) -> dict: @dataclass class UserToolSessionApprovalExtensionManagement: - "Schema for the `UserToolSessionApprovalExtensionManagement` type." + "Session-scoped tool-approval rule for extension-management operations, optionally narrowed by operation." kind: ClassVar[str] = "extension-management" operation: str | None = None @@ -8147,7 +8270,7 @@ def to_dict(self) -> dict: @dataclass class UserToolSessionApprovalExtensionPermissionAccess: - "Schema for the `UserToolSessionApprovalExtensionPermissionAccess` type." + "Session-scoped tool-approval rule for an extension's permission-gated capability access, keyed by extension name." extension_name: str kind: ClassVar[str] = "extension-permission-access" @@ -8168,7 +8291,7 @@ def to_dict(self) -> dict: @dataclass class UserToolSessionApprovalMcp: - "Schema for the `UserToolSessionApprovalMcp` type." + "Session-scoped tool-approval rule for an MCP server tool, or all tools on the server when `toolName` is null." kind: ClassVar[str] = "mcp" server_name: str tool_name: str | None @@ -8193,7 +8316,7 @@ def to_dict(self) -> dict: @dataclass class UserToolSessionApprovalMemory: - "Schema for the `UserToolSessionApprovalMemory` type." + "Session-scoped tool-approval rule for writes to long-term memory." kind: ClassVar[str] = "memory" @staticmethod @@ -8210,7 +8333,7 @@ def to_dict(self) -> dict: @dataclass class UserToolSessionApprovalRead: - "Schema for the `UserToolSessionApprovalRead` type." + "Session-scoped tool-approval rule for read-only filesystem operations." kind: ClassVar[str] = "read" @staticmethod @@ -8227,7 +8350,7 @@ def to_dict(self) -> dict: @dataclass class UserToolSessionApprovalWrite: - "Schema for the `UserToolSessionApprovalWrite` type." + "Session-scoped tool-approval rule for filesystem write operations." kind: ClassVar[str] = "write" @staticmethod @@ -8461,6 +8584,19 @@ def _load_UserToolSessionApproval(obj: Any) -> "UserToolSessionApproval": PermissionResult = PermissionApproved | PermissionApprovedForSession | PermissionApprovedForLocation | PermissionCancelled | PermissionDeniedByRules | PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser | PermissionDeniedInteractivelyByUser | PermissionDeniedByContentExclusionPolicy | PermissionDeniedByPermissionRequestHook +# Experimental: this enum is part of an experimental API and may change or be removed. +class AutoApprovalRecommendation(Enum): + "Outcome of the auto-approval safety judge for a permission request. Present only when auto mode is enabled; its absence means the judge did not evaluate the request (auto mode was off)." + # The judge evaluated the request and recommends automatically approving it. + APPROVE = "approve" + # The judge evaluated the request and does not recommend auto-approving it; explicit approval is required. Whether that means prompting, denying, or something else is the consumer's decision. + REQUIRE_APPROVAL = "requireApproval" + # Auto mode is enabled, but this request category is never auto-approvable (for example, sandbox-bypass requests), so the judge was not consulted. + EXCLUDED = "excluded" + # The judge was consulted but did not return a usable recommendation, so the request requires explicit approval. + ERROR = "error" + + # Experimental: this enum is part of an experimental API and may change or be removed. class CitationProvider(Enum): "The system that produced a citation." @@ -8472,6 +8608,17 @@ class CitationProvider(Enum): CLIENT = "client" +# Experimental: this enum is part of an experimental API and may change or be removed. +class PermissionAllowAllMode(Enum): + "Allow-all mode for the session." + # Permission requests follow the normal approval flow. + OFF = "off" + # Tool, path, and URL permission requests are automatically approved. + ON = "on" + # Permission requests follow the normal approval flow with an LLM advisory recommendation attached; clients may choose to auto-approve requests the judge evaluated as acceptable. + AUTO = "auto" + + class AbortReason(Enum): "Finite reason code describing why the current turn was aborted" # The local user requested the abort, for example by pressing Ctrl+C in the CLI. @@ -9138,6 +9285,7 @@ def session_event_to_dict(x: SessionEvent) -> Any: "AttachmentSelectionDetails", "AttachmentSelectionDetailsEnd", "AttachmentSelectionDetailsStart", + "AutoApprovalRecommendation", "AutoModeSwitchCompletedData", "AutoModeSwitchRequestedData", "AutoModeSwitchResponse", @@ -9218,9 +9366,11 @@ def session_event_to_dict(x: SessionEvent) -> Any: "OmittedBinaryResult", "OmittedBinaryType", "PendingMessagesModifiedData", + "PermissionAllowAllMode", "PermissionApproved", "PermissionApprovedForLocation", "PermissionApprovedForSession", + "PermissionAutoApproval", "PermissionCancelled", "PermissionCompletedData", "PermissionDeniedByContentExclusionPolicy", diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs index 621f0e610..d88832041 100644 --- a/rust/src/generated/api_types.rs +++ b/rust/src/generated/api_types.rs @@ -179,6 +179,8 @@ pub mod rpc_methods { pub const SESSION_GITHUBAUTH_GETSTATUS: &str = "session.gitHubAuth.getStatus"; /// `session.gitHubAuth.setCredentials` pub const SESSION_GITHUBAUTH_SETCREDENTIALS: &str = "session.gitHubAuth.setCredentials"; + /// `session.debug.collectLogs` + pub const SESSION_DEBUG_COLLECTLOGS: &str = "session.debug.collectLogs"; /// `session.canvas.list` pub const SESSION_CANVAS_LIST: &str = "session.canvas.list"; /// `session.canvas.listOpen` @@ -490,6 +492,10 @@ pub mod rpc_methods { /// `session.metadata.recomputeContextTokens` pub const SESSION_METADATA_RECOMPUTECONTEXTTOKENS: &str = "session.metadata.recomputeContextTokens"; + /// `session.settings.snapshot` + pub const SESSION_SETTINGS_SNAPSHOT: &str = "session.settings.snapshot"; + /// `session.settings.evaluatePredicate` + pub const SESSION_SETTINGS_EVALUATEPREDICATE: &str = "session.settings.evaluatePredicate"; /// `session.shell.exec` pub const SESSION_SHELL_EXEC: &str = "session.shell.exec"; /// `session.shell.kill` @@ -607,7 +613,7 @@ pub struct AbortResult { pub success: bool, } -/// Schema for the `AccountAllUsers` type. +/// Authenticated account entry returned by `account.getAllUsers`, with auth info and an optional associated token. /// ///

/// @@ -660,7 +666,7 @@ pub struct AccountGetQuotaRequest { pub git_hub_token: Option, } -/// Schema for the `AccountQuotaSnapshot` type. +/// Quota usage snapshot for a Copilot quota type, including entitlement, used requests, overage, reset date, and remaining percentage. /// ///
/// @@ -769,7 +775,7 @@ pub struct AccountLogoutResult { pub has_more_users: bool, } -/// Schema for the `AgentDiscoveryPath` type. +/// Canonical directory where custom agents can be discovered or created, with scope, preference, and optional project path. /// ///
/// @@ -806,7 +812,7 @@ pub struct AgentDiscoveryPathList { pub paths: Vec, } -/// Schema for the `AgentInfo` type. +/// Custom agent metadata, including identifiers, display details, source, tools, model, MCP servers, skills, and file path. /// ///
/// @@ -1181,13 +1187,16 @@ pub struct AgentsGetDiscoveryPathsRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AllowAllPermissionSetResult { - /// Authoritative allow-all state after the mutation + /// Authoritative full allow-all state after the mutation pub enabled: bool, + /// Authoritative allow-all mode after the mutation + #[serde(skip_serializing_if = "Option::is_none")] + pub mode: Option, /// Whether the operation succeeded pub success: bool, } -/// Current full allow-all permission state. +/// Current allow-all permission mode. /// ///
/// @@ -1200,9 +1209,12 @@ pub struct AllowAllPermissionSetResult { pub struct AllowAllPermissionState { /// Whether full allow-all permissions are currently active pub enabled: bool, + /// Current allow-all mode + #[serde(skip_serializing_if = "Option::is_none")] + pub mode: Option, } -/// Schema for the `CopilotUserResponseEndpoints` type. +/// Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough. /// ///
/// @@ -1223,7 +1235,7 @@ pub struct CopilotUserResponseEndpoints { pub telemetry: Option, } -/// Schema for the `CopilotUserResponseQuotaSnapshotsChat` type. +/// Chat quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. /// ///
/// @@ -1234,36 +1246,48 @@ pub struct CopilotUserResponseEndpoints { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CopilotUserResponseQuotaSnapshotsChat { + /// Number of requests/units included in the entitlement for this period; `-1` denotes an unlimited entitlement. #[serde(skip_serializing_if = "Option::is_none")] pub entitlement: Option, + /// Whether the user currently has quota available; when `false` and not unlimited, further requests are blocked until the quota resets. #[serde(rename = "has_quota", skip_serializing_if = "Option::is_none")] pub has_quota: Option, + /// Count of additional pay-per-request usage consumed this period beyond the entitlement. #[serde(rename = "overage_count", skip_serializing_if = "Option::is_none")] pub overage_count: Option, + /// Whether usage may continue at pay-per-request rates once the entitlement is exhausted. #[serde(rename = "overage_permitted", skip_serializing_if = "Option::is_none")] pub overage_permitted: Option, + /// Percentage of the entitlement remaining at the snapshot timestamp. #[serde(rename = "percent_remaining", skip_serializing_if = "Option::is_none")] pub percent_remaining: Option, + /// Identifier of the quota bucket this snapshot describes. #[serde(rename = "quota_id", skip_serializing_if = "Option::is_none")] pub quota_id: Option, + /// Amount of quota remaining at the snapshot timestamp. #[serde(rename = "quota_remaining", skip_serializing_if = "Option::is_none")] pub quota_remaining: Option, + /// Unix epoch time, in seconds, when this quota next resets. #[serde(rename = "quota_reset_at", skip_serializing_if = "Option::is_none")] pub quota_reset_at: Option, + /// Remaining entitlement/quota amount at the snapshot timestamp. #[serde(skip_serializing_if = "Option::is_none")] pub remaining: Option, + /// UTC timestamp when this snapshot was captured. #[serde(rename = "timestamp_utc", skip_serializing_if = "Option::is_none")] pub timestamp_utc: Option, + /// Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. #[serde( rename = "token_based_billing", skip_serializing_if = "Option::is_none" )] pub token_based_billing: Option, + /// Whether the entitlement for this category is unlimited. #[serde(skip_serializing_if = "Option::is_none")] pub unlimited: Option, } -/// Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` type. +/// Completions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. /// ///
/// @@ -1274,36 +1298,48 @@ pub struct CopilotUserResponseQuotaSnapshotsChat { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CopilotUserResponseQuotaSnapshotsCompletions { + /// Number of requests/units included in the entitlement for this period; `-1` denotes an unlimited entitlement. #[serde(skip_serializing_if = "Option::is_none")] pub entitlement: Option, + /// Whether the user currently has quota available; when `false` and not unlimited, further requests are blocked until the quota resets. #[serde(rename = "has_quota", skip_serializing_if = "Option::is_none")] pub has_quota: Option, + /// Count of additional pay-per-request usage consumed this period beyond the entitlement. #[serde(rename = "overage_count", skip_serializing_if = "Option::is_none")] pub overage_count: Option, + /// Whether usage may continue at pay-per-request rates once the entitlement is exhausted. #[serde(rename = "overage_permitted", skip_serializing_if = "Option::is_none")] pub overage_permitted: Option, + /// Percentage of the entitlement remaining at the snapshot timestamp. #[serde(rename = "percent_remaining", skip_serializing_if = "Option::is_none")] pub percent_remaining: Option, + /// Identifier of the quota bucket this snapshot describes. #[serde(rename = "quota_id", skip_serializing_if = "Option::is_none")] pub quota_id: Option, + /// Amount of quota remaining at the snapshot timestamp. #[serde(rename = "quota_remaining", skip_serializing_if = "Option::is_none")] pub quota_remaining: Option, + /// Unix epoch time, in seconds, when this quota next resets. #[serde(rename = "quota_reset_at", skip_serializing_if = "Option::is_none")] pub quota_reset_at: Option, + /// Remaining entitlement/quota amount at the snapshot timestamp. #[serde(skip_serializing_if = "Option::is_none")] pub remaining: Option, + /// UTC timestamp when this snapshot was captured. #[serde(rename = "timestamp_utc", skip_serializing_if = "Option::is_none")] pub timestamp_utc: Option, + /// Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. #[serde( rename = "token_based_billing", skip_serializing_if = "Option::is_none" )] pub token_based_billing: Option, + /// Whether the entitlement for this category is unlimited. #[serde(skip_serializing_if = "Option::is_none")] pub unlimited: Option, } -/// Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` type. +/// Premium-interactions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. /// ///
/// @@ -1314,36 +1350,48 @@ pub struct CopilotUserResponseQuotaSnapshotsCompletions { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CopilotUserResponseQuotaSnapshotsPremiumInteractions { + /// Number of requests/units included in the entitlement for this period; `-1` denotes an unlimited entitlement. #[serde(skip_serializing_if = "Option::is_none")] pub entitlement: Option, + /// Whether the user currently has quota available; when `false` and not unlimited, further requests are blocked until the quota resets. #[serde(rename = "has_quota", skip_serializing_if = "Option::is_none")] pub has_quota: Option, + /// Count of additional pay-per-request usage consumed this period beyond the entitlement. #[serde(rename = "overage_count", skip_serializing_if = "Option::is_none")] pub overage_count: Option, + /// Whether usage may continue at pay-per-request rates once the entitlement is exhausted. #[serde(rename = "overage_permitted", skip_serializing_if = "Option::is_none")] pub overage_permitted: Option, + /// Percentage of the entitlement remaining at the snapshot timestamp. #[serde(rename = "percent_remaining", skip_serializing_if = "Option::is_none")] pub percent_remaining: Option, + /// Identifier of the quota bucket this snapshot describes. #[serde(rename = "quota_id", skip_serializing_if = "Option::is_none")] pub quota_id: Option, + /// Amount of quota remaining at the snapshot timestamp. #[serde(rename = "quota_remaining", skip_serializing_if = "Option::is_none")] pub quota_remaining: Option, + /// Unix epoch time, in seconds, when this quota next resets. #[serde(rename = "quota_reset_at", skip_serializing_if = "Option::is_none")] pub quota_reset_at: Option, + /// Remaining entitlement/quota amount at the snapshot timestamp. #[serde(skip_serializing_if = "Option::is_none")] pub remaining: Option, + /// UTC timestamp when this snapshot was captured. #[serde(rename = "timestamp_utc", skip_serializing_if = "Option::is_none")] pub timestamp_utc: Option, + /// Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. #[serde( rename = "token_based_billing", skip_serializing_if = "Option::is_none" )] pub token_based_billing: Option, + /// Whether the entitlement for this category is unlimited. #[serde(skip_serializing_if = "Option::is_none")] pub unlimited: Option, } -/// Schema for the `CopilotUserResponseQuotaSnapshots` type. +/// Quota snapshot map from the raw Copilot user-response passthrough, with chat, completions, premium-interactions, and other entries. /// ///
/// @@ -1354,13 +1402,13 @@ pub struct CopilotUserResponseQuotaSnapshotsPremiumInteractions { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CopilotUserResponseQuotaSnapshots { - /// Schema for the `CopilotUserResponseQuotaSnapshotsChat` type. + /// Chat quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. #[serde(skip_serializing_if = "Option::is_none")] pub chat: Option, - /// Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` type. + /// Completions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. #[serde(skip_serializing_if = "Option::is_none")] pub completions: Option, - /// Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` type. + /// Premium-interactions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. #[serde( rename = "premium_interactions", skip_serializing_if = "Option::is_none" @@ -1379,91 +1427,115 @@ pub struct CopilotUserResponseQuotaSnapshots { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CopilotUserResponse { + /// Copilot access SKU identifier (e.g. `free_limited_copilot`, `copilot_for_business_seat_quota`) used to gate model and feature access. #[serde(rename = "access_type_sku", skip_serializing_if = "Option::is_none")] pub access_type_sku: Option, + /// Opaque analytics tracking identifier for the user, forwarded from the Copilot API. #[serde( rename = "analytics_tracking_id", skip_serializing_if = "Option::is_none" )] pub analytics_tracking_id: Option, + /// Date the Copilot seat was assigned to the user, if applicable. #[serde(rename = "assigned_date", skip_serializing_if = "Option::is_none")] pub assigned_date: Option, + /// Whether the user is eligible to sign up for the free/limited Copilot tier. #[serde( rename = "can_signup_for_limited", skip_serializing_if = "Option::is_none" )] pub can_signup_for_limited: Option, + /// Whether the user is able to upgrade their Copilot plan. #[serde(rename = "can_upgrade_plan", skip_serializing_if = "Option::is_none")] pub can_upgrade_plan: Option, + /// Whether Copilot chat is enabled for the user. #[serde(rename = "chat_enabled", skip_serializing_if = "Option::is_none")] pub chat_enabled: Option, + /// Whether CLI remote control is enabled for the user. #[serde( rename = "cli_remote_control_enabled", skip_serializing_if = "Option::is_none" )] pub cli_remote_control_enabled: Option, + /// Whether cloud session storage is enabled for the user. #[serde( rename = "cloud_session_storage_enabled", skip_serializing_if = "Option::is_none" )] pub cloud_session_storage_enabled: Option, + /// Whether the Codex agent is enabled for the user. #[serde( rename = "codex_agent_enabled", skip_serializing_if = "Option::is_none" )] pub codex_agent_enabled: Option, + /// Copilot plan name for the user (e.g. `individual`, `business`, `enterprise`). #[serde(rename = "copilot_plan", skip_serializing_if = "Option::is_none")] pub copilot_plan: Option, + /// Whether `.copilotignore` content-exclusion support is enabled for the user. #[serde( rename = "copilotignore_enabled", skip_serializing_if = "Option::is_none" )] pub copilotignore_enabled: Option, - /// Schema for the `CopilotUserResponseEndpoints` type. + /// Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough. #[serde(skip_serializing_if = "Option::is_none")] pub endpoints: Option, + /// Whether MCP (Model Context Protocol) support is enabled for the user. #[serde(rename = "is_mcp_enabled", skip_serializing_if = "Option::is_none")] pub is_mcp_enabled: Option, + /// Whether the user is a GitHub/Microsoft staff member. #[serde(rename = "is_staff", skip_serializing_if = "Option::is_none")] pub is_staff: Option, + /// Per-category quota allotments for free/limited-tier users, keyed by quota category. #[serde( rename = "limited_user_quotas", skip_serializing_if = "Option::is_none" )] pub limited_user_quotas: Option>, + /// Date the free/limited-tier user's quotas next reset, as a raw string from the Copilot API. #[serde( rename = "limited_user_reset_date", skip_serializing_if = "Option::is_none" )] pub limited_user_reset_date: Option, + /// GitHub login of the authenticated user. #[serde(skip_serializing_if = "Option::is_none")] pub login: Option, + /// Per-category monthly quota allotments, keyed by quota category. #[serde(rename = "monthly_quotas", skip_serializing_if = "Option::is_none")] pub monthly_quotas: Option>, + /// Organizations the user belongs to, each with an optional login and display name. #[serde(rename = "organization_list", skip_serializing_if = "Option::is_none")] pub organization_list: Option, + /// Logins of the organizations the user belongs to. #[serde( rename = "organization_login_list", skip_serializing_if = "Option::is_none" )] pub organization_login_list: Option>, + /// Date the user's usage quota next resets, as a raw string from the Copilot API; see `quota_reset_date_utc` for the UTC-normalized value. #[serde(rename = "quota_reset_date", skip_serializing_if = "Option::is_none")] pub quota_reset_date: Option, + /// UTC-normalized form of `quota_reset_date` (the date the user's usage quota next resets). #[serde( rename = "quota_reset_date_utc", skip_serializing_if = "Option::is_none" )] pub quota_reset_date_utc: Option, - /// Schema for the `CopilotUserResponseQuotaSnapshots` type. + /// Quota snapshot map from the raw Copilot user-response passthrough, with chat, completions, premium-interactions, and other entries. #[serde(rename = "quota_snapshots", skip_serializing_if = "Option::is_none")] pub quota_snapshots: Option, + /// Whether the user's telemetry is subject to restricted-data handling. #[serde( rename = "restricted_telemetry", skip_serializing_if = "Option::is_none" )] pub restricted_telemetry: Option, + /// Raw passthrough of the Copilot API `te` flag for the user (an opaque server-side eligibility signal surfaced in telemetry); not otherwise interpreted by the runtime. #[serde(skip_serializing_if = "Option::is_none")] pub te: Option, + /// Whether the account is on usage-based (token/AI-credit) billing rather than a fixed premium-request quota. #[serde( rename = "token_based_billing", skip_serializing_if = "Option::is_none" @@ -1471,7 +1543,7 @@ pub struct CopilotUserResponse { pub token_based_billing: Option, } -/// Schema for the `ApiKeyAuthInfo` type. +/// Authentication-info variant for API-key authentication to a non-GitHub LLM provider, carrying the secret `apiKey` and host. /// ///
/// @@ -2417,7 +2489,7 @@ pub struct SlashCommandInput { pub required: Option, } -/// Schema for the `SlashCommandInfo` type. +/// Slash-command metadata with name, aliases, description, kind, input hint, execution allowance, and schedulability. /// ///
/// @@ -2738,7 +2810,7 @@ pub struct ConnectRemoteSessionParams { pub session_id: SessionId, } -/// Optional connection token presented by the SDK client during the handshake. +/// Parameters for the `server.connect` handshake: an optional connection token and optional connection-level opt-ins (e.g. GitHub telemetry forwarding). /// ///
/// @@ -2749,6 +2821,9 @@ pub struct ConnectRemoteSessionParams { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub(crate) struct 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, in addition to the runtime's normal GitHub/CTS emission (dual-write). 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. + #[serde(skip_serializing_if = "Option::is_none")] + pub enable_git_hub_telemetry_forwarding: Option, /// Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN #[serde(skip_serializing_if = "Option::is_none")] pub token: Option, @@ -2794,7 +2869,7 @@ pub struct ContextHeaviestMessage { pub tokens: i64, } -/// Schema for the `CopilotApiTokenAuthInfo` type. +/// Authentication-info variant for direct Copilot API token auth sourced from environment variables, with public GitHub host. /// ///
/// @@ -2868,7 +2943,167 @@ pub struct CurrentToolMetadata { pub namespaced_name: Option, } -/// Schema for the `DiscoveredMcpServer` type. +/// A file included in the redacted debug bundle. +/// +///
+/// +/// **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 DebugCollectLogsCollectedEntry { + /// Relative path of the file in the staged bundle/archive. + pub bundle_path: String, + /// Redacted output size in bytes. + pub size_bytes: i64, + /// Source category for this entry. + pub source: DebugCollectLogsSource, +} + +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct DebugCollectLogsDestinationArchive { + pub kind: DebugCollectLogsDestinationArchiveKind, + /// When true, create the archive atomically without overwriting an existing file by appending ` (N)` before the extension as needed. Defaults to false. + #[serde(skip_serializing_if = "Option::is_none")] + pub no_overwrite: Option, + /// Absolute or server-relative path for the .tgz archive to create. + pub output_path: String, +} + +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct DebugCollectLogsDestinationDirectory { + pub kind: DebugCollectLogsDestinationDirectoryKind, + /// Directory where redacted files should be staged. The directory is created if needed. + pub output_directory: String, +} + +/// A caller-provided server-local file or directory to include in the debug bundle. +/// +///
+/// +/// **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 DebugCollectLogsEntry { + /// Relative path to use inside the staged bundle/archive. + pub bundle_path: String, + /// Kind of source path to include. + pub kind: DebugCollectLogsEntryKind, + /// Server-local source path to read. + pub path: String, + /// How text content from this entry should be redacted. Defaults to plain-text. + #[serde(skip_serializing_if = "Option::is_none")] + pub redaction: Option, + /// When true, collection fails if this entry cannot be read. Defaults to false, which records the entry in `skippedEntries`. + #[serde(skip_serializing_if = "Option::is_none")] + pub required: Option, +} + +/// Built-in session diagnostics to include in the bundle. Omitted fields default to true. +/// +///
+/// +/// **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 DebugCollectLogsInclude { + /// Server-local path to the current process log. When set, it is included as `process.log` and its directory is searched for prior logs from the same session. + #[serde(skip_serializing_if = "Option::is_none")] + pub current_process_log_path: Option, + /// Include the session event log (`events.jsonl`). Defaults to true. + #[serde(skip_serializing_if = "Option::is_none")] + pub events: Option, + /// Server-local path to the session's events.jsonl file. Internal callers normally omit this and let the runtime derive it from the session. + #[serde(skip_serializing_if = "Option::is_none")] + pub events_path: Option, + /// Maximum number of previous process logs to include. Defaults to 5. + #[serde(skip_serializing_if = "Option::is_none")] + pub previous_process_log_limit: Option, + /// Server-local process log directory to search when `currentProcessLogPath` is unavailable, useful for collecting logs for inactive sessions. + #[serde(skip_serializing_if = "Option::is_none")] + pub process_log_directory: Option, + /// Include process logs for the session. Defaults to true. + #[serde(skip_serializing_if = "Option::is_none")] + pub process_logs: Option, + /// Include interactive shell logs written under the session's `shell-logs` directory. Defaults to true. + #[serde(skip_serializing_if = "Option::is_none")] + pub shell_logs: Option, +} + +/// Options for collecting a redacted session debug bundle. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct DebugCollectLogsRequest { + /// Caller-provided server-local files or directories to include in addition to the runtime's built-in session diagnostics. This lets host applications add their own diagnostics without changing the API shape. + #[serde(skip_serializing_if = "Option::is_none")] + pub additional_entries: Option>, + /// Where the redacted bundle should be written. Use `archive` to produce a .tgz, or `directory` to stage redacted files for caller-managed upload/post-processing. + pub destination: DebugCollectLogsDestination, + /// Which built-in session diagnostics to include. Omitted fields default to true. + #[serde(skip_serializing_if = "Option::is_none")] + pub include: Option, +} + +/// An optional debug bundle entry that could not be included. +/// +///
+/// +/// **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 DebugCollectLogsSkippedEntry { + /// Relative path requested for this bundle entry. + pub bundle_path: String, + /// Server-local source path that could not be read. + #[serde(skip_serializing_if = "Option::is_none")] + pub path: Option, + /// Reason the entry was skipped. + pub reason: String, +} + +/// Result of collecting a redacted debug bundle. +/// +///
+/// +/// **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 DebugCollectLogsResult { + /// Files included in the redacted bundle. + pub entries: Vec, + /// Destination kind that was written. + pub kind: DebugCollectLogsResultKind, + /// Actual archive path or staging directory path written. This may differ from the requested path when no-overwrite suffixing or fallback-to-temp-directory was needed. + pub path: String, + /// Optional files or directories that could not be included. + #[serde(skip_serializing_if = "Option::is_none")] + pub skipped_entries: Option>, +} + +/// MCP server discovered by `mcp.discover`, with config source, optional plugin source, transport type, and enabled state. /// ///
/// @@ -2926,7 +3161,7 @@ pub struct EnqueueCommandResult { pub queued: bool, } -/// Schema for the `EnvAuthInfo` type. +/// Authentication-info variant for a token sourced from an environment variable, with host, optional login, token, and env var name. /// ///
/// @@ -3065,7 +3300,7 @@ pub struct ExecuteCommandResult { pub error: Option, } -/// Schema for the `Extension` type. +/// Discovered extension metadata, including source-qualified ID, name, discovery source, status, and optional process ID. /// ///
/// @@ -3471,7 +3706,7 @@ pub struct FolderTrustCheckResult { pub trusted: bool, } -/// Schema for the `GhCliAuthInfo` type. +/// Authentication-info variant for GitHub CLI credentials, carrying host, login, and the `gh auth token` value. /// ///
/// @@ -3584,7 +3819,7 @@ pub struct GitHubTelemetryEvent { pub session_id: Option, } -/// Payload for a `gitHubTelemetry.event` notification: a single GitHub telemetry event the runtime forwards to a host connection that opted into telemetry forwarding for the session. +/// 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. /// ///
/// @@ -3599,8 +3834,9 @@ pub struct GitHubTelemetryNotification { pub event: GitHubTelemetryEvent, /// Whether this is a restricted telemetry event (cli.restricted_telemetry). Hosts must route restricted events to first-party Microsoft stores only. pub restricted: bool, - /// Session the telemetry event belongs to. - pub session_id: SessionId, + /// Session the telemetry event belongs to, when it is session-scoped. Omitted for sessionless events (for example, `server.sendTelemetry` calls with no session id), which are still forwarded to opted-in connections. + #[serde(skip_serializing_if = "Option::is_none")] + pub session_id: Option, } /// Pending external tool call request ID, with the tool result or an error describing why it failed. @@ -3783,7 +4019,7 @@ pub struct HistoryTruncateResult { pub events_removed: i64, } -/// Schema for the `HMACAuthInfo` type. +/// Authentication-info variant for GitHub-internal HMAC auth, carrying the public GitHub host and HMAC secret. /// ///
/// @@ -3805,7 +4041,7 @@ pub struct HMACAuthInfo { pub r#type: HMACAuthInfoType, } -/// Schema for the `InstalledPlugin` type. +/// Installed plugin record from global state, with marketplace, version, install time, enabled state, cache path, and source. /// ///
/// @@ -3861,7 +4097,7 @@ pub struct InstalledPluginInfo { pub version: Option, } -/// Schema for the `InstalledPluginSourceGitHub` type. +/// Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref, and optional subpath. /// ///
/// @@ -3881,7 +4117,7 @@ pub struct InstalledPluginSourceGitHub { pub source: InstalledPluginSourceGitHubSource, } -/// Schema for the `InstalledPluginSourceLocal` type. +/// Source descriptor for a direct local plugin install, with a local filesystem path. /// ///
/// @@ -3897,7 +4133,7 @@ pub struct InstalledPluginSourceLocal { pub source: InstalledPluginSourceLocalSource, } -/// Schema for the `InstalledPluginSourceUrl` type. +/// Source descriptor for a direct URL plugin install, with URL, optional ref, and optional subpath. /// ///
/// @@ -3917,7 +4153,7 @@ pub struct InstalledPluginSourceUrl { pub url: String, } -/// Schema for the `InstructionDiscoveryPath` type. +/// Canonical file or directory where custom instructions can be discovered or created, with location, kind, preference, and project path. /// ///
/// @@ -3994,7 +4230,7 @@ pub struct InstructionsGetDiscoveryPathsRequest { pub project_paths: Option>, } -/// Schema for the `InstructionSource` type. +/// Loaded instruction source for a session, including path, content, category, location, applicability, and optional description. /// ///
/// @@ -4077,9 +4313,18 @@ pub struct LlmInferenceHttpRequestChunkResult {} #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct LlmInferenceHttpRequestStartRequest { + /// Stable per-agent-instance id attributing this request to a specific agent trajectory. Present when the request originates from an agent turn; absent for requests issued outside any agent context (e.g. some SDK callers). A request with an `agentId` but no `parentAgentId` is a root-agent request; one carrying both is a subagent request. Sourced from the runtime's per-request agent context and surfaced on the envelope independently of transport, so it is available for both first-party (CAPI) and BYOK/custom-provider requests; on the CAPI transport the runtime derives the upstream `X-Agent-Task-Id` header from this same context. Consumers routing each provider call to a training trajectory should key on this rather than on lifecycle events, since it is available on the request path before sampling. + #[serde(skip_serializing_if = "Option::is_none")] + pub agent_id: Option, pub headers: HashMap>, + /// Coarse classification of the interaction that produced this request. Open string for forward-compatibility; known values include `conversation-agent`, `conversation-subagent`, `conversation-sampling`, `conversation-background`, `conversation-compaction`, and `conversation-user`. Absent when the runtime did not classify the request. Comes from the runtime's per-request agent context independently of transport; on the CAPI transport the runtime derives the upstream `X-Interaction-Type` header from this same context. + #[serde(skip_serializing_if = "Option::is_none")] + pub interaction_type: Option, /// HTTP method, e.g. GET, POST. pub method: String, + /// Id of the parent agent that spawned the agent issuing this request. Present only for subagent requests; absent for root-agent requests and non-agent requests. Combined with `agentId`, this lets consumers attribute a call to a child trajectory versus the root. Like `agentId`, it comes from the runtime's per-request agent context independently of transport; on the CAPI transport the runtime derives the upstream `X-Parent-Agent-Id` header from this same context. + #[serde(skip_serializing_if = "Option::is_none")] + pub parent_agent_id: Option, /// Opaque runtime-minted id, unique per in-flight request. The SDK uses this to correlate httpRequestChunk frames and to address its httpResponseStart / httpResponseChunk replies back to the runtime. pub request_id: RequestId, /// Id of the runtime session that triggered this request, when one is in scope. Absent for requests issued outside any session (e.g. startup model-catalog or capability resolution). This is a payload field — not a dispatch key — because the client-global API is registered process-wide rather than per session. @@ -4234,7 +4479,7 @@ pub struct SessionContext { pub repository: Option, } -/// Schema for the `LocalSessionMetadataValue` type. +/// Persisted local session metadata, including identifiers, timestamps, summary/name, client, context, detached state, and task ID. /// ///
/// @@ -4423,7 +4668,7 @@ pub struct MarketplaceListResult { pub marketplaces: Vec, } -/// Schema for the `MarketplaceRefreshEntry` type. +/// Per-marketplace refresh result, including marketplace name, success flag, and optional failure error. /// ///
/// @@ -4476,7 +4721,7 @@ pub struct MarketplaceRemoveResult { pub removed: bool, } -/// Schema for the `McpAllowedServer` type. +/// MCP server allowed by policy, with server name and optional PII-free explanatory note. /// ///
/// @@ -4686,7 +4931,7 @@ pub struct McpAppsReadResourceRequest { pub uri: String, } -/// Schema for the `McpAppsResourceContent` type. +/// MCP Apps resource content with URI, optional MIME type, text or base64 blob, and resource metadata. /// ///
/// @@ -5026,7 +5271,7 @@ pub struct McpExecuteSamplingParams { pub server_name: String, } -/// Schema for the `McpFilteredServer` type. +/// MCP server filtered by policy, with name, reason, optional redacted reason, and enterprise login. /// ///
/// @@ -5199,7 +5444,7 @@ pub struct McpListToolsRequest { pub server_name: String, } -/// Schema for the `McpTools` type. +/// MCP tool metadata with tool name and optional description. /// ///
/// @@ -5461,7 +5706,7 @@ pub struct McpSamplingExecutionResult { pub result: Option, } -/// Schema for the `McpServer` type. +/// MCP server status entry, including config source/plugin source and any connection error. /// ///
/// @@ -6277,7 +6522,7 @@ pub struct ModelPolicy { pub terms: Option, } -/// Schema for the `Model` type. +/// Copilot model metadata, including identifier, display name, capabilities, policy, billing, reasoning efforts, and picker categories. /// ///
/// @@ -6663,7 +6908,7 @@ pub struct NameSetRequest { pub name: String, } -/// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. +/// Source descriptor for a `session.options.update` content-exclusion rule, with source name and type. /// ///
/// @@ -6678,7 +6923,7 @@ pub struct OptionsUpdateAdditionalContentExclusionPolicyRuleSource { pub r#type: String, } -/// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRule` type. +/// Single content-exclusion rule supplied to `session.options.update`, with paths, match conditions, and source. /// ///
/// @@ -6694,11 +6939,11 @@ pub struct OptionsUpdateAdditionalContentExclusionPolicyRule { #[serde(skip_serializing_if = "Option::is_none")] pub if_none_match: Option>, pub paths: Vec, - /// Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type. + /// Source descriptor for a `session.options.update` content-exclusion rule, with source name and type. pub source: OptionsUpdateAdditionalContentExclusionPolicyRuleSource, } -/// Schema for the `OptionsUpdateAdditionalContentExclusionPolicy` type. +/// Content-exclusion policy supplied to `session.options.update`, with rules, last-updated data, and scope. /// ///
/// @@ -6716,7 +6961,7 @@ pub struct OptionsUpdateAdditionalContentExclusionPolicy { pub scope: OptionsUpdateAdditionalContentExclusionPolicyScope, } -/// Schema for the `PendingPermissionRequest` type. +/// Pending permission prompt reconstructed from event history, with request ID and user-facing prompt details. /// ///
/// @@ -6748,7 +6993,7 @@ pub struct PendingPermissionRequestList { pub items: Vec, } -/// Schema for the `PermissionDecisionApproveOnce` type. +/// Permission-decision request variant to approve only the current permission request. /// ///
/// @@ -6763,7 +7008,7 @@ pub struct PermissionDecisionApproveOnce { pub kind: PermissionDecisionApproveOnceKind, } -/// Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type. +/// Session-scoped approval details for specific command identifiers. /// ///
/// @@ -6780,7 +7025,7 @@ pub struct PermissionDecisionApproveForSessionApprovalCommands { pub kind: PermissionDecisionApproveForSessionApprovalCommandsKind, } -/// Schema for the `PermissionDecisionApproveForSessionApprovalRead` type. +/// Session-scoped approval details for read-only filesystem operations. /// ///
/// @@ -6795,7 +7040,7 @@ pub struct PermissionDecisionApproveForSessionApprovalRead { pub kind: PermissionDecisionApproveForSessionApprovalReadKind, } -/// Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type. +/// Session-scoped approval details for filesystem write operations. /// ///
/// @@ -6810,7 +7055,7 @@ pub struct PermissionDecisionApproveForSessionApprovalWrite { pub kind: PermissionDecisionApproveForSessionApprovalWriteKind, } -/// Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type. +/// Session-scoped approval details for an MCP server tool, or all tools on the server when `toolName` is null. /// ///
/// @@ -6829,7 +7074,7 @@ pub struct PermissionDecisionApproveForSessionApprovalMcp { pub tool_name: Option, } -/// Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type. +/// Session-scoped approval details for MCP sampling requests from a server. /// ///
/// @@ -6846,7 +7091,7 @@ pub struct PermissionDecisionApproveForSessionApprovalMcpSampling { pub server_name: String, } -/// Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type. +/// Session-scoped approval details for writes to long-term memory. /// ///
/// @@ -6861,7 +7106,7 @@ pub struct PermissionDecisionApproveForSessionApprovalMemory { pub kind: PermissionDecisionApproveForSessionApprovalMemoryKind, } -/// Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type. +/// Session-scoped approval details for a custom tool, keyed by tool name. /// ///
/// @@ -6878,7 +7123,7 @@ pub struct PermissionDecisionApproveForSessionApprovalCustomTool { pub tool_name: String, } -/// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type. +/// Session-scoped approval details for extension-management operations, optionally narrowed by operation. /// ///
/// @@ -6896,7 +7141,7 @@ pub struct PermissionDecisionApproveForSessionApprovalExtensionManagement { pub operation: Option, } -/// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` type. +/// Session-scoped approval details for an extension's permission-gated capability access, keyed by extension name. /// ///
/// @@ -6913,7 +7158,7 @@ pub struct PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess pub kind: PermissionDecisionApproveForSessionApprovalExtensionPermissionAccessKind, } -/// Schema for the `PermissionDecisionApproveForSession` type. +/// Permission-decision request variant to approve for the rest of the session, with optional tool approval or URL domain. /// ///
/// @@ -6934,7 +7179,7 @@ pub struct PermissionDecisionApproveForSession { pub kind: PermissionDecisionApproveForSessionKind, } -/// Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type. +/// Location-scoped approval details for specific command identifiers. /// ///
/// @@ -6951,7 +7196,7 @@ pub struct PermissionDecisionApproveForLocationApprovalCommands { pub kind: PermissionDecisionApproveForLocationApprovalCommandsKind, } -/// Schema for the `PermissionDecisionApproveForLocationApprovalRead` type. +/// Location-scoped approval details for read-only filesystem operations. /// ///
/// @@ -6966,7 +7211,7 @@ pub struct PermissionDecisionApproveForLocationApprovalRead { pub kind: PermissionDecisionApproveForLocationApprovalReadKind, } -/// Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type. +/// Location-scoped approval details for filesystem write operations. /// ///
/// @@ -6981,7 +7226,7 @@ pub struct PermissionDecisionApproveForLocationApprovalWrite { pub kind: PermissionDecisionApproveForLocationApprovalWriteKind, } -/// Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type. +/// Location-scoped approval details for an MCP server tool, or all tools on the server when `toolName` is null. /// ///
/// @@ -7000,7 +7245,7 @@ pub struct PermissionDecisionApproveForLocationApprovalMcp { pub tool_name: Option, } -/// Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type. +/// Location-scoped approval details for MCP sampling requests from a server. /// ///
/// @@ -7017,7 +7262,7 @@ pub struct PermissionDecisionApproveForLocationApprovalMcpSampling { pub server_name: String, } -/// Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type. +/// Location-scoped approval details for writes to long-term memory. /// ///
/// @@ -7032,7 +7277,7 @@ pub struct PermissionDecisionApproveForLocationApprovalMemory { pub kind: PermissionDecisionApproveForLocationApprovalMemoryKind, } -/// Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type. +/// Location-scoped approval details for a custom tool, keyed by tool name. /// ///
/// @@ -7049,7 +7294,7 @@ pub struct PermissionDecisionApproveForLocationApprovalCustomTool { pub tool_name: String, } -/// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type. +/// Location-scoped approval details for extension-management operations, optionally narrowed by operation. /// ///
/// @@ -7067,7 +7312,7 @@ pub struct PermissionDecisionApproveForLocationApprovalExtensionManagement { pub operation: Option, } -/// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` type. +/// Location-scoped approval details for an extension's permission-gated capability access, keyed by extension name. /// ///
/// @@ -7084,7 +7329,7 @@ pub struct PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess pub kind: PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind, } -/// Schema for the `PermissionDecisionApproveForLocation` type. +/// Permission-decision request variant to approve and persist a permission for a project location, with approval details and location key. /// ///
/// @@ -7103,7 +7348,7 @@ pub struct PermissionDecisionApproveForLocation { pub location_key: String, } -/// Schema for the `PermissionDecisionApprovePermanently` type. +/// Permission-decision request variant to permanently approve a URL domain across sessions. /// ///
/// @@ -7120,7 +7365,7 @@ pub struct PermissionDecisionApprovePermanently { pub kind: PermissionDecisionApprovePermanentlyKind, } -/// Schema for the `PermissionDecisionReject` type. +/// Permission-decision request variant to reject a pending permission request, with optional feedback. /// ///
/// @@ -7138,7 +7383,7 @@ pub struct PermissionDecisionReject { pub kind: PermissionDecisionRejectKind, } -/// Schema for the `PermissionDecisionUserNotAvailable` type. +/// Permission-decision variant indicating no user was available to confirm the request. /// ///
/// @@ -7153,7 +7398,7 @@ pub struct PermissionDecisionUserNotAvailable { pub kind: PermissionDecisionUserNotAvailableKind, } -/// Schema for the `PermissionDecisionApproved` type. +/// Permission-decision variant indicating the request was approved. /// ///
/// @@ -7168,7 +7413,7 @@ pub struct PermissionDecisionApproved { pub kind: PermissionDecisionApprovedKind, } -/// Schema for the `PermissionDecisionApprovedForSession` type. +/// Permission-decision variant indicating approval was remembered for the session, with approval details. /// ///
/// @@ -7185,7 +7430,7 @@ pub struct PermissionDecisionApprovedForSession { pub kind: PermissionDecisionApprovedForSessionKind, } -/// Schema for the `PermissionDecisionApprovedForLocation` type. +/// Permission-decision variant indicating approval was persisted for a project location, with approval details and location key. /// ///
/// @@ -7204,7 +7449,7 @@ pub struct PermissionDecisionApprovedForLocation { pub location_key: String, } -/// Schema for the `PermissionDecisionCancelled` type. +/// Permission-decision variant indicating the request was cancelled before use, with an optional reason. /// ///
/// @@ -7222,7 +7467,7 @@ pub struct PermissionDecisionCancelled { pub reason: Option, } -/// Schema for the `PermissionDecisionDeniedByRules` type. +/// Permission-decision variant indicating explicit denial by permission rules, with the matching rules. /// ///
/// @@ -7239,7 +7484,7 @@ pub struct PermissionDecisionDeniedByRules { pub rules: Vec, } -/// Schema for the `PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type. +/// Permission-decision variant indicating no approval rule matched and user confirmation was unavailable. /// ///
/// @@ -7254,7 +7499,7 @@ pub struct PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser { pub kind: PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUserKind, } -/// Schema for the `PermissionDecisionDeniedInteractivelyByUser` type. +/// Permission-decision variant indicating the user denied an interactive prompt, with optional feedback and force-reject flag. /// ///
/// @@ -7275,7 +7520,7 @@ pub struct PermissionDecisionDeniedInteractivelyByUser { pub kind: PermissionDecisionDeniedInteractivelyByUserKind, } -/// Schema for the `PermissionDecisionDeniedByContentExclusionPolicy` type. +/// Permission-decision variant indicating denial by content-exclusion policy, with path and message. /// ///
/// @@ -7294,7 +7539,7 @@ pub struct PermissionDecisionDeniedByContentExclusionPolicy { pub path: String, } -/// Schema for the `PermissionDecisionDeniedByPermissionRequestHook` type. +/// Permission-decision variant indicating denial by a permission request hook, with optional message and interrupt flag. /// ///
/// @@ -7332,7 +7577,7 @@ pub struct PermissionDecisionRequest { pub result: PermissionDecision, } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsCommands` type. +/// Location-persisted tool approval details for specific command identifiers. /// ///
/// @@ -7349,7 +7594,7 @@ pub struct PermissionsLocationsAddToolApprovalDetailsCommands { pub kind: PermissionsLocationsAddToolApprovalDetailsCommandsKind, } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsRead` type. +/// Location-persisted tool approval details for read-only filesystem operations. /// ///
/// @@ -7364,7 +7609,7 @@ pub struct PermissionsLocationsAddToolApprovalDetailsRead { pub kind: PermissionsLocationsAddToolApprovalDetailsReadKind, } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsWrite` type. +/// Location-persisted tool approval details for filesystem write operations. /// ///
/// @@ -7379,7 +7624,7 @@ pub struct PermissionsLocationsAddToolApprovalDetailsWrite { pub kind: PermissionsLocationsAddToolApprovalDetailsWriteKind, } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsMcp` type. +/// Location-persisted tool approval details for an MCP server tool, or all tools when `toolName` is null. /// ///
/// @@ -7398,7 +7643,7 @@ pub struct PermissionsLocationsAddToolApprovalDetailsMcp { pub tool_name: Option, } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsMcpSampling` type. +/// Location-persisted tool approval details for MCP sampling requests from a server. /// ///
/// @@ -7415,7 +7660,7 @@ pub struct PermissionsLocationsAddToolApprovalDetailsMcpSampling { pub server_name: String, } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsMemory` type. +/// Location-persisted tool approval details for writes to long-term memory. /// ///
/// @@ -7430,7 +7675,7 @@ pub struct PermissionsLocationsAddToolApprovalDetailsMemory { pub kind: PermissionsLocationsAddToolApprovalDetailsMemoryKind, } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsCustomTool` type. +/// Location-persisted tool approval details for a custom tool, keyed by tool name. /// ///
/// @@ -7447,7 +7692,7 @@ pub struct PermissionsLocationsAddToolApprovalDetailsCustomTool { pub tool_name: String, } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionManagement` type. +/// Location-persisted tool approval details for extension-management operations, optionally narrowed by operation. /// ///
/// @@ -7465,7 +7710,7 @@ pub struct PermissionsLocationsAddToolApprovalDetailsExtensionManagement { pub operation: Option, } -/// Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess` type. +/// Location-persisted tool approval details for an extension's permission-gated capability access, keyed by extension name. /// ///
/// @@ -7750,7 +7995,7 @@ pub struct PermissionRulesSet { pub denied: Vec, } -/// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type. +/// Source descriptor for a `session.permissions.configure` content-exclusion rule, with source name and type. /// ///
/// @@ -7765,7 +8010,7 @@ pub struct PermissionsConfigureAdditionalContentExclusionPolicyRuleSource { pub r#type: String, } -/// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRule` type. +/// Single content-exclusion rule supplied to `session.permissions.configure`, with paths, match conditions, and source. /// ///
/// @@ -7781,11 +8026,11 @@ pub struct PermissionsConfigureAdditionalContentExclusionPolicyRule { #[serde(skip_serializing_if = "Option::is_none")] pub if_none_match: Option>, pub paths: Vec, - /// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type. + /// Source descriptor for a `session.permissions.configure` content-exclusion rule, with source name and type. pub source: PermissionsConfigureAdditionalContentExclusionPolicyRuleSource, } -/// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicy` type. +/// Content-exclusion policy supplied to `session.permissions.configure`, with rules, last-updated data, and scope. /// ///
/// @@ -8046,7 +8291,7 @@ pub struct PermissionsResetSessionApprovalsResult { pub success: bool, } -/// Whether to enable full allow-all permissions for the session. +/// Allow-all mode to apply for the session. /// ///
/// @@ -8057,8 +8302,15 @@ pub struct PermissionsResetSessionApprovalsResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionsSetAllowAllRequest { - /// Whether to enable full allow-all permissions - pub enabled: bool, + /// Legacy full allow-all toggle. Prefer `mode`; when `mode` is omitted, `enabled: true` is treated as `mode: "on"` and any other value is treated as `mode: "off"`. + #[serde(skip_serializing_if = "Option::is_none")] + pub enabled: Option, + /// Allow-all mode to apply. `on` enables full allow-all; `auto` enables advisory LLM auto-approval; `off` disables both. + #[serde(skip_serializing_if = "Option::is_none")] + pub mode: Option, + /// Optional model id for the `auto` mode auto-approval LLM judging. Only meaningful when `mode` is `auto`; ignored otherwise. When omitted, the session's active model is used. + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, /// Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers. #[serde(skip_serializing_if = "Option::is_none")] pub source: Option, @@ -8300,7 +8552,7 @@ pub struct PlanUpdateRequest { pub content: String, } -/// Schema for the `Plugin` type. +/// Session plugin metadata, with name, marketplace, optional version, and enabled state. /// ///
/// @@ -8545,7 +8797,7 @@ pub struct PluginsUpdateRequest { pub name: String, } -/// Schema for the `PluginUpdateAllEntry` type. +/// Per-plugin result from updating all plugins, with versions, skills installed, success flag, and optional error. /// ///
/// @@ -9283,7 +9535,7 @@ pub struct PushAttachmentSelection { pub r#type: PushAttachmentSelectionType, } -/// Schema for the `QueuedCommandHandled` type. +/// Queued-command response indicating the host executed the command, with an optional flag to stop queue processing. /// ///
/// @@ -9301,7 +9553,7 @@ pub struct QueuedCommandHandled { pub stop_processing_queue: Option, } -/// Schema for the `QueuedCommandNotHandled` type. +/// Queued-command response indicating the host did not execute the command and the queue may continue. /// ///
/// @@ -9316,7 +9568,7 @@ pub struct QueuedCommandNotHandled { pub handled: bool, } -/// Schema for the `QueuePendingItems` type. +/// User-facing pending queue entry, with kind and display text for a queued message, slash command, or model change. /// ///
/// @@ -9869,18 +10121,12 @@ pub struct SandboxConfigUserPolicyFilesystem { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SandboxConfigUserPolicyNetwork { - /// Hosts allowed in addition to the base policy. - #[serde(skip_serializing_if = "Option::is_none")] - pub allowed_hosts: Option>, /// Whether traffic to local/loopback addresses is allowed. #[serde(skip_serializing_if = "Option::is_none")] pub allow_local_network: Option, /// Whether outbound network traffic is allowed at all. #[serde(skip_serializing_if = "Option::is_none")] pub allow_outbound: Option, - /// Hosts explicitly blocked. - #[serde(skip_serializing_if = "Option::is_none")] - pub blocked_hosts: Option>, } /// macOS seatbelt-specific options. @@ -9945,7 +10191,7 @@ pub struct SandboxConfig { pub user_policy: Option, } -/// Schema for the `ScheduleEntry` type. +/// Scheduled prompt entry with ID, timing (`intervalMs`, `cron`, or `at`), prompt text, recurrence, and next run time. /// ///
/// @@ -10175,7 +10421,7 @@ pub struct ServerInstructionSourceList { pub sources: Vec, } -/// Schema for the `ServerSkill` type. +/// Server-side skill metadata, including name, description, source, enabled/invocable state, path, project path, and argument hint. /// ///
/// @@ -10508,7 +10754,7 @@ pub struct SessionFsReaddirResult { pub error: Option, } -/// Schema for the `SessionFsReaddirWithTypesEntry` type. +/// Directory entry returned by session filesystem `readdirWithTypes`, with name and entry type. /// ///
/// @@ -10817,7 +11063,7 @@ pub struct SessionFsWriteFileRequest { pub mode: Option, } -/// Schema for the `SessionInstalledPlugin` type. +/// Installed plugin record for a session, with marketplace, version, install time, enabled state, cache path, and source. /// ///
/// @@ -10848,7 +11094,7 @@ pub struct SessionInstalledPlugin { pub version: Option, } -/// Schema for the `SessionInstalledPluginSourceGitHub` type. +/// Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref, and optional subpath. /// ///
/// @@ -10868,7 +11114,7 @@ pub struct SessionInstalledPluginSourceGitHub { pub source: SessionInstalledPluginSourceGitHubSource, } -/// Schema for the `SessionInstalledPluginSourceLocal` type. +/// Source descriptor for a direct local plugin install, with a local filesystem path. /// ///
/// @@ -10884,7 +11130,7 @@ pub struct SessionInstalledPluginSourceLocal { pub source: SessionInstalledPluginSourceLocalSource, } -/// Schema for the `SessionInstalledPluginSourceUrl` type. +/// Source descriptor for a direct URL plugin install, with URL, optional ref, and optional subpath. /// ///
/// @@ -11062,7 +11308,7 @@ pub struct SessionModelList { pub quota_snapshots: Option>, } -/// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type. +/// Source descriptor for a `sessions.open` content-exclusion rule, with source name and type. /// ///
/// @@ -11077,7 +11323,7 @@ pub struct SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource { pub r#type: String, } -/// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRule` type. +/// Single content-exclusion rule supplied to `sessions.open` options, with paths, match conditions, and source. /// ///
/// @@ -11093,11 +11339,11 @@ pub struct SessionOpenOptionsAdditionalContentExclusionPolicyRule { #[serde(skip_serializing_if = "Option::is_none")] pub if_none_match: Option>, pub paths: Vec, - /// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type. + /// Source descriptor for a `sessions.open` content-exclusion rule, with source name and type. pub source: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource, } -/// Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicy` type. +/// Content-exclusion policy supplied to `sessions.open` options, with rules, last-updated data, and scope. /// ///
/// @@ -11300,6 +11546,9 @@ pub struct SessionOpenOptions { /// Resolved sandbox configuration. #[serde(skip_serializing_if = "Option::is_none")] pub sandbox_config: Option, + /// Opt-in: self-fetch enterprise managed settings at session bootstrap. + #[serde(skip_serializing_if = "Option::is_none")] + pub self_fetch_managed_settings: Option, /// Capabilities enabled for this session. #[serde(skip_serializing_if = "Option::is_none")] pub session_capabilities: Option>, @@ -11498,7 +11747,7 @@ pub struct SessionsOpenHandoff { pub task_type: Option, } -/// Schema for the `SessionsOpenProgress` type. +/// `sessions.open` handoff progress update with step, status, and optional message. /// ///
/// @@ -11696,6 +11945,206 @@ pub struct SessionSetCredentialsResult { pub success: bool, } +/// Availability of built-in job tools surfaced to boundary consumers. +/// +///
+/// +/// **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 SessionSettingsBuiltInToolAvailabilitySnapshot { + #[serde(skip_serializing_if = "Option::is_none")] + pub create_pull_request: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub report_progress: Option, +} + +/// Named Rust-owned settings predicate to evaluate for this session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionSettingsEvaluatePredicateRequest { + /// Predicate name. The runtime owns the raw feature-flag names and composition logic. + pub name: SessionSettingsPredicateName, + /// Tool name for tool-scoped predicates such as trivial-change handling. + #[serde(skip_serializing_if = "Option::is_none")] + pub tool_name: Option, +} + +/// Result of evaluating a Rust-owned settings predicate. +/// +///
+/// +/// **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 SessionSettingsEvaluatePredicateResult { + pub enabled: bool, +} + +/// Redacted job settings for a session. The job nonce is excluded. +/// +///
+/// +/// **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 SessionSettingsJobSnapshot { + #[serde(skip_serializing_if = "Option::is_none")] + pub built_in_tool_availability: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub event_type: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub is_trigger_job: Option, +} + +/// Redacted model routing settings for a session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionSettingsModelSnapshot { + #[serde(skip_serializing_if = "Option::is_none")] + pub callback_url: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub default_reasoning_effort: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub instance_id: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, +} + +/// Online-evaluation settings safe to expose across the SDK boundary. +/// +///
+/// +/// **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 SessionSettingsOnlineEvaluationSnapshot { + #[serde(skip_serializing_if = "Option::is_none")] + pub disable_online_evaluation: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub enable_online_evaluation_output_file: Option, +} + +/// Redacted repository and GitHub host settings for a session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionSettingsRepoSnapshot { + #[serde(skip_serializing_if = "Option::is_none")] + pub branch: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub commit: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub host: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub host_protocol: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub owner_id: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub owner_name: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub pr_commit_count: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub read_write: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub secret_scanning_url: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub server_url: Option, +} + +/// Redacted validation and memory-tool settings for a session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionSettingsValidationSnapshot { + #[serde(skip_serializing_if = "Option::is_none")] + pub advisory_enabled: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub codeql_enabled: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub code_review_enabled: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub code_review_model: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub dependabot_timeout: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub memory_store_enabled: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub memory_vote_enabled: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub secret_scanning_enabled: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub timeout: Option, +} + +/// Redacted, serializable view of session runtime settings for SDK boundary consumers. Secrets and raw feature flags are intentionally excluded. +/// +///
+/// +/// **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 SessionSettingsSnapshot { + #[serde(skip_serializing_if = "Option::is_none")] + pub client_name: Option, + pub job: SessionSettingsJobSnapshot, + pub model: SessionSettingsModelSnapshot, + pub online_evaluation: SessionSettingsOnlineEvaluationSnapshot, + pub repo: SessionSettingsRepoSnapshot, + #[serde(skip_serializing_if = "Option::is_none")] + pub start_time_ms: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub timeout_ms: Option, + pub validation: SessionSettingsValidationSnapshot, + #[serde(skip_serializing_if = "Option::is_none")] + pub version: Option, +} + /// UUID prefix to resolve to a unique session ID. /// ///
@@ -12514,7 +12963,7 @@ pub struct ShutdownRequest { pub r#type: Option, } -/// Schema for the `Skill` type. +/// Skill metadata available to a session, with name, description, source, enabled/invocable state, path, plugin, and argument hint. /// ///
/// @@ -12546,7 +12995,7 @@ pub struct Skill { pub user_invocable: bool, } -/// Schema for the `SkillDiscoveryPath` type. +/// Canonical directory where skills can be discovered or created, with scope, preference, and optional project path. /// ///
/// @@ -12684,7 +13133,7 @@ pub struct SkillsGetDiscoveryPathsRequest { pub project_paths: Option>, } -/// Schema for the `SkillsInvokedSkill` type. +/// Skill invocation record with name, path, content, allowed tools, and turn number. /// ///
/// @@ -12740,7 +13189,7 @@ pub struct SkillsLoadDiagnostics { pub warnings: Vec, } -/// Schema for the `SlashCommandAgentPromptResult` type. +/// Slash-command invocation result that submits an agent prompt, with display prompt, optional mode, and settings-change flag. /// ///
/// @@ -12765,7 +13214,7 @@ pub struct SlashCommandAgentPromptResult { pub runtime_settings_changed: Option, } -/// Schema for the `SlashCommandCompletedResult` type. +/// Slash-command invocation result indicating completion, with optional message and settings-change flag. /// ///
/// @@ -12786,7 +13235,7 @@ pub struct SlashCommandCompletedResult { pub runtime_settings_changed: Option, } -/// Schema for the `SlashCommandTextResult` type. +/// Slash-command invocation result containing text output plus Markdown/ANSI rendering flags. /// ///
/// @@ -12812,7 +13261,7 @@ pub struct SlashCommandTextResult { pub text: String, } -/// Schema for the `SlashCommandSelectSubcommandOption` type. +/// Selectable slash-command subcommand option with name, description, and optional group label. /// ///
/// @@ -12832,7 +13281,7 @@ pub struct SlashCommandSelectSubcommandOption { pub name: String, } -/// Schema for the `SlashCommandSelectSubcommandResult` type. +/// Slash-command invocation result asking the client to present subcommand options for a parent command. /// ///
/// @@ -12903,7 +13352,7 @@ pub struct SubagentSettings { pub max_depth: Option, } -/// Schema for the `TaskAgentInfo` type. +/// Tracked background agent task metadata, including IDs, status, timing, agent type, prompt, model, result, and latest response. /// ///
/// @@ -12965,7 +13414,7 @@ pub struct TaskAgentInfo { pub r#type: TaskAgentInfoType, } -/// Schema for the `TaskProgressLine` type. +/// Timestamped display line for task progress output or recent agent activity. /// ///
/// @@ -12982,7 +13431,7 @@ pub struct TaskProgressLine { pub timestamp: String, } -/// Schema for the `TaskAgentProgress` type. +/// Progress snapshot for an agent task, with recent activity lines and optional latest intent. /// ///
/// @@ -13093,7 +13542,7 @@ pub struct TasksGetProgressResult { pub progress: Option, } -/// Schema for the `TaskShellInfo` type. +/// Tracked shell task metadata, including ID, command, status, timing, attachment/execution mode, log path, and PID. /// ///
/// @@ -13135,7 +13584,7 @@ pub struct TaskShellInfo { pub r#type: TaskShellInfoType, } -/// Schema for the `TaskShellProgress` type. +/// Progress snapshot for a shell task, with recent stdout/stderr output and optional process ID. /// ///
/// @@ -13348,7 +13797,7 @@ pub struct TelemetrySetFeatureOverridesRequest { pub features: HashMap, } -/// Schema for the `TokenAuthInfo` type. +/// Authentication-info variant for SDK-configured token authentication, carrying host and the secret token value. /// ///
/// @@ -13370,7 +13819,7 @@ pub struct TokenAuthInfo { pub r#type: TokenAuthInfoType, } -/// Schema for the `Tool` type. +/// Built-in tool metadata with identifier, optional namespaced name, description, input-parameter schema, and usage instructions. /// ///
/// @@ -13466,7 +13915,7 @@ pub struct ToolsListRequest { #[serde(rename_all = "camelCase")] pub struct ToolsUpdateSubagentSettingsResult {} -/// Schema for the `UIElicitationArrayAnyOfFieldItemsAnyOf` type. +/// Selectable option for a UI elicitation multi-select array item, with submitted value and display label. /// ///
/// @@ -13765,7 +14214,7 @@ pub struct UIElicitationStringEnumField { pub r#type: UIElicitationStringEnumFieldType, } -/// Schema for the `UIElicitationStringOneOfFieldOneOf` type. +/// Selectable option for a UI elicitation single-select string field, with submitted value and display label. /// ///
/// @@ -13846,7 +14295,7 @@ pub struct UIEphemeralQueryResult { pub answer: String, } -/// Schema for the `UIExitPlanModeResponse` type. +/// User response for a pending exit-plan-mode request, with approval state, selected action, auto-approve flag, and feedback. /// ///
/// @@ -13917,7 +14366,7 @@ pub struct UIHandlePendingElicitationRequest { pub struct UIHandlePendingExitPlanModeRequest { /// The unique request ID from the exit_plan_mode.requested event pub request_id: RequestId, - /// Schema for the `UIExitPlanModeResponse` type. + /// User response for a pending exit-plan-mode request, with approval state, selected action, auto-approve flag, and feedback. pub response: UIExitPlanModeResponse, } @@ -14004,7 +14453,7 @@ pub struct UIHandlePendingSessionLimitsExhaustedRequest { pub response: UISessionLimitsExhaustedResponse, } -/// Schema for the `UIUserInputResponse` type. +/// User response for a pending user-input request, with answer text and whether it was typed freeform. /// ///
/// @@ -14034,7 +14483,7 @@ pub struct UIUserInputResponse { pub struct UIHandlePendingUserInputRequest { /// The unique request ID from the user_input.requested event pub request_id: RequestId, - /// Schema for the `UIUserInputResponse` type. + /// User response for a pending user-input request, with answer text and whether it was typed freeform. pub response: UIUserInputResponse, } @@ -14154,7 +14603,7 @@ pub struct UsageMetricsModelMetricRequests { pub count: i64, } -/// Schema for the `UsageMetricsModelMetricTokenDetail` type. +/// Per-model token-detail entry containing the accumulated token count for one token type. /// ///
/// @@ -14193,7 +14642,7 @@ pub struct UsageMetricsModelMetricUsage { pub reasoning_tokens: Option, } -/// Schema for the `UsageMetricsModelMetric` type. +/// Per-model usage metrics, including request counts/costs, token usage, nano-AI units, and per-token-type details. /// ///
/// @@ -14216,7 +14665,7 @@ pub struct UsageMetricsModelMetric { pub usage: UsageMetricsModelMetricUsage, } -/// Schema for the `UsageMetricsTokenDetail` type. +/// Session-wide token-detail entry containing the accumulated token count for one token type. /// ///
/// @@ -14269,7 +14718,7 @@ pub struct UsageGetMetricsResult { pub total_user_requests: i64, } -/// Schema for the `UserAuthInfo` type. +/// Authentication-info variant for OAuth user auth, with host and login; the token remains in the runtime secret store. /// ///
/// @@ -14486,7 +14935,7 @@ pub struct WorkspaceDiffResult { pub requested_mode: WorkspaceDiffMode, } -/// Schema for the `WorkspacesCheckpoints` type. +/// Workspace checkpoint metadata with assigned number, human-readable title, and checkpoint filename. /// ///
/// @@ -15433,6 +15882,28 @@ pub struct SessionGitHubAuthSetCredentialsResult { pub success: bool, } +/// Result of collecting a redacted debug bundle. +/// +///
+/// +/// **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 SessionDebugCollectLogsResult { + /// Files included in the redacted bundle. + pub entries: Vec, + /// Destination kind that was written. + pub kind: DebugCollectLogsResultKind, + /// Actual archive path or staging directory path written. This may differ from the requested path when no-overwrite suffixing or fallback-to-temp-directory was needed. + pub path: String, + /// Optional files or directories that could not be included. + #[serde(skip_serializing_if = "Option::is_none")] + pub skipped_entries: Option>, +} + /// Identifies the target session. /// ///
@@ -17464,13 +17935,16 @@ pub struct SessionPermissionsSetApproveAllResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionPermissionsSetAllowAllResult { - /// Authoritative allow-all state after the mutation + /// Authoritative full allow-all state after the mutation pub enabled: bool, + /// Authoritative allow-all mode after the mutation + #[serde(skip_serializing_if = "Option::is_none")] + pub mode: Option, /// Whether the operation succeeded pub success: bool, } -/// Current full allow-all permission state. +/// Current allow-all permission mode. /// ///
/// @@ -17483,6 +17957,9 @@ pub struct SessionPermissionsSetAllowAllResult { pub struct SessionPermissionsGetAllowAllResult { /// Whether full allow-all permissions are currently active pub enabled: bool, + /// Current allow-all mode + #[serde(skip_serializing_if = "Option::is_none")] + pub mode: Option, } /// Indicates whether the operation succeeded. @@ -18072,6 +18549,47 @@ pub struct SessionMetadataRecomputeContextTokensResult { pub total_tokens: i64, } +/// Identifies the target session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionSettingsSnapshotParams { + /// Target session identifier + pub session_id: SessionId, +} + +/// Redacted, serializable view of session runtime settings for SDK boundary consumers. Secrets and raw feature flags are intentionally excluded. +/// +///
+/// +/// **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 SessionSettingsSnapshotResult { + #[serde(skip_serializing_if = "Option::is_none")] + pub client_name: Option, + pub job: SessionSettingsJobSnapshot, + pub model: SessionSettingsModelSnapshot, + pub online_evaluation: SessionSettingsOnlineEvaluationSnapshot, + pub repo: SessionSettingsRepoSnapshot, + #[serde(skip_serializing_if = "Option::is_none")] + pub start_time_ms: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub timeout_ms: Option, + pub validation: SessionSettingsValidationSnapshot, + #[serde(skip_serializing_if = "Option::is_none")] + pub version: Option, +} + /// Identifier of the spawned process, used to correlate streamed output and exit notifications. /// ///
@@ -19078,6 +19596,31 @@ pub enum AgentRegistrySpawnResult { ValidationError(AgentRegistrySpawnValidationError), } +/// Current or requested allow-all mode. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionsAllowAllMode { + /// Permission requests follow the normal approval flow. + #[serde(rename = "off")] + Off, + /// Tool, path, and URL permission requests are automatically approved. + #[serde(rename = "on")] + On, + /// Permission requests follow the normal approval flow with an LLM advisory recommendation attached; clients may choose to auto-approve requests the judge evaluated as acceptable. + #[serde(rename = "auto")] + Auto, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// API-key authentication for non-GitHub LLM providers (e.g. when running BYOM-style). #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ApiKeyAuthInfoType { @@ -19389,6 +19932,129 @@ pub enum CopilotApiTokenAuthInfoType { CopilotApiToken, } +/// Source category for a collected debug bundle entry. +/// +///
+/// +/// **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 DebugCollectLogsSource { + /// Session event log. + #[serde(rename = "events")] + Events, + /// Process log for the session. + #[serde(rename = "process-log")] + ProcessLog, + /// Interactive shell log for the session. + #[serde(rename = "shell-log")] + ShellLog, + /// Caller-provided diagnostic entry. + #[serde(rename = "additional")] + Additional, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum DebugCollectLogsDestinationArchiveKind { + #[serde(rename = "archive")] + #[default] + Archive, +} + +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum DebugCollectLogsDestinationDirectoryKind { + #[serde(rename = "directory")] + #[default] + Directory, +} + +/// Destination for the redacted debug bundle. +/// +///
+/// +/// **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 DebugCollectLogsDestination { + Archive(DebugCollectLogsDestinationArchive), + Directory(DebugCollectLogsDestinationDirectory), +} + +/// Kind of caller-provided debug log entry. +/// +///
+/// +/// **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 DebugCollectLogsEntryKind { + /// Include a single server-local file. + #[serde(rename = "file")] + File, + /// Include files from a server-local directory recursively. + #[serde(rename = "directory")] + Directory, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// How a collected debug entry should be redacted before being staged. +/// +///
+/// +/// **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 DebugCollectLogsRedaction { + /// Redact the file as plain UTF-8 log text. + #[serde(rename = "plain-text")] + PlainText, + /// Redact each non-empty line as a session event JSON object, falling back to plain-text redaction for malformed lines. + #[serde(rename = "events-jsonl")] + EventsJsonl, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Destination kind that was written. +/// +///
+/// +/// **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 DebugCollectLogsResultKind { + /// A .tgz archive was written. + #[serde(rename = "archive")] + Archive, + /// A directory containing redacted files was written. + #[serde(rename = "directory")] + Directory, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Server transport type: stdio, http, sse (deprecated), or memory /// ///
@@ -21917,6 +22583,79 @@ pub enum SessionsOpenStatus { Unknown, } +/// Rust-owned settings predicates exposed across the SDK boundary. Raw feature-flag names are intentionally not part of the contract. +/// +///
+/// +/// **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 SessionSettingsPredicateName { + /// Whether the security-tools feature flag enables security tool wiring. + #[serde(rename = "securityToolsEnabled")] + SecurityToolsEnabled, + /// Whether third-party security tools should receive the security prompt. + #[serde(rename = "thirdPartySecurityPromptEnabled")] + ThirdPartySecurityPromptEnabled, + /// Whether validation may run in parallel. + #[serde(rename = "parallelValidationEnabled")] + ParallelValidationEnabled, + /// Whether runtime timing telemetry is enabled. + #[serde(rename = "runtimeTimingTelemetryEnabled")] + RuntimeTimingTelemetryEnabled, + /// Whether the co-author hook is enabled. + #[serde(rename = "coAuthorHookEnabled")] + CoAuthorHookEnabled, + /// Whether Chronicle integration is enabled. + #[serde(rename = "chronicleEnabled")] + ChronicleEnabled, + /// Whether content-exclusion policy may self-fetch data. + #[serde(rename = "contentExclusionSelfFetchEnabled")] + ContentExclusionSelfFetchEnabled, + /// Whether Claude Opus token-limit caps should be applied. + #[serde(rename = "capClaudeOpusTokenLimitsEnabled")] + CapClaudeOpusTokenLimitsEnabled, + /// Whether code-review behavior is enabled. + #[serde(rename = "codeReviewFeatureEnabled")] + CodeReviewFeatureEnabled, + /// Whether CCA should use the TypeScript autofind behavior. + #[serde(rename = "ccaUseTsAutofindEnabled")] + CcaUseTsAutofindEnabled, + /// Whether the dependency checker is enabled. + #[serde(rename = "dependencyCheckerEnabled")] + DependencyCheckerEnabled, + /// Whether the Dependabot checker is enabled. + #[serde(rename = "dependabotCheckerEnabled")] + DependabotCheckerEnabled, + /// Whether the CodeQL checker is enabled. + #[serde(rename = "codeqlCheckerEnabled")] + CodeqlCheckerEnabled, + /// Whether trivial-change handling is enabled. + #[serde(rename = "trivialChangeEnabled")] + TrivialChangeEnabled, + /// Whether trivial-change skip behavior is enabled. + #[serde(rename = "trivialChangeSkipEnabled")] + TrivialChangeSkipEnabled, + /// Whether trivial-change handling is enabled for code review. + #[serde(rename = "trivialChangeEnabledForCodeReview")] + TrivialChangeEnabledForCodeReview, + /// Whether trivial-change skip behavior is enabled for code review. + #[serde(rename = "trivialChangeSkipEnabledForCodeReview")] + TrivialChangeSkipEnabledForCodeReview, + /// Whether trivial-change handling is enabled for a specific tool. + #[serde(rename = "trivialChangeEnabledForTool")] + TrivialChangeEnabledForTool, + /// Whether trivial-change skip behavior is enabled for a specific tool. + #[serde(rename = "trivialChangeSkipEnabledForTool")] + TrivialChangeSkipEnabledForTool, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Which session sources to include. Defaults to `local` for backward compatibility. /// ///
diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs index 1d999c46e..0f7bf0212 100644 --- a/rust/src/generated/rpc.rs +++ b/rust/src/generated/rpc.rs @@ -161,7 +161,7 @@ impl<'a> ClientRpc<'a> { /// /// # Parameters /// - /// * `params` - Optional connection token presented by the SDK client during the handshake. + /// * `params` - Parameters for the `server.connect` handshake: an optional connection token and optional connection-level opt-ins (e.g. GitHub telemetry forwarding). /// /// # Returns /// @@ -2580,6 +2580,13 @@ impl<'a> SessionRpc<'a> { } } + /// `session.debug.*` sub-namespace. + pub fn debug(&self) -> SessionRpcDebug<'a> { + SessionRpcDebug { + session: self.session, + } + } + /// `session.eventLog.*` sub-namespace. pub fn event_log(&self) -> SessionRpcEventLog<'a> { SessionRpcEventLog { @@ -2720,6 +2727,13 @@ impl<'a> SessionRpc<'a> { } } + /// `session.settings.*` sub-namespace. + pub fn settings(&self) -> SessionRpcSettings<'a> { + SessionRpcSettings { + session: self.session, + } + } + /// `session.shell.*` sub-namespace. pub fn shell(&self) -> SessionRpcShell<'a> { SessionRpcShell { @@ -3525,6 +3539,47 @@ impl<'a> SessionRpcCompletions<'a> { } } +/// `session.debug.*` RPCs. +#[derive(Clone, Copy)] +pub struct SessionRpcDebug<'a> { + pub(crate) session: &'a Session, +} + +impl<'a> SessionRpcDebug<'a> { + /// Collects a redacted session debug log bundle into a local archive or staging directory. The runtime includes session-owned logs by default and accepts caller-provided diagnostic entries so host applications can add their own files without changing this API shape. + /// + /// Wire method: `session.debug.collectLogs`. + /// + /// # Parameters + /// + /// * `params` - Options for collecting a redacted session debug bundle. + /// + /// # Returns + /// + /// Result of collecting a redacted debug bundle. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn collect_logs( + &self, + params: DebugCollectLogsRequest, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_DEBUG_COLLECTLOGS, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } +} + /// `session.eventLog.*` RPCs. #[derive(Clone, Copy)] pub struct SessionRpcEventLog<'a> { @@ -5858,13 +5913,13 @@ impl<'a> SessionRpcPermissions<'a> { Ok(serde_json::from_value(_value)?) } - /// Enables or disables full allow-all permissions (tools, paths, and URLs) for the session. Used by attach-mode clients (e.g. LocalRpcSession's `/allow-all` forwarder) to flip the target session's permission state. Unlike `setApproveAll`, this swaps in the unrestricted path and URL managers and emits `session.permissions_changed` on transition. The result returns the authoritative post-mutation state so callers can update their local mirrors without racing the `session.permissions_changed` notification on the same wire. + /// Sets the allow-all permission mode for the session. Used by attach-mode clients (e.g. LocalRpcSession's `/allow-all` forwarder) to flip the target session's permission state. The `on` mode swaps in unrestricted path and URL managers and emits `session.permissions_changed` on transition; the `auto` mode keeps normal prompt paths active while attaching LLM safety recommendations. The result returns the authoritative post-mutation state so callers can update their local mirrors without racing the `session.permissions_changed` notification on the same wire. /// /// Wire method: `session.permissions.setAllowAll`. /// /// # Parameters /// - /// * `params` - Whether to enable full allow-all permissions for the session. + /// * `params` - Allow-all mode to apply for the session. /// /// # Returns /// @@ -5894,13 +5949,13 @@ impl<'a> SessionRpcPermissions<'a> { Ok(serde_json::from_value(_value)?) } - /// Returns whether full allow-all permissions are currently active for the session. + /// Returns the current allow-all permission mode for the session. /// /// Wire method: `session.permissions.getAllowAll`. /// /// # Returns /// - /// Current full allow-all permission state. + /// Current allow-all permission mode. /// ///
/// @@ -7032,6 +7087,75 @@ impl<'a> SessionRpcSchedule<'a> { } } +/// `session.settings.*` RPCs. +#[derive(Clone, Copy)] +pub struct SessionRpcSettings<'a> { + pub(crate) session: &'a Session, +} + +impl<'a> SessionRpcSettings<'a> { + /// Returns a redacted snapshot of session runtime settings, with secrets and raw feature flags excluded. Internal: the runtime settings shape is a runtime-internal surface and is deliberately kept out of the public SDK, because consumers should not depend on the runtime's internal settings layout. It remains callable in-process and is expected to be reworked as the runtime internals are consolidated. + /// + /// Wire method: `session.settings.snapshot`. + /// + /// # Returns + /// + /// Redacted, serializable view of session runtime settings for SDK boundary consumers. Secrets and raw feature flags are intentionally excluded. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub(crate) async fn snapshot(&self) -> Result { + let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SETTINGS_SNAPSHOT, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Evaluates a named Rust-owned settings predicate without exposing raw feature flags. Internal: the raw feature-flag names and composition are runtime-internal, so this predicate-evaluation helper is kept out of the public SDK surface and is callable in-process only. + /// + /// Wire method: `session.settings.evaluatePredicate`. + /// + /// # Parameters + /// + /// * `params` - Named Rust-owned settings predicate to evaluate for this session. + /// + /// # Returns + /// + /// Result of evaluating a Rust-owned settings predicate. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub(crate) async fn evaluate_predicate( + &self, + params: SessionSettingsEvaluatePredicateRequest, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_SETTINGS_EVALUATEPREDICATE, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } +} + /// `session.shell.*` RPCs. #[derive(Clone, Copy)] pub struct SessionRpcShell<'a> { diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs index af5fac2a8..fbb9b9510 100644 --- a/rust/src/generated/session_events.rs +++ b/rust/src/generated/session_events.rs @@ -870,12 +870,32 @@ pub struct SessionSessionLimitsChangedData { pub session_limits: Option, } -/// Session event "session.permissions_changed". Permissions change details carrying the aggregate allow-all boolean transition. +/// Session event "session.permissions_changed". Permissions change details carrying the aggregate allow-all transition. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionPermissionsChangedData { + /// Allow-all mode after the change + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub allow_all_permission_mode: Option, /// Aggregate allow-all flag after the change pub allow_all_permissions: bool, + /// Allow-all mode before the change + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub previous_allow_all_permission_mode: Option, /// Aggregate allow-all flag before the change pub previous_allow_all_permissions: bool, } @@ -1011,7 +1031,7 @@ pub struct ShutdownModelMetricRequests { pub count: Option, } -/// Schema for the `ShutdownModelMetricTokenDetail` type. +/// A token-type entry in a shutdown model metric, storing the accumulated token count. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ShutdownModelMetricTokenDetail { @@ -1036,7 +1056,7 @@ pub struct ShutdownModelMetricUsage { pub reasoning_tokens: Option, } -/// Schema for the `ShutdownModelMetric` type. +/// Per-model shutdown metrics with request counts, token usage, nano-AI units, and token details. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ShutdownModelMetric { @@ -1059,7 +1079,7 @@ pub struct ShutdownModelMetric { pub usage: ShutdownModelMetricUsage, } -/// Schema for the `ShutdownTokenDetail` type. +/// A session-wide shutdown token-type entry storing the accumulated token count. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ShutdownTokenDetail { @@ -1193,6 +1213,9 @@ pub struct SessionCompactionStartData { /// Token count from non-system messages (user, assistant, tool) at compaction start #[serde(skip_serializing_if = "Option::is_none")] pub conversation_tokens: Option, + /// Model identifier used for compaction, when known + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, /// Token count from system message(s) at compaction start #[serde(skip_serializing_if = "Option::is_none")] pub system_tokens: Option, @@ -1327,7 +1350,7 @@ pub struct SessionTaskCompleteData { pub summary: Option, } -/// Session event "user.message". +/// Session event "user.message". Payload of `user.message` with displayed and model-transformed content, attachments, source/delivery metadata, mode, and telemetry IDs. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UserMessageData { @@ -1377,6 +1400,9 @@ pub struct AssistantTurnStartData { /// CAPI interaction ID for correlating this turn with upstream telemetry #[serde(skip_serializing_if = "Option::is_none")] pub interaction_id: Option, + /// Model identifier used for this turn, when known + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, /// Identifier for this turn within the agentic loop, typically a stringified turn number pub turn_id: String, } @@ -1650,6 +1676,9 @@ pub struct AssistantMessageDeltaData { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AssistantTurnEndData { + /// Model identifier used for this turn, when known + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, /// Identifier of the turn that has ended, matching the corresponding assistant.turn_start event pub turn_id: String, } @@ -1689,7 +1718,7 @@ pub struct AssistantUsageCopilotUsage { pub total_nano_aiu: f64, } -/// Schema for the `AssistantUsageQuotaSnapshot` type. +/// Internal per-quota snapshot for assistant usage, including entitlement, consumed requests, overage, reset date, and remaining quota. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub(crate) struct AssistantUsageQuotaSnapshot { @@ -1910,7 +1939,7 @@ pub struct ToolExecutionStartShellToolInfo { pub possible_paths: Vec, } -/// Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. +/// MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_start`. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolExecutionStartToolDescriptionMetaUI { @@ -1926,7 +1955,7 @@ pub struct ToolExecutionStartToolDescriptionMetaUI { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolExecutionStartToolDescriptionMeta { - /// Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. + /// MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_start`. #[serde(skip_serializing_if = "Option::is_none")] pub ui: Option, } @@ -2158,7 +2187,7 @@ pub struct ToolExecutionCompleteContentResourceLink { pub uri: String, } -/// Schema for the `EmbeddedTextResourceContents` type. +/// Embedded text resource contents identified by a URI, with an optional MIME type and a text payload. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct EmbeddedTextResourceContents { @@ -2171,7 +2200,7 @@ pub struct EmbeddedTextResourceContents { pub uri: String, } -/// Schema for the `EmbeddedBlobResourceContents` type. +/// Embedded binary resource contents identified by a URI, with an optional MIME type and a base64-encoded blob. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct EmbeddedBlobResourceContents { @@ -2194,7 +2223,7 @@ pub struct ToolExecutionCompleteContentResource { pub r#type: ToolExecutionCompleteContentResourceType, } -/// Schema for the `ToolExecutionCompleteUIResourceMetaUICsp` type. +/// CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolExecutionCompleteUIResourceMetaUICsp { @@ -2208,54 +2237,54 @@ pub struct ToolExecutionCompleteUIResourceMetaUICsp { pub resource_domains: Option>, } -/// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsCamera` type. +/// Marker object for camera permission on an MCP Apps UI resource. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsCamera {} -/// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite` type. +/// Marker object for clipboard-write permission on an MCP Apps UI resource. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite {} -/// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation` type. +/// Marker object for geolocation permission on an MCP Apps UI resource. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation {} -/// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone` type. +/// Marker object for microphone permission on an MCP Apps UI resource. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone {} -/// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissions` type. +/// Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolExecutionCompleteUIResourceMetaUIPermissions { - /// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsCamera` type. + /// Marker object for camera permission on an MCP Apps UI resource. #[serde(skip_serializing_if = "Option::is_none")] pub camera: Option, - /// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite` type. + /// Marker object for clipboard-write permission on an MCP Apps UI resource. #[serde(skip_serializing_if = "Option::is_none")] pub clipboard_write: Option, - /// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation` type. + /// Marker object for geolocation permission on an MCP Apps UI resource. #[serde(skip_serializing_if = "Option::is_none")] pub geolocation: Option, - /// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone` type. + /// Marker object for microphone permission on an MCP Apps UI resource. #[serde(skip_serializing_if = "Option::is_none")] pub microphone: Option, } -/// Schema for the `ToolExecutionCompleteUIResourceMetaUI` type. +/// MCP Apps UI resource metadata for a completed tool result, including CSP, permissions, domain, and border preference. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolExecutionCompleteUIResourceMetaUI { - /// Schema for the `ToolExecutionCompleteUIResourceMetaUICsp` type. + /// CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. #[serde(skip_serializing_if = "Option::is_none")] pub csp: Option, #[serde(skip_serializing_if = "Option::is_none")] pub domain: Option, - /// Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissions` type. + /// Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. #[serde(skip_serializing_if = "Option::is_none")] pub permissions: Option, #[serde(skip_serializing_if = "Option::is_none")] @@ -2266,7 +2295,7 @@ pub struct ToolExecutionCompleteUIResourceMetaUI { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolExecutionCompleteUIResourceMeta { - /// Schema for the `ToolExecutionCompleteUIResourceMetaUI` type. + /// MCP Apps UI resource metadata for a completed tool result, including CSP, permissions, domain, and border preference. #[serde(skip_serializing_if = "Option::is_none")] pub ui: Option, } @@ -2330,7 +2359,7 @@ pub struct ToolExecutionCompleteResult { pub ui_resource: Option, } -/// Schema for the `ToolExecutionCompleteToolDescriptionMetaUI` type. +/// MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_complete`. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolExecutionCompleteToolDescriptionMetaUI { @@ -2346,7 +2375,7 @@ pub struct ToolExecutionCompleteToolDescriptionMetaUI { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ToolExecutionCompleteToolDescriptionMeta { - /// Schema for the `ToolExecutionCompleteToolDescriptionMetaUI` type. + /// MCP Apps tool `_meta.ui` resource URI and visibility captured on `tool.execution_complete`. #[serde(skip_serializing_if = "Option::is_none")] pub ui: Option, } @@ -2419,6 +2448,9 @@ pub struct SkillInvokedData { /// Description of the skill from its SKILL.md frontmatter #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, + /// Model identifier active when the skill was invoked, when known + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, /// Name of the invoked skill pub name: String, /// File path to the SKILL.md definition @@ -2637,7 +2669,7 @@ pub struct SystemNotificationData { pub kind: serde_json::Value, } -/// Schema for the `PermissionRequestShellCommand` type. +/// A parsed command identifier in a shell permission request, including whether it is read-only. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionRequestShellCommand { @@ -2647,7 +2679,7 @@ pub struct PermissionRequestShellCommand { pub read_only: bool, } -/// Schema for the `PermissionRequestShellPossibleUrl` type. +/// A URL that may be accessed by a command in a shell permission request. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionRequestShellPossibleUrl { @@ -2865,10 +2897,38 @@ pub struct PermissionRequestExtensionPermissionAccess { pub tool_call_id: Option, } +/// Auto-approval judge information attached to a permission request. Present (non-null) only when the session's allow-all mode is "auto"; its absence means auto mode was off and the judge did not evaluate the request. The `recommendation` conveys the judge's disposition for this request. +/// +///
+/// +/// **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 PermissionAutoApproval { + /// Human-readable reason for the judge's recommendation, when available. + #[serde(skip_serializing_if = "Option::is_none")] + pub reason: Option, + /// The auto-approval safety judge's outcome for this request. + pub recommendation: AutoApprovalRecommendation, +} + /// Shell command permission prompt #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionPromptRequestCommands { + /// Auto-approval judge information for this request; present only when auto mode is enabled. + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub auto_approval: Option, /// Whether the UI can offer session-wide approval for this command pattern pub can_offer_session_approval: bool, /// Command identifiers covered by this approval prompt @@ -2891,6 +2951,16 @@ pub struct PermissionPromptRequestCommands { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionPromptRequestWrite { + /// Auto-approval judge information for this request; present only when auto mode is enabled. + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub auto_approval: Option, /// Whether the UI can offer session-wide approval for file write operations pub can_offer_session_approval: bool, /// Unified diff showing the proposed changes @@ -2913,6 +2983,16 @@ pub struct PermissionPromptRequestWrite { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionPromptRequestRead { + /// Auto-approval judge information for this request; present only when auto mode is enabled. + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub auto_approval: Option, /// Human-readable description of why the file is being read pub intention: String, /// Prompt kind discriminator @@ -2931,6 +3011,16 @@ pub struct PermissionPromptRequestMcp { /// Arguments to pass to the MCP tool #[serde(skip_serializing_if = "Option::is_none")] pub args: Option, + /// Auto-approval judge information for this request; present only when auto mode is enabled. + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub auto_approval: Option, /// Prompt kind discriminator pub kind: PermissionPromptRequestMcpKind, /// Name of the MCP server providing the tool @@ -2948,6 +3038,16 @@ pub struct PermissionPromptRequestMcp { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionPromptRequestUrl { + /// Auto-approval judge information for this request; present only when auto mode is enabled. + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub auto_approval: Option, /// Human-readable description of why the URL is being accessed pub intention: String, /// Prompt kind discriminator @@ -2966,6 +3066,16 @@ pub struct PermissionPromptRequestMemory { /// Whether this is a store or vote memory operation #[serde(skip_serializing_if = "Option::is_none")] pub action: Option, + /// Auto-approval judge information for this request; present only when auto mode is enabled. + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub auto_approval: Option, /// Source references for the stored fact (store only) #[serde(skip_serializing_if = "Option::is_none")] pub citations: Option, @@ -2994,6 +3104,16 @@ pub struct PermissionPromptRequestCustomTool { /// Arguments to pass to the custom tool #[serde(skip_serializing_if = "Option::is_none")] pub args: Option, + /// Auto-approval judge information for this request; present only when auto mode is enabled. + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub auto_approval: Option, /// Prompt kind discriminator pub kind: PermissionPromptRequestCustomToolKind, /// Tool call ID that triggered this permission request @@ -3011,6 +3131,16 @@ pub struct PermissionPromptRequestCustomTool { pub struct PermissionPromptRequestPath { /// Underlying permission kind that needs path approval pub access_kind: PermissionPromptRequestPathAccessKind, + /// Auto-approval judge information for this request; present only when auto mode is enabled. + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub auto_approval: Option, /// Prompt kind discriminator pub kind: PermissionPromptRequestPathKind, /// File paths that require explicit approval @@ -3024,6 +3154,16 @@ pub struct PermissionPromptRequestPath { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionPromptRequestHook { + /// Auto-approval judge information for this request; present only when auto mode is enabled. + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub auto_approval: Option, /// Optional message from the hook explaining why confirmation is needed #[serde(skip_serializing_if = "Option::is_none")] pub hook_message: Option, @@ -3043,6 +3183,16 @@ pub struct PermissionPromptRequestHook { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionPromptRequestExtensionManagement { + /// Auto-approval judge information for this request; present only when auto mode is enabled. + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub auto_approval: Option, /// Name of the extension being managed #[serde(skip_serializing_if = "Option::is_none")] pub extension_name: Option, @@ -3059,6 +3209,16 @@ pub struct PermissionPromptRequestExtensionManagement { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionPromptRequestExtensionPermissionAccess { + /// Auto-approval judge information for this request; present only when auto mode is enabled. + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(skip_serializing_if = "Option::is_none")] + pub auto_approval: Option, /// Capabilities the extension is requesting pub capabilities: Vec, /// Name of the extension requesting permission access @@ -3086,7 +3246,7 @@ pub struct PermissionRequestedData { pub resolved_by_hook: Option, } -/// Schema for the `PermissionApproved` type. +/// Permission response variant indicating the request was approved without persisting an approval rule. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionApproved { @@ -3094,7 +3254,7 @@ pub struct PermissionApproved { pub kind: PermissionApprovedKind, } -/// Schema for the `UserToolSessionApprovalCommands` type. +/// Session-scoped tool-approval rule for specific shell command identifiers. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UserToolSessionApprovalCommands { @@ -3104,7 +3264,7 @@ pub struct UserToolSessionApprovalCommands { pub kind: UserToolSessionApprovalCommandsKind, } -/// Schema for the `UserToolSessionApprovalRead` type. +/// Session-scoped tool-approval rule for read-only filesystem operations. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UserToolSessionApprovalRead { @@ -3112,7 +3272,7 @@ pub struct UserToolSessionApprovalRead { pub kind: UserToolSessionApprovalReadKind, } -/// Schema for the `UserToolSessionApprovalWrite` type. +/// Session-scoped tool-approval rule for filesystem write operations. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UserToolSessionApprovalWrite { @@ -3120,7 +3280,7 @@ pub struct UserToolSessionApprovalWrite { pub kind: UserToolSessionApprovalWriteKind, } -/// Schema for the `UserToolSessionApprovalMcp` type. +/// Session-scoped tool-approval rule for an MCP server tool, or all tools on the server when `toolName` is null. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UserToolSessionApprovalMcp { @@ -3132,7 +3292,7 @@ pub struct UserToolSessionApprovalMcp { pub tool_name: Option, } -/// Schema for the `UserToolSessionApprovalMemory` type. +/// Session-scoped tool-approval rule for writes to long-term memory. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UserToolSessionApprovalMemory { @@ -3140,7 +3300,7 @@ pub struct UserToolSessionApprovalMemory { pub kind: UserToolSessionApprovalMemoryKind, } -/// Schema for the `UserToolSessionApprovalCustomTool` type. +/// Session-scoped tool-approval rule for a custom tool, keyed by tool name. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UserToolSessionApprovalCustomTool { @@ -3150,7 +3310,7 @@ pub struct UserToolSessionApprovalCustomTool { pub tool_name: String, } -/// Schema for the `UserToolSessionApprovalExtensionManagement` type. +/// Session-scoped tool-approval rule for extension-management operations, optionally narrowed by operation. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UserToolSessionApprovalExtensionManagement { @@ -3161,7 +3321,7 @@ pub struct UserToolSessionApprovalExtensionManagement { pub operation: Option, } -/// Schema for the `UserToolSessionApprovalExtensionPermissionAccess` type. +/// Session-scoped tool-approval rule for an extension's permission-gated capability access, keyed by extension name. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UserToolSessionApprovalExtensionPermissionAccess { @@ -3171,7 +3331,7 @@ pub struct UserToolSessionApprovalExtensionPermissionAccess { pub kind: UserToolSessionApprovalExtensionPermissionAccessKind, } -/// Schema for the `PermissionApprovedForSession` type. +/// Permission response variant that approves a request and remembers the provided approval for the rest of the session. #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionApprovedForSession { @@ -3181,7 +3341,7 @@ pub struct PermissionApprovedForSession { pub kind: PermissionApprovedForSessionKind, } -/// Schema for the `PermissionApprovedForLocation` type. +/// Permission response variant that approves a request and persists the provided approval to a project location key. #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionApprovedForLocation { @@ -3193,7 +3353,7 @@ pub struct PermissionApprovedForLocation { pub location_key: String, } -/// Schema for the `PermissionCancelled` type. +/// Permission response variant indicating the request was cancelled before use, with an optional reason. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionCancelled { @@ -3204,7 +3364,7 @@ pub struct PermissionCancelled { pub reason: Option, } -/// Schema for the `PermissionRule` type. +/// A permission approval or denial rule matched against a tool request, identified by a rule kind with an optional argument value. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionRule { @@ -3214,7 +3374,7 @@ pub struct PermissionRule { pub kind: String, } -/// Schema for the `PermissionDeniedByRules` type. +/// Permission response variant denied because matching approval rules explicitly blocked the request. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDeniedByRules { @@ -3224,7 +3384,7 @@ pub struct PermissionDeniedByRules { pub rules: Vec, } -/// Schema for the `PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type. +/// Permission response variant denied because no approval rule matched and user confirmation was unavailable. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser { @@ -3232,7 +3392,7 @@ pub struct PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser { pub kind: PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUserKind, } -/// Schema for the `PermissionDeniedInteractivelyByUser` type. +/// Permission response variant denied in an interactive user prompt, with optional feedback and force-reject flag. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDeniedInteractivelyByUser { @@ -3246,7 +3406,7 @@ pub struct PermissionDeniedInteractivelyByUser { pub kind: PermissionDeniedInteractivelyByUserKind, } -/// Schema for the `PermissionDeniedByContentExclusionPolicy` type. +/// Permission response variant denying a path under content exclusion policy, with the path and message. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDeniedByContentExclusionPolicy { @@ -3258,7 +3418,7 @@ pub struct PermissionDeniedByContentExclusionPolicy { pub path: String, } -/// Schema for the `PermissionDeniedByPermissionRequestHook` type. +/// Permission response variant denied by a permission-request hook, with optional message and interrupt flag. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDeniedByPermissionRequestHook { @@ -3623,7 +3783,7 @@ pub struct SessionLimitsExhaustedCompletedData { pub response: SessionLimitsExhaustedResponse, } -/// Schema for the `CommandsChangedCommand` type. +/// A single slash command available in the session, as listed by the `commands.changed` event. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CommandsChangedCommand { @@ -3702,7 +3862,7 @@ pub struct ExitPlanModeCompletedData { pub selected_action: Option, } -/// Session event "session.tools_updated". +/// Session event "session.tools_updated". Payload of `session.tools_updated` identifying the model whose resolved tools were updated. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionToolsUpdatedData { @@ -3710,12 +3870,12 @@ pub struct SessionToolsUpdatedData { pub model: String, } -/// Session event "session.background_tasks_changed". +/// Session event "session.background_tasks_changed". Empty payload for `session.background_tasks_changed`, indicating background task state changed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionBackgroundTasksChangedData {} -/// Schema for the `SkillsLoadedSkill` type. +/// A single resolved skill in `session.skills_loaded`, including source, invocability, enabled state, path, and argument hint. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SkillsLoadedSkill { @@ -3737,7 +3897,7 @@ pub struct SkillsLoadedSkill { pub user_invocable: bool, } -/// Session event "session.skills_loaded". +/// Session event "session.skills_loaded". Payload of `session.skills_loaded` listing resolved skill metadata. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionSkillsLoadedData { @@ -3745,7 +3905,7 @@ pub struct SessionSkillsLoadedData { pub skills: Vec, } -/// Schema for the `CustomAgentsUpdatedAgent` type. +/// A single loaded custom agent in `session.custom_agents_updated`, with identity, source, tools, invocability, and model override. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CustomAgentsUpdatedAgent { @@ -3768,7 +3928,7 @@ pub struct CustomAgentsUpdatedAgent { pub user_invocable: bool, } -/// Session event "session.custom_agents_updated". +/// Session event "session.custom_agents_updated". Payload of `session.custom_agents_updated` with loaded custom agents plus non-fatal warnings and fatal errors. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionCustomAgentsUpdatedData { @@ -3780,7 +3940,7 @@ pub struct SessionCustomAgentsUpdatedData { pub warnings: Vec, } -/// Schema for the `McpServersLoadedServer` type. +/// A single MCP server status summary in `session.mcp_servers_loaded`, including name, status, source, transport, and plugin metadata. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpServersLoadedServer { @@ -3805,7 +3965,7 @@ pub struct McpServersLoadedServer { pub transport: Option, } -/// Session event "session.mcp_servers_loaded". +/// Session event "session.mcp_servers_loaded". Payload of `session.mcp_servers_loaded` listing MCP server status summaries. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionMcpServersLoadedData { @@ -3813,7 +3973,7 @@ pub struct SessionMcpServersLoadedData { pub servers: Vec, } -/// Session event "session.mcp_server_status_changed". +/// Session event "session.mcp_server_status_changed". Payload of `session.mcp_server_status_changed` for one MCP server's status and optional failure error. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionMcpServerStatusChangedData { @@ -3826,7 +3986,7 @@ pub struct SessionMcpServerStatusChangedData { pub status: McpServerStatus, } -/// Schema for the `ExtensionsLoadedExtension` type. +/// A single extension discovered by `session.extensions_loaded`, including qualified ID, source, and current status. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ExtensionsLoadedExtension { @@ -3840,7 +4000,7 @@ pub struct ExtensionsLoadedExtension { pub status: ExtensionsLoadedExtensionStatus, } -/// Session event "session.extensions_loaded". +/// Session event "session.extensions_loaded". Payload of `session.extensions_loaded` listing discovered extensions and their statuses. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionExtensionsLoadedData { @@ -3848,7 +4008,7 @@ pub struct SessionExtensionsLoadedData { pub extensions: Vec, } -/// Session event "session.canvas.opened". +/// Session event "session.canvas.opened". Payload of `session.canvas.opened` with canvas instance and provider IDs plus optional title, status, URL, and input. /// ///
/// @@ -3882,7 +4042,7 @@ pub struct SessionCanvasOpenedData { pub url: Option, } -/// Schema for the `CanvasRegistryChangedCanvasAction` type. +/// A single action within a canvas declaration, with its name, optional description, and optional input schema. /// ///
/// @@ -3903,7 +4063,7 @@ pub struct CanvasRegistryChangedCanvasAction { pub name: String, } -/// Schema for the `CanvasRegistryChangedCanvas` type. +/// A single canvas declaration in `session.canvas.registry_changed`, including provider IDs, display metadata, input schema, and actions. /// ///
/// @@ -3933,7 +4093,7 @@ pub struct CanvasRegistryChangedCanvas { pub input_schema: Option, } -/// Session event "session.canvas.registry_changed". +/// Session event "session.canvas.registry_changed". Payload of `session.canvas.registry_changed` listing the canvas declarations currently available. /// ///
/// @@ -3948,7 +4108,7 @@ pub struct SessionCanvasRegistryChangedData { pub canvases: Vec, } -/// Session event "session.canvas.closed". +/// Session event "session.canvas.closed". Payload of `session.canvas.closed` with the closed canvas instance ID, provider ID, and canvas ID. /// ///
/// @@ -4030,7 +4190,7 @@ pub struct SessionCanvasRemovedData { pub instance_id: String, } -/// Session event "session.extensions.attachments_pushed". +/// Session event "session.extensions.attachments_pushed". Payload of `session.extensions.attachments_pushed` with extension-contributed attachments for the next send. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionExtensionsAttachmentsPushedData { @@ -4046,7 +4206,7 @@ pub struct McpAppToolCallCompleteError { pub message: String, } -/// Schema for the `McpAppToolCallCompleteToolMetaUI` type. +/// MCP App tool `_meta.ui` resource URI and SEP-1865 visibility captured with an `mcp_app.tool_call_complete` result. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpAppToolCallCompleteToolMetaUI { @@ -4062,7 +4222,7 @@ pub struct McpAppToolCallCompleteToolMetaUI { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct McpAppToolCallCompleteToolMeta { - /// Schema for the `McpAppToolCallCompleteToolMetaUI` type. + /// MCP App tool `_meta.ui` resource URI and SEP-1865 visibility captured with an `mcp_app.tool_call_complete` result. #[serde(skip_serializing_if = "Option::is_none")] pub ui: Option, } @@ -4198,6 +4358,31 @@ pub enum SessionMode { Unknown, } +/// Allow-all mode for the session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionAllowAllMode { + /// Permission requests follow the normal approval flow. + #[serde(rename = "off")] + Off, + /// Tool, path, and URL permission requests are automatically approved. + #[serde(rename = "on")] + On, + /// Permission requests follow the normal approval flow with an LLM advisory recommendation attached; clients may choose to auto-approve requests the judge evaluated as acceptable. + #[serde(rename = "auto")] + Auto, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// The type of operation performed on the plan file #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PlanChangedOperation { @@ -4708,6 +4893,34 @@ pub enum PermissionRequest { ExtensionPermissionAccess(PermissionRequestExtensionPermissionAccess), } +/// Outcome of the auto-approval safety judge for a permission request. Present only when auto mode is enabled; its absence means the judge did not evaluate the request (auto mode was off). +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum AutoApprovalRecommendation { + /// The judge evaluated the request and recommends automatically approving it. + #[serde(rename = "approve")] + Approve, + /// The judge evaluated the request and does not recommend auto-approving it; explicit approval is required. Whether that means prompting, denying, or something else is the consumer's decision. + #[serde(rename = "requireApproval")] + RequireApproval, + /// Auto mode is enabled, but this request category is never auto-approvable (for example, sandbox-bypass requests), so the judge was not consulted. + #[serde(rename = "excluded")] + Excluded, + /// The judge was consulted but did not return a usable recommendation, so the request requires explicit approval. + #[serde(rename = "error")] + Error, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Prompt kind discriminator #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionPromptRequestCommandsKind { diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json index e58565f80..400471d53 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.69-0", + "@github/copilot": "^1.0.69-1", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14", @@ -501,9 +501,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.69-0.tgz", - "integrity": "sha512-Y/ZJBo1dtsP7k2LxDQxQT5pj2ZaN7+dCD4vx5jhX3i2T+YFlOx7ZhfUx8Hpe94wQPDlCs+232TXRHl2Wb5p62w==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.69-1.tgz", + "integrity": "sha512-3kWG41prhG/+bMdgW6QvPZXSji2oVGSxQICrUStnW954vvwg0Snabz5g2P3/1EM7BJqoecYSSNIo+vzznxpuTQ==", "dev": true, "license": "SEE LICENSE IN LICENSE.md", "dependencies": { @@ -513,20 +513,20 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.69-0", - "@github/copilot-darwin-x64": "1.0.69-0", - "@github/copilot-linux-arm64": "1.0.69-0", - "@github/copilot-linux-x64": "1.0.69-0", - "@github/copilot-linuxmusl-arm64": "1.0.69-0", - "@github/copilot-linuxmusl-x64": "1.0.69-0", - "@github/copilot-win32-arm64": "1.0.69-0", - "@github/copilot-win32-x64": "1.0.69-0" + "@github/copilot-darwin-arm64": "1.0.69-1", + "@github/copilot-darwin-x64": "1.0.69-1", + "@github/copilot-linux-arm64": "1.0.69-1", + "@github/copilot-linux-x64": "1.0.69-1", + "@github/copilot-linuxmusl-arm64": "1.0.69-1", + "@github/copilot-linuxmusl-x64": "1.0.69-1", + "@github/copilot-win32-arm64": "1.0.69-1", + "@github/copilot-win32-x64": "1.0.69-1" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.69-0.tgz", - "integrity": "sha512-RyX31WkNGpXycW5FCAgJ7+MXTmfwSkiohHf7jWShKQPP6m/MEM0CrBuS4XPeWK0gjtWM4MdAwmVe7qXtbzZu1w==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.69-1.tgz", + "integrity": "sha512-rCgRgY+5AUK4SEcVxNIHTV4Apl8NwtWwlDMiVIV8UtE+re2oq7ojq3CGSo4wzagHWUQSjEAEpwVBL6+NFnSVYw==", "cpu": [ "arm64" ], @@ -541,9 +541,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.69-0.tgz", - "integrity": "sha512-NaA44Uq6d1ijcF2eT8/Ql0eacyvjGFGYN8hVFLkD6CsjPmSbupMd39NFt2RWnZDjhg3S68J77OSXH4aj3vcaiA==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.69-1.tgz", + "integrity": "sha512-GnrRZziYWQrHJYpvbeZQoBWawbfOdVr43KgTqGru1ybVXh9BCtoYG/wcnIyla5ezlgNOtDphDg64cQHNhypgDQ==", "cpu": [ "x64" ], @@ -558,9 +558,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.69-0.tgz", - "integrity": "sha512-dSFha3BrnGeMKLzqWE8c63tRdKgw3mjV9Apx4/i7L9BMJ0o13oycVVe+D+bEVniWH12gVriIxE1+TQUAAVWLIQ==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.69-1.tgz", + "integrity": "sha512-2Hls3xLhN4Gk1nEHzwEZ+0XySVAZeQa5Gz2KRXUbs+JJ0e0TikT7kKsGtK+1fhEgAFdZ721XvtvxB+LA32y/rQ==", "cpu": [ "arm64" ], @@ -575,9 +575,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.69-0.tgz", - "integrity": "sha512-2zH3yh7//D7rOriDt4eAc4+tYay+oQj9CcENP0Cb8aNEn27hyZmuKiLoA+xyGSrbhVqA4rzYLC3Hx9RI96xxSQ==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.69-1.tgz", + "integrity": "sha512-MqBrjkhoynBYbrEqZjStKNXXIMEu+kSF2aUtGbotyz24vauAeg4lOf4E6uM41B53l1qoMoj34dQ+gPT+Tlvf6A==", "cpu": [ "x64" ], @@ -592,9 +592,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.69-0.tgz", - "integrity": "sha512-vVezUNBfxp4ej9rTQy3zy8UT23imxFWqzkVu0yFrt6lqr9a7RSmPHhhKkPYkyxCWuzhSxGWLm3Ad6TDTYVVGog==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.69-1.tgz", + "integrity": "sha512-KfG+4vW53Aou5s6dYfAlrVIikIGvv8i3UQA+wGRJX0PvhB2Z2xje3+fcGhAGywghhCL/UjZT8rwaeyJWGvdrBg==", "cpu": [ "arm64" ], @@ -609,9 +609,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.69-0.tgz", - "integrity": "sha512-Wlb421yC7iuw6ICMxuNPPL+ItG0f9+vv3wdHUeWhyCMte7+7tqxvhyfxSCzj46V5CXoGo32vUc0oOxmXMfSbyQ==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.69-1.tgz", + "integrity": "sha512-EgW/avqTW1vZp/7LfWotbUce9kkcpKELxn+PiVLGOcEFP/5/3nGt0mkXYpRJQJLwNcHTFFYLBfgLZSMJ3g1hTg==", "cpu": [ "x64" ], @@ -626,9 +626,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.69-0.tgz", - "integrity": "sha512-H0p9kiCO8Rt6tMuZUPzszoxYaipIIvOBbUtqljV56UX+XwBaSnxME/ZjRCNn480jdrA2QbLjaobZWH2w3C4scg==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.69-1.tgz", + "integrity": "sha512-ySorVqbMWdSK21WvEUgSit4jTQcC+MnQeFF0ACWvtKj2q73dzXR6yh8AGJTXG2AzvEgVC2yY0TNAB28nk4zA+Q==", "cpu": [ "arm64" ], @@ -643,9 +643,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.69-0", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.69-0.tgz", - "integrity": "sha512-3W/e8Lhw1eStFJogIP4pf9bxg9izcI/c0KErHLFK+56HqfnzK5ZDQqb+oeqRw3+aq24MvzyLzHA421jPHLIoOQ==", + "version": "1.0.69-1", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.69-1.tgz", + "integrity": "sha512-S7Oj7o27olpS70s7BaipcDsMif2/YoHj7KyQI/2aoXJG2xZb25wds65f/gTtsgOQOnnpCefywt/bHpX8Bw8wDQ==", "cpu": [ "x64" ], diff --git a/test/harness/package.json b/test/harness/package.json index 15e41c4ef..5dbeac283 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.69-0", + "@github/copilot": "^1.0.69-1", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14",